diff --git a/.gitattributes b/.gitattributes index cb63127d..1cff6e96 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,12 +1,395 @@ -*.a filter=lfs diff=lfs merge=lfs -text -*.lib filter=lfs diff=lfs merge=lfs -text -*.dll filter=lfs diff=lfs merge=lfs -text -*.pdb filter=lfs diff=lfs merge=lfs -text -*.png filter=lfs diff=lfs merge=lfs -text -*.jpg filter=lfs diff=lfs merge=lfs -text -*.uberz filter=lfs diff=lfs merge=lfs -text -*.bin filter=lfs diff=lfs merge=lfs -text -*.ktx filter=lfs diff=lfs merge=lfs -text -*.blend filter=lfs diff=lfs merge=lfs -text -*.gltf filter=lfs diff=lfs merge=lfs -text -*.glb filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libbackendtest_combined.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libfilabridge.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libgltfio_core.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libibl-lite.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libcamutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libgeometry_combined.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libbackend.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libuberarchive.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libbasis_transcoder.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libgeometry.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libmikktspace.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libzstd.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libcivetweb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libsdl2.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libmeshoptimizer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libmathio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libbasis_transcoder.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libfilament-iblprefilter.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libmatdbg_combined.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libspirv-cross-msl.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libtinyexr.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libzstd.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libSPIRV-Tools.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libgeometry.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libimageio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libOGLCompiler.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libSPIRV-Tools-diff.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libfilamat_combined.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libfilameshio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libmathio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libassimp.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libmatlang.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libibl.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libmikktspace.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libmatdbg_combined.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/swift/ThermionDartTexture.h filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libfilamat_combined.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libfilament.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libibl.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libstb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libuberzlib.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libbasis_encoder.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libimgui.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libdracodec.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libimageio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libfilament.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libstb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libbackend_test.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libgetopt.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libgtest.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libfilabridge.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libmatdbg_resources.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libuberarchive.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libfilaflat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libSPIRV.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libpng.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libvkshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libimage.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libmatdbg_resources.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libsuzanne-resources.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libfilamat_lite.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libgeometry_combined.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libsmol-v.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libmath.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libgeometry.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libmeshoptimizer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libpng16.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libbenchmark_main.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libbluegl.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libuberzlib.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/swift/build.sh filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libdracodec.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libibl.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libktxreader.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libbluegl.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libfilaflat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libpng.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libbluevk.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libfilaflat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libfilamat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libglslang.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libcivetweb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libktxreader.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libbenchmark.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libgltf-demo-resources.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libgltfio_core.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libSPIRV-Tools-lint.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libdracodec.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libfilagui.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libmikktspace.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libsample-resources.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libOSDependent.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libspirv-cross-glsl.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libgltfio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libimage.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libpng.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libgltfio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libmatdbg.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libspirv-cross-core.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libstb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libfilamat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libfilamat_lite.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libfilamat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libviewer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libvkshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libcamutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libbackend.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libfilagui.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libmath.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libviewer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/swift/libdartfilamenttexture.dylib filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libfilament-iblprefilter.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libuberzlib.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libviewer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libfilamat_lite.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libfilameshio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libcivetweb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libbasis_transcoder.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libSPIRV-Tools-link.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libvkshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libz.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libbluevk.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libtinyexr.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libzstd.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libcamutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libfilabridge.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libmatdbg.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libimage.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libsmol-v.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libgltfio_core.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libsmol-v.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libfilament-iblprefilter.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libfilament.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libmeshoptimizer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libbackend.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libibl-lite.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/libktxreader.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libfilameshio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/swift filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libtinyexr.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libSPIRV-Tools-reduce.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/debug/libuberarchive.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libibl-lite.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/ios/libimageio.a filter=lfs diff=lfs merge=lfs -text +materials/Makefile filter=lfs diff=lfs merge=lfs -text +materials/gizmo.filamat filter=lfs diff=lfs merge=lfs -text +materials/gizmo.mat filter=lfs diff=lfs merge=lfs -text +materials/image.filamat filter=lfs diff=lfs merge=lfs -text +materials/image.mat filter=lfs diff=lfs merge=lfs -text +materials/unlit_fade.mat filter=lfs diff=lfs merge=lfs -text +materials/unlit_opaque.mat filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libktxreader.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libcamutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libuberzlib.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libdracodec.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libbackend.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libibl.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libmikktspace.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libzstd.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libzstd.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libfilament.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libmeshoptimizer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libvkshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libbluevk.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libgeometry.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libgltfio_core.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libstb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libgltfio_core.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libimage.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libvkshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64 filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libfilameshio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libcivetweb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libfilabridge.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libuberzlib.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libfilamat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libuberarchive.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libbackend.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libimage.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libsmol-v.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libbasis_transcoder.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libdracodec.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libfilament.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libfilament-iblprefilter.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libfilamat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libibl.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libvkshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libfilaflat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libibl-lite.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libmeshoptimizer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libsmol-v.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libfilaflat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libfilaflat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libzstd.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libbackend.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libdracodec.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libcamutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libfilament.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libuberzlib.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libbluevk.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libcamutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libsmol-v.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libcivetweb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libktxreader.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libbasis_transcoder.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libgltfio_core.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libfilaflat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libuberarchive.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libfilameshio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libbluevk.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libfilabridge.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libgltfio_core.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libibl.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libmikktspace.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libzstd.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libfilameshio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libfilament-iblprefilter.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libstb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libfilament-iblprefilter.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libimage.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libfilament.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libgeometry.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libdracodec.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libbasis_transcoder.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libgeometry.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libuberarchive.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libbluevk.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libfilabridge.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libuberzlib.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libimage.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libviewer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libibl-lite.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86 filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libibl-lite.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libuberarchive.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libktxreader.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libfilament-iblprefilter.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libfilameshio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libstb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/arm64-v8a/libgeometry.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libviewer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libktxreader.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libmeshoptimizer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libibl.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libmeshoptimizer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libfilamat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libibl-lite.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libvkshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libcamutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libcivetweb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libsmol-v.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libfilabridge.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libmikktspace.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libmikktspace.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libbackend.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libfilamat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libviewer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/armeabi-v7a/libviewer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libcivetweb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86_64/libshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libbasis_transcoder.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/android/x86/libstb.a filter=lfs diff=lfs merge=lfs -text +thermion_flutter_federated/thermion_flutter/example/web/thermion_dart.wasm filter=lfs diff=lfs merge=lfs -text +thermion_flutter_federated/thermion_flutter/example/web/main.unopt.wasm filter=lfs diff=lfs merge=lfs -text +thermion_flutter_federated/thermion_flutter/example/web/main.wasm filter=lfs diff=lfs merge=lfs -text +thermion_flutter_federated/thermion_flutter/example/web/thermion_dart.js filter=lfs diff=lfs merge=lfs -text +thermion_flutter_federated/thermion_flutter/example/web/thermion_dart.worker.js filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libmatdbg_resources.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libuberarchive.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libbasis_transcoder.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libcivetweb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libgltfio_core.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libimage.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libviewer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libvkshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libfilagui.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libfilamat_combined.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libshaders.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libtinyexr.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libmeshoptimizer.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libcamutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libfilamat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libibl.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libmikktspace.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libuberzlib.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libutils.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libzstd.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libfilaflat.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libfilamat_lite.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libgltfio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libimageio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libgeometry_combined.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libbluevk.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libdracodec.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libfilabridge.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libfilameshio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libktxreader.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libmatdbg.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libmathio.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libsmol-v.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libbackend.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libbluegl.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libfilament.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libgeometry.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libstb.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libpng.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libfilament-iblprefilter.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libibl-lite.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libmatdbg_combined.a filter=lfs diff=lfs merge=lfs -text +thermion_dart/native/lib/macos/release/libmath.a filter=lfs diff=lfs merge=lfs -text +examples/assets/default_env/default_env_skybox.ktx filter=lfs diff=lfs merge=lfs -text +examples/assets/shapes/shapes.gltf filter=lfs diff=lfs merge=lfs -text +examples/assets/3.glb filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone/textures/Boden_baseColor.jpg filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet.bin filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet.gltf filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic1.png filter=lfs diff=lfs merge=lfs -text +examples/assets/default_env filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone/textures/Boden_metallicRoughness.jpg filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_baseColor3.png filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic4.png filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/README.md filter=lfs diff=lfs merge=lfs -text +examples/assets/default_env/default_env_ibl.ktx filter=lfs diff=lfs merge=lfs -text +examples/assets/shapes/shapes.blend filter=lfs diff=lfs merge=lfs -text +examples/assets/shapes/shapes.glb filter=lfs diff=lfs merge=lfs -text +examples/assets/2.glb filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_normal.png filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_normal1.png filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic3.png filter=lfs diff=lfs merge=lfs -text +examples/assets/background.ktx filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone/scene.bin filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_baseColor4.png filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_normal4.png filter=lfs diff=lfs merge=lfs -text +examples/assets/shapes/shapes.blend1 filter=lfs diff=lfs merge=lfs -text +examples/assets/solidcolor.mat filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone/textures/body_baseColor.jpg filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone/textures/body_emissive.jpg filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic.png filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic2.png filter=lfs diff=lfs merge=lfs -text +examples/assets/solidcolor.filamat filter=lfs diff=lfs merge=lfs -text +examples/assets/1.glb filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone/scene.gltf filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_normal2.png filter=lfs diff=lfs merge=lfs -text +examples/assets/shapes/texture_test.png filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_normal3.png filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone/textures filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone/textures/Boden_normal.jpg filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone/textures/body_normal.jpg filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone/textures/material_metallicRoughness.jpg filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_baseColor.png filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_baseColor2.png filter=lfs diff=lfs merge=lfs -text +examples/assets/shapes filter=lfs diff=lfs merge=lfs -text +examples/assets/shapes/shapes.bin filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone/textures/body_metallicRoughness.jpg filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone/textures/material_baseColor.jpg filter=lfs diff=lfs merge=lfs -text +examples/assets/BusterDrone/textures/material_normal.jpg filter=lfs diff=lfs merge=lfs -text +examples/assets/FlightHelmet/FlightHelmet_baseColor1.png filter=lfs diff=lfs merge=lfs -text +examples/assets/background.png filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/assets/shapes/shapes.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/app/intermediates/assets/debug/flutter_assets/assets/2.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/app/intermediates/assets/debug/flutter_assets/assets/3.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/macos/Build/Products/Debug/example.app/Contents/Frameworks/App.framework/Versions/A/Resources/flutter_assets/assets/shapes/shapes.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/app/intermediates/assets/debug/flutter_assets/assets/1.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/app/intermediates/flutter/debug/flutter_assets/assets/shapes/shapes.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/macos/Build/Products/Debug/example.app/Contents/Frameworks/App.framework/Versions/A/Resources/flutter_assets/assets/1.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/macos/Build/Products/Debug/example.app/Contents/Frameworks/App.framework/Versions/A/Resources/flutter_assets/assets/3.glb filter=lfs diff=lfs merge=lfs -text +thermion_dart/test/assets/shapes.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/app/intermediates/flutter/debug/flutter_assets/assets/1.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/assets/1.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/app/intermediates/flutter/debug/flutter_assets/assets/3.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/assets/2.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/assets/3.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/macos/Build/Products/Debug/example.app/Contents/Frameworks/App.framework/Versions/A/Resources/flutter_assets/assets/2.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/app/intermediates/assets/debug/flutter_assets/assets/shapes/shapes.glb filter=lfs diff=lfs merge=lfs -text +examples/flutter/example/build/app/intermediates/flutter/debug/flutter_assets/assets/2.glb filter=lfs diff=lfs merge=lfs -text diff --git a/.github/workflows/analyze_project.yaml b/.github/workflows/analyze_project.yaml deleted file mode 100644 index d75c31cb..00000000 --- a/.github/workflows/analyze_project.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: Dart Analyzer - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: '12.x' - - - name: Install Flutter - uses: subosito/flutter-action@v1 - with: - flutter-version: '2.x' - - - name: Get dependencies - run: flutter pub get - - - name: Analyze - run: flutter analyze \ No newline at end of file diff --git a/.github/workflows/calculate_pub_dev_score.yaml b/.github/workflows/calculate_pub_dev_score.yaml deleted file mode 100644 index 9988c8e9..00000000 --- a/.github/workflows/calculate_pub_dev_score.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: PubDev Score - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - package-analysis: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: axel-op/dart-package-analyzer@v3 - id: analysis - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - - # use this id to retrieve the outputs in the next steps - # exit dirty when the package doesn't reach 100% - - name: Check scores - env: - # "analysis" is the id set above - # PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX )) - TOTAL: ${{ steps.analysis.outputs.total }} - TOTAL_MAX: ${{ steps.analysis.outputs.total_max }} - JSON_OUT: ${{ steps.analysis.outputs.json_output }} - run: | - if (( $TOTAL != $TOTAL_MAX )) - then - echo There are missing points in the project! - echo $TOTAL from $TOTAL_MAX Points reached - echo $JSON_OUT | jq - exit 1 - fi \ No newline at end of file diff --git a/.gitignore b/.gitignore index 9dcd4503..12aef55c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,9 @@ +**/*/.cxx +**/.github +**/.idea +.dart_tool +**/.dart_tool .vscode -macos/src -macos/include -.DS_Store \ No newline at end of file +.DS_Store +**/*/build +**/*/pubspec.lock diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml deleted file mode 100644 index 9947e786..00000000 --- a/.idea/libraries/Dart_SDK.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index f0496777..00000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/.idea/runConfigurations/example_lib_main_dart.xml b/.idea/runConfigurations/example_lib_main_dart.xml deleted file mode 100644 index 5fd9159d..00000000 --- a/.idea/runConfigurations/example_lib_main_dart.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 67826e51..00000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 91f155bc..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,9 +0,0 @@ -## 0.6.0 - -* `createViewer` is no longer called by `FilamentWidget` and must be called manually at least one frame after a FilamentWidget has been inserted into the widget hierarchy. - - -## 0.5.0 - -* Replaced `isReadyForScene` Future in `FilamentController` with the `Stream` `hasViewer`. -* Rendering is set to false when the app is hidden, inactive or paused; on resume, this will be set to the value it held prior to being hidden/inactive/paused. diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md new file mode 100644 index 00000000..484c8e74 --- /dev/null +++ b/GETTING_STARTED.md @@ -0,0 +1,38 @@ +# Thermion +Thermion is a package for creating 3D applications with Dart and/or Flutter. + +## Overview + +### Packages  +The two most relevant Thermion packages are:- [thermion_dart], which contains all the code needed to create a viewer, - [thermion_flutter], which is a Flutter-only package that contains all the logic necessary to create/embed a rendering surface inside a Flutter app.  +By decoupling the Flutter-specific components from the Dart-only components, Thermion can be used for rendering in both Flutter and non-Flutter applications. As far as the latter is concerned, Thermion ships with examples for  Javascript/WASM/HTML, and for CLI/headless mode on MacOS.  + +### pubspec.yaml +If you are creating a Flutter application, add [thermion_flutter] as a dependency to your `pubspec.yaml`. +```$ cd /path/to/your/flutter/project$ flutter pub add thermion_flutter``` + +### ThermionFlutterPlugin +Create an instance of `ThermionFlutterPlugin` in your app. +```dart +class _MyAppState extends State { +  late ThermionFlutterPlugin _thermionFlutterPlugin;  late Future _thermionViewer; +  void initState() {    _thermionFlutterPlugin = ThermionFlutterPlugin();    _thermionViewer = _thermionFlutterPlugin.createViewer();  }}``` +`ThermionFlutterPlugin` is a singleton, and mostly just handles creating a 3D rendering surface that can be embedded in a Flutter widget hierarchy.  [ThermionViewer] is the interface for actually interacting with the scene (loading assets, manipulating the camera, and so on). Call `createViewer` on `ThermionFlutterPlugin` to obtain a reference to `ThermionViewer` (which is also a singleton). +Note: `ThermionFlutterPlugin` and `ThermionViewer` were designed as separate classes so we can use `ThermionViewer` in non-Flutter apps. +### ThermionWidget +On most platforms[0], [ThermionWidget] is the widget where your rendered content (i.e. your viewport) will appear. This can be any size; the 3D viewport will be scaled to fit the dimensions on this widget. On most platforms, a [ThermionWidget] can be positioned above or below any other widget in the hierarchy and the Z-order will be preserved. +```class _MyAppState extends State { +  late ThermionFlutterPlugin _thermionFlutterPlugin;  late Future _thermionViewer; +  void initState() {    _thermionFlutterPlugin = ThermionFlutterPlugin();    _thermionViewer = _thermionFlutterPlugin.createViewer();  }    Widget build(BuildContext context) {       return Stack(children:[      Positioned.fill(        child:ThermionWidget(          plugin:_thermionFlutterPlugin        )      )    ]);  }}``` + +[0] Currently, the rendering surface on Windows and Web will always appear at the bottom of the application. You still need a ThermionWidget, but this only keeps track of the dimensions of your viewport and punches a transparent hole in the hierarchy; the actual rendering surface is attached beneath the Flutter window. +`ThermionWidget` will not display the rendering surface (even an empty one) until the call to `createViewer` has been completed. +- by default a Container will be rendered with solid red. If you want to change this, pass a widget as the initial paramer to the ThermionWidget constructor.on the second frame, ThermionWidget will pass its dimensions/pixel ratio to the FilamentController + + You can then call createViewer to create:the rendering surface (on most platforms, a backing texture that will be registered with Flutter for use in a Texture widget)a rendering threada ThermionViewerFFI and an AssetManager, which will allow you to load assets/cameras/lighting/etc via the FilamentControllerafter an indeterminate number of frames, FilamentController will notify ThermionWidget when a rendering surface is available the viewportThermionWidget will replace the default initial Widget with the viewport (which will initially be solid black or white, depending on your platform).IMPORTANT: there will be a delay between adding a ThermionWidget, calling createViewer and the actual rendering viewport becoming available. This is why we fill ThermionWidget with red - to make it abundantly clear that you need to handle this asynchronous delay appropriately. Once createViewer has completed, the viewport is available for rendering. +Currently, the initial widget will also be displayed whenever the viewport is resized (including changing orientation on mobile and drag-to-resize on desktop). You probably want to change this from the default red. +Congratulations! You now have a scene. It's completely empty, so you probably want to add something visible. + + + + diff --git a/LICENSE b/LICENSE deleted file mode 100644 index ba75c69f..00000000 --- a/LICENSE +++ /dev/null @@ -1 +0,0 @@ -TODO: Add your license here. diff --git a/Makefile b/Makefile index 6b6f095c..2534cd72 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,32 @@ -mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) -current_dir := $(dir $(mkfile_path)) -parent_dir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..) +dart-web: + cd thermion_dart/native/web; mkdir -p build && cd build && emcmake cmake .. && emmake make +dart-web-clean: + cd thermion_dart/native/web && rm -rf build +dart-wasm-cli-example: dart-web-clean dart-web + cd thermion_dart/examples/cli_wasm/bin && dart compile wasm example_cli.dart && node main.js +dart-web-example: dart-web + cp thermion_dart/native/web/build/build/out/thermion_dart* examples/web_wasm/bin + cd thermion_dart/examples/web_wasm/bin && dart compile wasm example_web.dart +flutter-example-web: dart-web-clean dart-web + cd thermion_flutter_federated/thermion_flutter/example/web && dart compile wasm main.dart && cd .. && flutter build web --wasm --profile +flutter-example-macos: + cd thermion_flutter_federated/thermion_flutter/example/web && flutter run -d macos +swift-bindings: + cd thermion_dart/ && dart --enable-experiment=native-assets run ffigen --config ffigen/swift.yaml +bindings: + cd thermion_dart/ && dart --enable-experiment=native-assets run ffigen --config ffigen/native.yaml -filament_build_out := $(parent_dir)/filament/out/cmake-release - -# building on MacOS, we currently just delete the macos/include -# and macos/src directories and copy from iOS - -sync-macos: FORCE - rm -rf ${current_dir}macos/include ${current_dir}macos/src - cp -R ${current_dir}ios/include ${current_dir}macos - cp -R ${current_dir}ios/src ${current_dir}macos +# We compile a small set of custom materials for various helpers (background image, gizmo, etc) +# You must specify the `FILAMENT_PATH` environment variable, either the path /out/release +# eg: FILAMENT_PATH=/path/to/filament/out/release/bin make materials +# +materials: FORCE + @echo "Using Filament build from ${FILAMENT_PATH}" + ${FILAMENT_PATH}/matc -a opengl -a metal -o materials/image.filamat materials/image.mat + $(FILAMENT_PATH)/resgen -c -p image -x ios/include/material/ materials/image.filamat + $(FILAMENT_PATH)/matc -a opengl -a metal -o materials/gizmo.filamat materials/gizmo.mat + $(FILAMENT_PATH)/resgen -c -p gizmo -x ios/include/material/ materials/gizmo.filamat + #rm materials/*.filamat FORCE: ; - -# We use a single material (no lighting and no transparency) for background images -# -# by default this assumes you have built filament in a sibling folder -# you may customize the out folder by speicifying `filament_build_out` -# -# eg: make generate-background-material filament_build_out=/filament/out/release -# -generate-background-material: - ${filament_build_out}/tools/matc/matc -a opengl -a metal -o materials/image.filamat materials/image.mat - ${filament_build_out}/tools/resgen/resgen -c -p image -x ios/include/material/ materials/image.filamat - rm materials/image.filamat + diff --git a/README.md b/README.md index 0580b9c1..cf13fe81 100644 --- a/README.md +++ b/README.md @@ -1,436 +1,37 @@ -# Flutter Filament +![Thermion Logo](docs/logo.png) -Cross-platform, 3D PBR rendering and animation for [Flutter](https://github.com/google/filament). +

+ Quickstart (Flutter) • + Documentation • + Showcase • + Discord +

-Wraps the [the Filament rendering library](https://github.com/google/filament). +## Cross-platform 3D engine for Dart and Flutter. -Powers the [Polyvox](https://polyvox.app) and [odd-io](https://github.com/odd-io/) engines. +pub +github +discord +contributors -This is still in beta: bugs/missing features are to be expected. +### Features +- Supports iOS (arm64), MacOS (arm64/x64), Android (arm64), Windows (x64) (>= 10), Web/WASM +- glTF, KTX, PNG & JPEG texture support +- camera/entity manipulation with mouse (desktop) and gestures (mobile) +- skinning + morph animations +### Sponsors, Contributors & Acknowledgments -https://github.com/nmfisher/flutter_filament/assets/7238578/42cd9641-e100-4a1d-8423-810d53559c71 - - - -|Feature|Supported| -|---|---| -|Platforms|✅ iOS (arm64)
✅ MacOS (arm64)
✅ Android (arm64)
✅ Windows (x64) (>= 10)
⚠️ Linux (x64 - broken)
⚠️ Web (planned)| -|Formats|✅ glb
⚠️ glTF (partial - see Known Issues)| -|Texture support|✅ PNG
✅ JPEG
✅ KTX
⚠️ KTX2 (planned)| -|Camera movement|✅ Desktop (mouse)
✅ Mobile (swipe/pinch)| -|Animation|✅ Embedded glTF skinning animations
✅ Embedded glTF morph animations
✅ Runtime/dynamic morph animations
⚠️ Runtime/dynamic skinning animations
-|Entity manipulation|✅ Viewport selection
⚠️ Entity/transform parenting (planned)
⚠️ Transform manipulation (mouse/gesture to rotate/translate/scale object) (partial)
⚠️ Runtime material changes (planned)| +Thermion uses the [Filament](https://github.com/google/filament) physically based rendering package under the hood. Special thanks to [odd-io](https://github.com/odd-io/) for sponsoring work on supporting Windows, raycasting, testing and documentation. -PRs are welcome but please create a placeholder PR to discuss before writing any code. This will help with feature planning, avoid clashes with existing work and keep the project structure consistent. +Thank you to the following people: -## Getting Started +- @Hannnes1 for help migrating to `native-assets` +- @jarrodcolburn for documentation contributions +- @daverin for MacOS library contributions +- @LukasPoque for CI/refactoring work +- @alexmercerind for his work on integrating ANGLE textures on Flutter Windows -This package requires Flutter >= `3.16.0`. - -```bash -flutter channel beta -flutter upgrade -``` -There are specific issues with earlier versions on Windows/MacOS (mobile should actually be fine, so if you want to experiment on your own you're free to remove the minimum version from `pubspec.yaml`). - -Next, clone this repository and pull the latest binaries from Git LFS: - -```bash -cd $HOME -git clone && cd flutter_filament -git lfs pull -``` - -(this step won't be needed after the plugin is published to pub.dev). - -> You *do not need to build Filament yourself*. The repository is bundled with all necessary headers/static libraries (`windows/lib`, `ios/lib`, `macos/lib` and `linux/lib`) and the Flutter plugin has been configured to link at build time. - -Run the example project to check: - -```bash -cd example && flutter run -d -``` - -To use the plugin in your own project, add the plugin to your pubspec.yaml: - -```yaml -name: your_project -description: Your project -#... -dependencies: - flutter: - sdk: flutter - flutter_filament: - path: -``` - -## Basic Usage - -See the `example` project for a complete sample that incorporates many of the below steps, and more. - -### Creating the viewport widget and controller - -Create an instance of `FilamentControllerFFI` somewhere in your app where it will not be garbage collected until you no longer need a rendering canvas: - -```dart -class MyApp extends StatelessWidget { - - final _filamentController = FilamentControllerFFI(); - //... -} - -``` - -This is a relatively lightweight object, however its constructor will load/bind symbols from the native library. This may momentarily block the UI, so you may wish to structure your app so that this is hidden behind a static widget until it is available. - -Next, create an instance of `FilamentWidget` in the widget hierarchy where you want the rendering canvas to appear. This can be sized as large or as small as you want. On most platforms, Flutter widgets can be positioned above or below the `FilamentWidget`. - -```dart -class MyApp extends StatelessWidget { - - final _filamentController = FilamentControllerFFI(); - - @override - Widget build(BuildContext context) { - return MaterialApp( - color: Colors.white, - home: Scaffold(backgroundColor: Colors.white, body: Stack(children:[ - Container(color:Colors.green, height:100, width:100), - Positioned.fill(top:100, left:100child:FilamentWidget(controller:_filamentController)), - Positioned(right:0, bottom:0, child:Container(color:Colors.purple, height:100, width:100)) - ]))); - } -} -``` - -When a `FilamentWidget` is added to the widget hierarchy: -1) by default a Container will be rendered with solid red. If you want to change this, pass a widget as the `initial` paramer to the `FilamentWidget` constructor. -2) on the second frame, `FilamentWidget` will pass its dimensions/pixel ratio to the `FilamentController` -3) You can then call `createViewer` to create: - * the rendering surface (on most platforms, a backing texture that will be registered with Flutter for use in a `Texture` widget) - * a rendering thread - * a `FilamentViewer` and an `AssetManager`, which will allow you to load assets/cameras/lighting/etc via the `FilamentController` -4) after an indeterminate number of frames, `FilamentController` will notify `FilamentWidget` when a rendering surface is available the viewport -5) `FilamentWidget` will replace the default `initial` Widget with the viewport (which will initially be solid black or white, depending on your platform). - -IMPORTANT: there *will* be a delay between adding a `FilamentWidget`, calling `createViewer` and the actual rendering viewport becoming available. This is why we fill `FilamentWidget` with red - to make it abundantly clear that you need to handle this asynchronous delay appropriately. Once `createViewer` has completed, the viewport is available for rendering. - -> Currently, the `initial` widget will also be displayed whenever the viewport is resized (including changing orientation on mobile and drag-to-resize on desktop). You probably want to change this from the default red. - -Congratulations! You now have a scene. It's completely empty, so you probably want to add something visible. - -### Load a background - -You probably want to set a background for your scene. You can load a skybox: -```dart -await _filamentController.loadSkybox("assets/default_env/default_env_skybox.ktx) -``` - -or a static background image: - -```dart -await _filamentController.setBackgroundImage("assets/background.ktx) -``` - -or a solid background color: - -```dart -await _filamentController.setBackgroundColor(0.0, 1.0, 0.0, 1.0); // solid green -``` - -At this point, you might not see any change in the viewport. This is because the FilamentController will only actually render into the viewport once `render` has been called. - -By default, the FilamentController will only render into the viewport by manually calling `render()` on the FilamentController. This is to avoid needlessly running a render loop when there is nothing to display. - -```dart -await _filamentController.render() -``` - -You should now see your background displayed in the scene. To automatically render at 60fps, call `setRendering`: -```dart -await _filamentController.setRendering(true); -``` - -### Load an asset - -To add a glTF asset to the scene, call `loadGlb()` on `FilamentController` with the Flutter asset path to your .glb file. - -For example, if your `pubspec.yaml` looks like this: -```yaml -flutter: - assets: - - assets/models/bob.glb -``` - -Then you would call the following -```dart -var entity = await _filamentController.loadGlb("assets/models/bob.glb"); -``` -You can also pass a URI to indicate that the glTF file should be loaded from the filesystem: -```dart -var entity = await _filamentController.loadGlb("file:///tmp/bob.glb"); -``` - -The return type `FilamentEntity` is simply an integer handle that be used to manipulate the entity in the scene. For example, to remove the asset: -```dart -await _filamentController.removeAsset(entity); -entity = null; -``` -> Removing an entity from the scene will invalidate the corresponding `FilamentEntity` handle, so ensure you don't retain any references to it after calling `removeAsset` or `clearAssets`. Removing one `FilamentEntity` does not invalidate/change any other `FilamentEntity` handles; you can continue to safely manipulate these via the `FilamentController`. - -### Lighting - -You should now see your object in the viewport, but since we haven't added a light, this will be solid black. - -Add an image-based light from a KTX file: - -```dart -await _filamentController.loadIbl("assets/default_env/default_env_ibl.ktx"); -``` - -You can also add dynamic lights: - -```dart -var sun = await _filamentController.addLight( -``` - -### Manipulating entity transforms - -To set the world space position of the asset: -```dart -_filamentController.setPositon(entity, 1.0, 1.0, 1.0); -``` - -On desktop, you can also click any renderable object in the viewport to retrieve its associated FilamentEntity (see below). - -### Camera movement - -To enable mouse/swipe navigation through the scene, wrap the `FilamentWidget` inside a `FilamentGestureDetector`: - -```dart -class MyApp extends StatelessWidget { - - final _filamentController = FilamentControllerFFI(); - - @override - Widget build(BuildContext context) { - return MaterialApp( - color: Colors.white, - home: Scaffold(backgroundColor: Colors.white, body: Stack(children:[ - Positioned.fill(child:FilamentGestureDetector( - controller: _filamentController, - child:FilamentWidget( - controller:_filamentController - ))), - Positioned(right:0, bottom:0, child:Container(color:Colors.purple, height:100, width:100)) - ]))); - } -} -``` - -On desktop: -1) hold the middle mouse button and move the mouse to rotate the camera -2) hold the left mouse button and move the mouse to pan the camera -3) scroll up/down with the scrollwheel to zoom in/out. - -On mobile: -1) swipe with your finger to pan the camera -2) double tap the viewport, then swipe with your finger to rotate the camera (double-tap again to return to pan) -3) pinch with two fingers in/out to zoom in/out. - -### Changing the active camera - -Every scene has a default camera. Whenever you rotate/pan/zoom the viewport, you are moving the default camera. - -If you have added an entity to the scene that contains one or more camera nodes, you can change the active scene camera to one of those camera nodes. - -```dart -var asset = await _filamentController.loadGlb("assets/some_asset_with_camera.glb"); -await _filamentController.setCamera(asset, "Camera.002"); // pass the node name to load a specific camera under that entity node -await _filamentController.setCamera(asset, null); // pass null to load the first camera found under that entity -``` - -### Picking entities - -On desktop, left-clicking an object in the viewport will retrieve the FilamentEntity for the top-most renderable instance at that cursor position (if any). - -Note this is an asynchronous operation, so you will need to subscribe to the [pickResult] stream on your [FilamentController] to do something with the result. - -```dart -class MyApp extends StatefulWidget { - //... -} - - -class _MyAppState extends State { - - final _filamentController = FilamentControllerFFI(); - - @override - void initState() { - _filamentController.pickResult.listen((FilamentEntity filamentEntity) async { - var entityName = _filamentController.getNameForEntity(filamentEntity); - await showDialog(builder:(ctx) { - return Container(child:Text("You clicked $entityName")); - }); - }); - } - - @override - Widget build(BuildContext context) { - return MaterialApp( - color: Colors.white, - home: Scaffold(backgroundColor: Colors.white, body: Stack(children:[ - Positioned.fill(child:FilamentGestureDetector( - controller: _filamentController, - child:FilamentWidget( - controller:_filamentController - ))), - ]))); - } -} -``` - -## Advanced Usage - -If you want to work with custom materials, you will need some (basic knowledge of the underlying Filament library)[https://google.github.io/filament/Materials.html#compilingmaterials]. - -Things to keep in mind: -- You must compile materials with the correct version of Filament (see the table above). Keep in mind that versions may not be identical across platforms so you may need multiple uberz files for multiple platforms. - -e.g. the lit_opaque.uberz file has been created from a Filament build: - -```bash -cd out/cmake-android-release-aarch64/libs/gltfio -uberz -TSHADINGMODEL=lit -TBLENDING=opaque -o lit_opaque_43.uberz lit_opaque -``` - -(note that the number in the filename corresponds to the Material version, not the Filament version. Not every Filament version requires a new Material version). - -## Footguns - -### Stripping in release mode - -If you build your app in release mode, you will need to ensure that "Dead Strip" is set to false. - -This is because we only invoke the library at runtime via FFI, so at link time these symbols are otherwise treated as redundant. - -### Animations when backgrounded - -Don't call playAnimation when the app is in the background (i.e inactive/hidden). This will queue, but not start, an animation, and eventually this will overflow the command buffer when the app is foregrounded/resumed. - -If you have some kind of looping animation in your app code, make sure it pauses while the app is backgrounded. - - - -## Versioning - -||Android|iOS|MacOS|Windows|Linux|WebGL| -|---|---|---|---|---|---|---| -|Filament|v1.43.1 (arm64/armeabi-v7a/x86/x86_64)|v1.43.1* (arm64)|v1.43.1 (arm64)|v1.32.4 (x86_64)|TODO**|TODO***| -|Flutter||3.15.0-15.2.pre|3.15.0-15.2.pre|3.15.0-15.2.pre - -* iOS release build has a skybox bug so the debug versions are currently shipped on iOS -** (Waiting for https://github.com/google/filament/issues/7078 to be resolved before upgrading, not sure exactly when the bug was introduced but it was somewhere between v1.32.4 and v1.40.0) -*** Texture widget not currently supported on web in Flutter. - - -## Testing - -We automate testing by running the example project on actual iOS/Android/MacOS/Windows devices and executing various operations. - -Eventually we want to compare screenshots after each operation to a set of goldens for every platform. - -Currently this is only possible on iOS (see https://github.com/flutter/flutter/issues/123063 and https://github.com/flutter/flutter/issues/127306). - -To re-generate the golden screenshots for a given device: - -```bash -./regenerate_goldens.sh -``` -To run the tests and compare against those goldens: -``` -./compare_goldens.sh -``` - -The results will depend on the actual device used to generate the golden, therefore if you are using a different device (which is likely), your results may not be the same. This is expected. - -# Building Filament from source - -```bash -git clone git@github.com:nmfisher/filament.git && cd filament -``` - -## Android/iOS/MacOS - -```bash -git checkout flutter-filament-ios-android-macos -./build.sh -p release -``` - -## Windows - -To support embedding GPU textures in Flutter (rather than copying to a CPU pixel buffer on every frame), we need to build a slightly customized version of Filament that uses GLES on Windows (rather than the default, which uses OpenGL). - -Separately, we also force the Filament gltfio library to load assets via in-memory buffers, rather than the filesystem. This is simply a convenience so we don't have to use different logic for gltf resource loading across platforms. - -```bash -git checkout flutter-filament-windows -mkdir out && cd out -"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build . --target gltf_viewer --config Debug -``` - -Building notes: -On Android/iOS, we remove -fno-exceptions from CMakeLists.txt - -Project structure: -- most shared code/headers under ios/src (because I still can't get podspec to build a target with symlinks or relative paths) -- building on MacOS, we currently just delete the macos/include and macos/src directories and copy from iOS (for same reason), -e.g. - -```bash -make sync-macos -``` - -- Note also need to specifically build imageio/png/tinyexr -- if release build, then need to comment out -fno-exceptions - -# Linux specific - -(Fedora 34) -Building Filament: -env LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/11/ CC=clang CXX=clang++ CXX_FLAGS="-v" LD_FLAGS="-v" FILAMENT_REQUIRES_CXXABI=true ./build.sh -c release - -Running example project: -export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:/usr/lib64/pkgconfig/ CPLUS_INCLUDE_PATH=/usr/include/gtk-3.0/:/usr/include/pango-1.0/:/usr/include/harfbuzz:/usr/include/cairo/:/usr/include/gdk-pixbuf-2.0/:/usr/include/atk-1.0/ - -Web: - -EMCC_CFLAGS="-Wno-missing-field-initializers -Wno-deprecated-literal-operator -fPIC" ./build.sh -c -p webgl -i debug - -EMCC_CFLAGS="-I/Users/nickfisher/Documents/filament/libs/utils/include -I/Users/nickfisher/Documents/filament/libs/image/include -I/Users/nickfisher/Documents/filament/libs/math/include -I../../..//third_party/basisu/encoder/ -I../../..//third_party/libpng/ -I../../..//third_party/tinyexr/ -fPIC" emmake make - - -## Materials - -We use a single material (no lighting and no transparency) for background images: - -```bash -make generate-background-material -``` - -# Known issues - -On Windows, loading a glTF (but NOT a glb) may crash due to a race condition between uploading resource data to GPU memory and being freed on the host side. - -This has been fixed in recent versions of Filament, but other bugs on Windows prevent upgrading. - -Only workaround is to load a .glb file. - -# Thanks - -- https://github.com/alexmercerind/flutter-windows-ANGLE-OpenGL-ES diff --git a/android/.cxx/abi_configuration_3f421w4c.json b/android/.cxx/abi_configuration_3f421w4c.json deleted file mode 100644 index cc7b4d82..00000000 --- a/android/.cxx/abi_configuration_3f421w4c.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "allAbis": [ - "arm64-v8a" - ], - "validAbis": [ - "ARM64_V8A" - ] -} \ No newline at end of file diff --git a/android/.cxx/abi_configuration_3f421w4c.log b/android/.cxx/abi_configuration_3f421w4c.log deleted file mode 100644 index 0637a088..00000000 --- a/android/.cxx/abi_configuration_3f421w4c.log +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/android/.cxx/abi_configuration_3f421w4c_key.json b/android/.cxx/abi_configuration_3f421w4c_key.json deleted file mode 100644 index 3ae4ccbd..00000000 --- a/android/.cxx/abi_configuration_3f421w4c_key.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "ndkHandlerSupportedAbis": [ - "ARMEABI_V7A", - "ARM64_V8A", - "X86", - "X86_64" - ], - "ndkHandlerDefaultAbis": [ - "ARMEABI_V7A", - "ARM64_V8A", - "X86", - "X86_64" - ], - "externalNativeBuildAbiFilters": [], - "ndkConfigAbiFilters": [ - "arm64-v8a" - ], - "splitsFilterAbis": [], - "ideBuildOnlyTargetAbi": true -} \ No newline at end of file diff --git a/android/.cxx/ndk_locator_record_1q1i3ah3.json b/android/.cxx/ndk_locator_record_1q1i3ah3.json deleted file mode 100644 index c7366bce..00000000 --- a/android/.cxx/ndk_locator_record_1q1i3ah3.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ndk": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk\\ndk\\25.2.9519653", - "revision": { - "mMajor": 25, - "mMinor": 2, - "mMicro": 9519653, - "mPreview": 0, - "mPrecision": "MICRO", - "mPreviewSeparator": " " - } -} \ No newline at end of file diff --git a/android/.cxx/ndk_locator_record_1q1i3ah3.log b/android/.cxx/ndk_locator_record_1q1i3ah3.log deleted file mode 100644 index 2849d5b7..00000000 --- a/android/.cxx/ndk_locator_record_1q1i3ah3.log +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "level": "INFO", - "message": "android.ndkVersion from module build.gradle is [25.2.9519653]" - }, - { - "level": "INFO", - "message": "android.ndkPath from module build.gradle is not set" - }, - { - "level": "INFO", - "message": "ndk.dir in local.properties is not set" - }, - { - "level": "INFO", - "message": "Not considering ANDROID_NDK_HOME because support was removed after deprecation period." - }, - { - "level": "INFO", - "message": "sdkFolder is C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk" - } -] \ No newline at end of file diff --git a/android/.cxx/ndk_locator_record_1q1i3ah3_key.json b/android/.cxx/ndk_locator_record_1q1i3ah3_key.json deleted file mode 100644 index 48347fb0..00000000 --- a/android/.cxx/ndk_locator_record_1q1i3ah3_key.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "ndkVersionFromDsl": "25.2.9519653", - "sdkFolder": "C:\\Users\\Nick\\AppData\\Local\\Android\\Sdk", - "sideBySideNdkFolderNames": [ - "19.2.5345600", - "21.1.6352462", - "21.4.7075529", - "22.0.7026061", - "22.1.7171670", - "23.0.7599858", - "23.1.7779620", - "23.2.8568313", - "24.0.8215888", - "25.1.8937393", - "25.2.9519653" - ] -} \ No newline at end of file diff --git a/android/CMakeLists.txt b/android/CMakeLists.txt deleted file mode 100644 index 7a337f0e..00000000 --- a/android/CMakeLists.txt +++ /dev/null @@ -1,61 +0,0 @@ -cmake_minimum_required(VERSION 3.10) - -include_directories(../ios/src) -include_directories(../ios/include) -include_directories(../ios/include/filament) -include_directories(src/main/cpp) -link_directories(src/main/jniLibs/${ANDROID_ABI}) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") - -add_library(flutter_filament_android SHARED - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/FlutterFilamentApi.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/FlutterFilamentFFIApi.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/FilamentAndroid.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/AssetManager.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/FilamentViewer.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/StreamBufferAdapter.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/TimeIt.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/camutils/Manipulator.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/camutils/Bookmark.cpp" -) - -add_library(FILAMENT_SHADERS SHARED - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/include/material/image.c" -) - -target_link_libraries( - flutter_filament_android - FILAMENT_SHADERS - -landroid - -llog - -lgltfio_core - -lfilament - -lbackend - -lgeometry - -lfilameshio - -lfilamat - -lfilabridge - -lcamutils - -lfilaflat - -ldracodec - -libl - -lktxreader - -limageio - -limage - -lutils - -ltinyexr - -lstb - -lbluevk - -lvkshaders - -luberzlib - -lsmol-v - -luberarchive - -lmeshoptimizer - -lgeometry - -lbasis_transcoder - -lGLESv3 - -lEGL - -lpng - -lz - -lzstd -) \ No newline at end of file diff --git a/android/settings.gradle b/android/settings.gradle deleted file mode 100644 index d7463b36..00000000 --- a/android/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'flutter_filament' diff --git a/android/src/main/cpp/FilamentAndroid.cpp b/android/src/main/cpp/FilamentAndroid.cpp deleted file mode 100644 index 1e0c4695..00000000 --- a/android/src/main/cpp/FilamentAndroid.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include - -extern "C" { - - #include "FlutterFilamentFFIApi.h" - - void* get_native_window_from_surface( - jobject surface, - JNIEnv* env - ) { - void* window = ANativeWindow_fromSurface(env, surface); - return window; - } - - // this does nothing, but we need it for JNA to return the correct pointer - FilamentRenderCallback make_render_callback_fn_pointer(FilamentRenderCallback callback) { - return callback; - } - -} diff --git a/android/src/main/jniLibs/arm64-v8a/libbackend.a b/android/src/main/jniLibs/arm64-v8a/libbackend.a deleted file mode 100644 index 64f74e1c..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libbackend.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:577996c240a574c291848329ddc2823ed9432a3bb0eba4322bc8724f616b46dc -size 2186272 diff --git a/android/src/main/jniLibs/arm64-v8a/libbasis_transcoder.a b/android/src/main/jniLibs/arm64-v8a/libbasis_transcoder.a deleted file mode 100644 index 81af2883..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libbasis_transcoder.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:76eaee1bddc9c4fa2a5da5fece5bc33178092a24843250ad02623031fc6271b5 -size 387274 diff --git a/android/src/main/jniLibs/arm64-v8a/libbluevk.a b/android/src/main/jniLibs/arm64-v8a/libbluevk.a deleted file mode 100644 index 793e4000..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libbluevk.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:11b0fc712800467f6f9eae1022a9b6a868c37040b8d27aab3b141f47684ee0f0 -size 200504 diff --git a/android/src/main/jniLibs/arm64-v8a/libcamutils.a b/android/src/main/jniLibs/arm64-v8a/libcamutils.a deleted file mode 100644 index be7a5438..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libcamutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f56a73aa32f19c681cd140a83e64273b6bf550770cbc1ba0c39f8e8135d992ac -size 49004 diff --git a/android/src/main/jniLibs/arm64-v8a/libcivetweb.a b/android/src/main/jniLibs/arm64-v8a/libcivetweb.a deleted file mode 100644 index 67ec7345..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libcivetweb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c3d89171648cd80b9457cc1d06e50f44cf816b37932dfb05d1d192743a75f3f6 -size 283364 diff --git a/android/src/main/jniLibs/arm64-v8a/libdracodec.a b/android/src/main/jniLibs/arm64-v8a/libdracodec.a deleted file mode 100644 index 7322665a..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libdracodec.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5e9862f1e4694a57fafd1140d8749dabbb50c580673a5eefbd4f184a799b09a1 -size 2537500 diff --git a/android/src/main/jniLibs/arm64-v8a/libfilabridge.a b/android/src/main/jniLibs/arm64-v8a/libfilabridge.a deleted file mode 100644 index ea488df7..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libfilabridge.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b920ca16cc9542ddfb5d1710ccaafe6d6302c957c46583cd378eecb4855749d3 -size 67032 diff --git a/android/src/main/jniLibs/arm64-v8a/libfilaflat.a b/android/src/main/jniLibs/arm64-v8a/libfilaflat.a deleted file mode 100644 index 07278718..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libfilaflat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ee941c4e8d442ce441720653bacf58dca3811d957522364cc0df7c1323e9b0b8 -size 49830 diff --git a/android/src/main/jniLibs/arm64-v8a/libfilamat.a b/android/src/main/jniLibs/arm64-v8a/libfilamat.a deleted file mode 100644 index 4eab1a7c..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libfilamat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f7cb50b8b077a1f5a3bc2f9ed0c77b45be68eae6090b2835ffd085bf2cdcc43d -size 28876048 diff --git a/android/src/main/jniLibs/arm64-v8a/libfilamat_lite.a b/android/src/main/jniLibs/arm64-v8a/libfilamat_lite.a deleted file mode 100644 index 3fc305a3..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libfilamat_lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:014d1015b292c6a49e4bdbf86e1eea9000bc91497dcb072dd7c3c771de07a33e -size 650872 diff --git a/android/src/main/jniLibs/arm64-v8a/libfilament-iblprefilter.a b/android/src/main/jniLibs/arm64-v8a/libfilament-iblprefilter.a deleted file mode 100644 index 9d07c3e8..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libfilament-iblprefilter.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e27d41d11d24399af9a06b3c320de343b4b035299c4372a035cf16f74d3a94e6 -size 72470 diff --git a/android/src/main/jniLibs/arm64-v8a/libfilament.a b/android/src/main/jniLibs/arm64-v8a/libfilament.a deleted file mode 100644 index 9e5681a9..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libfilament.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f9b76ab599e907ef8bc2c1372d01a8c1697b700fd231c523fc4d2d316d6c4e79 -size 2730404 diff --git a/android/src/main/jniLibs/arm64-v8a/libfilameshio.a b/android/src/main/jniLibs/arm64-v8a/libfilameshio.a deleted file mode 100644 index 7b6f662d..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libfilameshio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d49cef08fadf1ce1853d683005b6e93d15364e40ec94913b9f4e33aa7bd1b1ed -size 42044 diff --git a/android/src/main/jniLibs/arm64-v8a/libgeometry.a b/android/src/main/jniLibs/arm64-v8a/libgeometry.a deleted file mode 100644 index b4c4a17a..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libgeometry.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd3c186447e4e40f44b0fd37a6255add16c0b055cddcb73e9e570ea624d2b56e -size 99010 diff --git a/android/src/main/jniLibs/arm64-v8a/libgltfio_core.a b/android/src/main/jniLibs/arm64-v8a/libgltfio_core.a deleted file mode 100644 index 7b24a035..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libgltfio_core.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3768e9aaa45b74679c7470730422f33b5bef68821a42e9fa176e5d2dc60c0f7f -size 1189476 diff --git a/android/src/main/jniLibs/arm64-v8a/libibl-lite.a b/android/src/main/jniLibs/arm64-v8a/libibl-lite.a deleted file mode 100644 index 720f5109..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libibl-lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b826b2c7c829153b1d27706cb5db97cc69ef2f61f4736f020e17c30395651459 -size 360156 diff --git a/android/src/main/jniLibs/arm64-v8a/libibl.a b/android/src/main/jniLibs/arm64-v8a/libibl.a deleted file mode 100644 index 5ea9905b..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libibl.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4853a94c43601aa7b5c072b4d789d435c5f2ddf4b9bdda96e44d363dbb7d1495 -size 440976 diff --git a/android/src/main/jniLibs/arm64-v8a/libimage.a b/android/src/main/jniLibs/arm64-v8a/libimage.a deleted file mode 100644 index c922b79c..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libimage.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:19ccbbc7b5fb6f65c95c531f7562ee60882ebe755599787e050a6573e509f029 -size 104924 diff --git a/android/src/main/jniLibs/arm64-v8a/libimageio.a b/android/src/main/jniLibs/arm64-v8a/libimageio.a deleted file mode 100644 index 46904f96..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libimageio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2affa1a46f0509e26741e613278ba7742e73d5665b201d9819c9357b3824c9ff -size 212054 diff --git a/android/src/main/jniLibs/arm64-v8a/libktxreader.a b/android/src/main/jniLibs/arm64-v8a/libktxreader.a deleted file mode 100644 index 117f7b2a..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libktxreader.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f7d7948a522c57f3b6bf0e3f1570c7ba5b90499006c79660d8d2bd157d280fad -size 51514 diff --git a/android/src/main/jniLibs/arm64-v8a/libmeshoptimizer.a b/android/src/main/jniLibs/arm64-v8a/libmeshoptimizer.a deleted file mode 100644 index 705c6a43..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libmeshoptimizer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d0089029b919d128e1520250925d23b304566c5a831eb7be4c156d61a11b37b6 -size 143536 diff --git a/android/src/main/jniLibs/arm64-v8a/libmikktspace.a b/android/src/main/jniLibs/arm64-v8a/libmikktspace.a deleted file mode 100644 index 71b3a9ed..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libmikktspace.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:68f40361280bc8fde1350a00d8e3ce4129b69385bac3d9eda37c0b392f9a167e -size 20686 diff --git a/android/src/main/jniLibs/arm64-v8a/libpng.a b/android/src/main/jniLibs/arm64-v8a/libpng.a deleted file mode 100644 index 3e14c006..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libpng.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dde94c36b283091a5a3211e8a336f3f50dd1664db09929e5f2a654adaf0db6b3 -size 355194 diff --git a/android/src/main/jniLibs/arm64-v8a/libshaders.a b/android/src/main/jniLibs/arm64-v8a/libshaders.a deleted file mode 100644 index 7d66cf62..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eca6cad667424fa5cb4808a009cf8b72b240bb3b4e5bcf14155d3b625eba7e28 -size 127430 diff --git a/android/src/main/jniLibs/arm64-v8a/libsmol-v.a b/android/src/main/jniLibs/arm64-v8a/libsmol-v.a deleted file mode 100644 index 7afa6228..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libsmol-v.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:08bb916351f38d144803944cc2b9d6659a297dab73d99394d66237b3073177ee -size 39734 diff --git a/android/src/main/jniLibs/arm64-v8a/libstb.a b/android/src/main/jniLibs/arm64-v8a/libstb.a deleted file mode 100644 index a9aff10f..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libstb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99fdf005160d4f1be0b72a24a3abafa7f11ba47950125a664a535637071dafc5 -size 130006 diff --git a/android/src/main/jniLibs/arm64-v8a/libtinyexr.a b/android/src/main/jniLibs/arm64-v8a/libtinyexr.a deleted file mode 100644 index ee67bb55..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libtinyexr.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f27ccb09daed406bd49c8d47b1738815d8daf0336a3fea6fdb059876e2416493 -size 226376 diff --git a/android/src/main/jniLibs/arm64-v8a/libuberarchive.a b/android/src/main/jniLibs/arm64-v8a/libuberarchive.a deleted file mode 100644 index 1c31e0bb..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libuberarchive.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cdb8a9ed3a9ba3cdbbeef8065358a92b6654363e7f4e1b57d0522abc063d27e6 -size 1831436 diff --git a/android/src/main/jniLibs/arm64-v8a/libuberzlib.a b/android/src/main/jniLibs/arm64-v8a/libuberzlib.a deleted file mode 100644 index 9f299159..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libuberzlib.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b3bf56398e2410c37613d7ab6f43bdd65eaec1d70e2a315db08f2c6e836cb0d6 -size 32970 diff --git a/android/src/main/jniLibs/arm64-v8a/libutils.a b/android/src/main/jniLibs/arm64-v8a/libutils.a deleted file mode 100644 index 1e92c42f..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0ffbd71464e87f505601a1bf2e6ca8f1ff14a541d878811d9a7c460cf52d3d28 -size 360534 diff --git a/android/src/main/jniLibs/arm64-v8a/libviewer.a b/android/src/main/jniLibs/arm64-v8a/libviewer.a deleted file mode 100644 index da583588..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libviewer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:89928210c8470639f8db62fbcc74c31b72f79411db3454040d77c749a9047b6b -size 534600 diff --git a/android/src/main/jniLibs/arm64-v8a/libvkshaders.a b/android/src/main/jniLibs/arm64-v8a/libvkshaders.a deleted file mode 100644 index 4fb38ade..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libvkshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9040bd03b7b1021be16908c4e398c55e67283f4e471dd4ffbc407828147e380d -size 2446 diff --git a/android/src/main/jniLibs/arm64-v8a/libz.a b/android/src/main/jniLibs/arm64-v8a/libz.a deleted file mode 100644 index 8ef669ad..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libz.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa6d6caaa63f5b406bce82001fa415d2dfe199c6e443514552655d9f2bed4bc4 -size 124934 diff --git a/android/src/main/jniLibs/arm64-v8a/libzstd.a b/android/src/main/jniLibs/arm64-v8a/libzstd.a deleted file mode 100644 index a4763204..00000000 --- a/android/src/main/jniLibs/arm64-v8a/libzstd.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9884cc62093cae12ef44610b0bbf5ab9a3940772646377644f11677f5ec2a6a4 -size 693850 diff --git a/android/src/main/jniLibs/armeabi-v7a/libbackend.a b/android/src/main/jniLibs/armeabi-v7a/libbackend.a deleted file mode 100644 index e696fb08..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libbackend.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0e90af7a4eeddda57a6d2e908e17d5f811acf05e85f0bb02db9330e84baea14 -size 1921834 diff --git a/android/src/main/jniLibs/armeabi-v7a/libbasis_transcoder.a b/android/src/main/jniLibs/armeabi-v7a/libbasis_transcoder.a deleted file mode 100644 index ea7118be..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libbasis_transcoder.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ac08b9235e1f64644cd63900be5eb89d41669e644fb9f9682f2a983cabb8af47 -size 334968 diff --git a/android/src/main/jniLibs/armeabi-v7a/libbluevk.a b/android/src/main/jniLibs/armeabi-v7a/libbluevk.a deleted file mode 100644 index f3bcf4b1..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libbluevk.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e2dc261eb31198f16f611ca7f7c20acfec21e24b486ed5dea10ed64effad5bbf -size 97648 diff --git a/android/src/main/jniLibs/armeabi-v7a/libcamutils.a b/android/src/main/jniLibs/armeabi-v7a/libcamutils.a deleted file mode 100644 index c0af2554..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libcamutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6a58756b0425352edf2c02df034177fb0b0bf885bdb70850c5e3ec8091ca1308 -size 49696 diff --git a/android/src/main/jniLibs/armeabi-v7a/libcivetweb.a b/android/src/main/jniLibs/armeabi-v7a/libcivetweb.a deleted file mode 100644 index e76343aa..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libcivetweb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:41041d6ee1b1ecb9fbeac961170b493b6f923f0cb0fadb450c30022132973f5f -size 192156 diff --git a/android/src/main/jniLibs/armeabi-v7a/libdracodec.a b/android/src/main/jniLibs/armeabi-v7a/libdracodec.a deleted file mode 100644 index a04aa5e6..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libdracodec.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f8e9f2005ad07aacb49c5b02c55f2b418879bd409f09619b8d6ccff427971310 -size 2163328 diff --git a/android/src/main/jniLibs/armeabi-v7a/libfilabridge.a b/android/src/main/jniLibs/armeabi-v7a/libfilabridge.a deleted file mode 100644 index 0fe4758b..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libfilabridge.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:46bc4c3723ce398239975826895515ce0bff3c58b6f2e7875be819bb748b2800 -size 58366 diff --git a/android/src/main/jniLibs/armeabi-v7a/libfilaflat.a b/android/src/main/jniLibs/armeabi-v7a/libfilaflat.a deleted file mode 100644 index 79f4f51c..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libfilaflat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:19627f494f67d03a428b786095cd9720f12137b3f0ca10518424d012e76d7e0a -size 44928 diff --git a/android/src/main/jniLibs/armeabi-v7a/libfilamat.a b/android/src/main/jniLibs/armeabi-v7a/libfilamat.a deleted file mode 100644 index 1b83d697..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libfilamat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:094642603b72a40f73a46596a9a30ff4b0076bb074c746ff2bf324cc5bb3d92a -size 25254932 diff --git a/android/src/main/jniLibs/armeabi-v7a/libfilamat_lite.a b/android/src/main/jniLibs/armeabi-v7a/libfilamat_lite.a deleted file mode 100644 index a71de223..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libfilamat_lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f65567b38b146e39092ce9f9eef8ff588dbd97531202aa847916ad98b91e90b7 -size 538770 diff --git a/android/src/main/jniLibs/armeabi-v7a/libfilament-iblprefilter.a b/android/src/main/jniLibs/armeabi-v7a/libfilament-iblprefilter.a deleted file mode 100644 index 1cbda782..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libfilament-iblprefilter.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c22085b3bd21823ee8b28e3b9a43fe61c71e26c0ffd84447d505d307a98ec4e4 -size 61498 diff --git a/android/src/main/jniLibs/armeabi-v7a/libfilament.a b/android/src/main/jniLibs/armeabi-v7a/libfilament.a deleted file mode 100644 index c14fc511..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libfilament.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:87e140c8a18facb798d66432d5c6e148e1d85a7f9e3a8b0cbd6b8ca727a470fa -size 2627016 diff --git a/android/src/main/jniLibs/armeabi-v7a/libfilameshio.a b/android/src/main/jniLibs/armeabi-v7a/libfilameshio.a deleted file mode 100644 index 44d9c34e..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libfilameshio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bb836a5781758df35cb3101fbdf85450ab125dc6a8f86b9c10f69212111e6740 -size 36352 diff --git a/android/src/main/jniLibs/armeabi-v7a/libgeometry.a b/android/src/main/jniLibs/armeabi-v7a/libgeometry.a deleted file mode 100644 index 379ec7d1..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libgeometry.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e96465ea3fa2e75a9b138985cf090068febaeab3821c9f63515ae4ec10b511a8 -size 87278 diff --git a/android/src/main/jniLibs/armeabi-v7a/libgltfio_core.a b/android/src/main/jniLibs/armeabi-v7a/libgltfio_core.a deleted file mode 100644 index 2d97f402..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libgltfio_core.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99012d0b89fd8c149a5d68576f54de962bad345b5a89f6bd4078994583111303 -size 1022636 diff --git a/android/src/main/jniLibs/armeabi-v7a/libibl-lite.a b/android/src/main/jniLibs/armeabi-v7a/libibl-lite.a deleted file mode 100644 index 2f5af2d0..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libibl-lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1637be0db30afc4d5291ad78bd2e4e661ff4168ab1d0e67182b5e32039fec901 -size 349604 diff --git a/android/src/main/jniLibs/armeabi-v7a/libibl.a b/android/src/main/jniLibs/armeabi-v7a/libibl.a deleted file mode 100644 index f4447218..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libibl.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:baff9505cb2c26505b549f613a99a2b790426edfb25aefd76d3fd0dd7b8090ec -size 431960 diff --git a/android/src/main/jniLibs/armeabi-v7a/libimage.a b/android/src/main/jniLibs/armeabi-v7a/libimage.a deleted file mode 100644 index 5a47aad3..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libimage.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:111c0e0c798c56f82df3f6d9c54f8034bcd8d501f4032ad20fe5dc3d6fe85dcd -size 80256 diff --git a/android/src/main/jniLibs/armeabi-v7a/libimageio.a b/android/src/main/jniLibs/armeabi-v7a/libimageio.a deleted file mode 100644 index cfa51f4c..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libimageio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c413e680c5df5f8ca0600df1938c0c94e52ba15f733fb86dac6259efe8becd1 -size 161038 diff --git a/android/src/main/jniLibs/armeabi-v7a/libktxreader.a b/android/src/main/jniLibs/armeabi-v7a/libktxreader.a deleted file mode 100644 index f17d9588..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libktxreader.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:76e98365dcfffa1af20248f6183d04876c7801aeaf3b9baf1921eb8bc9c05092 -size 41644 diff --git a/android/src/main/jniLibs/armeabi-v7a/libmeshoptimizer.a b/android/src/main/jniLibs/armeabi-v7a/libmeshoptimizer.a deleted file mode 100644 index 1ace7810..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libmeshoptimizer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a9c8bc64684f16214fa741edefaa467c3d3987d45ef7bc5f3a9339b309b3dd7e -size 111704 diff --git a/android/src/main/jniLibs/armeabi-v7a/libmikktspace.a b/android/src/main/jniLibs/armeabi-v7a/libmikktspace.a deleted file mode 100644 index 6a1857f8..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libmikktspace.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c531d71de69f8734b1946d8f18b18d7217f5f133bf10f7e120ca40f36b5f028b -size 15326 diff --git a/android/src/main/jniLibs/armeabi-v7a/libpng.a b/android/src/main/jniLibs/armeabi-v7a/libpng.a deleted file mode 100644 index ddc733de..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libpng.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd5bf07a67fbb6096da10f6ffc3a60aaf720662370c6ccbbf3582999d0833c28 -size 243322 diff --git a/android/src/main/jniLibs/armeabi-v7a/libshaders.a b/android/src/main/jniLibs/armeabi-v7a/libshaders.a deleted file mode 100644 index 4fbb925d..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:97f602f703a739609f874fb07e5f3116520dc4085ccc634c8f00cc1fa6551fd0 -size 126666 diff --git a/android/src/main/jniLibs/armeabi-v7a/libsmol-v.a b/android/src/main/jniLibs/armeabi-v7a/libsmol-v.a deleted file mode 100644 index 83119cc3..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libsmol-v.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:375bc70b9a5e0a9143373d4ed579227d665e232889bd8963f55b5dab0c8ebb87 -size 27622 diff --git a/android/src/main/jniLibs/armeabi-v7a/libstb.a b/android/src/main/jniLibs/armeabi-v7a/libstb.a deleted file mode 100644 index 627e4f4f..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libstb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:23f077c0379cbca2bad3b342cc0db2bb0bf1747dc95e884afd709143b2702dbf -size 88774 diff --git a/android/src/main/jniLibs/armeabi-v7a/libtinyexr.a b/android/src/main/jniLibs/armeabi-v7a/libtinyexr.a deleted file mode 100644 index 64b0e5fe..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libtinyexr.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09ee485f222900bc3f67d9daec7711d7ca1c57abcacc7f4df5e5f76f2534ea47 -size 152200 diff --git a/android/src/main/jniLibs/armeabi-v7a/libuberarchive.a b/android/src/main/jniLibs/armeabi-v7a/libuberarchive.a deleted file mode 100644 index 311e82d9..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libuberarchive.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2e2eabf92a463967157fc0cf5319e4b59c1e9afe7d98bcd8667b89a5e3dffb9 -size 1831260 diff --git a/android/src/main/jniLibs/armeabi-v7a/libuberzlib.a b/android/src/main/jniLibs/armeabi-v7a/libuberzlib.a deleted file mode 100644 index e5f78ff2..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libuberzlib.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ac61dec39919f1c19a9601b073020593e6cc9d0cbe27fe3e2104d904bd345196 -size 27354 diff --git a/android/src/main/jniLibs/armeabi-v7a/libutils.a b/android/src/main/jniLibs/armeabi-v7a/libutils.a deleted file mode 100644 index 28e35f68..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3d314214a0a09fe047080b54cd8684a0322c192a45d1f859914677ec84c8711e -size 299782 diff --git a/android/src/main/jniLibs/armeabi-v7a/libviewer.a b/android/src/main/jniLibs/armeabi-v7a/libviewer.a deleted file mode 100644 index fe95a94d..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libviewer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6865d378b0e97f1f829221c45e4b74091953d3ce66222c2534be6c5f470e13d8 -size 392688 diff --git a/android/src/main/jniLibs/armeabi-v7a/libvkshaders.a b/android/src/main/jniLibs/armeabi-v7a/libvkshaders.a deleted file mode 100644 index 61b20241..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libvkshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c2bdeeafe7933584916aa8d8e07856b8660025eae13a602a090c884dd009776b -size 2254 diff --git a/android/src/main/jniLibs/armeabi-v7a/libz.a b/android/src/main/jniLibs/armeabi-v7a/libz.a deleted file mode 100644 index 165a8565..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libz.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fcf5034e7d1fb324feebe63497b151b0ce2acaaae2cd2a13ad18d24eba8d5fff -size 91942 diff --git a/android/src/main/jniLibs/armeabi-v7a/libzstd.a b/android/src/main/jniLibs/armeabi-v7a/libzstd.a deleted file mode 100644 index 201296bd..00000000 --- a/android/src/main/jniLibs/armeabi-v7a/libzstd.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:da1ea9abc45796696b36a30aa451978a646b43d85ebec43c157efff4501a7f87 -size 563610 diff --git a/android/src/main/jniLibs/x86/libbackend.a b/android/src/main/jniLibs/x86/libbackend.a deleted file mode 100644 index 02ff1b1d..00000000 --- a/android/src/main/jniLibs/x86/libbackend.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d7d7fd061ad93dd9ac21c5b0620c3a7b38b54375d518bfb3f31dcb51f1b3d1f5 -size 1791656 diff --git a/android/src/main/jniLibs/x86/libbasis_transcoder.a b/android/src/main/jniLibs/x86/libbasis_transcoder.a deleted file mode 100644 index 643993af..00000000 --- a/android/src/main/jniLibs/x86/libbasis_transcoder.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:84273290e6b3ebd92a97d9904005eb031a4e2c40e236b572ede6f20aa8f6b5c2 -size 392140 diff --git a/android/src/main/jniLibs/x86/libbluevk.a b/android/src/main/jniLibs/x86/libbluevk.a deleted file mode 100644 index 14655b76..00000000 --- a/android/src/main/jniLibs/x86/libbluevk.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ae215d1057b2df182a15cef28c3dbcfadbd7e919cd658f79d48cc679dcc981fb -size 131020 diff --git a/android/src/main/jniLibs/x86/libcamutils.a b/android/src/main/jniLibs/x86/libcamutils.a deleted file mode 100644 index c84bd111..00000000 --- a/android/src/main/jniLibs/x86/libcamutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb4db56341d4c880a3a7304e9788d9279890b30315c3d8cf4ded49b60e202e22 -size 46776 diff --git a/android/src/main/jniLibs/x86/libcivetweb.a b/android/src/main/jniLibs/x86/libcivetweb.a deleted file mode 100644 index 0351cbe2..00000000 --- a/android/src/main/jniLibs/x86/libcivetweb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1d07d91f9ce5a99c910a5c767710305db09af0940a8b0e8fe44bd07d0098c0f2 -size 239568 diff --git a/android/src/main/jniLibs/x86/libdracodec.a b/android/src/main/jniLibs/x86/libdracodec.a deleted file mode 100644 index e84018ef..00000000 --- a/android/src/main/jniLibs/x86/libdracodec.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd82549b6db29c158d096340f72dddadf31cc757d7fd02496eeefbcaaa89c69b -size 2175384 diff --git a/android/src/main/jniLibs/x86/libfilabridge.a b/android/src/main/jniLibs/x86/libfilabridge.a deleted file mode 100644 index 9f0e181a..00000000 --- a/android/src/main/jniLibs/x86/libfilabridge.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:54953690caae540cb34c61f18b50161b4f83cc98a5e52c0498024bcd66deb4d5 -size 53346 diff --git a/android/src/main/jniLibs/x86/libfilaflat.a b/android/src/main/jniLibs/x86/libfilaflat.a deleted file mode 100644 index 34ca497a..00000000 --- a/android/src/main/jniLibs/x86/libfilaflat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:12b12cdf3017cce821c86e612ceeb26e227a32ae42d46822ffc9149e1382c337 -size 41466 diff --git a/android/src/main/jniLibs/x86/libfilamat.a b/android/src/main/jniLibs/x86/libfilamat.a deleted file mode 100644 index e1ef2257..00000000 --- a/android/src/main/jniLibs/x86/libfilamat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e0f1500570bb005e14cb490331980b2eed7d74b28500c6363947d833c97ae963 -size 23301288 diff --git a/android/src/main/jniLibs/x86/libfilamat_lite.a b/android/src/main/jniLibs/x86/libfilamat_lite.a deleted file mode 100644 index 5ea6e85c..00000000 --- a/android/src/main/jniLibs/x86/libfilamat_lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f7831363303801ef3e83ee9d31f65c386f310e174a921d921ca17afe216b7115 -size 521960 diff --git a/android/src/main/jniLibs/x86/libfilament-iblprefilter.a b/android/src/main/jniLibs/x86/libfilament-iblprefilter.a deleted file mode 100644 index c3d876b7..00000000 --- a/android/src/main/jniLibs/x86/libfilament-iblprefilter.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:033fc92a176e25d2ddebab48ffa059e0cdb11a8efcddb65addc2b29eb5cc5753 -size 63910 diff --git a/android/src/main/jniLibs/x86/libfilament.a b/android/src/main/jniLibs/x86/libfilament.a deleted file mode 100644 index 5ed56f55..00000000 --- a/android/src/main/jniLibs/x86/libfilament.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bdc677eeb69936cf45cd5379680d49506c16ca8f0a9207790c5a97697b99a1f7 -size 2471750 diff --git a/android/src/main/jniLibs/x86/libfilameshio.a b/android/src/main/jniLibs/x86/libfilameshio.a deleted file mode 100644 index 617d90d0..00000000 --- a/android/src/main/jniLibs/x86/libfilameshio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:37da0f2518b4c327552993b7ed775218d49018a4dd1000ad6fa7f4edc3a14b4d -size 33196 diff --git a/android/src/main/jniLibs/x86/libgeometry.a b/android/src/main/jniLibs/x86/libgeometry.a deleted file mode 100644 index f189df28..00000000 --- a/android/src/main/jniLibs/x86/libgeometry.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:61afbde1d11f2651ebccc78f9e04954c0b60c4c987de4197ccaaadb47b6195b8 -size 91242 diff --git a/android/src/main/jniLibs/x86/libgltfio_core.a b/android/src/main/jniLibs/x86/libgltfio_core.a deleted file mode 100644 index 763c7f1e..00000000 --- a/android/src/main/jniLibs/x86/libgltfio_core.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:69d288c287cb4e31e4c163ac5ad67b78e1e76f8bb87891077c4c8926daa92186 -size 998496 diff --git a/android/src/main/jniLibs/x86/libibl-lite.a b/android/src/main/jniLibs/x86/libibl-lite.a deleted file mode 100644 index e62a81d6..00000000 --- a/android/src/main/jniLibs/x86/libibl-lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a66050451e3ee22107bf106ffb08984fef456bd86d97a323839fbfd80bc209ee -size 327150 diff --git a/android/src/main/jniLibs/x86/libibl.a b/android/src/main/jniLibs/x86/libibl.a deleted file mode 100644 index eeaa863b..00000000 --- a/android/src/main/jniLibs/x86/libibl.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:40cd56ed861cbffda3135d53db841ba7448cf223881ff9a0a4aac13bbbed34ce -size 398100 diff --git a/android/src/main/jniLibs/x86/libimage.a b/android/src/main/jniLibs/x86/libimage.a deleted file mode 100644 index 2db166ab..00000000 --- a/android/src/main/jniLibs/x86/libimage.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d6f0f0e5ad5713bb7f4af574227d596006c0669e24ae86de1f205fa103510ab8 -size 90468 diff --git a/android/src/main/jniLibs/x86/libimageio.a b/android/src/main/jniLibs/x86/libimageio.a deleted file mode 100644 index cc15d726..00000000 --- a/android/src/main/jniLibs/x86/libimageio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fad4729150c16cbc07a1ef3f442f17c539723329a74e52e50b8001ded18061e2 -size 167674 diff --git a/android/src/main/jniLibs/x86/libktxreader.a b/android/src/main/jniLibs/x86/libktxreader.a deleted file mode 100644 index f53785da..00000000 --- a/android/src/main/jniLibs/x86/libktxreader.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a9df29f881a854a55dc9343c670068bf9b7ca25166cd37f76e1a38b4a248e743 -size 54332 diff --git a/android/src/main/jniLibs/x86/libmeshoptimizer.a b/android/src/main/jniLibs/x86/libmeshoptimizer.a deleted file mode 100644 index e98e7116..00000000 --- a/android/src/main/jniLibs/x86/libmeshoptimizer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ca58790fd0f51daa86cc7b03f4790842f2e6c50695280c5d293a80e4af0c03e2 -size 142436 diff --git a/android/src/main/jniLibs/x86/libmikktspace.a b/android/src/main/jniLibs/x86/libmikktspace.a deleted file mode 100644 index 54273374..00000000 --- a/android/src/main/jniLibs/x86/libmikktspace.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5e373508c804a2e4c3309f0a49d0e46b0aa9116becb34e8a06c87ee226f366b4 -size 24790 diff --git a/android/src/main/jniLibs/x86/libpng.a b/android/src/main/jniLibs/x86/libpng.a deleted file mode 100644 index da729667..00000000 --- a/android/src/main/jniLibs/x86/libpng.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:68680810cf49495414ca6c5098b726696038bccb892f9de56c2899f97ae483c6 -size 308346 diff --git a/android/src/main/jniLibs/x86/libshaders.a b/android/src/main/jniLibs/x86/libshaders.a deleted file mode 100644 index d6079bba..00000000 --- a/android/src/main/jniLibs/x86/libshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e29d337f722c63f6b86200390fd7d55fe0e468a2efe22f5dd49007e52246b0db -size 126578 diff --git a/android/src/main/jniLibs/x86/libsmol-v.a b/android/src/main/jniLibs/x86/libsmol-v.a deleted file mode 100644 index 2b36439d..00000000 --- a/android/src/main/jniLibs/x86/libsmol-v.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c282f70f89e72652b42c4885e284bead0b4ef272fa52de3cd29e57a124117f2f -size 33002 diff --git a/android/src/main/jniLibs/x86/libstb.a b/android/src/main/jniLibs/x86/libstb.a deleted file mode 100644 index 47d91d74..00000000 --- a/android/src/main/jniLibs/x86/libstb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8cb8c05b15b6cd0d2310f875906b676e00af13c97be13f978c11ec66fb21855c -size 117546 diff --git a/android/src/main/jniLibs/x86/libtinyexr.a b/android/src/main/jniLibs/x86/libtinyexr.a deleted file mode 100644 index c6e736b1..00000000 --- a/android/src/main/jniLibs/x86/libtinyexr.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a9a1b003919d978bac2301ed573b511f80101da311cd33486290cd4ba0caf953 -size 175696 diff --git a/android/src/main/jniLibs/x86/libuberarchive.a b/android/src/main/jniLibs/x86/libuberarchive.a deleted file mode 100644 index 52adf78c..00000000 --- a/android/src/main/jniLibs/x86/libuberarchive.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:099166e038461fea456a389dd3d2ca81d1996969f376029525770522c9f31f85 -size 1831036 diff --git a/android/src/main/jniLibs/x86/libuberzlib.a b/android/src/main/jniLibs/x86/libuberzlib.a deleted file mode 100644 index c50be51c..00000000 --- a/android/src/main/jniLibs/x86/libuberzlib.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:986915629470491d640ebe896300b37277280c8dbe82fddd34771e55204ef2b3 -size 27818 diff --git a/android/src/main/jniLibs/x86/libutils.a b/android/src/main/jniLibs/x86/libutils.a deleted file mode 100644 index 7b68c8c5..00000000 --- a/android/src/main/jniLibs/x86/libutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8f26e15d26484f12e0813eae201785d490129c88d13bf291efe0b776565035f9 -size 270920 diff --git a/android/src/main/jniLibs/x86/libviewer.a b/android/src/main/jniLibs/x86/libviewer.a deleted file mode 100644 index 010f64d5..00000000 --- a/android/src/main/jniLibs/x86/libviewer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:81b85dbda19b9960b3859a8841f495176e7052035b724a5c3e2de5437cfb184f -size 421712 diff --git a/android/src/main/jniLibs/x86/libvkshaders.a b/android/src/main/jniLibs/x86/libvkshaders.a deleted file mode 100644 index 73990e4b..00000000 --- a/android/src/main/jniLibs/x86/libvkshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5cbd41298d89ec7664ca6f98387ad87de447b30981d7ed4016af5d07e3aa706e -size 2030 diff --git a/android/src/main/jniLibs/x86/libz.a b/android/src/main/jniLibs/x86/libz.a deleted file mode 100644 index 43b7c158..00000000 --- a/android/src/main/jniLibs/x86/libz.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2e41ef7a40d92f60921fc278c19dede08b4c947e3dbc1a68db2665a45afb768 -size 120202 diff --git a/android/src/main/jniLibs/x86/libzstd.a b/android/src/main/jniLibs/x86/libzstd.a deleted file mode 100644 index ce9ad6e4..00000000 --- a/android/src/main/jniLibs/x86/libzstd.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d5541b7365aaec6cedbf4416ab20e3878f2c3a7daf505a4795cb7ef14256e22 -size 836070 diff --git a/android/src/main/jniLibs/x86_64/libbackend.a b/android/src/main/jniLibs/x86_64/libbackend.a deleted file mode 100644 index cab78ebe..00000000 --- a/android/src/main/jniLibs/x86_64/libbackend.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5954b6cfcbb4417d5710e6498a6adb01bd8ec5b9bda9c02b0360cb49c913f9f8 -size 2130866 diff --git a/android/src/main/jniLibs/x86_64/libbasis_transcoder.a b/android/src/main/jniLibs/x86_64/libbasis_transcoder.a deleted file mode 100644 index fcdc6241..00000000 --- a/android/src/main/jniLibs/x86_64/libbasis_transcoder.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b11944faf9a17d4f00db8f9f0c2385ee7cd99a6a8b756237c6aae6cd8ed3895 -size 412466 diff --git a/android/src/main/jniLibs/x86_64/libbluevk.a b/android/src/main/jniLibs/x86_64/libbluevk.a deleted file mode 100644 index 275cf33e..00000000 --- a/android/src/main/jniLibs/x86_64/libbluevk.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f8bfa8311d1b5d55dbcba4904885f984a5b3fdbf4839824d20191f12259c2b9a -size 175072 diff --git a/android/src/main/jniLibs/x86_64/libcamutils.a b/android/src/main/jniLibs/x86_64/libcamutils.a deleted file mode 100644 index 1c561caf..00000000 --- a/android/src/main/jniLibs/x86_64/libcamutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99abf7173591a8ec4d3b840f2356b911d6758e4974891e71461bc256c6460700 -size 55508 diff --git a/android/src/main/jniLibs/x86_64/libcivetweb.a b/android/src/main/jniLibs/x86_64/libcivetweb.a deleted file mode 100644 index 01456358..00000000 --- a/android/src/main/jniLibs/x86_64/libcivetweb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:27c9ddda9df2b118f7d011f09d5fc939e790a27608a98d2da2973a50d098ddec -size 296228 diff --git a/android/src/main/jniLibs/x86_64/libdracodec.a b/android/src/main/jniLibs/x86_64/libdracodec.a deleted file mode 100644 index 2c7f4ecd..00000000 --- a/android/src/main/jniLibs/x86_64/libdracodec.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5b7a9d790442cd77a95370a022eff351b204644e7bc45bf9731b913eb9e179f9 -size 2577646 diff --git a/android/src/main/jniLibs/x86_64/libfilabridge.a b/android/src/main/jniLibs/x86_64/libfilabridge.a deleted file mode 100644 index edfd614a..00000000 --- a/android/src/main/jniLibs/x86_64/libfilabridge.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dee5375dffeb6bf459461c4b8de8069a8a3fc66584037394f40d3b47fb79d887 -size 67288 diff --git a/android/src/main/jniLibs/x86_64/libfilaflat.a b/android/src/main/jniLibs/x86_64/libfilaflat.a deleted file mode 100644 index eabfe188..00000000 --- a/android/src/main/jniLibs/x86_64/libfilaflat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4c587aef1513eb974abafcf58866c4b34617931b4ba5f5bc310f48646d26c4f2 -size 47718 diff --git a/android/src/main/jniLibs/x86_64/libfilamat.a b/android/src/main/jniLibs/x86_64/libfilamat.a deleted file mode 100644 index 7226a15e..00000000 --- a/android/src/main/jniLibs/x86_64/libfilamat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:26cf0b30d49aa36b559a0b1512707f3b53a0b685834afc7d65dd395cc4dc2481 -size 29487854 diff --git a/android/src/main/jniLibs/x86_64/libfilamat_lite.a b/android/src/main/jniLibs/x86_64/libfilamat_lite.a deleted file mode 100644 index ff4cd562..00000000 --- a/android/src/main/jniLibs/x86_64/libfilamat_lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:295259598574e8b24affb68d2ba409ddfbc5110219c66f80258ad4c44d9b4b60 -size 650064 diff --git a/android/src/main/jniLibs/x86_64/libfilament-iblprefilter.a b/android/src/main/jniLibs/x86_64/libfilament-iblprefilter.a deleted file mode 100644 index 9fd4a122..00000000 --- a/android/src/main/jniLibs/x86_64/libfilament-iblprefilter.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3689e9ab9f215336805761a5f6290b57e2b8329eace8e7208fff582236ac189f -size 73862 diff --git a/android/src/main/jniLibs/x86_64/libfilament.a b/android/src/main/jniLibs/x86_64/libfilament.a deleted file mode 100644 index 7c083df5..00000000 --- a/android/src/main/jniLibs/x86_64/libfilament.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:27524a5352c1d7c8c6610ad5235fe6a82b174069735527bb57de246cee169c47 -size 2800470 diff --git a/android/src/main/jniLibs/x86_64/libfilameshio.a b/android/src/main/jniLibs/x86_64/libfilameshio.a deleted file mode 100644 index 6d85b8a8..00000000 --- a/android/src/main/jniLibs/x86_64/libfilameshio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d435c6614a5051daf75fd7a8b885ec710439252a78fbcd8fedf935730610973 -size 40996 diff --git a/android/src/main/jniLibs/x86_64/libgeometry.a b/android/src/main/jniLibs/x86_64/libgeometry.a deleted file mode 100644 index 2dd21148..00000000 --- a/android/src/main/jniLibs/x86_64/libgeometry.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d1c80a2c594936e6a1f55b485b3bd3e29f828a99785b53f631fa75ddc88eae51 -size 110424 diff --git a/android/src/main/jniLibs/x86_64/libgltfio_core.a b/android/src/main/jniLibs/x86_64/libgltfio_core.a deleted file mode 100644 index 29c53183..00000000 --- a/android/src/main/jniLibs/x86_64/libgltfio_core.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:738d73b4185c8c6363b9fb9caeebc8f8c29d2c3611356cbe148d930e47dca309 -size 1199164 diff --git a/android/src/main/jniLibs/x86_64/libibl-lite.a b/android/src/main/jniLibs/x86_64/libibl-lite.a deleted file mode 100644 index 88326778..00000000 --- a/android/src/main/jniLibs/x86_64/libibl-lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3d7b366656fa1f9208a173ed14f0a23656f3e080bb07cc8fb8ef12abfdb0a3ef -size 385650 diff --git a/android/src/main/jniLibs/x86_64/libibl.a b/android/src/main/jniLibs/x86_64/libibl.a deleted file mode 100644 index b6b80e86..00000000 --- a/android/src/main/jniLibs/x86_64/libibl.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9cd2a89622aa4425c109442f7a5adeed21498b4779e0e33433081c60179011cf -size 471620 diff --git a/android/src/main/jniLibs/x86_64/libimage.a b/android/src/main/jniLibs/x86_64/libimage.a deleted file mode 100644 index c2caff82..00000000 --- a/android/src/main/jniLibs/x86_64/libimage.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:48ecae870cc7b08019765640658c148d165b148f7fb351ddb2d74a7002c11da3 -size 109860 diff --git a/android/src/main/jniLibs/x86_64/libimageio.a b/android/src/main/jniLibs/x86_64/libimageio.a deleted file mode 100644 index 64ec15d3..00000000 --- a/android/src/main/jniLibs/x86_64/libimageio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d61c0a18fe03e0d62c48a6d95b346a84191dedd06f0d755c71e4967dace31ef2 -size 209914 diff --git a/android/src/main/jniLibs/x86_64/libktxreader.a b/android/src/main/jniLibs/x86_64/libktxreader.a deleted file mode 100644 index c4607b92..00000000 --- a/android/src/main/jniLibs/x86_64/libktxreader.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eaabc6b1d44100f4ec7ac90f86ff7913cb21a55e96be24ebba57b81f45d626be -size 82906 diff --git a/android/src/main/jniLibs/x86_64/libmeshoptimizer.a b/android/src/main/jniLibs/x86_64/libmeshoptimizer.a deleted file mode 100644 index f91e72d4..00000000 --- a/android/src/main/jniLibs/x86_64/libmeshoptimizer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:10e96ca27d8bb7706886c57c0790173dd750360b2e7c915181c3c687706b249a -size 169648 diff --git a/android/src/main/jniLibs/x86_64/libmikktspace.a b/android/src/main/jniLibs/x86_64/libmikktspace.a deleted file mode 100644 index caff1b97..00000000 --- a/android/src/main/jniLibs/x86_64/libmikktspace.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:80e35196ba4e8c328858b67b250d7b73cb003df260b64fe4780fad283c4ac29a -size 26174 diff --git a/android/src/main/jniLibs/x86_64/libpng.a b/android/src/main/jniLibs/x86_64/libpng.a deleted file mode 100644 index 96d50b1d..00000000 --- a/android/src/main/jniLibs/x86_64/libpng.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b62be7d7eedb390e4f26940c9a65ce0fc8515c9cdab029b50b3bcbada2469f8a -size 383722 diff --git a/android/src/main/jniLibs/x86_64/libshaders.a b/android/src/main/jniLibs/x86_64/libshaders.a deleted file mode 100644 index 7a4f08f8..00000000 --- a/android/src/main/jniLibs/x86_64/libshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d08729aea048e5801b74810d5420b76283721442ad0e12374faf3116658d7210 -size 127398 diff --git a/android/src/main/jniLibs/x86_64/libsmol-v.a b/android/src/main/jniLibs/x86_64/libsmol-v.a deleted file mode 100644 index 1bd3c3e9..00000000 --- a/android/src/main/jniLibs/x86_64/libsmol-v.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3633648c3bd68d7cf63e4283a1e23475d2dbe97ed2f300825691ac33d1fa8fe5 -size 44750 diff --git a/android/src/main/jniLibs/x86_64/libstb.a b/android/src/main/jniLibs/x86_64/libstb.a deleted file mode 100644 index bcbb5884..00000000 --- a/android/src/main/jniLibs/x86_64/libstb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3f7876773cd4e27f432ea1811beb8fc4588c2944957a31a9f892bb5d65aad81b -size 136886 diff --git a/android/src/main/jniLibs/x86_64/libtinyexr.a b/android/src/main/jniLibs/x86_64/libtinyexr.a deleted file mode 100644 index faa29388..00000000 --- a/android/src/main/jniLibs/x86_64/libtinyexr.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8dca39d876437fefd651bbc5aaecf4f11e95c9ad8b2d7f3b4d1116976673ecac -size 220104 diff --git a/android/src/main/jniLibs/x86_64/libuberarchive.a b/android/src/main/jniLibs/x86_64/libuberarchive.a deleted file mode 100644 index dd71c687..00000000 --- a/android/src/main/jniLibs/x86_64/libuberarchive.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:baa93139416274e711557da2e42da4215b2256e3c78f25f1c071a5d107bec4e4 -size 1831372 diff --git a/android/src/main/jniLibs/x86_64/libuberzlib.a b/android/src/main/jniLibs/x86_64/libuberzlib.a deleted file mode 100644 index 5f392595..00000000 --- a/android/src/main/jniLibs/x86_64/libuberzlib.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a773ef5ce4e21b009bf95073514be4808981c66518c25368afb97469fe0502a -size 31602 diff --git a/android/src/main/jniLibs/x86_64/libutils.a b/android/src/main/jniLibs/x86_64/libutils.a deleted file mode 100644 index e36ad016..00000000 --- a/android/src/main/jniLibs/x86_64/libutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67f0ac604642358050721abf6faeb06c09bd1a40585b0b6b9149cfc3d3769829 -size 339742 diff --git a/android/src/main/jniLibs/x86_64/libviewer.a b/android/src/main/jniLibs/x86_64/libviewer.a deleted file mode 100644 index b7371183..00000000 --- a/android/src/main/jniLibs/x86_64/libviewer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:423ea9531e1f44d7602901e801f998e4d7565dfb7d36183f77eb9525bfb3c65c -size 558048 diff --git a/android/src/main/jniLibs/x86_64/libvkshaders.a b/android/src/main/jniLibs/x86_64/libvkshaders.a deleted file mode 100644 index b015f736..00000000 --- a/android/src/main/jniLibs/x86_64/libvkshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc1ec619b430b3529c14072cb9fa8006d9760675fa035da77e1db11d44b19e67 -size 2390 diff --git a/android/src/main/jniLibs/x86_64/libz.a b/android/src/main/jniLibs/x86_64/libz.a deleted file mode 100644 index 45f95644..00000000 --- a/android/src/main/jniLibs/x86_64/libz.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:231887c29b4cc99afb7ace9f54caab7465483a3f90cb67ac006400cba217e497 -size 135466 diff --git a/android/src/main/jniLibs/x86_64/libzstd.a b/android/src/main/jniLibs/x86_64/libzstd.a deleted file mode 100644 index 4b2c3a81..00000000 --- a/android/src/main/jniLibs/x86_64/libzstd.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bc24c1145057b77348afe327c863266f7983c21afc68503fdbef83379733e08c -size 837570 diff --git a/docs.json b/docs.json new file mode 100644 index 00000000..f177d25e --- /dev/null +++ b/docs.json @@ -0,0 +1,16 @@ +{ + "name": "Thermion", + "description": "3D rendering framework for Dart and/or Flutter", + "logo": "logo.png", + "sidebar": [ + [ + "Getting Started", + [ + ["Overview", "/"], + ["Quick Start", "/quickstart"] + ] + ], + ["Misc.", [["Contributing", "/contributing"]]] + ] + +} diff --git a/docs/android.mdx b/docs/android.mdx new file mode 100644 index 00000000..4020b554 --- /dev/null +++ b/docs/android.mdx @@ -0,0 +1,12 @@ +## Android + +In release mode, you must add the following to your `app/build.gradle`: + +``` + buildTypes { + release { + shrinkResources false + minifyEnabled false + } + } +``` \ No newline at end of file diff --git a/docs/another-page.mdx b/docs/another-page.mdx new file mode 100644 index 00000000..581e0d15 --- /dev/null +++ b/docs/another-page.mdx @@ -0,0 +1 @@ +# Another Page \ No newline at end of file diff --git a/docs/contributing.mdx b/docs/contributing.mdx new file mode 100644 index 00000000..a4466ca5 --- /dev/null +++ b/docs/contributing.mdx @@ -0,0 +1,6 @@ +## Contributing + +Thermion is an open source project and we welcome all contributions from every level of experience. + +Please [join us on Discord](https://discord.gg/h2VdDK3EAQ) if you'd like some guidance or just want to chat. + diff --git a/docs/examples.mdx b/docs/examples.mdx new file mode 100644 index 00000000..c6ccb62b --- /dev/null +++ b/docs/examples.mdx @@ -0,0 +1,8 @@ +# Examples +Thermion is a package for creating 3D applications with Dart and/or Flutter. + +## Polyvox + +iOS app + +## Nick Fisher (Personal Website) \ No newline at end of file diff --git a/docs/filament.mdx b/docs/filament.mdx new file mode 100644 index 00000000..165154f0 --- /dev/null +++ b/docs/filament.mdx @@ -0,0 +1,46 @@ +## Filament + +Thermion uses the [Filament](https://github.com/google/filament) PBR package for much of the heavy lifting - rendering, materials, glTF, and so on. + +Thermion is currently based on the `1.51.2` release of Filament. + +## Building your own materials + +If you want to work with custom materials, you will need some (basic knowledge of the underlying Filament library)[https://google.github.io/filament/Materials.html#compilingmaterials]. + +Things to keep in mind: +- You must compile materials with the correct version of Filament (see the table above). Keep in mind that versions may not be identical across platforms so you may need multiple uberz files for multiple platforms. + +e.g. the lit_opaque.uberz file has been created from a Filament build: + +``` +cd out/cmake-android-release-aarch64/libs/gltfio +uberz -TSHADINGMODEL=lit -TBLENDING=opaque -o lit_opaque_43.uberz lit_opaque +``` +(note that the number in the filename corresponds to the Material version, not the Filament version. Not every Filament version requires a new Material version). + +## Footguns + +### Stripping in release mode + +If you build your app in release mode, you will need to ensure that "Dead Strip" is set to false. + +This is because we only invoke the library at runtime via FFI, so at link time these symbols are otherwise treated as redundant. + +### Animations when backgrounded + +Don't call playAnimation when the app is in the background (i.e inactive/hidden). This will queue, but not start, an animation, and eventually this will overflow the command buffer when the app is foregrounded/resumed. + +If you have some kind of looping animation in your app code, make sure it pauses while the app is backgrounded. + +The results will depend on the actual device used to generate the golden, therefore if you are using a different device (which is likely), your results may not be the same. This is expected. + +# Building Filament from source + +Only the WebGL2/WASM build differs from the official Filament build. + +- Note also need to specifically build imageio/png/tinyexr + + + + diff --git a/ARCHITECTURE.md b/docs/flutter.mdx similarity index 98% rename from ARCHITECTURE.md rename to docs/flutter.mdx index 8b952df9..85cec869 100644 --- a/ARCHITECTURE.md +++ b/docs/flutter.mdx @@ -11,7 +11,7 @@ This is an overview of how the rendering surface is constructed, and how the Flu |iOS|CVPixelBuffer surface (Metal) + Flutter Texture widget| |MacOS|CVMetalTexture render target (Metal) + Flutter Texture widget| -On most platforms, we create Filament with a headless swapchain, then render into a (hardware accelerated) texture that Flutter imports into its own widget hierarchy via a Texture widget. This allows the Filament viewport to be transformed/composed completely within the Flutter hierarchy (i.e. you could rotate/scale/translate the FilamentWidget in Flutter if you wanted, or insert other widgets above/below). +On most platforms, we create Filament with a headless swapchain, then render into a (hardware accelerated) texture that Flutter imports into its own widget hierarchy via a Texture widget. This allows the Filament viewport to be transformed/composed completely within the Flutter hierarchy (i.e. you could rotate/scale/translate the ThermionWidget in Flutter if you wanted, or insert other widgets above/below). Due to performance issues on Windows, we choose a different default approach where Filament renders into its own window, which is then composed with the Flutter window via the system compositor. This only works on Windows 10. diff --git a/docs/images/drawing.png b/docs/images/drawing.png new file mode 100644 index 00000000..87e1931d --- /dev/null +++ b/docs/images/drawing.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:198e1d357c8690e2c3c994acf16b78c48ba33c09cd17ea94a1da41cfa49bb6e9 +size 79668 diff --git a/docs/images/drawing.svg b/docs/images/drawing.svg new file mode 100644 index 00000000..33f58053 --- /dev/null +++ b/docs/images/drawing.svg @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FilamentController (Dart) + ThermionFlutterFFI + ThermionViewerFFI / Filament Engine (etc) + Render thread + Main Flutter Thread + Platform Channel + + + + + + + Sets up OpenGL/Metal/etc rendering context, render target textures/window, etc + Asset loading + + diff --git a/docs/images/macos_min_deployment.png b/docs/images/macos_min_deployment.png new file mode 100644 index 00000000..121bdbf4 Binary files /dev/null and b/docs/images/macos_min_deployment.png differ diff --git a/docs/images/thermion_sample_project.png b/docs/images/thermion_sample_project.png new file mode 100644 index 00000000..c06cee09 Binary files /dev/null and b/docs/images/thermion_sample_project.png differ diff --git a/docs/index.mdx b/docs/index.mdx new file mode 100644 index 00000000..b119fc1f --- /dev/null +++ b/docs/index.mdx @@ -0,0 +1,25 @@ +![Thermion Logo](logo.png) + +Thermion is a framework for creating cross-platform 3D applications with Dart and/or Flutter. + +## Overview + +### Package structure  + +Thermion is divided into two packages: +- `thermion_flutter`, a Flutter package for creating/embedding a rendering surface inside a Flutter app.  +- `thermion_dart`, which contains all the code needed to create a viewer. + +With this structure, the Flutter-specific components are not coupled to the Dart components, meaning Thermion can be used for rendering in both Flutter and non-Flutter applications. + +For example, Thermion ships with examples for rendering with Dart only (no Flutter) with a CLI/headless application on MacOS, and with a Javascript/WASM/HTML applicaiton in browsers. + +`thermion_flutter` exports `thermion_dart`, so if you are working with a Flutter application, you will only need to import `thermion_fluttter`. + +### ThermionViewer (`thermion_dart`) + +// TODO + +### ThermionWidget (`thermion_flutter`) + +// TODO diff --git a/docs/logo.png b/docs/logo.png new file mode 100644 index 00000000..db74c00d Binary files /dev/null and b/docs/logo.png differ diff --git a/docs/logo_square.png b/docs/logo_square.png new file mode 100644 index 00000000..70597c0c Binary files /dev/null and b/docs/logo_square.png differ diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx new file mode 100644 index 00000000..ad685fed --- /dev/null +++ b/docs/quickstart.mdx @@ -0,0 +1,209 @@ +## Quickstart (Flutter) + +> You can find the entire project below in the [examples/flutter/quickstart](examples/flutter/quickstart) folder of the repository. + +1. Switch to Flutter master channel, create a new project, then add `thermion_flutter` as a dependency + +```bash +$ flutter channel master +$ flutter config --enable-native-assets +$ flutter create thermion_sample_project && cd thermion_sample_project +$ flutter pub add thermion_flutter +``` + +2. If running on iOS or MacOS, change the minimum deployment target to OSX 13 + + + +Make sure the `platform` entry refers to `13.0` in your Podfile. + +In `macos/Podfile` (for macOS): +``` +platform :osx, '13.0' +``` + +In `ios/Podfile`, (for iOS): +``` +platform :ios, '13.0' +``` + +Then open XCode: +``` +open macos/Runner.xcworkspace +``` + +and change the minimum deployment target to 13.0: + +![XCode screenshot](images/macos_min_deployment.png) + + + +2. Add a folder containing your assets (glTF model + skybox ktx) to your `pubspec.yaml` asset list + +```yaml +... +flutter + uses-material-design: true + assets: + - assets/ +``` + +3. Create an instance of `ThermionFlutterPlugin` in your app. + +```dart + +class _MyAppState extends State { +  late ThermionFlutterPlugin _thermionFlutterPlugin;  + late Future _thermionViewer; +  void initState() {    + _thermionFlutterPlugin = ThermionFlutterPlugin();    + _thermionViewer = _thermionFlutterPlugin.createViewer();  + } +} + +``` + + +4. Add a `ThermionWidget` to your widget hierarchy + +```dart + +class _MyAppState extends State { + + late ThermionFlutterPlugin _thermionFlutterPlugin;  + late Future _thermionViewer; + void initState() {    + _thermionFlutterPlugin = ThermionFlutterPlugin(); + _thermionViewer = _thermionFlutterPlugin.initialize(); + }    + + Widget build(BuildContext context) { + return Stack(children:[ +     Positioned.fill( + child:ThermionWidget( + plugin:_thermionFlutterPlugin +         )  +     ) +     ]);  + } +} + +``` + +4. Add a button to load the model when pressed + +```dart + +... + +class _MyAppState extends State { + +... + + bool _loaded = false; + + Widget build(BuildContext context) { + return Stack(children:[ +     Positioned.fill( + child:ThermionWidget( + plugin:_thermionFlutterPlugin +         )  +     ), + if (!_loaded) + Center( + child: ElevatedButton( + child: const Text("Load"), + onPressed: () async { + // TODO + _loaded = true; + setState(() {}); + })) +     ]);  +}} +``` + +5. When the button is pressed, load a skybox, lighting and the glb asset + +You will need to import the `dart:math` and `package:vector_math` libraries. + +```dart +import 'package:vector_math/vector_math_64.dart' as v; +import 'dart:math'; + +... + +class _MyAppState extends State { + + ... + + Widget build(BuildContext context) { + return Stack(children:[ + ... + if(!_loaded) + Center( + child: ElevatedButton( + child: const Text("Load"), + onPressed: () async { + var viewer = await _thermionViewer; + await viewer.loadIbl("assets/default_env_ibl.ktx"); + await viewer.loadSkybox("assets/default_env_skybox.ktx"); + await viewer.loadGlb("assets/cube.glb"); + + await viewer.setCameraPosition(0, 1, 10); + await viewer.setCameraRotation(v.Quaternion.axisAngle( + v.Vector3(1, 0, 0), -30 / 180 * pi) * + v.Quaternion.axisAngle(v.Vector3(0, 1, 0), 15 / 180 * pi)); + await viewer.addLight( + LightType.SUN, 7500, 50000, 0, 0, 0, 1, -1, -1); + await viewer.setRendering(true); + _loaded = true; + setState(() {}); + } + ) + ) + ]); + } +} +``` + +Here, we've added a skybox (the background (cube) image rendered behind all other elements in the scene), image-based lighting (where an image is used to determine the direction and intensity of a light source) and a directional light (Sun). + +Anything added to the scene is referred to as an "entity" (including lights and cameras). + +Entities are always added to the scene at position (0,0,0). + +The default scene camera is located at (0,0,0) (and is looking at -Z, or "into" the screen), so by adding a cube at (0,0,0), the camera will now be inside the cube. + +We need to move the camera outside the cube so it's visible. + +6. Change the camera orientation +```dart + var viewer = await _thermionViewer; + await viewer.loadSkybox("assets/default_env_skybox.ktx"); + await viewer.loadGlb("assets/cube.glb"); + + await viewer.setCameraPosition(0, 1, 10); + await viewer.setCameraRotation(v.Quaternion.axisAngle( + v.Vector3(1, 0, 0), -30 / 180 * pi) * + v.Quaternion.axisAngle(v.Vector3(0, 1, 0), 15 / 180 * pi)); +``` + +The cube still won't be visible until we add a light to the scene and tell Thermion to start rendering. + +7. Add a light and turn rendering on +```dart + ... + await viewer.addLight( + LightType.SUN, 7500, 50000, 0, 0, 0, 1, -1, -1); + await viewer.setRendering(true); + ... +```` + +8. Run the project +``` +$ flutter run -d macos +``` + +![Screenshot of Thermion Quickstart project](images/thermion_sample_project.png) + +Your first Thermion project is complete! \ No newline at end of file diff --git a/docs/windows.mdx b/docs/windows.mdx new file mode 100644 index 00000000..c2644256 --- /dev/null +++ b/docs/windows.mdx @@ -0,0 +1,24 @@ +## Windows + +## pubspec.yaml + +On Windows, you will need to add a custom version of `native_toolchain_c` to your `dependency_overrides`. This is currently needed to link static libraries when building a DLL. + +``` +native_toolchain_c: + git: + url: git@github.com:nmfisher/native.git + path: pkgs/native_toolchain_c + ref: 99020084c4687be4c58c7115a167088c0441d1de +``` + +This will eventually be fixed upstream in the `native_toolchain_c` package, so this should be a short-term/temporary issue only. + +## ANGLE build (not currently working) +To support embedding GPU textures in Flutter (rather than copying to a CPU pixel buffer on every frame), we need to build a slightly customized version of Filament that uses GLES on Windows (rather than the default, which uses OpenGL). + +``` +git checkout flutter-filament-windows +mkdir out && cd out +"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build . --target gltf_viewer --config Debug +``` \ No newline at end of file diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle deleted file mode 100644 index 60b5af61..00000000 --- a/example/android/app/build.gradle +++ /dev/null @@ -1,81 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' - -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 33 - ndkVersion "25.2.9519653" - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - applicationId "app.polyvox.flutter_filament_example" - minSdkVersion 22 - targetSdkVersion 31 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - ndk { - abiFilters 'arm64-v8a' // 'x86_64' 'armeabi-v7a' - } - } - - buildTypes { - release { - signingConfig signingConfigs.debug - minifyEnabled true - shrinkResources true - proguardFiles getDefaultProguardFile( - 'proguard-android-optimize.txt'), - 'proguard-rules.pro' - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2" - implementation "androidx.annotation:annotation:1.3.0" - implementation "androidx.core:core:1.7.0" - implementation 'net.java.dev.jna:jna:5.10.0@aar' -} diff --git a/example/android/app/proguard-rules.pro b/example/android/app/proguard-rules.pro deleted file mode 100644 index f67c58ea..00000000 --- a/example/android/app/proguard-rules.pro +++ /dev/null @@ -1,9 +0,0 @@ --keep class io.flutter.app.** { *; } --keep class io.flutter.plugin.** { *; } --keep class io.flutter.util.** { *; } --keep class io.flutter.view.** { *; } --keep class io.flutter.** { *; } --keep class io.flutter.plugins.** { *; } --dontwarn java.awt.* --keep class com.sun.jna.* { *; } --keepclassmembers class * extends com.sun.jna.* { public *; } \ No newline at end of file diff --git a/example/android/app/src/main/kotlin/app/polyvox/flutter_filament_example/MainActivity.kt b/example/android/app/src/main/kotlin/app/polyvox/flutter_filament_example/MainActivity.kt deleted file mode 100644 index fbdcbc30..00000000 --- a/example/android/app/src/main/kotlin/app/polyvox/flutter_filament_example/MainActivity.kt +++ /dev/null @@ -1,10 +0,0 @@ -package app.polyvox.flutter_filament_example - -import io.flutter.embedding.android.FlutterActivity -import io.flutter.embedding.android.TransparencyMode - -class MainActivity: FlutterActivity() { - override fun getTransparencyMode(): TransparencyMode { - return TransparencyMode.transparent - } -} diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index d563b149..00000000 --- a/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/example/android/build.gradle b/example/android/build.gradle deleted file mode 100644 index 2f76fefa..00000000 --- a/example/android/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -buildscript { - ext.kotlin_version = '1.6.0' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" - project.evaluationDependsOn(':app') -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/example/android/gradle.properties b/example/android/gradle.properties deleted file mode 100644 index 94adc3a3..00000000 --- a/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/example/android/settings.gradle b/example/android/settings.gradle deleted file mode 100644 index 121d30d8..00000000 --- a/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} \ No newline at end of file diff --git a/example/assets/lit_opaque_32.uberz b/example/assets/lit_opaque_32.uberz deleted file mode 100644 index a19003d2..00000000 --- a/example/assets/lit_opaque_32.uberz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f3968531385d8ba9db3e8460451ccf55c5e80108caeae813fcfb8f32230dbd2e -size 3607448 diff --git a/example/assets/lit_opaque_43.uberz b/example/assets/lit_opaque_43.uberz deleted file mode 100644 index 5986f870..00000000 --- a/example/assets/lit_opaque_43.uberz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cded95729bd217f86db59866042260dd8049bbff25bbde8fb52f37bd605653fa -size 212643 diff --git a/example/assets/lit_opaque_43_gles.uberz b/example/assets/lit_opaque_43_gles.uberz deleted file mode 100644 index 5986f870..00000000 --- a/example/assets/lit_opaque_43_gles.uberz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cded95729bd217f86db59866042260dd8049bbff25bbde8fb52f37bd605653fa -size 212643 diff --git a/example/assets/lit_opaque_43_metal_macos.uberz b/example/assets/lit_opaque_43_metal_macos.uberz deleted file mode 100644 index a6a41a51..00000000 --- a/example/assets/lit_opaque_43_metal_macos.uberz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d7a46bb2bec8300cb9fcd41a9bd0fecd38c17732ff5afaaa54136c9d1d578a65 -size 2596038 diff --git a/example/assets/shapes/shapes.bin b/example/assets/shapes/shapes.bin deleted file mode 100644 index e159dcdd..00000000 --- a/example/assets/shapes/shapes.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9cd37bd5152ca0d7bde93663e188a537b2ac2bad58eaf69fbac00d9bc2da9f43 -size 93896 diff --git a/example/assets/shapes/shapes.blend b/example/assets/shapes/shapes.blend deleted file mode 100644 index b13524b3..00000000 --- a/example/assets/shapes/shapes.blend +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3085e273974ed731754f59598767923c824dbbfdeebb2a620897e421d6a4689f -size 1212972 diff --git a/example/assets/shapes/shapes.glb b/example/assets/shapes/shapes.glb deleted file mode 100644 index 31340700..00000000 --- a/example/assets/shapes/shapes.glb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3fa9367e8955a1e47e704e56f267854019f0135199a06d8e25f62cec503d67d6 -size 136160 diff --git a/example/assets/shapes/shapes.gltf b/example/assets/shapes/shapes.gltf deleted file mode 100644 index e87aacbd..00000000 --- a/example/assets/shapes/shapes.gltf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf4bf82fd77a54fd6573cded79d1d4db0d0e000c4200c0eadee9ce29425449de -size 32690 diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock deleted file mode 100644 index 30bedf6c..00000000 --- a/example/ios/Podfile.lock +++ /dev/null @@ -1,41 +0,0 @@ -PODS: - - Flutter (1.0.0) - - flutter_filament (0.0.1): - - Flutter - - integration_test (0.0.1): - - Flutter - - path_provider_foundation (0.0.1): - - Flutter - - FlutterMacOS - - permission_handler_apple (9.1.1): - - Flutter - -DEPENDENCIES: - - Flutter (from `Flutter`) - - flutter_filament (from `.symlinks/plugins/flutter_filament/ios`) - - integration_test (from `.symlinks/plugins/integration_test/ios`) - - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - -EXTERNAL SOURCES: - Flutter: - :path: Flutter - flutter_filament: - :path: ".symlinks/plugins/flutter_filament/ios" - integration_test: - :path: ".symlinks/plugins/integration_test/ios" - path_provider_foundation: - :path: ".symlinks/plugins/path_provider_foundation/darwin" - permission_handler_apple: - :path: ".symlinks/plugins/permission_handler_apple/ios" - -SPEC CHECKSUMS: - Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - flutter_filament: 9d744e795935e0fc5308e46a0c5947cb91714848 - integration_test: 13825b8a9334a850581300559b8839134b124670 - path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 - permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6 - -PODFILE CHECKSUM: 7adbc9d59f05e1b01f554ea99b6c79e97f2214a2 - -COCOAPODS: 1.12.1 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf03..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde1211..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d3..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f585..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/example/ios/RunnerTests/RunnerTests.swift b/example/ios/RunnerTests/RunnerTests.swift deleted file mode 100644 index 481885f5..00000000 --- a/example/ios/RunnerTests/RunnerTests.swift +++ /dev/null @@ -1,26 +0,0 @@ -import Flutter -import UIKit -import XCTest - -@testable import flutter_filament - -// This demonstrates a simple unit test of the Swift portion of this plugin's implementation. -// -// See https://developer.apple.com/documentation/xctest for more information about using XCTest. - -class RunnerTests: XCTestCase { - - func testGetPlatformVersion() { - let plugin = FlutterFilamentPlugin() - - let call = FlutterMethodCall(methodName: "getPlatformVersion", arguments: []) - - let resultExpectation = expectation(description: "result block must be called.") - plugin.handle(call) { result in - XCTAssertEqual(result as! String, "iOS " + UIDevice.current.systemVersion) - resultExpectation.fulfill() - } - waitForExpectations(timeout: 1) - } - -} diff --git a/example/lib/camera_matrix_overlay.dart b/example/lib/camera_matrix_overlay.dart deleted file mode 100644 index 2b3cb3ee..00000000 --- a/example/lib/camera_matrix_overlay.dart +++ /dev/null @@ -1,103 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; -import 'package:flutter_filament/filament_controller.dart'; - -class CameraMatrixOverlay extends StatefulWidget { - final FilamentController controller; - final bool showProjectionMatrices; - - const CameraMatrixOverlay( - {super.key, - required this.controller, - required this.showProjectionMatrices}); - - @override - State createState() => _CameraMatrixOverlayState(); -} - -class _CameraMatrixOverlayState extends State { - Timer? _cameraTimer; - String? _cameraPosition; - String? _cameraRotation; - - String? _cameraProjectionMatrix; - String? _cameraCullingProjectionMatrix; - - void _tick(Timer timer) async { - var cameraPosition = await widget.controller.getCameraPosition(); - var cameraRotation = await widget.controller.getCameraRotation(); - - _cameraPosition = - "${cameraPosition.storage.map((v) => v.toStringAsFixed(2))}"; - _cameraRotation = - "${cameraRotation.storage.map((v) => v.toStringAsFixed(2))}"; - - if (widget.showProjectionMatrices) { - var projMatrix = await widget.controller.getCameraProjectionMatrix(); - var cullingMatrix = - await widget.controller.getCameraCullingProjectionMatrix(); - - _cameraProjectionMatrix = - projMatrix.storage.map((v) => v.toStringAsFixed(2)).join(","); - _cameraCullingProjectionMatrix = - cullingMatrix.storage.map((v) => v.toStringAsFixed(2)).join(","); - } - - setState(() {}); - } - - void _updateTimer() { - _cameraTimer?.cancel(); - if (widget.controller.hasViewer.value) { - _cameraTimer = Timer.periodic(const Duration(milliseconds: 50), _tick); - } - } - - @override - void initState() { - super.initState(); - - _updateTimer(); - - widget.controller.hasViewer.addListener(_updateTimer); - } - - @override - void didUpdateWidget(CameraMatrixOverlay oldWidget) { - super.didUpdateWidget(oldWidget); - setState(() {}); - } - - @override - void dispose() { - super.dispose(); - widget.controller.hasViewer.removeListener(_updateTimer); - _cameraTimer?.cancel(); - } - - @override - Widget build(BuildContext context) { - return Container( - decoration: BoxDecoration( - color: Colors.black.withOpacity(0.5), - borderRadius: BorderRadius.circular(29)), - padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text("Camera position : $_cameraPosition $_cameraRotation", - style: const TextStyle(color: Colors.white, fontSize: 12)), - widget.showProjectionMatrices - ? Text("Projection matrix : $_cameraProjectionMatrix", - style: const TextStyle(color: Colors.white, fontSize: 12)) - : Container(), - widget.showProjectionMatrices - ? Text("Culling matrix : $_cameraCullingProjectionMatrix", - style: const TextStyle(color: Colors.white, fontSize: 12)) - : Container(), - ])); - } -} diff --git a/example/lib/example_viewport.dart b/example/lib/example_viewport.dart deleted file mode 100644 index 4cfe2ee5..00000000 --- a/example/lib/example_viewport.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:flutter/widgets.dart'; -import 'package:flutter_filament/filament_controller.dart'; -import 'package:flutter_filament/widgets/filament_gesture_detector.dart'; -import 'package:flutter_filament/widgets/filament_widget.dart'; - -class ExampleViewport extends StatelessWidget { - final FilamentController? controller; - final EdgeInsets padding; - - const ExampleViewport( - {super.key, required this.controller, required this.padding}); - - @override - Widget build(BuildContext context) { - return controller != null - ? Padding( - padding: padding, - child: FilamentGestureDetector( - showControlOverlay: true, - controller: controller!, - child: FilamentWidget( - controller: controller!, - ))) - : Container(); - } -} diff --git a/example/lib/main.dart b/example/lib/main.dart deleted file mode 100644 index 249cede9..00000000 --- a/example/lib/main.dart +++ /dev/null @@ -1,176 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:flutter_filament/filament_controller_ffi.dart'; -import 'package:flutter_filament_example/camera_matrix_overlay.dart'; -import 'package:flutter_filament_example/menus/controller_menu.dart'; -import 'package:flutter_filament_example/example_viewport.dart'; -import 'package:flutter_filament_example/picker_result_widget.dart'; -import 'package:flutter_filament_example/menus/scene_menu.dart'; - -import 'package:flutter_filament/filament_controller.dart'; - -const loadDefaultScene = bool.hasEnvironment('--load-default-scene'); - -void main() async { - print(loadDefaultScene); - runApp(MyApp()); -} - -class MyApp extends StatefulWidget { - const MyApp({Key? key}) : super(key: key); - - @override - State createState() => _MyAppState(); -} - -class _MyAppState extends State with SingleTickerProviderStateMixin { - @override - Widget build(BuildContext context) { - return MaterialApp( - theme: ThemeData(useMaterial3: true), - // showPerformanceOverlay: true, - home: const Scaffold(body: ExampleWidget())); - } -} - -class ExampleWidget extends StatefulWidget { - const ExampleWidget({super.key}); - - @override - State createState() { - return ExampleWidgetState(); - } -} - -enum MenuType { controller, assets, camera, misc } - -class ExampleWidgetState extends State { - FilamentController? _filamentController; - - EdgeInsets _viewportMargin = EdgeInsets.zero; - - // these are all the options that can be set via the menu - // we store them here - static bool rendering = false; - static int framerate = 60; - static bool postProcessing = true; - static bool frustumCulling = true; - static ManipulatorMode cameraManipulatorMode = ManipulatorMode.ORBIT; - - static double zoomSpeed = 0.01; - static double orbitSpeedX = 0.01; - static double orbitSpeedY = 0.01; - - static FilamentEntity? last; - - static bool hasSkybox = false; - static bool coneHidden = false; - - static FilamentEntity? shapes; - static FilamentEntity? flightHelmet; - static FilamentEntity? buster; - - static List? animations; - - static FilamentEntity? directionalLight; - - static bool loop = false; - static final showProjectionMatrices = ValueNotifier(false); - - late StreamSubscription _listener; - - @override - void initState() { - super.initState(); - if (loadDefaultScene) { - WidgetsBinding.instance.addPostFrameCallback((timeStamp) async { - setState(() { - _filamentController = FilamentControllerFFI(); - }); - await Future.delayed(const Duration(milliseconds: 100)); - WidgetsBinding.instance.addPostFrameCallback((timeStamp) async { - await _filamentController!.createViewer(); - await _filamentController! - .loadSkybox("assets/default_env/default_env_skybox.ktx"); - await _filamentController!.setRendering(true); - await _filamentController!.loadGlb("assets/shapes/shapes.glb"); - }); - }); - } - } - - @override - void dispose() { - super.dispose(); - _listener.cancel(); - } - - @override - Widget build(BuildContext context) { - return Stack(children: [ - Positioned.fill( - child: ExampleViewport( - controller: _filamentController, - padding: _viewportMargin, - ), - ), - Align( - alignment: Alignment.bottomCenter, - child: Container( - padding: const EdgeInsets.only(bottom: 30), - height: 100, - color: Colors.white, - child: Row(crossAxisAlignment: CrossAxisAlignment.end, children: [ - ControllerMenu( - controller: _filamentController, - onControllerDestroyed: () {}, - onControllerCreated: (controller) { - setState(() { - _filamentController = controller; - _listener = _filamentController!.onLoad - .listen((FilamentEntity entity) { - print("Set last to $entity"); - last = entity; - if (mounted) { - setState(() {}); - } - print(_filamentController!.getNameForEntity(entity) ?? - "NAME NOT FOUND"); - }); - }); - }), - SceneMenu( - controller: _filamentController, - ), - Expanded(child: Container()), - TextButton( - child: const Text("Toggle viewport size"), - onPressed: () { - setState(() { - _viewportMargin = (_viewportMargin == EdgeInsets.zero) - ? const EdgeInsets.all(30) - : EdgeInsets.zero; - }); - }, - ) - ]))), - _filamentController == null - ? Container() - : Padding( - padding: const EdgeInsets.only(top: 40, left: 20, right: 20), - child: ValueListenableBuilder( - valueListenable: showProjectionMatrices, - builder: (ctx, value, child) => CameraMatrixOverlay( - controller: _filamentController!, - showProjectionMatrices: value)), - ), - _filamentController == null - ? Container() - : Align( - alignment: Alignment.topRight, - child: PickerResultWidget(controller: _filamentController!), - ) - ]); - } -} diff --git a/example/lib/menus/asset_submenu.dart b/example/lib/menus/asset_submenu.dart deleted file mode 100644 index 31e73d35..00000000 --- a/example/lib/menus/asset_submenu.dart +++ /dev/null @@ -1,309 +0,0 @@ -import 'dart:math'; - -import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; -import 'package:flutter_filament/filament_controller.dart'; -import 'package:flutter_filament_example/main.dart'; -import 'package:permission_handler/permission_handler.dart'; - -class AssetSubmenu extends StatefulWidget { - final FilamentController controller; - const AssetSubmenu({super.key, required this.controller}); - - @override - State createState() => _AssetSubmenuState(); -} - -class _AssetSubmenuState extends State { - @override - void initState() { - super.initState(); - } - - Widget _shapesSubmenu() { - var children = [ - MenuItemButton( - onPressed: () async { - if (ExampleWidgetState.shapes == null) { - ExampleWidgetState.shapes = - await widget.controller.loadGlb('assets/shapes/shapes.glb'); - ExampleWidgetState.animations = await widget.controller - .getAnimationNames(ExampleWidgetState.shapes!); - } else { - await widget.controller.removeAsset(ExampleWidgetState.shapes!); - ExampleWidgetState.shapes = null; - ExampleWidgetState.animations = null; - } - }, - child: const Text('Load GLB')), - MenuItemButton( - onPressed: ExampleWidgetState.shapes != null - ? null - : () async { - if (ExampleWidgetState.shapes != null) { - widget.controller.removeAsset(ExampleWidgetState.shapes!); - } - ExampleWidgetState.shapes = await widget.controller - .loadGltf('assets/shapes/shapes.gltf', 'assets/shapes'); - }, - child: const Text('Load GLTF')), - MenuItemButton( - onPressed: ExampleWidgetState.shapes == null - ? null - : () async { - await widget.controller - .transformToUnitCube(ExampleWidgetState.shapes!); - }, - child: const Text('Transform to unit cube')), - MenuItemButton( - onPressed: () async { - var names = await widget.controller - .getMorphTargetNames(ExampleWidgetState.shapes!, "Cylinder"); - await showDialog( - context: context, - builder: (ctx) { - return Container( - height: 100, - width: 100, - color: Colors.white, - child: Text(names.join(","))); - }); - }, - child: const Text("Show morph target names for Cylinder")), - MenuItemButton( - onPressed: () async { - widget.controller.setMorphTargetWeights( - ExampleWidgetState.shapes!, "Cylinder", List.filled(4, 1.0)); - }, - child: const Text("set Cylinder morph weights to 1")), - MenuItemButton( - onPressed: () async { - widget.controller.setMorphTargetWeights( - ExampleWidgetState.shapes!, "Cylinder", List.filled(4, 0.0)); - }, - child: const Text("Set Cylinder morph weights to 0")), - MenuItemButton( - onPressed: () async { - widget.controller - .setPosition(ExampleWidgetState.shapes!, 1.0, 1.0, -1.0); - }, - child: const Text('Set position to 1, 1, -1'), - ), - MenuItemButton( - onPressed: () async { - if (ExampleWidgetState.coneHidden) { - widget.controller.reveal(ExampleWidgetState.shapes!, "Cone"); - } else { - widget.controller.hide(ExampleWidgetState.shapes!, "Cone"); - } - - ExampleWidgetState.coneHidden = !ExampleWidgetState.coneHidden; - }, - child: - Text(ExampleWidgetState.coneHidden ? 'show cone' : 'hide cone')), - MenuItemButton( - onPressed: ExampleWidgetState.shapes == null - ? null - : () async { - widget.controller.setMaterialColor( - ExampleWidgetState.shapes!, "Cone", 0, Colors.purple); - }, - child: const Text("Set cone material color to purple")), - MenuItemButton( - onPressed: () async { - ExampleWidgetState.loop = !ExampleWidgetState.loop; - }, - child: Text( - "Toggle animation looping ${ExampleWidgetState.loop ? "OFF" : "ON"}")) - ]; - if (ExampleWidgetState.animations != null) { - children.addAll(ExampleWidgetState.animations!.map((a) => MenuItemButton( - onPressed: () { - widget.controller.playAnimation(ExampleWidgetState.shapes!, - ExampleWidgetState.animations!.indexOf(a), - replaceActive: true, - crossfade: 0.5, - loop: ExampleWidgetState.loop); - }, - child: Text( - "play animation ${ExampleWidgetState.animations!.indexOf(a)} (replace/fade)")))); - children.addAll(ExampleWidgetState.animations!.map((a) => MenuItemButton( - onPressed: () { - widget.controller.playAnimation(ExampleWidgetState.shapes!, - ExampleWidgetState.animations!.indexOf(a), - replaceActive: false, loop: ExampleWidgetState.loop); - }, - child: Text( - "Play animation ${ExampleWidgetState.animations!.indexOf(a)} (noreplace)")))); - } - - return SubmenuButton(menuChildren: children, child: const Text("Shapes")); - } - - @override - Widget build(BuildContext context) { - return SubmenuButton( - menuChildren: [ - _shapesSubmenu(), - MenuItemButton( - onPressed: () async { - ExampleWidgetState.directionalLight = await widget.controller - .addLight(1, 6500, 150000, 0, 1, 0, 0, -1, 0, true); - }, - child: const Text("Add directional light"), - ), - MenuItemButton( - onPressed: () async { - await widget.controller.clearLights(); - }, - child: const Text("Clear lights"), - ), - MenuItemButton( - onPressed: () async { - if (ExampleWidgetState.buster == null) { - ExampleWidgetState.buster = await widget.controller.loadGltf( - "assets/BusterDrone/scene.gltf", "assets/BusterDrone", - force: true); - await widget.controller - .playAnimation(ExampleWidgetState.buster!, 0, loop: true); - ExampleWidgetState.animations = await widget.controller - .getAnimationNames(ExampleWidgetState.shapes!); - } else { - await widget.controller.removeAsset(ExampleWidgetState.buster!); - ExampleWidgetState.buster = null; - } - }, - child: Text(ExampleWidgetState.buster == null - ? 'Load buster' - : 'Remove buster')), - MenuItemButton( - onPressed: () async { - if (ExampleWidgetState.flightHelmet == null) { - ExampleWidgetState.flightHelmet ??= await widget.controller - .loadGltf('assets/FlightHelmet/FlightHelmet.gltf', - 'assets/FlightHelmet', - force: true); - } else { - await widget.controller - .removeAsset(ExampleWidgetState.flightHelmet!); - ExampleWidgetState.flightHelmet = null; - } - }, - child: Text(ExampleWidgetState.flightHelmet == null - ? 'Load flight helmet' - : 'Remove flight helmet')), - MenuItemButton( - onPressed: () { - widget.controller.setBackgroundColor(const Color(0xFF73C9FA)); - }, - child: const Text("Set background color")), - MenuItemButton( - onPressed: () { - widget.controller.setBackgroundImage('assets/background.ktx'); - }, - child: const Text("Load background image")), - MenuItemButton( - onPressed: () { - widget.controller.setBackgroundImage('assets/background.ktx', - fillHeight: true); - }, - child: const Text("Load background image (fill height)")), - MenuItemButton( - onPressed: () { - if (ExampleWidgetState.hasSkybox) { - widget.controller.removeSkybox(); - } else { - widget.controller - .loadSkybox('assets/default_env/default_env_skybox.ktx'); - } - ExampleWidgetState.hasSkybox = !ExampleWidgetState.hasSkybox; - }, - child: Text(ExampleWidgetState.hasSkybox - ? 'Remove skybox' - : 'Load skybox')), - MenuItemButton( - onPressed: () { - widget.controller - .loadIbl('assets/default_env/default_env_ibl.ktx'); - }, - child: const Text('Load IBL')), - MenuItemButton( - onPressed: () async { - await Permission.microphone.request(); - }, - child: const Text("Request permissions (tests inactive->resume)")), - MenuItemButton( - onPressed: () async { - await widget.controller.clearAssets(); - ExampleWidgetState.flightHelmet = null; - ExampleWidgetState.buster = null; - ExampleWidgetState.shapes = null; - }, - child: const Text('Clear assets')), - ], - child: const Text("Assets"), - ); - } -} - - -// _item(() async { -// var frameData = Float32List.fromList( -// List.generate(120, (i) => i / 120).expand((x) { -// var vals = List.filled(7, x); -// vals[3] = 1.0; -// // vals[4] = 0; -// vals[5] = 0; -// vals[6] = 0; -// return vals; -// }).toList()); - -// widget.controller!.setBoneAnimation( -// _shapes!, -// BoneAnimationData( -// "Bone.001", ["Cube.001"], frameData, 1000.0 / 60.0)); -// // , -// // "Bone.001", -// // "Cube.001", -// // BoneTransform([Vec3(x: 0, y: 0.0, z: 0.0)], -// // [Quaternion(x: 1, y: 1, z: 1, w: 1)])); -// }, 'construct bone animation'), - -// _item(() async { -// var morphs = await widget.controller! -// .getMorphTargetNames(_shapes!, "Cylinder"); -// final animation = AnimationBuilder( -// availableMorphs: morphs, -// framerate: 30, -// meshName: "Cylinder") -// .setDuration(4) -// .setMorphTargets(["Key 1", "Key 2"]) -// .interpolateMorphWeights(0, 4, 0, 1) -// .build(); -// widget.controller!.setMorphAnimationData(_shapes!, animation); -// }, "animate cylinder morph weights #1 and #2"), -// _item(() async { -// var morphs = await widget.controller! -// .getMorphTargetNames(_shapes!, "Cylinder"); -// final animation = AnimationBuilder( -// availableMorphs: morphs, -// framerate: 30, -// meshName: "Cylinder") -// .setDuration(4) -// .setMorphTargets(["Key 3", "Key 4"]) -// .interpolateMorphWeights(0, 4, 0, 1) -// .build(); -// widget.controller!.setMorphAnimationData(_shapes!, animation); -// }, "animate cylinder morph weights #3 and #4"), -// _item(() async { -// var morphs = await widget.controller! -// .getMorphTargetNames(_shapes!, "Cube"); -// final animation = AnimationBuilder( -// availableMorphs: morphs, framerate: 30, meshName: "Cube") -// .setDuration(4) -// .setMorphTargets(["Key 1", "Key 2"]) -// .interpolateMorphWeights(0, 4, 0, 1) -// .build(); -// widget.controller!.setMorphAnimationData(_shapes!, animation); -// }, "animate shapes morph weights #1 and #2"), - diff --git a/example/lib/menus/controller_menu.dart b/example/lib/menus/controller_menu.dart deleted file mode 100644 index b18c3461..00000000 --- a/example/lib/menus/controller_menu.dart +++ /dev/null @@ -1,117 +0,0 @@ -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; -import 'package:flutter_filament/filament_controller.dart'; -import 'package:flutter_filament/filament_controller_ffi.dart'; - -class ControllerMenu extends StatefulWidget { - final FilamentController? controller; - final void Function(FilamentController controller) onControllerCreated; - final void Function() onControllerDestroyed; - - ControllerMenu( - {this.controller, - required this.onControllerCreated, - required this.onControllerDestroyed}); - - @override - State createState() => _ControllerMenuState(); -} - -class _ControllerMenuState extends State { - FilamentController? _filamentController; - final FocusNode _buttonFocusNode = FocusNode(debugLabel: 'Camera Menu'); - - void _createController({String? uberArchivePath}) { - if (_filamentController != null) { - throw Exception("Controller already exists"); - } - _filamentController = - FilamentControllerFFI(uberArchivePath: uberArchivePath); - widget.onControllerCreated(_filamentController!); - } - - @override - void initState() { - super.initState(); - _filamentController = widget.controller; - } - - @override - void didUpdateWidget(ControllerMenu oldWidget) { - super.didUpdateWidget(oldWidget); - if (widget.controller != _filamentController) { - setState(() { - _filamentController = widget.controller; - }); - } - } - - @override - Widget build(BuildContext context) { - var items = []; - if (_filamentController?.hasViewer.value != true) { - items.addAll([ - MenuItemButton( - child: const Text("Create FilamentViewer"), - onPressed: _filamentController == null - ? null - : () { - _filamentController!.createViewer(); - }, - ), - MenuItemButton( - child: const Text("Create FilamentController (default ubershader)"), - onPressed: () { - _createController(); - }, - ), - MenuItemButton( - child: const Text( - "Create FilamentController (custom ubershader - lit opaque only)"), - onPressed: () { - _createController( - uberArchivePath: Platform.isWindows - ? "assets/lit_opaque_32.uberz" - : Platform.isMacOS - ? "assets/lit_opaque_43.uberz" - : Platform.isIOS - ? "assets/lit_opaque_43.uberz" - : "assets/lit_opaque_43_gles.uberz"); - }, - ) - ]); - } else { - items.addAll([ - MenuItemButton( - child: const Text("Destroy viewer"), - onPressed: () { - _filamentController!.destroy(); - _filamentController = null; - widget.onControllerDestroyed(); - setState(() {}); - }, - ) - ]); - } - return MenuAnchor( - childFocusNode: _buttonFocusNode, - menuChildren: items, - builder: - (BuildContext context, MenuController controller, Widget? child) { - return Align( - alignment: Alignment.bottomLeft, - child: TextButton( - onPressed: () { - if (controller.isOpen) { - controller.close(); - } else { - controller.open(); - } - }, - child: const Text("Controller / Viewer"), - )); - }); - } -} diff --git a/example/lib/menus/rendering_submenu.dart b/example/lib/menus/rendering_submenu.dart deleted file mode 100644 index 6f65d4be..00000000 --- a/example/lib/menus/rendering_submenu.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; -import 'package:flutter_filament/filament_controller.dart'; -import 'package:flutter_filament_example/main.dart'; - -class RenderingSubmenu extends StatefulWidget { - final FilamentController controller; - - const RenderingSubmenu({super.key, required this.controller}); - - @override - State createState() => _RenderingSubmenuState(); -} - -class _RenderingSubmenuState extends State { - @override - Widget build(BuildContext context) { - return SubmenuButton( - menuChildren: [ - MenuItemButton( - onPressed: () { - widget.controller.render(); - }, - child: const Text("Render single frame"), - ), - MenuItemButton( - onPressed: () { - ExampleWidgetState.rendering = !ExampleWidgetState.rendering; - widget.controller.setRendering(ExampleWidgetState.rendering); - }, - child: Text( - "Set continuous rendering to ${!ExampleWidgetState.rendering}"), - ), - MenuItemButton( - onPressed: () { - ExampleWidgetState.framerate = - ExampleWidgetState.framerate == 60 ? 30 : 60; - widget.controller.setFrameRate(ExampleWidgetState.framerate); - }, - child: Text( - "Toggle framerate (currently $ExampleWidgetState.framerate) "), - ), - MenuItemButton( - onPressed: () { - widget.controller.setToneMapping(ToneMapper.LINEAR); - }, - child: const Text("Set tone mapping to linear"), - ), - MenuItemButton( - onPressed: () { - ExampleWidgetState.postProcessing = - !ExampleWidgetState.postProcessing; - widget.controller - .setPostProcessing(ExampleWidgetState.postProcessing); - }, - child: Text( - "${ExampleWidgetState.postProcessing ? "Disable" : "Enable"} postprocessing"), - ), - ], - child: const Text("Rendering"), - ); - } -} diff --git a/example/lib/menus/scene_menu.dart b/example/lib/menus/scene_menu.dart deleted file mode 100644 index 56367c14..00000000 --- a/example/lib/menus/scene_menu.dart +++ /dev/null @@ -1,68 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:flutter_filament/filament_controller.dart'; -import 'package:flutter_filament_example/menus/asset_submenu.dart'; -import 'package:flutter_filament_example/menus/camera_submenu.dart'; -import 'package:flutter_filament_example/menus/rendering_submenu.dart'; - -class SceneMenu extends StatefulWidget { - final FilamentController? controller; - - const SceneMenu({super.key, required this.controller}); - - @override - State createState() { - return _SceneMenuState(); - } -} - -class _SceneMenuState extends State { - @override - void didUpdateWidget(SceneMenu oldWidget) { - super.didUpdateWidget(oldWidget); - if (widget.controller != null && - widget.controller != oldWidget.controller || - widget.controller!.hasViewer != oldWidget.controller!.hasViewer) { - setState(() {}); - } - } - - @override - Widget build(BuildContext context) { - return ValueListenableBuilder( - valueListenable: - widget.controller?.hasViewer ?? ValueNotifier(false), - builder: (BuildContext ctx, bool hasViewer, Widget? child) { - return MenuAnchor( - menuChildren: widget.controller == null - ? [] - : [ - RenderingSubmenu( - controller: widget.controller!, - ), - AssetSubmenu(controller: widget.controller!), - CameraSubmenu( - controller: widget.controller!, - ), - ], - builder: (BuildContext context, MenuController controller, - Widget? child) { - return Align( - alignment: Alignment.bottomLeft, - child: TextButton( - onPressed: !hasViewer - ? null - : () { - if (controller.isOpen) { - controller.close(); - } else { - controller.open(); - } - }, - child: const Text("Scene"), - )); - }, - ); - }); - } -} diff --git a/example/linux/flutter/generated_plugin_registrant.cc b/example/linux/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 98d022b4..00000000 --- a/example/linux/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include - -void fl_register_plugins(FlPluginRegistry* registry) { - g_autoptr(FlPluginRegistrar) flutter_filament_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterFilamentPlugin"); - flutter_filament_plugin_register_with_registrar(flutter_filament_registrar); -} diff --git a/example/makefile b/example/makefile deleted file mode 100644 index b0562352..00000000 --- a/example/makefile +++ /dev/null @@ -1,7 +0,0 @@ -include ../makefile - -# building on MacOS, we currently just delete the macos/include -# and macos/src directories and copy from iOS - -sync-libs-macos-and-update-pods: sync-libs-macos - pushd macos && pod update \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock deleted file mode 100644 index 13549bc4..00000000 --- a/example/pubspec.lock +++ /dev/null @@ -1,520 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - archive: - dependency: transitive - description: - name: archive - sha256: "7e0d52067d05f2e0324268097ba723b71cb41ac8a6a2b24d1edf9c536b987b03" - url: "https://pub.dev" - source: hosted - version: "3.4.6" - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - characters: - dependency: transitive - description: - name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - collection: - dependency: transitive - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - crypto: - dependency: "direct dev" - description: - name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.dev" - source: hosted - version: "3.0.3" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d - url: "https://pub.dev" - source: hosted - version: "1.0.6" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - ffi: - dependency: transitive - description: - name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - file: - dependency: transitive - description: - name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_driver: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - flutter_filament: - dependency: "direct main" - description: - path: ".." - relative: true - source: path - version: "0.5.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493 - url: "https://pub.dev" - source: hosted - version: "1.0.4" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - fuchsia_remote_debug_protocol: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - image: - dependency: transitive - description: - name: image - sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" - url: "https://pub.dev" - source: hosted - version: "3.3.0" - image_compare: - dependency: "direct dev" - description: - name: image_compare - sha256: "774e9ef1558ca328191fe9690e8e024159a3a2db6ea4ef6b65bea0faa3631b74" - url: "https://pub.dev" - source: hosted - version: "1.1.2" - integration_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - intl: - dependency: transitive - description: - name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" - url: "https://pub.dev" - source: hosted - version: "0.18.1" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: f38a2c91c12f31726ca13015fbab3d2e9440edcb7c17b8b36ed9b85ed6eee6a2 - url: "https://pub.dev" - source: hosted - version: "9.0.11" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: "23770c69594f5260a79fe9d84e29f8b175d1b05d128e751c904b3cdf910e5dfc" - url: "https://pub.dev" - source: hosted - version: "1.0.9" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: b06739349ec2477e943055aea30172c5c7000225f79dad4702e2ec0eda79a6ff - url: "https://pub.dev" - source: hosted - version: "1.0.5" - lints: - dependency: transitive - description: - name: lints - sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c - url: "https://pub.dev" - source: hosted - version: "1.0.1" - matcher: - dependency: transitive - description: - name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" - url: "https://pub.dev" - source: hosted - version: "0.12.16" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" - url: "https://pub.dev" - source: hosted - version: "0.8.0" - meta: - dependency: transitive - description: - name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 - url: "https://pub.dev" - source: hosted - version: "1.11.0" - path: - dependency: transitive - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" - path_provider: - dependency: "direct main" - description: - name: path_provider - sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa - url: "https://pub.dev" - source: hosted - version: "2.1.1" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1" - url: "https://pub.dev" - source: hosted - version: "2.2.0" - path_provider_foundation: - dependency: transitive - description: - name: path_provider_foundation - sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" - url: "https://pub.dev" - source: hosted - version: "2.3.1" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.dev" - source: hosted - version: "2.2.1" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" - url: "https://pub.dev" - source: hosted - version: "2.2.1" - permission_handler: - dependency: "direct main" - description: - name: permission_handler - sha256: "284a66179cabdf942f838543e10413246f06424d960c92ba95c84439154fcac8" - url: "https://pub.dev" - source: hosted - version: "11.0.1" - permission_handler_android: - dependency: transitive - description: - name: permission_handler_android - sha256: f9fddd3b46109bd69ff3f9efa5006d2d309b7aec0f3c1c5637a60a2d5659e76e - url: "https://pub.dev" - source: hosted - version: "11.1.0" - permission_handler_apple: - dependency: transitive - description: - name: permission_handler_apple - sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5" - url: "https://pub.dev" - source: hosted - version: "9.1.4" - permission_handler_platform_interface: - dependency: transitive - description: - name: permission_handler_platform_interface - sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4" - url: "https://pub.dev" - source: hosted - version: "3.12.0" - permission_handler_windows: - dependency: transitive - description: - name: permission_handler_windows - sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098 - url: "https://pub.dev" - source: hosted - version: "0.1.3" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: eeb2d1428ee7f4170e2bd498827296a18d4e7fc462b71727d111c0ac7707cfa6 - url: "https://pub.dev" - source: hosted - version: "6.0.1" - platform: - dependency: transitive - description: - name: platform - sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59" - url: "https://pub.dev" - source: hosted - version: "3.1.3" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d - url: "https://pub.dev" - source: hosted - version: "2.1.6" - pointycastle: - dependency: transitive - description: - name: pointycastle - sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" - url: "https://pub.dev" - source: hosted - version: "3.7.3" - process: - dependency: transitive - description: - name: process - sha256: "266ca5be5820feefc777793d0a583acfc8c40834893c87c00c6c09e2cf58ea42" - url: "https://pub.dev" - source: hosted - version: "5.0.1" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - sync_http: - dependency: transitive - description: - name: sync_http - sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" - url: "https://pub.dev" - source: hosted - version: "0.3.1" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" - tuple: - dependency: transitive - description: - name: tuple - sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 - url: "https://pub.dev" - source: hosted - version: "2.0.2" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" - source: hosted - version: "1.3.2" - universal_io: - dependency: transitive - description: - name: universal_io - sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" - url: "https://pub.dev" - source: hosted - version: "2.2.2" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: a13d5503b4facefc515c8c587ce3cf69577a7b064a9f1220e005449cf1f64aad - url: "https://pub.dev" - source: hosted - version: "12.0.0" - web: - dependency: transitive - description: - name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 - url: "https://pub.dev" - source: hosted - version: "0.3.0" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b - url: "https://pub.dev" - source: hosted - version: "2.4.0" - webdriver: - dependency: transitive - description: - name: webdriver - sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" - url: "https://pub.dev" - source: hosted - version: "3.0.3" - win32: - dependency: transitive - description: - name: win32 - sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3" - url: "https://pub.dev" - source: hosted - version: "5.0.9" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" - url: "https://pub.dev" - source: hosted - version: "1.0.3" - xml: - dependency: transitive - description: - name: xml - sha256: af5e77e9b83f2f4adc5d3f0a4ece1c7f45a2467b695c2540381bac793e34e556 - url: "https://pub.dev" - source: hosted - version: "6.4.2" -sdks: - dart: ">=3.2.0-194.0.dev <4.0.0" - flutter: ">=3.16.0-0.2.pre" diff --git a/example/pubspec.yaml b/example/pubspec.yaml deleted file mode 100644 index e2801abd..00000000 --- a/example/pubspec.yaml +++ /dev/null @@ -1,49 +0,0 @@ -name: flutter_filament_example -description: Demonstrates how to use the flutter_filament plugin. - -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -environment: - sdk: ">=3.0.0 <4.0.0" - -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. -dependencies: - flutter: - sdk: flutter - path_provider: - flutter_filament: - path: ../ - permission_handler: - cupertino_icons: ^1.0.2 - -dev_dependencies: - flutter_test: - sdk: flutter - integration_test: - sdk: flutter - flutter_lints: ^1.0.0 - crypto: - image_compare: ^1.1.2 - - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - uses-material-design: true - assets: - - assets/ - - assets/shapes/ - - assets/default_env/ - - assets/BusterDrone/ - - assets/BusterDrone/textures/ - - assets/FlightHelmet/ - \ No newline at end of file diff --git a/example/web/index.html b/example/web/index.html deleted file mode 100644 index bd7bcbe9..00000000 --- a/example/web/index.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - flutter_filament_example - - - - - - - -
-
- - - - diff --git a/example/windows/flutter/generated_plugin_registrant.cc b/example/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 754e1cb7..00000000 --- a/example/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,17 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include -#include - -void RegisterPlugins(flutter::PluginRegistry* registry) { - FlutterFilamentPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("FlutterFilamentPluginCApi")); - PermissionHandlerWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); -} diff --git a/examples/assets/1.glb b/examples/assets/1.glb new file mode 100644 index 00000000..f6e5c4cf --- /dev/null +++ b/examples/assets/1.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a1d72d69da8b933bde5453ef2000612b561f8ddfa536a7ad89288ef11eb876d +size 1624 diff --git a/examples/assets/2.glb b/examples/assets/2.glb new file mode 100644 index 00000000..a5bd07f7 --- /dev/null +++ b/examples/assets/2.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe0151ced8fd8609f9692f3d62dbd30890dada97cb6995572e37c7e7b4440d86 +size 21304 diff --git a/examples/assets/3.glb b/examples/assets/3.glb new file mode 100644 index 00000000..de666f7c --- /dev/null +++ b/examples/assets/3.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f8b793f6513cf83f80ce9c63c7b51d329908b1991f17ca642911634b15b32de +size 34172 diff --git a/example/assets/BusterDrone/scene.bin b/examples/assets/BusterDrone/scene.bin similarity index 100% rename from example/assets/BusterDrone/scene.bin rename to examples/assets/BusterDrone/scene.bin diff --git a/example/assets/BusterDrone/scene.gltf b/examples/assets/BusterDrone/scene.gltf similarity index 100% rename from example/assets/BusterDrone/scene.gltf rename to examples/assets/BusterDrone/scene.gltf diff --git a/example/assets/BusterDrone/textures/Boden_baseColor.jpg b/examples/assets/BusterDrone/textures/Boden_baseColor.jpg similarity index 100% rename from example/assets/BusterDrone/textures/Boden_baseColor.jpg rename to examples/assets/BusterDrone/textures/Boden_baseColor.jpg diff --git a/example/assets/BusterDrone/textures/Boden_metallicRoughness.jpg b/examples/assets/BusterDrone/textures/Boden_metallicRoughness.jpg similarity index 100% rename from example/assets/BusterDrone/textures/Boden_metallicRoughness.jpg rename to examples/assets/BusterDrone/textures/Boden_metallicRoughness.jpg diff --git a/example/assets/BusterDrone/textures/Boden_normal.jpg b/examples/assets/BusterDrone/textures/Boden_normal.jpg similarity index 100% rename from example/assets/BusterDrone/textures/Boden_normal.jpg rename to examples/assets/BusterDrone/textures/Boden_normal.jpg diff --git a/example/assets/BusterDrone/textures/body_baseColor.jpg b/examples/assets/BusterDrone/textures/body_baseColor.jpg similarity index 100% rename from example/assets/BusterDrone/textures/body_baseColor.jpg rename to examples/assets/BusterDrone/textures/body_baseColor.jpg diff --git a/example/assets/BusterDrone/textures/body_emissive.jpg b/examples/assets/BusterDrone/textures/body_emissive.jpg similarity index 100% rename from example/assets/BusterDrone/textures/body_emissive.jpg rename to examples/assets/BusterDrone/textures/body_emissive.jpg diff --git a/example/assets/BusterDrone/textures/body_metallicRoughness.jpg b/examples/assets/BusterDrone/textures/body_metallicRoughness.jpg similarity index 100% rename from example/assets/BusterDrone/textures/body_metallicRoughness.jpg rename to examples/assets/BusterDrone/textures/body_metallicRoughness.jpg diff --git a/example/assets/BusterDrone/textures/body_normal.jpg b/examples/assets/BusterDrone/textures/body_normal.jpg similarity index 100% rename from example/assets/BusterDrone/textures/body_normal.jpg rename to examples/assets/BusterDrone/textures/body_normal.jpg diff --git a/example/assets/BusterDrone/textures/material_baseColor.jpg b/examples/assets/BusterDrone/textures/material_baseColor.jpg similarity index 100% rename from example/assets/BusterDrone/textures/material_baseColor.jpg rename to examples/assets/BusterDrone/textures/material_baseColor.jpg diff --git a/example/assets/BusterDrone/textures/material_metallicRoughness.jpg b/examples/assets/BusterDrone/textures/material_metallicRoughness.jpg similarity index 100% rename from example/assets/BusterDrone/textures/material_metallicRoughness.jpg rename to examples/assets/BusterDrone/textures/material_metallicRoughness.jpg diff --git a/example/assets/BusterDrone/textures/material_normal.jpg b/examples/assets/BusterDrone/textures/material_normal.jpg similarity index 100% rename from example/assets/BusterDrone/textures/material_normal.jpg rename to examples/assets/BusterDrone/textures/material_normal.jpg diff --git a/example/assets/FlightHelmet/FlightHelmet.bin b/examples/assets/FlightHelmet/FlightHelmet.bin similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet.bin rename to examples/assets/FlightHelmet/FlightHelmet.bin diff --git a/example/assets/FlightHelmet/FlightHelmet.gltf b/examples/assets/FlightHelmet/FlightHelmet.gltf similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet.gltf rename to examples/assets/FlightHelmet/FlightHelmet.gltf diff --git a/example/assets/FlightHelmet/FlightHelmet_baseColor.png b/examples/assets/FlightHelmet/FlightHelmet_baseColor.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_baseColor.png rename to examples/assets/FlightHelmet/FlightHelmet_baseColor.png diff --git a/example/assets/FlightHelmet/FlightHelmet_baseColor1.png b/examples/assets/FlightHelmet/FlightHelmet_baseColor1.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_baseColor1.png rename to examples/assets/FlightHelmet/FlightHelmet_baseColor1.png diff --git a/example/assets/FlightHelmet/FlightHelmet_baseColor2.png b/examples/assets/FlightHelmet/FlightHelmet_baseColor2.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_baseColor2.png rename to examples/assets/FlightHelmet/FlightHelmet_baseColor2.png diff --git a/example/assets/FlightHelmet/FlightHelmet_baseColor3.png b/examples/assets/FlightHelmet/FlightHelmet_baseColor3.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_baseColor3.png rename to examples/assets/FlightHelmet/FlightHelmet_baseColor3.png diff --git a/example/assets/FlightHelmet/FlightHelmet_baseColor4.png b/examples/assets/FlightHelmet/FlightHelmet_baseColor4.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_baseColor4.png rename to examples/assets/FlightHelmet/FlightHelmet_baseColor4.png diff --git a/example/assets/FlightHelmet/FlightHelmet_normal.png b/examples/assets/FlightHelmet/FlightHelmet_normal.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_normal.png rename to examples/assets/FlightHelmet/FlightHelmet_normal.png diff --git a/example/assets/FlightHelmet/FlightHelmet_normal1.png b/examples/assets/FlightHelmet/FlightHelmet_normal1.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_normal1.png rename to examples/assets/FlightHelmet/FlightHelmet_normal1.png diff --git a/example/assets/FlightHelmet/FlightHelmet_normal2.png b/examples/assets/FlightHelmet/FlightHelmet_normal2.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_normal2.png rename to examples/assets/FlightHelmet/FlightHelmet_normal2.png diff --git a/example/assets/FlightHelmet/FlightHelmet_normal3.png b/examples/assets/FlightHelmet/FlightHelmet_normal3.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_normal3.png rename to examples/assets/FlightHelmet/FlightHelmet_normal3.png diff --git a/example/assets/FlightHelmet/FlightHelmet_normal4.png b/examples/assets/FlightHelmet/FlightHelmet_normal4.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_normal4.png rename to examples/assets/FlightHelmet/FlightHelmet_normal4.png diff --git a/example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic.png b/examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic.png rename to examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic.png diff --git a/example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic1.png b/examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic1.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic1.png rename to examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic1.png diff --git a/example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic2.png b/examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic2.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic2.png rename to examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic2.png diff --git a/example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic3.png b/examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic3.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic3.png rename to examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic3.png diff --git a/example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic4.png b/examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic4.png similarity index 100% rename from example/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic4.png rename to examples/assets/FlightHelmet/FlightHelmet_occlusionRoughnessMetallic4.png diff --git a/example/assets/FlightHelmet/README.md b/examples/assets/FlightHelmet/README.md similarity index 100% rename from example/assets/FlightHelmet/README.md rename to examples/assets/FlightHelmet/README.md diff --git a/example/assets/background.ktx b/examples/assets/background.ktx similarity index 100% rename from example/assets/background.ktx rename to examples/assets/background.ktx diff --git a/example/assets/background.png b/examples/assets/background.png similarity index 100% rename from example/assets/background.png rename to examples/assets/background.png diff --git a/example/assets/default_env/default_env_ibl.ktx b/examples/assets/default_env/default_env_ibl.ktx similarity index 100% rename from example/assets/default_env/default_env_ibl.ktx rename to examples/assets/default_env/default_env_ibl.ktx diff --git a/example/assets/default_env/default_env_skybox.ktx b/examples/assets/default_env/default_env_skybox.ktx similarity index 100% rename from example/assets/default_env/default_env_skybox.ktx rename to examples/assets/default_env/default_env_skybox.ktx diff --git a/examples/assets/shapes/shapes.bin b/examples/assets/shapes/shapes.bin new file mode 100644 index 00000000..661d051b --- /dev/null +++ b/examples/assets/shapes/shapes.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5821c53850d84c5b2d0b39ad28e6cde94d8fc7e1bbb97d5d898c40733e2d4e99 +size 107424 diff --git a/examples/assets/shapes/shapes.blend b/examples/assets/shapes/shapes.blend new file mode 100644 index 00000000..1f15f926 --- /dev/null +++ b/examples/assets/shapes/shapes.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9134594e40a4bad7601d0396bb5f2a7600656bda5d815b3cb2e855ba6c6c5e4 +size 1263808 diff --git a/examples/assets/shapes/shapes.blend1 b/examples/assets/shapes/shapes.blend1 new file mode 100644 index 00000000..27743c63 --- /dev/null +++ b/examples/assets/shapes/shapes.blend1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab0cada556723be0d138d7b1cadb5e315a273524db0468e0c4255d8d2b0c1c2d +size 1222992 diff --git a/examples/assets/shapes/shapes.glb b/examples/assets/shapes/shapes.glb new file mode 100644 index 00000000..9d154306 --- /dev/null +++ b/examples/assets/shapes/shapes.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c58d82602dc9b4dabb63f378fecd7ecb9eaf6f5da5746552ec42dde4ec211d7 +size 121104 diff --git a/examples/assets/shapes/shapes.gltf b/examples/assets/shapes/shapes.gltf new file mode 100644 index 00000000..f06ccefc --- /dev/null +++ b/examples/assets/shapes/shapes.gltf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c1d3eac0151a58c3f36bea0f636691559612fd2d5ce21bb3551d43e86043e26 +size 36741 diff --git a/example/assets/shapes/texture_test.png b/examples/assets/shapes/texture_test.png similarity index 100% rename from example/assets/shapes/texture_test.png rename to examples/assets/shapes/texture_test.png diff --git a/examples/assets/solidcolor.filamat b/examples/assets/solidcolor.filamat new file mode 100644 index 00000000..4b3536e9 --- /dev/null +++ b/examples/assets/solidcolor.filamat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c07d5f3b06fb763d74e4d6afa2ff933d8953e8f73828320d0c34c2105e346d97 +size 38119 diff --git a/examples/assets/solidcolor.mat b/examples/assets/solidcolor.mat new file mode 100644 index 00000000..d416afd8 --- /dev/null +++ b/examples/assets/solidcolor.mat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2033d3f7f8e0af983d8ab237737b45db2ed476b9283c6b0fda6a6954e1a72dea +size 294 diff --git a/examples/dart/cli_macos/.gitignore b/examples/dart/cli_macos/.gitignore new file mode 100644 index 00000000..3a857904 --- /dev/null +++ b/examples/dart/cli_macos/.gitignore @@ -0,0 +1,3 @@ +# https://dart.dev/guides/libraries/private-files +# Created by `dart pub` +.dart_tool/ diff --git a/examples/dart/cli_macos/CHANGELOG.md b/examples/dart/cli_macos/CHANGELOG.md new file mode 100644 index 00000000..effe43c8 --- /dev/null +++ b/examples/dart/cli_macos/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version. diff --git a/examples/dart/cli_macos/README.md b/examples/dart/cli_macos/README.md new file mode 100644 index 00000000..3816eca3 --- /dev/null +++ b/examples/dart/cli_macos/README.md @@ -0,0 +1,2 @@ +A sample command-line application with an entrypoint in `bin/`, library code +in `lib/`, and example unit test in `test/`. diff --git a/examples/dart/cli_macos/analysis_options.yaml b/examples/dart/cli_macos/analysis_options.yaml new file mode 100644 index 00000000..dee8927a --- /dev/null +++ b/examples/dart/cli_macos/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/examples/dart/cli_macos/bin/assets b/examples/dart/cli_macos/bin/assets new file mode 120000 index 00000000..2978ef39 --- /dev/null +++ b/examples/dart/cli_macos/bin/assets @@ -0,0 +1 @@ +../../../assets \ No newline at end of file diff --git a/examples/dart/cli_macos/bin/example_cli.dart b/examples/dart/cli_macos/bin/example_cli.dart new file mode 100644 index 00000000..e56c3400 --- /dev/null +++ b/examples/dart/cli_macos/bin/example_cli.dart @@ -0,0 +1,46 @@ +import 'dart:io'; +import 'package:thermion_dart/thermion_dart/compatibility/compatibility.dart'; +import 'package:thermion_dart/thermion_dart/swift/swift_bindings.g.dart'; +import 'package:thermion_dart/thermion_dart/compatibility/compatibility.dart'; +import 'package:thermion_dart/thermion_dart/utils/dart_resources.dart'; +import 'package:ffi/ffi.dart'; +import 'package:thermion_dart/thermion_dart.dart'; + +void main() async { + var scriptDir = File(Platform.script.toFilePath()).parent.path; + final lib = ThermionDartTexture1( + DynamicLibrary.open("$scriptDir/libthermion_swift.dylib")); + final object = ThermionDartTexture.new1(lib); + object.initWithWidth_height_(500, 500); + + final resourceLoader = calloc(1); + var loadToOut = NativeCallable< + Void Function(Pointer, + Pointer)>.listener(DartResourceLoader.loadResource); + + resourceLoader.ref.loadToOut = loadToOut.nativeFunction; + var freeResource = NativeCallable.listener( + DartResourceLoader.freeResource); + resourceLoader.ref.freeResource = freeResource.nativeFunction; + + var viewer = ThermionViewerFFI(resourceLoader: resourceLoader.cast()); + + await viewer.initialized; + await viewer.createSwapChain(500, 500); + await viewer.createRenderTarget(500, 500, object.metalTextureAddress); + await viewer.updateViewportAndCameraProjection(500, 500); + + var outDir = Directory("$scriptDir/output"); + if (outDir.existsSync()) { + outDir.deleteSync(recursive: true); + } + outDir.createSync(); + + await viewer.setRecordingOutputDirectory(outDir.path); + await viewer.setRecording(true); + await viewer.loadSkybox( + "file:///$scriptDir/assets/default_env/default_env_skybox.ktx"); + await Future.delayed(Duration(milliseconds: 16)); + await viewer.render(); + await viewer.dispose(); +} diff --git a/examples/dart/cli_macos/bin/libthermion_swift.dylib b/examples/dart/cli_macos/bin/libthermion_swift.dylib new file mode 120000 index 00000000..c9146a01 --- /dev/null +++ b/examples/dart/cli_macos/bin/libthermion_swift.dylib @@ -0,0 +1 @@ +../../../../thermion_dart/native/lib/macos/swift/libthermion_swift.dylib \ No newline at end of file diff --git a/examples/dart/cli_macos/bin/output/output_000007.png b/examples/dart/cli_macos/bin/output/output_000007.png new file mode 100644 index 00000000..656ea930 Binary files /dev/null and b/examples/dart/cli_macos/bin/output/output_000007.png differ diff --git a/examples/dart/cli_macos/pubspec.yaml b/examples/dart/cli_macos/pubspec.yaml new file mode 100644 index 00000000..e2672c8a --- /dev/null +++ b/examples/dart/cli_macos/pubspec.yaml @@ -0,0 +1,18 @@ +name: example_cli +description: A sample command-line application. +version: 1.0.0 +# repository: https://github.com/my_org/my_repo + +environment: + sdk: ^3.3.0 + +# Add regular dependencies here. +dependencies: + thermion_dart: + path: ../../../thermion_dart + ffi: + +dev_dependencies: + ffigen: ^11.0.0 + lints: ^3.0.0 + test: ^1.24.0 diff --git a/examples/dart/cli_macos/test/example_cli_test.dart b/examples/dart/cli_macos/test/example_cli_test.dart new file mode 100644 index 00000000..900e362a --- /dev/null +++ b/examples/dart/cli_macos/test/example_cli_test.dart @@ -0,0 +1,8 @@ +import 'package:example_cli/example_cli.dart'; +import 'package:test/test.dart'; + +void main() { + test('calculate', () { + expect(calculate(), 42); + }); +} diff --git a/examples/dart/cli_wasm/.gitignore b/examples/dart/cli_wasm/.gitignore new file mode 100644 index 00000000..3a857904 --- /dev/null +++ b/examples/dart/cli_wasm/.gitignore @@ -0,0 +1,3 @@ +# https://dart.dev/guides/libraries/private-files +# Created by `dart pub` +.dart_tool/ diff --git a/examples/dart/cli_wasm/CHANGELOG.md b/examples/dart/cli_wasm/CHANGELOG.md new file mode 100644 index 00000000..effe43c8 --- /dev/null +++ b/examples/dart/cli_wasm/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version. diff --git a/examples/dart/cli_wasm/README.md b/examples/dart/cli_wasm/README.md new file mode 100644 index 00000000..3816eca3 --- /dev/null +++ b/examples/dart/cli_wasm/README.md @@ -0,0 +1,2 @@ +A sample command-line application with an entrypoint in `bin/`, library code +in `lib/`, and example unit test in `test/`. diff --git a/examples/dart/cli_wasm/analysis_options.yaml b/examples/dart/cli_wasm/analysis_options.yaml new file mode 100644 index 00000000..dee8927a --- /dev/null +++ b/examples/dart/cli_wasm/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/examples/dart/cli_wasm/bin/.gitignore b/examples/dart/cli_wasm/bin/.gitignore new file mode 100644 index 00000000..768bac72 --- /dev/null +++ b/examples/dart/cli_wasm/bin/.gitignore @@ -0,0 +1,4 @@ +example_cli.mjs +example_cli.wasm +example_cli.unopt.wasm +node_modules/**/* diff --git a/examples/dart/cli_wasm/bin/build.log b/examples/dart/cli_wasm/bin/build.log new file mode 100644 index 00000000..2f3f8079 --- /dev/null +++ b/examples/dart/cli_wasm/bin/build.log @@ -0,0 +1,98 @@ +MAIN +initializing +gto uberarchive ptr +create void ptr callback +resolve +try +done, returning +created +got promise [object Promise] +got fn ptr address 2720 +Calling create_filament_viewer_ffi +Call complete +Created viewer, waiting for initialization +Creating WebGL context. +Created WebGL context 2.0 +Made WebGL context current +FEngine (32 bits) created at 0x1937d0 (threading is disabled) + +[stack-gl], [ANGLE], [OpenGL ES 3.0 (WebGL 1.0 stack-gl 8.0.2)], [OpenGL ES GLSL ES 1.00 (WebGL GLSL ES 1.0 stack-gl)] + +Feature level: 1 +Active workarounds: + +Backend feature level: 1 + +FEngine feature level: 1 + +Set frame interval to 16.666666 +Setting tone mapping to ACES +Bloom is disabled on WebGL builds as it causes instability with certain drivers. setBloom will be ignored +View created +Camera aperture 16.000000 shutter 0.008000 sensitivity 100.000000 +Created ubershader provider. +Added imageEntity 6 +Got void ptr callback +Set viewer to true +Created viewer 1652064 +Initialied +Loading GLB from buffer of length 116948 +Loaded glb +Entities : [10, 11, 12] +entityName : Cone +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +morph targets : [Key 1, Key 2, Key 3, Key 4, Key 5, Key 6, Key 7, Key 8] +entityName : Cube +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +morph targets : [Key 1, Key 2] +entityName : Cylinder +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +Getting morpht arget names +No insdtance +Using asset instance +morph targets : [Key 1, Key 2, Key 3, Key 4] diff --git a/examples/dart/cli_wasm/bin/example_cli.dart b/examples/dart/cli_wasm/bin/example_cli.dart new file mode 100644 index 00000000..7e5f0a1f --- /dev/null +++ b/examples/dart/cli_wasm/bin/example_cli.dart @@ -0,0 +1,33 @@ +import 'package:thermion_dart/thermion_dart/compatibility/compatibility.dart'; +import 'package:thermion_dart/thermion_dart.dart'; +import 'package:animation_tools_dart/animation_tools_dart.dart'; + +void main(List args) async { + final resourceLoader = thermion_dart_web_get_resource_loader_wrapper(); + var viewer = ThermionViewerFFI(resourceLoader: resourceLoader.cast()); + viewer.initialized.then((_) async { + var entity = await viewer.loadGlb( + "/Users/nickfisher/Documents/polyvox/apps/packages/thermion_flutter/thermion_flutter_federated/thermion_flutter/example/assets/shapes/shapes.glb"); + var entities = await viewer.getChildEntities(entity, true); + for (final childEntity in entities) { + final childName = await viewer.getNameForEntity(childEntity); + var morphTargetNames = + await viewer.getMorphTargetNames(entity, childEntity!); + if (morphTargetNames.isNotEmpty) { + await viewer.setMorphTargetWeights( + childEntity, List.filled(morphTargetNames.length, 1.0)); + } + var animationData = MorphAnimationData( + List.generate( + 10, (_) => List.filled(morphTargetNames.length, 1.0)), + morphTargetNames); + + await viewer.setMorphAnimationData(entity, animationData, + targetMeshNames: [childName!]); + } + }); + + while (true) { + await Future.delayed(Duration(seconds: 1)); + } +} diff --git a/examples/dart/cli_wasm/bin/main.js b/examples/dart/cli_wasm/bin/main.js new file mode 100644 index 00000000..9a2a5033 --- /dev/null +++ b/examples/dart/cli_wasm/bin/main.js @@ -0,0 +1,123 @@ +const fs = require('node:fs'); +const thermion_dart = require("./thermion_dart.js") +const GLctx = require('gl')(100, 100, { preserveDrawingBuffer: true }) + +// queueMicrotask = (func) => { +// func(); +// } +// read('thermion_dart.wasm', 'binary') +// const exports = {}; +// const module = {}; + +const wasmBuffer = fs.readFileSync('thermion_dart.wasm'); + +var dartFilamentModulePromise = WebAssembly.compile(wasmBuffer); +let globalDf; +thermion_dart({ + dartFilamentResolveCallback: (cb, data) => { + const fn = globalDf.wasmTable.get(cb); + if(data) { + fn(data); + } else { + fn(); + } + }, + ctx:GLctx}).then((df) => { + globalDf = df; + createVoidCallback = () => { + let res; //placeholder for resolver callback, outside of promise + const promise = new Promise((resolve, reject) => { + res = resolve; + }); + try { + const callback = () => { + try { + res({}); + } catch(err) { + console.log(err); + } + } + const fnPtr = df.addFunction(callback, 'v'); + return [promise, fnPtr]; + } catch(err) { + console.log(err); + return null; + } + } + createIntCallback = () => { + let res; + const promise = new Promise((resolve, reject) => { + res = resolve; + }); + try { + const callback = (val) => { + try { + res(val); + } catch(err) { + console.log(err); + } + } + const fnPtr = df.addFunction(callback, 'vi'); + return [promise, fnPtr]; + } catch(err) { + console.log(err); + return null; + } + } + createVoidPointerCallback = () => { + console.log("create void ptr callback"); + let res; //placeholder for resolver callback, outside of promise + const promise = new Promise((resolve, reject) => { + console.log("resolve"); + res = resolve; + }); + try { + console.log("try"); + const callback = (voidPtr) => { + try { + res(voidPtr); + } catch(err) { + console.log(err); + } + } + const fnPtr = df.addFunction(callback, 'vi'); + console.log("done, returning"); + return [promise, fnPtr]; + } catch(err) { + console.log(err); + return null; + } + } + + createBoolCallback = () => { + let res; //placeholder for resolver callback, outside of promise + + const promise = new Promise((resolve, reject) => { + res = resolve; + }); + try { + const callback = (val) => { + try { + res(val); + } catch(err) { + console.log(err); + } + } + const fnPtr = df.addFunction(callback, 'vi'); + return [promise, fnPtr]; + } catch(err) { + console.log(err); + return null; + } + } + + import('./example_cli.mjs').then((dart2wasm_runtime) => { + var dartModulePromise = WebAssembly.compile(fs.readFileSync('./example_cli.wasm')); + const imports = {"thermion_dart": df, "ctx": GLctx}; + dart2wasm_runtime.instantiate(dartModulePromise, imports).then((moduleInstance) => { + dart2wasm_runtime.invoke(moduleInstance); + }); + }); +}); + +// // dartModulePromise.then((dartModule) => { console.log(dartModule.exports); dart2wasm_runtime.invoke(dartModule, imports);}); }); \ No newline at end of file diff --git a/examples/dart/cli_wasm/bin/package-lock.json b/examples/dart/cli_wasm/bin/package-lock.json new file mode 100644 index 00000000..69892e83 --- /dev/null +++ b/examples/dart/cli_wasm/bin/package-lock.json @@ -0,0 +1,1559 @@ +{ + "name": "bin", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "gl": "^8.0.2" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@npmcli/agent": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz", + "integrity": "sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/fs": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", + "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/abbrev": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bit-twiddle": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bit-twiddle/-/bit-twiddle-1.0.2.tgz", + "integrity": "sha512-B9UhK0DKFZhoTFcfvAzhqsjStvGJp9vYWf3+6SNTtdSQnvIgfkHbgHrg/e4+TH71N2GDu8tpmCVoyfrL1d7ntA==" + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/cacache": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.3.tgz", + "integrity": "sha512-qXCd4rh6I07cnDqh8V48/94Tc/WSfj+o3Gn6NZ0aZovS255bUx8O13uKxRFd2eWG0xgsco7+YItQNPaa5E85hg==", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/detect-libc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" + }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" + }, + "node_modules/gl": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/gl/-/gl-8.0.2.tgz", + "integrity": "sha512-bAQg+aXnz/uBDwWEld/6Fifj0KBN3H3XElQgoz/F9hmBhIYKRohZP/41y43tHBQ6+LqVt1JKM1vts7t+Nzc6oA==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.5.0", + "bit-twiddle": "^1.0.2", + "glsl-tokenizer": "^2.1.5", + "nan": "^2.18.0", + "node-abi": "^3.56.0", + "node-gyp": "^10.0.1", + "prebuild-install": "^7.1.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/glob": { + "version": "10.3.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.15.tgz", + "integrity": "sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.6", + "minimatch": "^9.0.1", + "minipass": "^7.0.4", + "path-scurry": "^1.11.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glsl-tokenizer": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/glsl-tokenizer/-/glsl-tokenizer-2.1.5.tgz", + "integrity": "sha512-XSZEJ/i4dmz3Pmbnpsy3cKh7cotvFlBiZnDOwnj/05EwNp2XrhQ4XKJxT7/pDt4kp4YcpRSKz8eTV7S+mwV6MA==", + "dependencies": { + "through2": "^0.6.3" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "engines": { + "node": ">=16" + } + }, + "node_modules/jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + }, + "node_modules/lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/make-fetch-happen": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz", + "integrity": "sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==", + "dependencies": { + "@npmcli/agent": "^2.0.0", + "cacache": "^18.0.0", + "http-cache-semantics": "^4.1.1", + "is-lambda": "^1.0.1", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "proc-log": "^4.2.0", + "promise-retry": "^2.0.1", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/proc-log": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", + "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.1.tgz", + "integrity": "sha512-UZ7eQ+h8ywIRAW1hIEl2AqdwzJucU/Kp59+8kkZeSvafXhZjul247BvIJjEVFVeON6d7lM46XX1HXCduKAS8VA==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nan": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", + "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==" + }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-abi": { + "version": "3.62.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.62.0.tgz", + "integrity": "sha512-CPMcGa+y33xuL1E0TcNIu4YyaZCxnnvkVaEXrsosR3FxN+fV8xvb7Mzpb7IgKler10qeMkE6+Dp8qJhpzdq35g==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-gyp": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.1.0.tgz", + "integrity": "sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA==", + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^10.3.10", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^13.0.0", + "nopt": "^7.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^4.0.0" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/nopt": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", + "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/prebuild-install": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz", + "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/proc-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "optional": true + }, + "node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", + "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", + "dependencies": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + }, + "node_modules/ssri": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-fs/node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha512-RkK/CCESdTKQZHdmKICijdKKsCRVHs5KsLZ6pACAmF/1GPUQhonHSXWNERctxEp7RmvjdNbZTL5z9V7nSCXKcg==", + "dependencies": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/examples/dart/cli_wasm/bin/package.json b/examples/dart/cli_wasm/bin/package.json new file mode 100644 index 00000000..c6382089 --- /dev/null +++ b/examples/dart/cli_wasm/bin/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "gl": "^8.0.2" + } +} diff --git a/examples/dart/cli_wasm/bin/thermion_dart.js b/examples/dart/cli_wasm/bin/thermion_dart.js new file mode 120000 index 00000000..6710a76f --- /dev/null +++ b/examples/dart/cli_wasm/bin/thermion_dart.js @@ -0,0 +1 @@ +../../../native/web/build/build/out/dart_filament.js \ No newline at end of file diff --git a/examples/dart/cli_wasm/bin/thermion_dart.wasm b/examples/dart/cli_wasm/bin/thermion_dart.wasm new file mode 120000 index 00000000..a1439c39 --- /dev/null +++ b/examples/dart/cli_wasm/bin/thermion_dart.wasm @@ -0,0 +1 @@ +../../../native/web/build/build/out/dart_filament.wasm \ No newline at end of file diff --git a/examples/dart/cli_wasm/bin/thermion_dart.worker.js b/examples/dart/cli_wasm/bin/thermion_dart.worker.js new file mode 120000 index 00000000..54392ba9 --- /dev/null +++ b/examples/dart/cli_wasm/bin/thermion_dart.worker.js @@ -0,0 +1 @@ +../../../native/web/build/build/out/dart_filament.worker.js \ No newline at end of file diff --git a/examples/dart/cli_wasm/pubspec.yaml b/examples/dart/cli_wasm/pubspec.yaml new file mode 100644 index 00000000..e02af0c1 --- /dev/null +++ b/examples/dart/cli_wasm/pubspec.yaml @@ -0,0 +1,18 @@ +name: example_cli +description: A sample command-line application. +version: 1.0.0 +# repository: https://github.com/my_org/my_repo + +environment: + sdk: ^3.3.0 + +# Add regular dependencies here. +dependencies: + thermion_dart: + path: ../../ + ffi: + +dev_dependencies: + ffigen: ^11.0.0 + lints: ^3.0.0 + test: ^1.24.0 diff --git a/examples/dart/cli_wasm/test/example_cli_test.dart b/examples/dart/cli_wasm/test/example_cli_test.dart new file mode 100644 index 00000000..900e362a --- /dev/null +++ b/examples/dart/cli_wasm/test/example_cli_test.dart @@ -0,0 +1,8 @@ +import 'package:example_cli/example_cli.dart'; +import 'package:test/test.dart'; + +void main() { + test('calculate', () { + expect(calculate(), 42); + }); +} diff --git a/examples/dart/web_wasm/.gitignore b/examples/dart/web_wasm/.gitignore new file mode 100644 index 00000000..3a857904 --- /dev/null +++ b/examples/dart/web_wasm/.gitignore @@ -0,0 +1,3 @@ +# https://dart.dev/guides/libraries/private-files +# Created by `dart pub` +.dart_tool/ diff --git a/examples/dart/web_wasm/CHANGELOG.md b/examples/dart/web_wasm/CHANGELOG.md new file mode 100644 index 00000000..effe43c8 --- /dev/null +++ b/examples/dart/web_wasm/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version. diff --git a/examples/dart/web_wasm/README.md b/examples/dart/web_wasm/README.md new file mode 100644 index 00000000..3816eca3 --- /dev/null +++ b/examples/dart/web_wasm/README.md @@ -0,0 +1,2 @@ +A sample command-line application with an entrypoint in `bin/`, library code +in `lib/`, and example unit test in `test/`. diff --git a/examples/dart/web_wasm/analysis_options.yaml b/examples/dart/web_wasm/analysis_options.yaml new file mode 100644 index 00000000..dee8927a --- /dev/null +++ b/examples/dart/web_wasm/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/examples/dart/web_wasm/bin/README.md b/examples/dart/web_wasm/bin/README.md new file mode 100644 index 00000000..75aba073 --- /dev/null +++ b/examples/dart/web_wasm/bin/README.md @@ -0,0 +1,16 @@ +# Flight Helmet + +## Screenshot + +![screenshot](screenshot/screenshot.jpg) + +## License Information + +Donated by Microsoft for glTF testing + +[![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)](http://creativecommons.org/publicdomain/zero/1.0/) +To the extent possible under law, Microsoft has waived all copyright and related or neighboring rights to this asset. + +Draco compression was done via Cesium tools on 27-03-2020 as follows. + + gltf-pipeline -i FlightHelmet.gltf -o FlightHelmet.gltf -d -s --keep-unused-elements diff --git a/examples/dart/web_wasm/bin/assets b/examples/dart/web_wasm/bin/assets new file mode 120000 index 00000000..0500631d --- /dev/null +++ b/examples/dart/web_wasm/bin/assets @@ -0,0 +1 @@ +../../../../flutter_filament_federated/flutter_filament/example/assets \ No newline at end of file diff --git a/examples/dart/web_wasm/bin/example_web.dart b/examples/dart/web_wasm/bin/example_web.dart new file mode 100644 index 00000000..37e35c1a --- /dev/null +++ b/examples/dart/web_wasm/bin/example_web.dart @@ -0,0 +1,57 @@ +import 'dart:js_interop'; +import 'dart:js_interop_unsafe'; +import 'package:thermion_dart/thermion_dart/compatibility/compatibility.dart'; +import 'package:thermion_dart/thermion_dart/thermion_viewer_ffi.dart'; +import 'package:web/web.dart'; + +void main(List arguments) async { + var fc = FooChar(); + + final canvas = document.getElementById("canvas") as HTMLCanvasElement; + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + + var resourceLoader = thermion_dart_web_get_resource_loader_wrapper(); + + var viewer = ThermionViewerFFI(resourceLoader: resourceLoader); + + var mousedown = (JSObject event) { + var x = event.getProperty("clientX".toJS) as JSNumber; + var y = event.getProperty("clientY".toJS) as JSNumber; + viewer.rotateStart(x.toDartDouble, y.toDartDouble); + }; + + canvas.addEventListener("mousedown", mousedown.toJS); + + var mousemove = (JSObject event) { + var x = event.getProperty("clientX".toJS) as JSNumber; + var y = event.getProperty("clientY".toJS) as JSNumber; + viewer.rotateUpdate(x.toDartDouble, y.toDartDouble); + }; + + canvas.addEventListener("mousemove", mousemove.toJS); + + var mouseup = (JSObject event) { + viewer.rotateEnd(); + }; + + canvas.addEventListener("mouseup", mousedown.toJS); + + await viewer.initialized; + var width = window.innerWidth; + var height = window.innerHeight; + await viewer.createSwapChain(width.toDouble(), height.toDouble()); + await viewer.setBackgroundColor(0.0, 1.0, 1.0, 1.0); + await viewer.loadSkybox("assets/default_env_skybox.ktx"); + await viewer.loadIbl("assets/default_env_ibl.ktx"); + await viewer.loadGltf("assets/FlightHelmet.gltf", "assets"); + await viewer.updateViewportAndCameraProjection( + width.toDouble(), height.toDouble()); + await viewer.setPostProcessing(true); + await viewer.setRendering(true); + + while (true) { + await Future.delayed(Duration(milliseconds: 16)); + } + print("Finisehd!"); +} diff --git a/examples/dart/web_wasm/bin/example_web.mjs b/examples/dart/web_wasm/bin/example_web.mjs new file mode 100644 index 00000000..836f37a3 --- /dev/null +++ b/examples/dart/web_wasm/bin/example_web.mjs @@ -0,0 +1,249 @@ +let buildArgsList; + +// `modulePromise` is a promise to the `WebAssembly.module` object to be +// instantiated. +// `importObjectPromise` is a promise to an object that contains any additional +// imports needed by the module that aren't provided by the standard runtime. +// The fields on this object will be merged into the importObject with which +// the module will be instantiated. +// This function returns a promise to the instantiated module. +export const instantiate = async (modulePromise, importObjectPromise) => { + let dartInstance; + + function stringFromDartString(string) { + const totalLength = dartInstance.exports.$stringLength(string); + let result = ''; + let index = 0; + while (index < totalLength) { + let chunkLength = Math.min(totalLength - index, 0xFFFF); + const array = new Array(chunkLength); + for (let i = 0; i < chunkLength; i++) { + array[i] = dartInstance.exports.$stringRead(string, index++); + } + result += String.fromCharCode(...array); + } + return result; + } + + function stringToDartString(string) { + const length = string.length; + let range = 0; + for (let i = 0; i < length; i++) { + range |= string.codePointAt(i); + } + if (range < 256) { + const dartString = dartInstance.exports.$stringAllocate1(length); + for (let i = 0; i < length; i++) { + dartInstance.exports.$stringWrite1(dartString, i, string.codePointAt(i)); + } + return dartString; + } else { + const dartString = dartInstance.exports.$stringAllocate2(length); + for (let i = 0; i < length; i++) { + dartInstance.exports.$stringWrite2(dartString, i, string.charCodeAt(i)); + } + return dartString; + } + } + + // Prints to the console + function printToConsole(value) { + if (typeof dartPrint == "function") { + dartPrint(value); + return; + } + if (typeof console == "object" && typeof console.log != "undefined") { + console.log(value); + return; + } + if (typeof print == "function") { + print(value); + return; + } + + throw "Unable to print message: " + js; + } + + // Converts a Dart List to a JS array. Any Dart objects will be converted, but + // this will be cheap for JSValues. + function arrayFromDartList(constructor, list) { + const length = dartInstance.exports.$listLength(list); + const array = new constructor(length); + for (let i = 0; i < length; i++) { + array[i] = dartInstance.exports.$listRead(list, i); + } + return array; + } + + buildArgsList = function(list) { + const dartList = dartInstance.exports.$makeStringList(); + for (let i = 0; i < list.length; i++) { + dartInstance.exports.$listAdd(dartList, stringToDartString(list[i])); + } + return dartList; + } + + // A special symbol attached to functions that wrap Dart functions. + const jsWrappedDartFunctionSymbol = Symbol("JSWrappedDartFunction"); + + function finalizeWrapper(dartFunction, wrapped) { + wrapped.dartFunction = dartFunction; + wrapped[jsWrappedDartFunctionSymbol] = true; + return wrapped; + } + + // Imports + const dart2wasm = { + +_18: f => finalizeWrapper(f,x0 => dartInstance.exports._18(f,x0)), +_19: f => finalizeWrapper(f,x0 => dartInstance.exports._19(f,x0)), +_75: (x0,x1) => x0.getElementById(x1), +_76: f => finalizeWrapper(f,x0 => dartInstance.exports._76(f,x0)), +_77: (x0,x1,x2) => x0.addEventListener(x1,x2), +_78: f => finalizeWrapper(f,x0 => dartInstance.exports._78(f,x0)), +_79: f => finalizeWrapper(f,x0 => dartInstance.exports._79(f,x0)), +_1499: (x0,x1) => x0.width = x1, +_1501: (x0,x1) => x0.height = x1, +_1878: () => globalThis.window, +_1920: x0 => x0.innerWidth, +_1921: x0 => x0.innerHeight, +_6854: () => globalThis.document, +_12721: () => globalThis.createBoolCallback(), +_12722: () => globalThis.createVoidPointerCallback(), +_12723: () => globalThis.createVoidCallback(), +_12727: v => stringToDartString(v.toString()), +_12743: () => { + let stackString = new Error().stack.toString(); + let frames = stackString.split('\n'); + let drop = 2; + if (frames[0] === 'Error') { + drop += 1; + } + return frames.slice(drop).join('\n'); + }, +_12762: s => stringToDartString(JSON.stringify(stringFromDartString(s))), +_12763: s => printToConsole(stringFromDartString(s)), +_12777: (ms, c) => + setTimeout(() => dartInstance.exports.$invokeCallback(c),ms), +_12781: (c) => + queueMicrotask(() => dartInstance.exports.$invokeCallback(c)), +_12783: (a, i) => a.push(i), +_12794: a => a.length, +_12796: (a, i) => a[i], +_12797: (a, i, v) => a[i] = v, +_12799: a => a.join(''), +_12809: (s, p, i) => s.indexOf(p, i), +_12812: (o, start, length) => new Uint8Array(o.buffer, o.byteOffset + start, length), +_12813: (o, start, length) => new Int8Array(o.buffer, o.byteOffset + start, length), +_12814: (o, start, length) => new Uint8ClampedArray(o.buffer, o.byteOffset + start, length), +_12815: (o, start, length) => new Uint16Array(o.buffer, o.byteOffset + start, length), +_12816: (o, start, length) => new Int16Array(o.buffer, o.byteOffset + start, length), +_12817: (o, start, length) => new Uint32Array(o.buffer, o.byteOffset + start, length), +_12818: (o, start, length) => new Int32Array(o.buffer, o.byteOffset + start, length), +_12821: (o, start, length) => new Float32Array(o.buffer, o.byteOffset + start, length), +_12822: (o, start, length) => new Float64Array(o.buffer, o.byteOffset + start, length), +_12827: (o) => new DataView(o.buffer, o.byteOffset, o.byteLength), +_12831: Function.prototype.call.bind(Object.getOwnPropertyDescriptor(DataView.prototype, 'byteLength').get), +_12832: (b, o) => new DataView(b, o), +_12834: Function.prototype.call.bind(DataView.prototype.getUint8), +_12836: Function.prototype.call.bind(DataView.prototype.getInt8), +_12838: Function.prototype.call.bind(DataView.prototype.getUint16), +_12840: Function.prototype.call.bind(DataView.prototype.getInt16), +_12842: Function.prototype.call.bind(DataView.prototype.getUint32), +_12844: Function.prototype.call.bind(DataView.prototype.getInt32), +_12850: Function.prototype.call.bind(DataView.prototype.getFloat32), +_12852: Function.prototype.call.bind(DataView.prototype.getFloat64), +_12873: o => o === undefined, +_12874: o => typeof o === 'boolean', +_12875: o => typeof o === 'number', +_12877: o => typeof o === 'string', +_12880: o => o instanceof Int8Array, +_12881: o => o instanceof Uint8Array, +_12882: o => o instanceof Uint8ClampedArray, +_12883: o => o instanceof Int16Array, +_12884: o => o instanceof Uint16Array, +_12885: o => o instanceof Int32Array, +_12886: o => o instanceof Uint32Array, +_12887: o => o instanceof Float32Array, +_12888: o => o instanceof Float64Array, +_12889: o => o instanceof ArrayBuffer, +_12890: o => o instanceof DataView, +_12891: o => o instanceof Array, +_12892: o => typeof o === 'function' && o[jsWrappedDartFunctionSymbol] === true, +_12896: (l, r) => l === r, +_12897: o => o, +_12898: o => o, +_12899: o => o, +_12900: b => !!b, +_12901: o => o.length, +_12904: (o, i) => o[i], +_12905: f => f.dartFunction, +_12906: l => arrayFromDartList(Int8Array, l), +_12907: l => arrayFromDartList(Uint8Array, l), +_12908: l => arrayFromDartList(Uint8ClampedArray, l), +_12909: l => arrayFromDartList(Int16Array, l), +_12910: l => arrayFromDartList(Uint16Array, l), +_12911: l => arrayFromDartList(Int32Array, l), +_12912: l => arrayFromDartList(Uint32Array, l), +_12913: l => arrayFromDartList(Float32Array, l), +_12914: l => arrayFromDartList(Float64Array, l), +_12915: (data, length) => { + const view = new DataView(new ArrayBuffer(length)); + for (let i = 0; i < length; i++) { + view.setUint8(i, dartInstance.exports.$byteDataGetUint8(data, i)); + } + return view; + }, +_12916: l => arrayFromDartList(Array, l), +_12917: stringFromDartString, +_12918: stringToDartString, +_12921: l => new Array(l), +_12925: (o, p) => o[p], +_12929: o => String(o), +_12930: (p, s, f) => p.then(s, f), +_12949: (o, p) => o[p] + }; + + const baseImports = { + dart2wasm: dart2wasm, + + + Math: Math, + Date: Date, + Object: Object, + Array: Array, + Reflect: Reflect, + }; + + const jsStringPolyfill = { + "charCodeAt": (s, i) => s.charCodeAt(i), + "compare": (s1, s2) => { + if (s1 < s2) return -1; + if (s1 > s2) return 1; + return 0; + }, + "concat": (s1, s2) => s1 + s2, + "equals": (s1, s2) => s1 === s2, + "fromCharCode": (i) => String.fromCharCode(i), + "length": (s) => s.length, + "substring": (s, a, b) => s.substring(a, b), + }; + + dartInstance = await WebAssembly.instantiate(await modulePromise, { + ...baseImports, + ...(await importObjectPromise), + "wasm:js-string": jsStringPolyfill, + }); + + return dartInstance; +} + +// Call the main function for the instantiated module +// `moduleInstance` is the instantiated dart2wasm module +// `args` are any arguments that should be passed into the main function. +export const invoke = (moduleInstance, ...args) => { + const dartMain = moduleInstance.exports.$getMain(); + const dartArgs = buildArgsList(args); + moduleInstance.exports.$invokeMain(dartMain, dartArgs); +} + diff --git a/examples/dart/web_wasm/bin/example_web.unopt.wasm b/examples/dart/web_wasm/bin/example_web.unopt.wasm new file mode 100644 index 00000000..3bda1345 Binary files /dev/null and b/examples/dart/web_wasm/bin/example_web.unopt.wasm differ diff --git a/examples/dart/web_wasm/bin/example_web.wasm b/examples/dart/web_wasm/bin/example_web.wasm new file mode 100644 index 00000000..763b8df9 Binary files /dev/null and b/examples/dart/web_wasm/bin/example_web.wasm differ diff --git a/examples/dart/web_wasm/bin/index.html b/examples/dart/web_wasm/bin/index.html new file mode 100644 index 00000000..7abc5620 --- /dev/null +++ b/examples/dart/web_wasm/bin/index.html @@ -0,0 +1,127 @@ + + + + + + + + + + \ No newline at end of file diff --git a/examples/dart/web_wasm/bin/thermion_dart.js b/examples/dart/web_wasm/bin/thermion_dart.js new file mode 120000 index 00000000..6710a76f --- /dev/null +++ b/examples/dart/web_wasm/bin/thermion_dart.js @@ -0,0 +1 @@ +../../../native/web/build/build/out/dart_filament.js \ No newline at end of file diff --git a/examples/dart/web_wasm/bin/thermion_dart.wasm b/examples/dart/web_wasm/bin/thermion_dart.wasm new file mode 120000 index 00000000..a1439c39 --- /dev/null +++ b/examples/dart/web_wasm/bin/thermion_dart.wasm @@ -0,0 +1 @@ +../../../native/web/build/build/out/dart_filament.wasm \ No newline at end of file diff --git a/examples/dart/web_wasm/bin/thermion_dart.worker.js b/examples/dart/web_wasm/bin/thermion_dart.worker.js new file mode 120000 index 00000000..54392ba9 --- /dev/null +++ b/examples/dart/web_wasm/bin/thermion_dart.worker.js @@ -0,0 +1 @@ +../../../native/web/build/build/out/dart_filament.worker.js \ No newline at end of file diff --git a/examples/dart/web_wasm/pubspec.yaml b/examples/dart/web_wasm/pubspec.yaml new file mode 100644 index 00000000..e1be14e3 --- /dev/null +++ b/examples/dart/web_wasm/pubspec.yaml @@ -0,0 +1,17 @@ +name: example_web +description: A sample command-line application. +version: 1.0.0 +# repository: https://github.com/my_org/my_repo + +environment: + sdk: ^3.3.0 + +# Add regular dependencies here. +dependencies: + thermion_dart: + path: ../../ + ffi: + +dev_dependencies: + lints: ^3.0.0 + test: ^1.24.0 diff --git a/examples/dart/web_wasm/test/example_web_test.dart b/examples/dart/web_wasm/test/example_web_test.dart new file mode 100644 index 00000000..4c50d967 --- /dev/null +++ b/examples/dart/web_wasm/test/example_web_test.dart @@ -0,0 +1,8 @@ +import 'package:example_web/example_web.dart'; +import 'package:test/test.dart'; + +void main() { + test('calculate', () { + expect(calculate(), 42); + }); +} diff --git a/example/.fvm/fvm_config.json b/examples/flutter/example/.fvm/fvm_config.json similarity index 100% rename from example/.fvm/fvm_config.json rename to examples/flutter/example/.fvm/fvm_config.json diff --git a/example/.gitattributes b/examples/flutter/example/.gitattributes similarity index 100% rename from example/.gitattributes rename to examples/flutter/example/.gitattributes diff --git a/example/.gitignore b/examples/flutter/example/.gitignore similarity index 93% rename from example/.gitignore rename to examples/flutter/example/.gitignore index 40b27f75..76cbb205 100644 --- a/example/.gitignore +++ b/examples/flutter/example/.gitignore @@ -32,7 +32,6 @@ /build/ # Web related -lib/generated_plugin_registrant.dart # Symbolication related app.*.symbols @@ -48,4 +47,4 @@ app.*.map.json /android/.cxx/**/* # fvm -.fvm/flutter_sdk \ No newline at end of file +.fvm/flutter_sdk diff --git a/example/.metadata b/examples/flutter/example/.metadata similarity index 65% rename from example/.metadata rename to examples/flutter/example/.metadata index 13169084..de6eb858 100644 --- a/example/.metadata +++ b/examples/flutter/example/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "a3a651d82270ff0c40ab2d1615ef6d36af11d580" + revision: "12d54de962782853206992fedce29723fcb4a95b" channel: "master" project_type: app @@ -13,11 +13,11 @@ project_type: app migration: platforms: - platform: root - create_revision: a3a651d82270ff0c40ab2d1615ef6d36af11d580 - base_revision: a3a651d82270ff0c40ab2d1615ef6d36af11d580 - - platform: android - create_revision: a3a651d82270ff0c40ab2d1615ef6d36af11d580 - base_revision: a3a651d82270ff0c40ab2d1615ef6d36af11d580 + create_revision: 12d54de962782853206992fedce29723fcb4a95b + base_revision: 12d54de962782853206992fedce29723fcb4a95b + - platform: macos + create_revision: 12d54de962782853206992fedce29723fcb4a95b + base_revision: 12d54de962782853206992fedce29723fcb4a95b # User provided section diff --git a/example/README.md b/examples/flutter/example/README.md similarity index 90% rename from example/README.md rename to examples/flutter/example/README.md index 8f831b07..a1e9374f 100644 --- a/example/README.md +++ b/examples/flutter/example/README.md @@ -1,6 +1,6 @@ -# flutter_filament_example +# thermion_flutter_example -Demonstrates how to use the flutter_filament plugin. +Demonstrates how to use the thermion_flutter plugin. ## Linux diff --git a/example/analysis_options.yaml b/examples/flutter/example/analysis_options.yaml similarity index 100% rename from example/analysis_options.yaml rename to examples/flutter/example/analysis_options.yaml diff --git a/example/android/.gitignore b/examples/flutter/example/android/.gitignore similarity index 97% rename from example/android/.gitignore rename to examples/flutter/example/android/.gitignore index 473d8bd3..6f568019 100644 --- a/example/android/.gitignore +++ b/examples/flutter/example/android/.gitignore @@ -6,8 +6,6 @@ gradle-wrapper.jar /local.properties GeneratedPluginRegistrant.java -.cxx/ - # Remember to never publicly share your keystore. # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app key.properties diff --git a/examples/flutter/example/android/app/build.gradle b/examples/flutter/example/android/app/build.gradle new file mode 100644 index 00000000..2641214e --- /dev/null +++ b/examples/flutter/example/android/app/build.gradle @@ -0,0 +1,51 @@ +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" +} + +android { + namespace = "app.polyvox.example" + compileSdkVersion 34 + ndkVersion "25.2.9519653" + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "app.polyvox.example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdk = 30 + targetSdk = 31 + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + signingConfig = signingConfigs.debug + shrinkResources false + minifyEnabled false + } + debug { + + } + } +} + +dependencies { + implementation 'net.java.dev.jna:jna:5.10.0@aar' +} + +flutter { + source = "../.." +} diff --git a/example/android/app/src/debug/AndroidManifest.xml b/examples/flutter/example/android/app/src/debug/AndroidManifest.xml similarity index 57% rename from example/android/app/src/debug/AndroidManifest.xml rename to examples/flutter/example/android/app/src/debug/AndroidManifest.xml index 3fac46b6..399f6981 100644 --- a/example/android/app/src/debug/AndroidManifest.xml +++ b/examples/flutter/example/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/example/android/app/src/main/AndroidManifest.xml b/examples/flutter/example/android/app/src/main/AndroidManifest.xml similarity index 60% rename from example/android/app/src/main/AndroidManifest.xml rename to examples/flutter/example/android/app/src/main/AndroidManifest.xml index 10e1b0cb..74a78b93 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/examples/flutter/example/android/app/src/main/AndroidManifest.xml @@ -1,20 +1,17 @@ - - - + + android:icon="@mipmap/ic_launcher"> + android:windowSoftInputMode="adjustResize"> - @@ -43,4 +31,15 @@ android:name="flutterEmbedding" android:value="2" /> + + + + + + + diff --git a/examples/flutter/example/android/app/src/main/kotlin/app/polyvox/example/MainActivity.kt b/examples/flutter/example/android/app/src/main/kotlin/app/polyvox/example/MainActivity.kt new file mode 100644 index 00000000..c546a613 --- /dev/null +++ b/examples/flutter/example/android/app/src/main/kotlin/app/polyvox/example/MainActivity.kt @@ -0,0 +1,5 @@ +package app.polyvox.example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/example/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/flutter/example/android/app/src/main/res/drawable-v21/launch_background.xml similarity index 100% rename from example/android/app/src/main/res/drawable-v21/launch_background.xml rename to examples/flutter/example/android/app/src/main/res/drawable-v21/launch_background.xml diff --git a/example/android/app/src/main/res/drawable/launch_background.xml b/examples/flutter/example/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from example/android/app/src/main/res/drawable/launch_background.xml rename to examples/flutter/example/android/app/src/main/res/drawable/launch_background.xml diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/flutter/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to examples/flutter/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/flutter/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to examples/flutter/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/flutter/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to examples/flutter/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/flutter/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to examples/flutter/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/flutter/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to examples/flutter/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/values-night/styles.xml b/examples/flutter/example/android/app/src/main/res/values-night/styles.xml similarity index 94% rename from example/android/app/src/main/res/values-night/styles.xml rename to examples/flutter/example/android/app/src/main/res/values-night/styles.xml index 449a9f93..06952be7 100644 --- a/example/android/app/src/main/res/values-night/styles.xml +++ b/examples/flutter/example/android/app/src/main/res/values-night/styles.xml @@ -3,14 +3,14 @@ + + + diff --git a/example/android/app/src/profile/AndroidManifest.xml b/examples/flutter/example/android/app/src/profile/AndroidManifest.xml similarity index 57% rename from example/android/app/src/profile/AndroidManifest.xml rename to examples/flutter/example/android/app/src/profile/AndroidManifest.xml index 3fac46b6..399f6981 100644 --- a/example/android/app/src/profile/AndroidManifest.xml +++ b/examples/flutter/example/android/app/src/profile/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/examples/flutter/example/android/build.gradle b/examples/flutter/example/android/build.gradle new file mode 100644 index 00000000..d2ffbffa --- /dev/null +++ b/examples/flutter/example/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = "../build" +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/examples/flutter/example/android/gradle.properties b/examples/flutter/example/android/gradle.properties new file mode 100644 index 00000000..25971708 --- /dev/null +++ b/examples/flutter/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/examples/flutter/example/android/gradle/wrapper/gradle-wrapper.properties similarity index 80% rename from example/android/gradle/wrapper/gradle-wrapper.properties rename to examples/flutter/example/android/gradle/wrapper/gradle-wrapper.properties index bc6a58af..e1ca574e 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/examples/flutter/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip diff --git a/examples/flutter/example/android/settings.gradle b/examples/flutter/example/android/settings.gradle new file mode 100644 index 00000000..536165d3 --- /dev/null +++ b/examples/flutter/example/android/settings.gradle @@ -0,0 +1,25 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false +} + +include ":app" diff --git a/examples/flutter/example/assets b/examples/flutter/example/assets new file mode 120000 index 00000000..41aef43f --- /dev/null +++ b/examples/flutter/example/assets @@ -0,0 +1 @@ +../../assets \ No newline at end of file diff --git a/example/integration_test/goldens/ios/0_fresh.png b/examples/flutter/example/integration_test/goldens/ios/0_fresh.png similarity index 100% rename from example/integration_test/goldens/ios/0_fresh.png rename to examples/flutter/example/integration_test/goldens/ios/0_fresh.png diff --git a/example/integration_test/goldens/ios/10_setshapespositionto.png b/examples/flutter/example/integration_test/goldens/ios/10_setshapespositionto.png similarity index 100% rename from example/integration_test/goldens/ios/10_setshapespositionto.png rename to examples/flutter/example/integration_test/goldens/ios/10_setshapespositionto.png diff --git a/example/integration_test/goldens/ios/11_Disablefrustumculling.png b/examples/flutter/example/integration_test/goldens/ios/11_Disablefrustumculling.png similarity index 100% rename from example/integration_test/goldens/ios/11_Disablefrustumculling.png rename to examples/flutter/example/integration_test/goldens/ios/11_Disablefrustumculling.png diff --git a/example/integration_test/goldens/ios/12_Settonemappingtolinear.png b/examples/flutter/example/integration_test/goldens/ios/12_Settonemappingtolinear.png similarity index 100% rename from example/integration_test/goldens/ios/12_Settonemappingtolinear.png rename to examples/flutter/example/integration_test/goldens/ios/12_Settonemappingtolinear.png diff --git a/example/integration_test/goldens/ios/13_Movecameratoasset.png b/examples/flutter/example/integration_test/goldens/ios/13_Movecameratoasset.png similarity index 100% rename from example/integration_test/goldens/ios/13_Movecameratoasset.png rename to examples/flutter/example/integration_test/goldens/ios/13_Movecameratoasset.png diff --git a/example/integration_test/goldens/ios/14_movecamerato.png b/examples/flutter/example/integration_test/goldens/ios/14_movecamerato.png similarity index 100% rename from example/integration_test/goldens/ios/14_movecamerato.png rename to examples/flutter/example/integration_test/goldens/ios/14_movecamerato.png diff --git a/example/integration_test/goldens/ios/15_setcameratofirstcamerainshapesGLB.png b/examples/flutter/example/integration_test/goldens/ios/15_setcameratofirstcamerainshapesGLB.png similarity index 100% rename from example/integration_test/goldens/ios/15_setcameratofirstcamerainshapesGLB.png rename to examples/flutter/example/integration_test/goldens/ios/15_setcameratofirstcamerainshapesGLB.png diff --git a/example/integration_test/goldens/ios/16_resize.png b/examples/flutter/example/integration_test/goldens/ios/16_resize.png similarity index 100% rename from example/integration_test/goldens/ios/16_resize.png rename to examples/flutter/example/integration_test/goldens/ios/16_resize.png diff --git a/example/integration_test/goldens/ios/17_resize.png b/examples/flutter/example/integration_test/goldens/ios/17_resize.png similarity index 100% rename from example/integration_test/goldens/ios/17_resize.png rename to examples/flutter/example/integration_test/goldens/ios/17_resize.png diff --git a/example/integration_test/goldens/ios/18_resize.png b/examples/flutter/example/integration_test/goldens/ios/18_resize.png similarity index 100% rename from example/integration_test/goldens/ios/18_resize.png rename to examples/flutter/example/integration_test/goldens/ios/18_resize.png diff --git a/example/integration_test/goldens/ios/19_resize.png b/examples/flutter/example/integration_test/goldens/ios/19_resize.png similarity index 100% rename from example/integration_test/goldens/ios/19_resize.png rename to examples/flutter/example/integration_test/goldens/ios/19_resize.png diff --git a/example/integration_test/goldens/ios/1_createviewerdefaultubershader.png b/examples/flutter/example/integration_test/goldens/ios/1_createviewerdefaultubershader.png similarity index 100% rename from example/integration_test/goldens/ios/1_createviewerdefaultubershader.png rename to examples/flutter/example/integration_test/goldens/ios/1_createviewerdefaultubershader.png diff --git a/example/integration_test/goldens/ios/2_Renderingfalse.png b/examples/flutter/example/integration_test/goldens/ios/2_Renderingfalse.png similarity index 100% rename from example/integration_test/goldens/ios/2_Renderingfalse.png rename to examples/flutter/example/integration_test/goldens/ios/2_Renderingfalse.png diff --git a/example/integration_test/goldens/ios/3_loadskybox.png b/examples/flutter/example/integration_test/goldens/ios/3_loadskybox.png similarity index 100% rename from example/integration_test/goldens/ios/3_loadskybox.png rename to examples/flutter/example/integration_test/goldens/ios/3_loadskybox.png diff --git a/example/integration_test/goldens/ios/4_loadIBL.png b/examples/flutter/example/integration_test/goldens/ios/4_loadIBL.png similarity index 100% rename from example/integration_test/goldens/ios/4_loadIBL.png rename to examples/flutter/example/integration_test/goldens/ios/4_loadIBL.png diff --git a/example/integration_test/goldens/ios/5_loadshapesGLB.png b/examples/flutter/example/integration_test/goldens/ios/5_loadshapesGLB.png similarity index 100% rename from example/integration_test/goldens/ios/5_loadshapesGLB.png rename to examples/flutter/example/integration_test/goldens/ios/5_loadshapesGLB.png diff --git a/example/integration_test/goldens/ios/6_zoomin.png b/examples/flutter/example/integration_test/goldens/ios/6_zoomin.png similarity index 100% rename from example/integration_test/goldens/ios/6_zoomin.png rename to examples/flutter/example/integration_test/goldens/ios/6_zoomin.png diff --git a/example/integration_test/goldens/ios/7_rotate.png b/examples/flutter/example/integration_test/goldens/ios/7_rotate.png similarity index 100% rename from example/integration_test/goldens/ios/7_rotate.png rename to examples/flutter/example/integration_test/goldens/ios/7_rotate.png diff --git a/example/integration_test/goldens/ios/8_pan.png b/examples/flutter/example/integration_test/goldens/ios/8_pan.png similarity index 100% rename from example/integration_test/goldens/ios/8_pan.png rename to examples/flutter/example/integration_test/goldens/ios/8_pan.png diff --git a/example/integration_test/goldens/ios/9_transformtounitcube.png b/examples/flutter/example/integration_test/goldens/ios/9_transformtounitcube.png similarity index 100% rename from example/integration_test/goldens/ios/9_transformtounitcube.png rename to examples/flutter/example/integration_test/goldens/ios/9_transformtounitcube.png diff --git a/example/integration_test/plugin_integration_test.dart b/examples/flutter/example/integration_test/plugin_integration_test.dart similarity index 95% rename from example/integration_test/plugin_integration_test.dart rename to examples/flutter/example/integration_test/plugin_integration_test.dart index ea543418..d1a921f0 100644 --- a/example/integration_test/plugin_integration_test.dart +++ b/examples/flutter/example/integration_test/plugin_integration_test.dart @@ -4,9 +4,9 @@ import 'dart:ui'; import 'package:flutter/gestures.dart'; import 'package:flutter/widgets.dart'; +import 'package:thermion_flutter/filament/widgets/filament_widget.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import 'package:flutter_filament/widgets/filament_widget.dart'; import '../lib/main.dart' as app; void main() { @@ -89,9 +89,9 @@ void main() { await _snapshot(tester, "fresh"); await tap(tester, "Controller / Viewer"); - await tap(tester, "Create FilamentController (default ubershader)"); + await tap(tester, "Create ThermionFlutterPlugin (default ubershader)"); await tap(tester, "Controller / Viewer"); - await tap(tester, "Create FilamentViewer", + await tap(tester, "Create ThermionViewerFFI", 4); // on older devices this may take a while, so let's insert a length delay await tap(tester, "Scene"); @@ -114,7 +114,7 @@ void main() { await tap(tester, "Load IBL", 1); final Offset pointerLocation = - tester.getCenter(find.byType(FilamentWidget)); + tester.getCenter(find.byType(ThermionWidget)); TestPointer testPointer = TestPointer(1, PointerDeviceKind.mouse); // scroll/zoom diff --git a/example/ios/.gitignore b/examples/flutter/example/ios/.gitignore similarity index 100% rename from example/ios/.gitignore rename to examples/flutter/example/ios/.gitignore diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/examples/flutter/example/ios/Flutter/AppFrameworkInfo.plist similarity index 96% rename from example/ios/Flutter/AppFrameworkInfo.plist rename to examples/flutter/example/ios/Flutter/AppFrameworkInfo.plist index 9625e105..7c569640 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/examples/flutter/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/example/ios/Flutter/Debug.xcconfig b/examples/flutter/example/ios/Flutter/Debug.xcconfig similarity index 100% rename from example/ios/Flutter/Debug.xcconfig rename to examples/flutter/example/ios/Flutter/Debug.xcconfig diff --git a/example/ios/Flutter/Release.xcconfig b/examples/flutter/example/ios/Flutter/Release.xcconfig similarity index 100% rename from example/ios/Flutter/Release.xcconfig rename to examples/flutter/example/ios/Flutter/Release.xcconfig diff --git a/example/ios/Podfile b/examples/flutter/example/ios/Podfile similarity index 94% rename from example/ios/Podfile rename to examples/flutter/example/ios/Podfile index 9061ff8f..3e44f9c6 100644 --- a/example/ios/Podfile +++ b/examples/flutter/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '12.1' +platform :ios, '13.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -32,6 +32,9 @@ target 'Runner' do use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end end post_install do |installer| diff --git a/examples/flutter/example/ios/Podfile.lock b/examples/flutter/example/ios/Podfile.lock new file mode 100644 index 00000000..a4335a9c --- /dev/null +++ b/examples/flutter/example/ios/Podfile.lock @@ -0,0 +1,35 @@ +PODS: + - Flutter (1.0.0) + - integration_test (0.0.1): + - Flutter + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS + - thermion_flutter (0.0.1): + - Flutter + +DEPENDENCIES: + - Flutter (from `Flutter`) + - integration_test (from `.symlinks/plugins/integration_test/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) + - thermion_flutter (from `.symlinks/plugins/thermion_flutter/ios`) + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + integration_test: + :path: ".symlinks/plugins/integration_test/ios" + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/darwin" + thermion_flutter: + :path: ".symlinks/plugins/thermion_flutter/ios" + +SPEC CHECKSUMS: + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573 + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 + thermion_flutter: dd8d01cb3b3e6e9a612f5a1061a96be1e1c2f659 + +PODFILE CHECKSUM: a57f30d18f102dd3ce366b1d62a55ecbef2158e5 + +COCOAPODS: 1.15.2 diff --git a/examples/flutter/example/ios/Runner.xcodeproj/project.pbxproj b/examples/flutter/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..0b85a8de --- /dev/null +++ b/examples/flutter/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,730 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 18BA9BAB0A3151C581637BC5 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 913673949B5C862688BEB411 /* Pods_Runner.framework */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 44B597F813CB15F7F7362D7F /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E559449EFA9688E4362535A /* Pods_RunnerTests.framework */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 24862DEBD358E9187AF1957F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 28E01474E257DCB9E5A9F16D /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 34F6152C42E578942239D66E /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 3E559449EFA9688E4362535A /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 71B8727E9D9717E2EC7D0632 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 913673949B5C862688BEB411 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C4E435CCE2B189B896F861F8 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + FA604CE866685A80B2F7D1EA /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 18BA9BAB0A3151C581637BC5 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E5F93109740F1CF8EAB7C740 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 44B597F813CB15F7F7362D7F /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 3762816736B339B0521FA963 /* Pods */ = { + isa = PBXGroup; + children = ( + FA604CE866685A80B2F7D1EA /* Pods-Runner.debug.xcconfig */, + C4E435CCE2B189B896F861F8 /* Pods-Runner.release.xcconfig */, + 24862DEBD358E9187AF1957F /* Pods-Runner.profile.xcconfig */, + 34F6152C42E578942239D66E /* Pods-RunnerTests.debug.xcconfig */, + 28E01474E257DCB9E5A9F16D /* Pods-RunnerTests.release.xcconfig */, + 71B8727E9D9717E2EC7D0632 /* Pods-RunnerTests.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + 3762816736B339B0521FA963 /* Pods */, + F604EC48BBC88B9D456C52C9 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; + F604EC48BBC88B9D456C52C9 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 913673949B5C862688BEB411 /* Pods_Runner.framework */, + 3E559449EFA9688E4362535A /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 966EE0BC7D8B7994F46B60D0 /* [CP] Check Pods Manifest.lock */, + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + E5F93109740F1CF8EAB7C740 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + F7EDF8FA795C5CA2175B4CDF /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ED098149A1804FAFC41C252E /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 966EE0BC7D8B7994F46B60D0 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + ED098149A1804FAFC41C252E /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + F7EDF8FA795C5CA2175B4CDF /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = TM2B4SJXNJ; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "app.flutter-filament.example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 34F6152C42E578942239D66E /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = app.polyvox.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 28E01474E257DCB9E5A9F16D /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = app.polyvox.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 71B8727E9D9717E2EC7D0632 /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = app.polyvox.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = TM2B4SJXNJ; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "app.flutter-filament.example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = TM2B4SJXNJ; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "app.flutter-filament.example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/flutter/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to examples/flutter/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/flutter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to examples/flutter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/flutter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to examples/flutter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 86% rename from example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to examples/flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index a6b826db..8e3ca5df 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/examples/flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ + + + + + CADisableMinimumFrameDurationOnPhone + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName @@ -24,6 +26,8 @@ $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS + UIApplicationSupportsIndirectInputEvents + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -41,11 +45,5 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIViewControllerBasedStatusBarAppearance - - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - diff --git a/example/ios/Runner/Runner-Bridging-Header.h b/examples/flutter/example/ios/Runner/Runner-Bridging-Header.h similarity index 100% rename from example/ios/Runner/Runner-Bridging-Header.h rename to examples/flutter/example/ios/Runner/Runner-Bridging-Header.h diff --git a/examples/flutter/example/ios/RunnerTests/RunnerTests.swift b/examples/flutter/example/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 00000000..86a7c3b1 --- /dev/null +++ b/examples/flutter/example/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/examples/flutter/example/lib/camera_matrix_overlay.dart b/examples/flutter/example/lib/camera_matrix_overlay.dart new file mode 100644 index 00000000..a2c4c17d --- /dev/null +++ b/examples/flutter/example/lib/camera_matrix_overlay.dart @@ -0,0 +1,139 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import 'package:thermion_flutter/thermion_flutter.dart'; +import 'package:vector_math/vector_math_64.dart' as v; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; + +class CameraMatrixOverlay extends StatefulWidget { + final ThermionViewer controller; + final bool showProjectionMatrices; + + const CameraMatrixOverlay( + {super.key, + required this.controller, + required this.showProjectionMatrices}); + + @override + State createState() => _CameraMatrixOverlayState(); +} + +class _CameraMatrixOverlayState extends State { + Timer? _cameraTimer; + String? _cameraPosition; + String? _cameraRotation; + + String? _cameraProjectionMatrix; + String? _cameraCullingProjectionMatrix; + + void _tick(Timer timer) async { + var cameraPosition = await widget.controller.getCameraPosition(); + var cameraRotation = await widget.controller.getCameraRotation(); + + _cameraPosition = + "${cameraPosition.storage.map((v) => v.toStringAsFixed(2))}"; + _cameraRotation = + "${cameraRotation.storage.map((v) => v.toStringAsFixed(2))}"; + + if (widget.showProjectionMatrices) { + var projMatrix = await widget.controller.getCameraProjectionMatrix(); + var cullingMatrix = + await widget.controller.getCameraCullingProjectionMatrix(); + + _cameraProjectionMatrix = + projMatrix.storage.map((v) => v.toStringAsFixed(2)).join(","); + _cameraCullingProjectionMatrix = + cullingMatrix.storage.map((v) => v.toStringAsFixed(2)).join(","); + _getFrustum(); + } + + setState(() {}); + } + + void _updateTimer() async { + _cameraTimer?.cancel(); + await widget.controller.initialized; + } + + v.Frustum? _frustum; + + void _getFrustum() async { + _frustum = await widget.controller.getCameraFrustum(); + } + + @override + void initState() { + super.initState(); + _updateTimer(); + } + + @override + void didUpdateWidget(CameraMatrixOverlay oldWidget) { + super.didUpdateWidget(oldWidget); + setState(() {}); + } + + @override + void dispose() { + super.dispose(); + _cameraTimer?.cancel(); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + color: Colors.black.withOpacity(0.5), + borderRadius: BorderRadius.circular(29)), + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text("Camera : $_cameraPosition $_cameraRotation", + style: + const TextStyle(color: Colors.white, fontSize: 10)), + // widget.showProjectionMatrices + // ? Text("Projection matrix : $_cameraProjectionMatrix", + // style: const TextStyle(color: Colors.white, fontSize: 12)) + // : Container(), + // widget.showProjectionMatrices + // ? Text("Culling matrix : $_cameraCullingProjectionMatrix", + // style: const TextStyle(color: Colors.white, fontSize: 12)) + // : Container(), + widget.showProjectionMatrices + ? const Text("Frustum matrix", + style: TextStyle(color: Colors.white, fontSize: 10)) + : Container() + ] + + (_frustum == null + ? [] + : [ + _frustum!.plane0, + _frustum!.plane1, + _frustum!.plane2, + _frustum!.plane3, + _frustum!.plane4, + _frustum!.plane5 + ] + .map((plane) => Row( + children: [ + plane.normal.x, + plane.normal.y, + plane.normal.z, + plane.constant + ] + .map((v) => Text( + v.toStringAsFixed(2) + " ", + style: const TextStyle( + color: Colors.white, + fontSize: 10), + textAlign: TextAlign.center, + )) + .cast() + .toList())) + .cast() + .toList()))); + } +} diff --git a/examples/flutter/example/lib/example_viewport.dart b/examples/flutter/example/lib/example_viewport.dart new file mode 100644 index 00000000..4b48ea6c --- /dev/null +++ b/examples/flutter/example/lib/example_viewport.dart @@ -0,0 +1,37 @@ +import 'package:flutter/widgets.dart'; +import 'package:thermion_flutter/filament/widgets/camera/entity_controller_mouse_widget.dart'; +import 'package:thermion_flutter/filament/widgets/camera/gestures/filament_gesture_detector.dart'; +import 'package:thermion_flutter/filament/widgets/filament_widget.dart'; +import 'package:thermion_flutter/thermion_flutter.dart'; +import 'package:thermion_dart/thermion_dart/entities/entity_transform_controller.dart'; + + +class ExampleViewport extends StatelessWidget { + final ThermionFlutterPlugin? controller; + final EntityTransformController? entityTransformController; + final EdgeInsets padding; + final FocusNode keyboardFocusNode; + + const ExampleViewport( + {super.key, + required this.controller, + required this.padding, + required this.keyboardFocusNode, + this.entityTransformController}); + + @override + Widget build(BuildContext context) { + return controller != null + ? Padding( + padding: padding, + child: EntityTransformMouseControllerWidget( + transformController: entityTransformController, + child: FilamentGestureDetector( + showControlOverlay: true, + controller: controller!.viewer, + child: ThermionWidget( + plugin: controller!, + )))) + : Container(); + } +} diff --git a/examples/flutter/example/lib/main.dart b/examples/flutter/example/lib/main.dart new file mode 100644 index 00000000..b5cbf62c --- /dev/null +++ b/examples/flutter/example/lib/main.dart @@ -0,0 +1,203 @@ +import 'dart:async'; +import 'package:flutter/material.dart'; +import 'package:thermion_flutter/filament/widgets/debug/entity_list_widget.dart'; +import 'package:thermion_flutter_example/camera_matrix_overlay.dart'; +import 'package:thermion_flutter_example/menus/controller_menu.dart'; +import 'package:thermion_flutter_example/example_viewport.dart'; +import 'package:thermion_dart/thermion_dart/entities/entity_transform_controller.dart'; +import 'package:thermion_flutter_example/menus/scene_menu.dart'; +import 'package:thermion_flutter/thermion_flutter.dart'; +import 'package:thermion_flutter_example/picker_result_widget.dart'; + + +const loadDefaultScene = bool.hasEnvironment('--load-default-scene'); + +void main() async { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({Key? key}) : super(key: key); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State with SingleTickerProviderStateMixin { + @override + Widget build(BuildContext context) { + return MaterialApp( + theme: ThemeData( + useMaterial3: true, + textTheme: const TextTheme( + labelLarge: TextStyle(fontSize: 12), + displayMedium: TextStyle(fontSize: 12), + headlineMedium: const TextStyle(fontSize: 12), + titleMedium: TextStyle(fontSize: 12), + bodyLarge: TextStyle(fontSize: 14), + bodyMedium: TextStyle(fontSize: 12))), + // showPerformanceOverlay: true, + home: const Scaffold( + backgroundColor: Color(0x00000000), + body: ExampleWidget())); + } +} + +class ExampleWidget extends StatefulWidget { + const ExampleWidget({super.key}); + + @override + State createState() { + return ExampleWidgetState(); + } +} + +enum MenuType { controller, assets, camera, misc } + +class ExampleWidgetState extends State { + final _plugin = ThermionFlutterPlugin(); + + EdgeInsets _viewportMargin = EdgeInsets.zero; + + // these are all the options that can be set via the menu + // we store them here + static bool rendering = false; + static bool recording = false; + static int framerate = 60; + static bool postProcessing = false; + static bool antiAliasingMsaa = false; + static bool antiAliasingTaa = false; + static bool antiAliasingFxaa = false; + static bool frustumCulling = true; + + static double zoomSpeed = 0.01; + static double orbitSpeedX = 0.01; + static double orbitSpeedY = 0.01; + + static bool hasSkybox = false; + static bool coneHidden = false; + + static bool loop = false; + static final showProjectionMatrices = ValueNotifier(false); + + late StreamSubscription _listener; + + @override + void initState() { + super.initState(); + } + + @override + void dispose() { + super.dispose(); + _listener.cancel(); + } + + EntityTransformController? _transformController; + + final _sharedFocusNode = FocusNode(); + + @override + Widget build(BuildContext context) { + return FutureBuilder( + future: _plugin.initialized, + builder: (_, AsyncSnapshot initialized) { + var isInitialized = initialized.data == true; + + return Stack( + fit: StackFit.expand, + children: [ + if (isInitialized) + Positioned.fill( + child: ExampleViewport( + controller: isInitialized ? _plugin : null, + entityTransformController: _transformController, + padding: _viewportMargin, + keyboardFocusNode: _sharedFocusNode), + ), + Positioned( + bottom: 30, + left: 0, + right: 10, + height: 30, + child: Container( + height: 30, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(30), + color: Colors.white.withOpacity(0.25), + ), + padding: const EdgeInsets.symmetric(horizontal: 10), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + ControllerMenu( + sharedFocusNode: _sharedFocusNode, + controller: _plugin, + onToggleViewport: () { + setState(() { + _viewportMargin = + (_viewportMargin == EdgeInsets.zero) + ? const EdgeInsets.all(30) + : EdgeInsets.zero; + }); + }, + onControllerDestroyed: () {}, + onControllerCreated: () {}), + SceneMenu( + sharedFocusNode: _sharedFocusNode, + controller: _plugin, + ), + GestureDetector( + onTap: () async { + await _plugin.viewer.loadGlb( + 'assets/shapes/shapes.glb', + numInstances: 1); + }, + child: Container( + color: Colors.transparent, + child: const Text("shapes.glb"))), + const SizedBox(width: 5), + GestureDetector( + onTap: () async { + await _plugin.viewer.loadGlb('assets/1.glb'); + }, + child: Container( + color: Colors.transparent, + child: const Text("1.glb"))), + const SizedBox(width: 5), + GestureDetector( + onTap: () async { + await _plugin.viewer.loadGlb('assets/2.glb'); + }, + child: Container( + color: Colors.transparent, + child: const Text("2.glb"))), + const SizedBox(width: 5), + GestureDetector( + onTap: () async { + await _plugin.viewer.loadGlb('assets/3.glb'); + }, + child: Container( + color: Colors.transparent, + child: const Text("3.glb"))), + Expanded(child: Container()), + ]))), + if (isInitialized) ...[ + Positioned(top:10, left:10, width:200, height:200, child:Container( + child:EntityListWidget(controller: _plugin.viewer))), + // Padding( + // padding: const EdgeInsets.only(top: 10, left: 20, right: 20), + // child: ValueListenableBuilder( + // valueListenable: showProjectionMatrices, + // builder: (ctx, value, child) => CameraMatrixOverlay( + // controller: _plugin.viewer, showProjectionMatrices: value)), + // ), + // Align( + // alignment: Alignment.topRight, + // child: PickerResultWidget(controller: _plugin.viewer), + // ) + ] + ]); + }); + } +} diff --git a/examples/flutter/example/lib/menus/asset_submenu.dart b/examples/flutter/example/lib/menus/asset_submenu.dart new file mode 100644 index 00000000..3ddc3d08 --- /dev/null +++ b/examples/flutter/example/lib/menus/asset_submenu.dart @@ -0,0 +1,263 @@ +import 'dart:math'; + +import 'package:flutter/material.dart'; +import 'package:thermion_flutter/thermion_flutter.dart'; +import 'package:animation_tools_dart/animation_tools_dart.dart'; +import 'package:thermion_flutter_example/main.dart'; +import 'package:vector_math/vector_math_64.dart' as v; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; + +class AssetSubmenu extends StatefulWidget { + final ThermionFlutterPlugin controller; + const AssetSubmenu({super.key, required this.controller}); + + @override + State createState() => _AssetSubmenuState(); +} + +class _AssetSubmenuState extends State { + @override + void initState() { + super.initState(); + } + + Widget _shapesSubmenu() { + var children = [ + MenuItemButton( + closeOnActivate: false, + onPressed: () async { + var entity = await widget.controller.viewer.getChildEntity( + widget.controller.viewer.scene.listEntities().last, "Cylinder"); + await showDialog( + context: context, + builder: (BuildContext context) { + return Center( + child: Container( + color: Colors.white, child: Text(entity.toString()))); + }); + }, + child: const Text('Find Cylinder entity by name')), + MenuItemButton( + onPressed: () async { + widget.controller.viewer.setPosition( + widget.controller.viewer.scene.listEntities().last, + 1.0, + 1.0, + -1.0); + }, + child: const Text('Set position to 1, 1, -1'), + ), + MenuItemButton( + onPressed: () async { + final color = Colors.purple; + widget.controller.viewer.setMaterialColor( + widget.controller.viewer.scene.listEntities().last, + "Cone", + 0, + color.red / 255.0, + color.green / 255.0, + color.blue / 255.0, + 1.0); + }, + child: const Text("Set cone material color to purple")), + ]; + + return SubmenuButton(menuChildren: children, child: const Text("Shapes")); + } + + Widget _geometrySubmenu() { + return SubmenuButton( + menuChildren: [ + MenuItemButton( + onPressed: () async { + var verts = [ + -1.0, + 0.0, + -1.0, + -1.0, + 0.0, + 1.0, + 1.0, + 0.0, + 1.0, + 1.0, + 0.0, + -1.0, + ]; + var indices = [0, 1, 2, 2, 3, 0]; + var geom = await widget.controller.viewer.createGeometry( + verts, indices, + materialPath: "asset://assets/solidcolor.filamat"); + }, + child: const Text("Quad")), + MenuItemButton( + onPressed: () async { + await widget.controller.viewer.createGeometry([ + 0, + 0, + 0, + 1, + 0, + 0, + ], [ + 0, + 1 + ], primitiveType: PrimitiveType.LINES); + }, + child: const Text("Line")) + ], + child: const Text("Custom Geometry"), + ); + } + + @override + Widget build(BuildContext context) { + return SubmenuButton( + menuChildren: [ + _shapesSubmenu(), + _geometrySubmenu(), + MenuItemButton( + onPressed: () async { + await widget.controller.viewer.addLight( + LightType.DIRECTIONAL, 6500, 100000, 0, 1, 0, 0, -1, 0); + }, + child: const Text("Add directional light"), + ), + MenuItemButton( + onPressed: () async { + await widget.controller.viewer.addLight( + LightType.POINT, 6500, 100000, 0, 1, 0, 0, -1, 0, + falloffRadius: 1.0); + }, + child: const Text("Add point light"), + ), + MenuItemButton( + onPressed: () async { + await widget.controller.viewer.addLight( + LightType.SPOT, 6500, 1000000, 0, 0, 0, 0, 1, 0, + spotLightConeInner: 0.1, + spotLightConeOuter: 0.4, + falloffRadius: 100.0); + }, + child: const Text("Add spot light"), + ), + MenuItemButton( + onPressed: () async { + await widget.controller.viewer.clearLights(); + }, + child: const Text("Clear lights"), + ), + MenuItemButton( + onPressed: () { + final color = const Color(0xAA73C9FA); + widget.controller.viewer.setBackgroundColor(color.red / 255.0, + color.green / 255.0, color.blue / 255.0, 1.0); + }, + child: const Text("Set background color")), + MenuItemButton( + onPressed: () { + widget.controller.viewer + .setBackgroundImage('assets/background.ktx'); + }, + child: const Text("Load background image")), + MenuItemButton( + onPressed: () { + widget.controller.viewer.setBackgroundImage( + 'assets/background.ktx', + fillHeight: true); + }, + child: const Text("Load background image (fill height)")), + MenuItemButton( + onPressed: () { + if (ExampleWidgetState.hasSkybox) { + widget.controller.viewer.removeSkybox(); + } else { + widget.controller.viewer + .loadSkybox('assets/default_env/default_env_skybox.ktx'); + } + ExampleWidgetState.hasSkybox = !ExampleWidgetState.hasSkybox; + }, + child: Text(ExampleWidgetState.hasSkybox + ? 'Remove skybox' + : 'Load skybox')), + MenuItemButton( + onPressed: () { + widget.controller.viewer + .loadIbl('assets/default_env/default_env_ibl.ktx'); + }, + child: const Text('Load IBL')), + MenuItemButton( + onPressed: () { + widget.controller.viewer.removeIbl(); + }, + child: const Text('Remove IBL')), + MenuItemButton( + onPressed: () async { + await widget.controller.viewer.clearEntities(); + }, + child: const Text('Clear assets')), + ], + child: const Text("Assets"), + ); + } +} + +// _item(() async { +// var frameData = Float32List.fromList( +// List.generate(120, (i) => i / 120).expand((x) { +// var vals = List.filled(7, x); +// vals[3] = 1.0; +// // vals[4] = 0; +// vals[5] = 0; +// vals[6] = 0; +// return vals; +// }).toList()); + +// widget.controller!.setBoneAnimation( +// _shapes!, +// BoneAnimationData( +// "Bone.001", ["Cube.001"], frameData, 1000.0 / 60.0)); +// // , +// // "Bone.001", +// // "Cube.001", +// // BoneTransform([Vec3(x: 0, y: 0.0, z: 0.0)], +// // [Quaternion(x: 1, y: 1, z: 1, w: 1)])); +// }, 'construct bone animation'), + +// _item(() async { +// var morphs = await widget.controller! +// .getMorphTargetNames(_shapes!, "Cylinder"); +// final animation = AnimationBuilder( +// availableMorphs: morphs, +// framerate: 30, +// meshName: "Cylinder") +// .setDuration(4) +// .setMorphTargets(["Key 1", "Key 2"]) +// .interpolateMorphWeights(0, 4, 0, 1) +// .build(); +// widget.controller!.setMorphAnimationData(_shapes!, animation); +// }, "animate cylinder morph weights #1 and #2"), +// _item(() async { +// var morphs = await widget.controller! +// .getMorphTargetNames(_shapes!, "Cylinder"); +// final animation = AnimationBuilder( +// availableMorphs: morphs, +// framerate: 30, +// meshName: "Cylinder") +// .setDuration(4) +// .setMorphTargets(["Key 3", "Key 4"]) +// .interpolateMorphWeights(0, 4, 0, 1) +// .build(); +// widget.controller!.setMorphAnimationData(_shapes!, animation); +// }, "animate cylinder morph weights #3 and #4"), +// _item(() async { +// var morphs = await widget.controller! +// .getMorphTargetNames(_shapes!, "Cube"); +// final animation = AnimationBuilder( +// availableMorphs: morphs, framerate: 30, meshName: "Cube") +// .setDuration(4) +// .setMorphTargets(["Key 1", "Key 2"]) +// .interpolateMorphWeights(0, 4, 0, 1) +// .build(); +// widget.controller!.setMorphAnimationData(_shapes!, animation); +// }, "animate shapes morph weights #1 and #2"), diff --git a/example/lib/menus/camera_submenu.dart b/examples/flutter/example/lib/menus/camera_submenu.dart similarity index 65% rename from example/lib/menus/camera_submenu.dart rename to examples/flutter/example/lib/menus/camera_submenu.dart index 8ce199b8..5113264e 100644 --- a/example/lib/menus/camera_submenu.dart +++ b/examples/flutter/example/lib/menus/camera_submenu.dart @@ -2,12 +2,13 @@ import 'dart:async'; import 'dart:math'; import 'package:flutter/material.dart'; - -import 'package:flutter_filament/filament_controller.dart'; -import 'package:flutter_filament_example/main.dart'; +import 'package:vector_math/vector_math_64.dart' as v; +import 'package:thermion_flutter/thermion_flutter.dart'; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; +import 'package:thermion_flutter_example/main.dart'; class CameraSubmenu extends StatefulWidget { - final FilamentController controller; + final ThermionFlutterPlugin controller; const CameraSubmenu({super.key, required this.controller}); @override @@ -15,8 +16,22 @@ class CameraSubmenu extends StatefulWidget { } class _CameraSubmenuState extends State { - double _near = 0.05; - double _far = 1000.0; + double? _near; + double? _far; + + @override + void initState() { + super.initState(); + widget.controller.viewer.initialized.then((_) { + widget.controller.viewer.getCameraCullingNear().then((v) { + _near = v; + widget.controller.viewer.getCameraCullingFar().then((v) { + _far = v; + setState(() {}); + }); + }); + }); + } final _menuController = MenuController(); @@ -30,7 +45,7 @@ class _CameraSubmenuState extends State { print("Set to ${ExampleWidgetState.showProjectionMatrices}"); }, child: Text( - '${ExampleWidgetState.showProjectionMatrices.value ? "Hide" : "Display"} camera projection/culling projection matrices', + '${ExampleWidgetState.showProjectionMatrices.value ? "Hide" : "Display"} camera frustum', style: TextStyle( fontWeight: ExampleWidgetState.showProjectionMatrices.value ? FontWeight.bold @@ -41,7 +56,7 @@ class _CameraSubmenuState extends State { menuChildren: [1.0, 7.0, 14.0, 28.0, 56.0] .map((v) => MenuItemButton( onPressed: () { - widget.controller.setCameraFocalLength(v); + widget.controller.viewer.setCameraFocalLength(v); }, child: Text( v.toStringAsFixed(2), @@ -54,7 +69,9 @@ class _CameraSubmenuState extends State { .map((v) => MenuItemButton( onPressed: () { _near = v; - widget.controller.setCameraCulling(_near, _far); + print("Setting camera culling to $_near $_far!"); + + widget.controller.viewer.setCameraCulling(_near!, _far!); }, child: Text( v.toStringAsFixed(2), @@ -67,7 +84,8 @@ class _CameraSubmenuState extends State { .map((v) => MenuItemButton( onPressed: () { _far = v; - widget.controller.setCameraCulling(_near, _far); + print("Setting camera culling to $_near! $_far"); + widget.controller.viewer.setCameraCulling(_near!, _far!); }, child: Text( v.toStringAsFixed(2), @@ -77,31 +95,22 @@ class _CameraSubmenuState extends State { child: const Text("Set far")), MenuItemButton( onPressed: () async { - widget.controller.setCameraPosition(1.0, 1.0, -1.0); + widget.controller.viewer.setCameraPosition(1.0, 1.0, -1.0); }, - child: const Text('Move to 1, 1, -1'), + child: const Text('Set position to 1, 1, -1 (leave rotation as-is)'), ), MenuItemButton( - onPressed: ExampleWidgetState.last == null - ? null - : () async { - await widget.controller - .setCamera(ExampleWidgetState.last!, null); - }, - child: const Text('Set to first camera in last added asset'), - ), - MenuItemButton( - onPressed: ExampleWidgetState.last == null - ? null - : () async { - await widget.controller - .moveCameraToAsset(ExampleWidgetState.last!); - }, - child: const Text("Move to last added asset"), + onPressed: () async { + widget.controller.viewer.setCameraPosition(0.0, 0.0, 0.0); + widget.controller.viewer.setCameraRotation( + v.Quaternion.axisAngle(v.Vector3(0, 0.0, 1.0), 0.0)); + }, + child: const Text('Move to 0,0,0, facing towards 0,0,-1'), ), MenuItemButton( onPressed: () { - widget.controller.setCameraRotation(pi / 4, 0.0, 1.0, 0.0); + widget.controller.viewer.setCameraRotation( + v.Quaternion.axisAngle(v.Vector3(0, 1, 0), pi / 4)); }, child: const Text("Rotate camera 45 degrees around y axis"), ), @@ -109,7 +118,7 @@ class _CameraSubmenuState extends State { onPressed: () { ExampleWidgetState.frustumCulling = !ExampleWidgetState.frustumCulling; - widget.controller + widget.controller.viewer .setViewFrustumCulling(ExampleWidgetState.frustumCulling); }, child: Text( @@ -119,7 +128,7 @@ class _CameraSubmenuState extends State { closeOnActivate: false, onPressed: () async { var projMatrix = - await widget.controller.getCameraProjectionMatrix(); + await widget.controller.viewer.getCameraProjectionMatrix(); await showDialog( context: context, builder: (ctx) { @@ -134,45 +143,12 @@ class _CameraSubmenuState extends State { }); }, child: const Text("Get projection matrix")), - MenuItemButton( - closeOnActivate: false, - onPressed: () async { - var frustum = await widget.controller.getCameraFrustum(); - var normalString = [ - frustum.plane0, - frustum.plane1, - frustum.plane2, - frustum.plane3, - frustum.plane4, - frustum.plane5 - ] - .map((plane) => - plane.normal.storage - .map((v) => v.toStringAsFixed(2)) - .join(",") + - ",${plane.constant}") - .join("\n"); - showDialog( - context: context, - builder: (ctx) { - return Center( - child: Container( - height: 300, - width: 300, - color: Colors.white, - child: - Text("Frustum plane normals : $normalString "))); - }); - _menuController.close(); - }, - child: const Text("Get frustum")), SubmenuButton( menuChildren: ManipulatorMode.values.map((mm) { return MenuItemButton( onPressed: () { - ExampleWidgetState.cameraManipulatorMode = mm; - widget.controller.setCameraManipulatorOptions( - mode: ExampleWidgetState.cameraManipulatorMode, + widget.controller.viewer.setCameraManipulatorOptions( + mode: mm, orbitSpeedX: ExampleWidgetState.orbitSpeedX, orbitSpeedY: ExampleWidgetState.orbitSpeedY, zoomSpeed: ExampleWidgetState.zoomSpeed); @@ -180,9 +156,10 @@ class _CameraSubmenuState extends State { child: Text( mm.name, style: TextStyle( - fontWeight: ExampleWidgetState.cameraManipulatorMode == mm - ? FontWeight.bold - : FontWeight.normal), + // fontWeight: ExampleWidgetState.cameraManipulatorMode == mm + // ? FontWeight.bold + // : FontWeight.normal + ), ), ); }).toList(), @@ -192,8 +169,7 @@ class _CameraSubmenuState extends State { return MenuItemButton( onPressed: () { ExampleWidgetState.zoomSpeed = speed; - widget.controller.setCameraManipulatorOptions( - mode: ExampleWidgetState.cameraManipulatorMode, + widget.controller.viewer.setCameraManipulatorOptions( orbitSpeedX: ExampleWidgetState.orbitSpeedX, orbitSpeedY: ExampleWidgetState.orbitSpeedY, zoomSpeed: ExampleWidgetState.zoomSpeed); @@ -215,8 +191,7 @@ class _CameraSubmenuState extends State { onPressed: () { ExampleWidgetState.orbitSpeedX = speed; ExampleWidgetState.orbitSpeedY = speed; - widget.controller.setCameraManipulatorOptions( - mode: ExampleWidgetState.cameraManipulatorMode, + widget.controller.viewer.setCameraManipulatorOptions( orbitSpeedX: ExampleWidgetState.orbitSpeedX, orbitSpeedY: ExampleWidgetState.orbitSpeedY, zoomSpeed: ExampleWidgetState.zoomSpeed); @@ -237,6 +212,9 @@ class _CameraSubmenuState extends State { @override Widget build(BuildContext context) { + // if (_near == null || _far == null) { + // return Container(); + // } return SubmenuButton( controller: _menuController, menuChildren: _cameraMenu(), diff --git a/examples/flutter/example/lib/menus/controller_menu.dart b/examples/flutter/example/lib/menus/controller_menu.dart new file mode 100644 index 00000000..2ba71624 --- /dev/null +++ b/examples/flutter/example/lib/menus/controller_menu.dart @@ -0,0 +1,106 @@ +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; + +import 'package:thermion_flutter/thermion_flutter.dart'; + +class ControllerMenu extends StatefulWidget { + final ThermionFlutterPlugin controller; + final void Function() onToggleViewport; + final void Function() onControllerCreated; + final void Function() onControllerDestroyed; + final FocusNode sharedFocusNode; + + + ControllerMenu( + {required this.controller, + required this.onControllerCreated, + required this.onControllerDestroyed, + required this.sharedFocusNode, + required this.onToggleViewport}); + + @override + State createState() => _ControllerMenuState(); +} + +class _ControllerMenuState extends State { + void _createController({String? uberArchivePath}) async { + widget.controller.initialize(uberArchivePath: uberArchivePath); + widget.onControllerCreated(); + } + + @override + void initState() { + super.initState(); + } + + @override + void didUpdateWidget(ControllerMenu oldWidget) { + super.didUpdateWidget(oldWidget); + } + + bool _initialized = false; + @override + Widget build(BuildContext context) { + var items = []; + if (!_initialized) { + items.addAll([ + MenuItemButton( + child: + const Text("Create ThermionFlutterPlugin (default ubershader)"), + onPressed: () { + _createController(); + }, + ), + MenuItemButton( + child: const Text( + "Create ThermionFlutterPlugin (custom ubershader - lit opaque only)"), + onPressed: () { + _createController( + uberArchivePath: Platform.isWindows + ? "assets/lit_opaque_32.uberz" + : Platform.isMacOS + ? "assets/lit_opaque_43.uberz" + : Platform.isIOS + ? "assets/lit_opaque_43.uberz" + : "assets/lit_opaque_43_gles.uberz"); + }, + ) + ]); + } else { + items.addAll([ + MenuItemButton( + child: const Text("Destroy viewer"), + onPressed: () async { + widget.controller.dispose(); + widget.onControllerDestroyed(); + setState(() {}); + }, + ) + ]); + } + return MenuAnchor( + childFocusNode: widget.sharedFocusNode, + menuChildren: items + + [ + TextButton( + child: const Text("Toggle viewport size"), + onPressed: widget.onToggleViewport, + ) + ], + builder: + (BuildContext context, MenuController controller, Widget? child) { + return TextButton( + onPressed: () { + if (controller.isOpen) { + controller.close(); + } else { + controller.open(); + } + }, + child: const Text("Controller / Viewer"), + ); + }); + } +} diff --git a/examples/flutter/example/lib/menus/rendering_submenu.dart b/examples/flutter/example/lib/menus/rendering_submenu.dart new file mode 100644 index 00000000..0a6ced87 --- /dev/null +++ b/examples/flutter/example/lib/menus/rendering_submenu.dart @@ -0,0 +1,95 @@ +import 'package:flutter/material.dart'; +import 'package:thermion_flutter/thermion_flutter.dart'; +import 'package:thermion_flutter_example/main.dart'; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; + +class RenderingSubmenu extends StatefulWidget { + final ThermionFlutterPlugin controller; + + const RenderingSubmenu({super.key, required this.controller}); + + @override + State createState() => _RenderingSubmenuState(); +} + +class _RenderingSubmenuState extends State { + @override + Widget build(BuildContext context) { + return SubmenuButton( + menuChildren: [ + MenuItemButton( + onPressed: () { + widget.controller.viewer.render(); + }, + child: const Text("Render single frame"), + ), + MenuItemButton( + onPressed: () { + ExampleWidgetState.rendering = !ExampleWidgetState.rendering; + widget.controller.viewer.setRendering(ExampleWidgetState.rendering); + }, + child: Text( + "Set continuous rendering to ${!ExampleWidgetState.rendering}"), + ), + MenuItemButton( + onPressed: () { + ExampleWidgetState.framerate = + ExampleWidgetState.framerate == 60 ? 30 : 60; + widget.controller.viewer.setFrameRate(ExampleWidgetState.framerate); + }, + child: Text( + "Toggle framerate (currently ${ExampleWidgetState.framerate}) "), + ), + MenuItemButton( + onPressed: () { + widget.controller.viewer.setToneMapping(ToneMapper.LINEAR); + }, + child: const Text("Set tone mapping to linear"), + ), + MenuItemButton( + onPressed: () { + ExampleWidgetState.postProcessing = + !ExampleWidgetState.postProcessing; + widget.controller.viewer + .setPostProcessing(ExampleWidgetState.postProcessing); + }, + child: Text( + "${ExampleWidgetState.postProcessing ? "Disable" : "Enable"} postprocessing"), + ), + MenuItemButton( + onPressed: () { + ExampleWidgetState.antiAliasingMsaa = + !ExampleWidgetState.antiAliasingMsaa; + widget.controller.viewer.setAntiAliasing( + ExampleWidgetState.antiAliasingMsaa, + ExampleWidgetState.antiAliasingFxaa, + ExampleWidgetState.antiAliasingTaa); + }, + child: Text( + "${ExampleWidgetState.antiAliasingMsaa ? "Disable" : "Enable"} MSAA antialiasing"), + ), + MenuItemButton( + onPressed: () { + ExampleWidgetState.antiAliasingFxaa = + !ExampleWidgetState.antiAliasingFxaa; + widget.controller.viewer.setAntiAliasing( + ExampleWidgetState.antiAliasingMsaa, + ExampleWidgetState.antiAliasingFxaa, + ExampleWidgetState.antiAliasingTaa); + }, + child: Text( + "${ExampleWidgetState.antiAliasingFxaa ? "Disable" : "Enable"} FXAA antialiasing"), + ), + MenuItemButton( + onPressed: () { + ExampleWidgetState.recording = !ExampleWidgetState.recording; + widget.controller.viewer.setRecording(ExampleWidgetState.recording); + }, + child: Text( + "Turn recording ${ExampleWidgetState.recording ? "OFF" : "ON"}) "), + ), + ], + child: const Text("Rendering"), + ); + } +} diff --git a/examples/flutter/example/lib/menus/scene_menu.dart b/examples/flutter/example/lib/menus/scene_menu.dart new file mode 100644 index 00000000..fbd1bf71 --- /dev/null +++ b/examples/flutter/example/lib/menus/scene_menu.dart @@ -0,0 +1,62 @@ +import 'package:flutter/material.dart'; + +import 'package:thermion_flutter/thermion_flutter.dart'; +import 'package:thermion_flutter_example/menus/asset_submenu.dart'; +import 'package:thermion_flutter_example/menus/camera_submenu.dart'; +import 'package:thermion_flutter_example/menus/rendering_submenu.dart'; + +class SceneMenu extends StatefulWidget { + final ThermionFlutterPlugin? controller; + final FocusNode sharedFocusNode; + + const SceneMenu( + {super.key, required this.controller, required this.sharedFocusNode}); + + @override + State createState() { + return _SceneMenuState(); + } +} + +class _SceneMenuState extends State { + @override + void didUpdateWidget(SceneMenu oldWidget) { + super.didUpdateWidget(oldWidget); + if (widget.controller != null && + (widget.controller != oldWidget.controller)) { + setState(() {}); + } + } + + @override + Widget build(BuildContext context) { + return MenuAnchor( + onClose: () {}, + childFocusNode: widget.sharedFocusNode, + menuChildren: widget.controller == null + ? [] + : [ + RenderingSubmenu( + controller: widget.controller!, + ), + AssetSubmenu(controller: widget.controller!), + CameraSubmenu( + controller: widget.controller!, + ), + ], + builder: + (BuildContext context, MenuController controller, Widget? child) { + return TextButton( + onPressed: () { + if (controller.isOpen) { + controller.close(); + } else { + controller.open(); + } + }, + child: const Text("Scene"), + ); + }, + ); + } +} diff --git a/example/lib/picker_result_widget.dart b/examples/flutter/example/lib/picker_result_widget.dart similarity index 60% rename from example/lib/picker_result_widget.dart rename to examples/flutter/example/lib/picker_result_widget.dart index 01544d46..692c4fc6 100644 --- a/example/lib/picker_result_widget.dart +++ b/examples/flutter/example/lib/picker_result_widget.dart @@ -1,19 +1,16 @@ import 'package:flutter/material.dart'; -import 'package:flutter_filament/filament_controller.dart'; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; class PickerResultWidget extends StatelessWidget { - final FilamentController controller; + final ThermionViewer controller; const PickerResultWidget({required this.controller, super.key}); @override Widget build(BuildContext context) { return StreamBuilder( - stream: controller.pickResult.map((FilamentEntity? entityId) { - if (entityId == null) { - return null; - } - return controller.getNameForEntity(entityId); + stream: controller.pickResult.map((result) { + return controller.getNameForEntity(result.entity); }), builder: (ctx, snapshot) => snapshot.data == null ? Container() diff --git a/example/linux/.gitignore b/examples/flutter/example/linux/.gitignore similarity index 100% rename from example/linux/.gitignore rename to examples/flutter/example/linux/.gitignore diff --git a/example/linux/CMakeLists.txt b/examples/flutter/example/linux/CMakeLists.txt similarity index 98% rename from example/linux/CMakeLists.txt rename to examples/flutter/example/linux/CMakeLists.txt index 9465b20e..8e014c4d 100644 --- a/example/linux/CMakeLists.txt +++ b/examples/flutter/example/linux/CMakeLists.txt @@ -4,10 +4,10 @@ project(runner LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "flutter_filament_example") +set(BINARY_NAME "thermion_flutter_example") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "app.polyvox.flutter_filament") +set(APPLICATION_ID "app.polyvox.thermion_flutter") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. diff --git a/example/linux/flutter/CMakeLists.txt b/examples/flutter/example/linux/flutter/CMakeLists.txt similarity index 100% rename from example/linux/flutter/CMakeLists.txt rename to examples/flutter/example/linux/flutter/CMakeLists.txt diff --git a/examples/flutter/example/linux/flutter/generated_plugin_registrant.cc b/examples/flutter/example/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 00000000..01193c10 --- /dev/null +++ b/examples/flutter/example/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + +#include + +void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) thermion_flutter_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "ThermionFlutterPlugin"); + thermion_flutter_plugin_register_with_registrar(thermion_flutter_registrar); +} diff --git a/example/linux/flutter/generated_plugin_registrant.h b/examples/flutter/example/linux/flutter/generated_plugin_registrant.h similarity index 100% rename from example/linux/flutter/generated_plugin_registrant.h rename to examples/flutter/example/linux/flutter/generated_plugin_registrant.h diff --git a/example/linux/flutter/generated_plugins.cmake b/examples/flutter/example/linux/flutter/generated_plugins.cmake similarity index 97% rename from example/linux/flutter/generated_plugins.cmake rename to examples/flutter/example/linux/flutter/generated_plugins.cmake index 75876d76..274b5f60 100644 --- a/example/linux/flutter/generated_plugins.cmake +++ b/examples/flutter/example/linux/flutter/generated_plugins.cmake @@ -3,7 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST - flutter_filament + thermion_flutter ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/example/linux/main.cc b/examples/flutter/example/linux/main.cc similarity index 100% rename from example/linux/main.cc rename to examples/flutter/example/linux/main.cc diff --git a/example/linux/my_application.cc b/examples/flutter/example/linux/my_application.cc similarity index 96% rename from example/linux/my_application.cc rename to examples/flutter/example/linux/my_application.cc index aafe4dd9..75722485 100644 --- a/example/linux/my_application.cc +++ b/examples/flutter/example/linux/my_application.cc @@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) { if (use_header_bar) { GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "flutter_filament_example"); + gtk_header_bar_set_title(header_bar, "thermion_flutter_example"); gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); } else { - gtk_window_set_title(window, "flutter_filament_example"); + gtk_window_set_title(window, "thermion_flutter_example"); } gtk_window_set_default_size(window, 1280, 720); diff --git a/example/linux/my_application.h b/examples/flutter/example/linux/my_application.h similarity index 100% rename from example/linux/my_application.h rename to examples/flutter/example/linux/my_application.h diff --git a/example/macos/.gitignore b/examples/flutter/example/macos/.gitignore similarity index 100% rename from example/macos/.gitignore rename to examples/flutter/example/macos/.gitignore diff --git a/example/macos/Flutter/Flutter-Debug.xcconfig b/examples/flutter/example/macos/Flutter/Flutter-Debug.xcconfig similarity index 100% rename from example/macos/Flutter/Flutter-Debug.xcconfig rename to examples/flutter/example/macos/Flutter/Flutter-Debug.xcconfig diff --git a/example/macos/Flutter/Flutter-Release.xcconfig b/examples/flutter/example/macos/Flutter/Flutter-Release.xcconfig similarity index 100% rename from example/macos/Flutter/Flutter-Release.xcconfig rename to examples/flutter/example/macos/Flutter/Flutter-Release.xcconfig diff --git a/example/macos/Flutter/GeneratedPluginRegistrant.swift b/examples/flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift similarity index 67% rename from example/macos/Flutter/GeneratedPluginRegistrant.swift rename to examples/flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift index bb5362df..93683cf5 100644 --- a/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/examples/flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,10 +5,10 @@ import FlutterMacOS import Foundation -import flutter_filament import path_provider_foundation +import thermion_flutter func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - SwiftFlutterFilamentPlugin.register(with: registry.registrar(forPlugin: "SwiftFlutterFilamentPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + SwiftThermionFlutterPlugin.register(with: registry.registrar(forPlugin: "SwiftThermionFlutterPlugin")) } diff --git a/example/macos/Podfile b/examples/flutter/example/macos/Podfile similarity index 98% rename from example/macos/Podfile rename to examples/flutter/example/macos/Podfile index b5174a8d..90de47d4 100644 --- a/example/macos/Podfile +++ b/examples/flutter/example/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '13' +platform :osx, '13.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/example/macos/Podfile.lock b/examples/flutter/example/macos/Podfile.lock similarity index 56% rename from example/macos/Podfile.lock rename to examples/flutter/example/macos/Podfile.lock index b5155056..94fb2021 100644 --- a/example/macos/Podfile.lock +++ b/examples/flutter/example/macos/Podfile.lock @@ -1,29 +1,29 @@ PODS: - - flutter_filament (0.0.1): - - FlutterMacOS - FlutterMacOS (1.0.0) - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS + - thermion_flutter (0.0.1): + - FlutterMacOS DEPENDENCIES: - - flutter_filament (from `Flutter/ephemeral/.symlinks/plugins/flutter_filament/macos`) - FlutterMacOS (from `Flutter/ephemeral`) - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) + - thermion_flutter (from `Flutter/ephemeral/.symlinks/plugins/thermion_flutter/macos`) EXTERNAL SOURCES: - flutter_filament: - :path: Flutter/ephemeral/.symlinks/plugins/flutter_filament/macos FlutterMacOS: :path: Flutter/ephemeral path_provider_foundation: :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin + thermion_flutter: + :path: Flutter/ephemeral/.symlinks/plugins/thermion_flutter/macos SPEC CHECKSUMS: - flutter_filament: ddf9db01d70cce6c8f3a34f414562ebdb43c7f36 FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 + thermion_flutter: e4895ade6b14d9efb6e17ed2436e89dbb87fa998 -PODFILE CHECKSUM: 9cc8fc8fc62b1d9a89fd6f974ad4157b35254030 +PODFILE CHECKSUM: 1888651be91a8ad58692c1add9ce24279fd4e950 -COCOAPODS: 1.12.1 +COCOAPODS: 1.15.2 diff --git a/example/macos/Runner.xcodeproj/project.pbxproj b/examples/flutter/example/macos/Runner.xcodeproj/project.pbxproj similarity index 91% rename from example/macos/Runner.xcodeproj/project.pbxproj rename to examples/flutter/example/macos/Runner.xcodeproj/project.pbxproj index 518377f0..6eba66ee 100644 --- a/example/macos/Runner.xcodeproj/project.pbxproj +++ b/examples/flutter/example/macos/Runner.xcodeproj/project.pbxproj @@ -27,8 +27,8 @@ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; - 7D1392D8A76BD085A2EACCCA /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67E2BAAB9A1F121079BF72BA /* Pods_RunnerTests.framework */; }; - 8C809D64151E1E580729D80C /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9C522586E642B13803E84A1 /* Pods_Runner.framework */; }; + 73983334E7E3D03A0E12661E /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8E0CF9C3C7800C07C9845FC /* Pods_RunnerTests.framework */; }; + C522DC3C60A9E9D8A157D709 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A43AAD1E638EA0D1719DBA3 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -62,7 +62,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 1C6D0D90A342B362D149A35C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 07D325EB165BDBD20CA1B50D /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; @@ -79,15 +79,15 @@ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 5CF03DE655862183459429BD /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; - 5DAC190752838B8100F59394 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - 67E2BAAB9A1F121079BF72BA /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7A39537BBD94CD705E51B003 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 5A43AAD1E638EA0D1719DBA3 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 750CFF70D61D26C0BECD5590 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 8A325254C21887E4CBDE8294 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - A9C522586E642B13803E84A1 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - B79A02483CBED7850CF820CC /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; - CB600D560A980353C316D9E3 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + C29827A08E11D88646BFBE93 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + D8E0CF9C3C7800C07C9845FC /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DEA954DCA916B6FC51B8D22B /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + F0328BD31CA3A8DD85456972 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -95,7 +95,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7D1392D8A76BD085A2EACCCA /* Pods_RunnerTests.framework in Frameworks */, + 73983334E7E3D03A0E12661E /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -103,7 +103,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 8C809D64151E1E580729D80C /* Pods_Runner.framework in Frameworks */, + C522DC3C60A9E9D8A157D709 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -137,7 +137,7 @@ 331C80D6294CF71000263BE5 /* RunnerTests */, 33CC10EE2044A3C60003C045 /* Products */, D73912EC22F37F3D000D13A0 /* Frameworks */, - D02080FF87F750C48907FD9A /* Pods */, + A1BEA79574E5550EED38B897 /* Pods */, ); sourceTree = ""; }; @@ -185,15 +185,15 @@ path = Runner; sourceTree = ""; }; - D02080FF87F750C48907FD9A /* Pods */ = { + A1BEA79574E5550EED38B897 /* Pods */ = { isa = PBXGroup; children = ( - 5DAC190752838B8100F59394 /* Pods-Runner.debug.xcconfig */, - 1C6D0D90A342B362D149A35C /* Pods-Runner.release.xcconfig */, - 7A39537BBD94CD705E51B003 /* Pods-Runner.profile.xcconfig */, - 5CF03DE655862183459429BD /* Pods-RunnerTests.debug.xcconfig */, - B79A02483CBED7850CF820CC /* Pods-RunnerTests.release.xcconfig */, - CB600D560A980353C316D9E3 /* Pods-RunnerTests.profile.xcconfig */, + C29827A08E11D88646BFBE93 /* Pods-Runner.debug.xcconfig */, + F0328BD31CA3A8DD85456972 /* Pods-Runner.release.xcconfig */, + 8A325254C21887E4CBDE8294 /* Pods-Runner.profile.xcconfig */, + DEA954DCA916B6FC51B8D22B /* Pods-RunnerTests.debug.xcconfig */, + 750CFF70D61D26C0BECD5590 /* Pods-RunnerTests.release.xcconfig */, + 07D325EB165BDBD20CA1B50D /* Pods-RunnerTests.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -201,8 +201,8 @@ D73912EC22F37F3D000D13A0 /* Frameworks */ = { isa = PBXGroup; children = ( - A9C522586E642B13803E84A1 /* Pods_Runner.framework */, - 67E2BAAB9A1F121079BF72BA /* Pods_RunnerTests.framework */, + 5A43AAD1E638EA0D1719DBA3 /* Pods_Runner.framework */, + D8E0CF9C3C7800C07C9845FC /* Pods_RunnerTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -214,7 +214,7 @@ isa = PBXNativeTarget; buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - 7F1E06FCC65DB724329B04B3 /* [CP] Check Pods Manifest.lock */, + 210FEE2628F42B7BDFED20C4 /* [CP] Check Pods Manifest.lock */, 331C80D1294CF70F00263BE5 /* Sources */, 331C80D2294CF70F00263BE5 /* Frameworks */, 331C80D3294CF70F00263BE5 /* Resources */, @@ -233,13 +233,13 @@ isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - AE8AFEA5652762748393D9A7 /* [CP] Check Pods Manifest.lock */, + B67C6085C13299F59758F7CC /* [CP] Check Pods Manifest.lock */, 33CC10E92044A3C60003C045 /* Sources */, 33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EB2044A3C60003C045 /* Resources */, 33CC110E2044A8840003C045 /* Bundle Framework */, 3399D490228B24CF009A79C7 /* ShellScript */, - 828781F99DBC51FED1472F5D /* [CP] Embed Pods Frameworks */, + D8E4D2DE64C21B53086793F8 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -257,8 +257,9 @@ 33CC10E52044A3C60003C045 /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C80D4294CF70F00263BE5 = { @@ -321,6 +322,28 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 210FEE2628F42B7BDFED20C4 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -359,46 +382,7 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; - 7F1E06FCC65DB724329B04B3 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 828781F99DBC51FED1472F5D /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - AE8AFEA5652762748393D9A7 /* [CP] Check Pods Manifest.lock */ = { + B67C6085C13299F59758F7CC /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -420,6 +404,23 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + D8E4D2DE64C21B53086793F8 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -471,7 +472,7 @@ /* Begin XCBuildConfiguration section */ 331C80DB294CF71000263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5CF03DE655862183459429BD /* Pods-RunnerTests.debug.xcconfig */; + baseConfigurationReference = DEA954DCA916B6FC51B8D22B /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -486,7 +487,7 @@ }; 331C80DC294CF71000263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B79A02483CBED7850CF820CC /* Pods-RunnerTests.release.xcconfig */; + baseConfigurationReference = 750CFF70D61D26C0BECD5590 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -501,7 +502,7 @@ }; 331C80DD294CF71000263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CB600D560A980353C316D9E3 /* Pods-RunnerTests.profile.xcconfig */; + baseConfigurationReference = 07D325EB165BDBD20CA1B50D /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -519,6 +520,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -542,9 +544,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -574,8 +578,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13; - ONLY_ACTIVE_ARCH = YES; + MACOSX_DEPLOYMENT_TARGET = 13.0; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; @@ -594,6 +597,7 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -617,9 +621,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -647,6 +653,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -670,9 +677,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -702,7 +711,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13; + MACOSX_DEPLOYMENT_TARGET = 13.0; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -723,8 +732,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13; - ONLY_ACTIVE_ARCH = YES; + MACOSX_DEPLOYMENT_TARGET = 13.0; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; diff --git a/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/flutter/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to examples/flutter/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 99% rename from example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to examples/flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 397f3d33..15368ecc 100644 --- a/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/examples/flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ Bool { return true diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png similarity index 100% rename from example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png rename to examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png similarity index 100% rename from example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png rename to examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png similarity index 100% rename from example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png rename to examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png similarity index 100% rename from example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png rename to examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png similarity index 100% rename from example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png rename to examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png similarity index 100% rename from example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png rename to examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png similarity index 100% rename from example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png rename to examples/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png diff --git a/example/macos/Runner/Base.lproj/MainMenu.xib b/examples/flutter/example/macos/Runner/Base.lproj/MainMenu.xib similarity index 100% rename from example/macos/Runner/Base.lproj/MainMenu.xib rename to examples/flutter/example/macos/Runner/Base.lproj/MainMenu.xib diff --git a/example/macos/Runner/Configs/AppInfo.xcconfig b/examples/flutter/example/macos/Runner/Configs/AppInfo.xcconfig similarity index 89% rename from example/macos/Runner/Configs/AppInfo.xcconfig rename to examples/flutter/example/macos/Runner/Configs/AppInfo.xcconfig index 16dee77d..322ba235 100644 --- a/example/macos/Runner/Configs/AppInfo.xcconfig +++ b/examples/flutter/example/macos/Runner/Configs/AppInfo.xcconfig @@ -11,4 +11,4 @@ PRODUCT_NAME = example PRODUCT_BUNDLE_IDENTIFIER = app.polyvox.example // The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2023 app.polyvox. All rights reserved. +PRODUCT_COPYRIGHT = Copyright © 2024 app.polyvox. All rights reserved. diff --git a/example/macos/Runner/Configs/Debug.xcconfig b/examples/flutter/example/macos/Runner/Configs/Debug.xcconfig similarity index 100% rename from example/macos/Runner/Configs/Debug.xcconfig rename to examples/flutter/example/macos/Runner/Configs/Debug.xcconfig diff --git a/example/macos/Runner/Configs/Release.xcconfig b/examples/flutter/example/macos/Runner/Configs/Release.xcconfig similarity index 100% rename from example/macos/Runner/Configs/Release.xcconfig rename to examples/flutter/example/macos/Runner/Configs/Release.xcconfig diff --git a/example/macos/Runner/Configs/Warnings.xcconfig b/examples/flutter/example/macos/Runner/Configs/Warnings.xcconfig similarity index 100% rename from example/macos/Runner/Configs/Warnings.xcconfig rename to examples/flutter/example/macos/Runner/Configs/Warnings.xcconfig diff --git a/example/macos/Runner/DebugProfile.entitlements b/examples/flutter/example/macos/Runner/DebugProfile.entitlements similarity index 97% rename from example/macos/Runner/DebugProfile.entitlements rename to examples/flutter/example/macos/Runner/DebugProfile.entitlements index 9f56413f..dddb8a30 100644 --- a/example/macos/Runner/DebugProfile.entitlements +++ b/examples/flutter/example/macos/Runner/DebugProfile.entitlements @@ -3,7 +3,7 @@ com.apple.security.app-sandbox - + com.apple.security.cs.allow-jit com.apple.security.network.server diff --git a/example/macos/Runner/Info.plist b/examples/flutter/example/macos/Runner/Info.plist similarity index 95% rename from example/macos/Runner/Info.plist rename to examples/flutter/example/macos/Runner/Info.plist index 75d20137..4789daa6 100644 --- a/example/macos/Runner/Info.plist +++ b/examples/flutter/example/macos/Runner/Info.plist @@ -28,7 +28,5 @@ MainMenu NSPrincipalClass NSApplication - com.apple.security.app-sandbox - diff --git a/example/macos/Runner/MainFlutterWindow.swift b/examples/flutter/example/macos/Runner/MainFlutterWindow.swift similarity index 100% rename from example/macos/Runner/MainFlutterWindow.swift rename to examples/flutter/example/macos/Runner/MainFlutterWindow.swift diff --git a/example/macos/Runner/Release.entitlements b/examples/flutter/example/macos/Runner/Release.entitlements similarity index 100% rename from example/macos/Runner/Release.entitlements rename to examples/flutter/example/macos/Runner/Release.entitlements diff --git a/example/macos/RunnerTests/RunnerTests.swift b/examples/flutter/example/macos/RunnerTests/RunnerTests.swift similarity index 100% rename from example/macos/RunnerTests/RunnerTests.swift rename to examples/flutter/example/macos/RunnerTests/RunnerTests.swift index 5418c9f5..61f3bd1f 100644 --- a/example/macos/RunnerTests/RunnerTests.swift +++ b/examples/flutter/example/macos/RunnerTests/RunnerTests.swift @@ -1,5 +1,5 @@ -import FlutterMacOS import Cocoa +import FlutterMacOS import XCTest class RunnerTests: XCTestCase { diff --git a/examples/flutter/example/pubspec.yaml b/examples/flutter/example/pubspec.yaml new file mode 100644 index 00000000..1985ba79 --- /dev/null +++ b/examples/flutter/example/pubspec.yaml @@ -0,0 +1,39 @@ +name: thermion_flutter_example +description: Demonstrates how to use the thermion_flutter plugin. + +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ">=3.3.0 <4.0.0" + +dependencies: + flutter: + sdk: flutter + path_provider: + thermion_flutter: + path: ../../../thermion_flutter/thermion_flutter + cupertino_icons: ^1.0.2 + web: + +dev_dependencies: + flutter_test: + sdk: flutter + integration_test: + sdk: flutter + flutter_lints: ^1.0.0 + crypto: + image_compare: ^1.1.2 + +# The following section is specific to Flutter. +flutter: + uses-material-design: true + assets: + - assets/ + - assets/shapes/ + - assets/default_env/ + - assets/BusterDrone/ + - assets/BusterDrone/textures/ + - assets/FlightHelmet/ + \ No newline at end of file diff --git a/example/test/widget_test.dart b/examples/flutter/example/test/widget_test.dart similarity index 94% rename from example/test/widget_test.dart rename to examples/flutter/example/test/widget_test.dart index 78b385b9..c0873888 100644 --- a/example/test/widget_test.dart +++ b/examples/flutter/example/test/widget_test.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:flutter_filament_example/main.dart'; +import 'package:thermion_flutter_example/main.dart'; void main() { testWidgets('Verify Platform version', (WidgetTester tester) async { diff --git a/example/compare_goldens.sh b/examples/flutter/example/test_driver/compare_goldens.sh similarity index 100% rename from example/compare_goldens.sh rename to examples/flutter/example/test_driver/compare_goldens.sh diff --git a/example/test_driver/integration_test.dart b/examples/flutter/example/test_driver/integration_test.dart similarity index 100% rename from example/test_driver/integration_test.dart rename to examples/flutter/example/test_driver/integration_test.dart diff --git a/example/test_driver/integration_test_update_goldens.dart b/examples/flutter/example/test_driver/integration_test_update_goldens.dart similarity index 100% rename from example/test_driver/integration_test_update_goldens.dart rename to examples/flutter/example/test_driver/integration_test_update_goldens.dart diff --git a/example/regenerate_goldens.sh b/examples/flutter/example/test_driver/regenerate_goldens.sh similarity index 100% rename from example/regenerate_goldens.sh rename to examples/flutter/example/test_driver/regenerate_goldens.sh diff --git a/example/web/favicon.png b/examples/flutter/example/web/favicon.png similarity index 100% rename from example/web/favicon.png rename to examples/flutter/example/web/favicon.png diff --git a/example/web/icons/Icon-192.png b/examples/flutter/example/web/icons/Icon-192.png similarity index 100% rename from example/web/icons/Icon-192.png rename to examples/flutter/example/web/icons/Icon-192.png diff --git a/example/web/icons/Icon-512.png b/examples/flutter/example/web/icons/Icon-512.png similarity index 100% rename from example/web/icons/Icon-512.png rename to examples/flutter/example/web/icons/Icon-512.png diff --git a/example/web/icons/Icon-maskable-192.png b/examples/flutter/example/web/icons/Icon-maskable-192.png similarity index 100% rename from example/web/icons/Icon-maskable-192.png rename to examples/flutter/example/web/icons/Icon-maskable-192.png diff --git a/example/web/icons/Icon-maskable-512.png b/examples/flutter/example/web/icons/Icon-maskable-512.png similarity index 100% rename from example/web/icons/Icon-maskable-512.png rename to examples/flutter/example/web/icons/Icon-maskable-512.png diff --git a/examples/flutter/example/web/index.html b/examples/flutter/example/web/index.html new file mode 100644 index 00000000..afc3b66e --- /dev/null +++ b/examples/flutter/example/web/index.html @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + thermion_flutter_example + + + + + + + + + + +
+ + + diff --git a/examples/flutter/example/web/main.dart b/examples/flutter/example/web/main.dart new file mode 100644 index 00000000..91a2b0f9 --- /dev/null +++ b/examples/flutter/example/web/main.dart @@ -0,0 +1,53 @@ + +// import 'package:polyvox_engine/app/app.dart'; +// import 'package:polyvox_engine/app/states/states.dart'; +// import 'package:polyvox_engine/services/asr_service.dart'; +// import 'package:polyvox_web/error_handler.dart'; +// import 'package:polyvox_web/services/web_asr_service.dart'; +// import 'package:polyvox_web/services/web_asset_repository.dart'; +// import 'package:polyvox_web/services/web_audio_service.dart'; +// import 'package:polyvox_web/services/web_auth_service.dart'; +// import 'package:polyvox_web/services/web_data_provider.dart'; +// import 'package:polyvox_web/services/web_purchase_service.dart'; +// import 'package:polyvox_web/services/web_scoring_service.dart'; +// import 'package:polyvox_web/web_canvas.dart'; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; +import 'package:thermion_dart/thermion_dart/compatibility/web/compatibility.dart'; +import 'package:thermion_dart/thermion_dart/thermion_viewer_ffi.dart'; +import 'package:thermion_dart/thermion_dart/compatibility/web/interop/thermion_dart_js_export_type.dart'; +import 'package:thermion_dart/thermion_dart/compatibility/web/interop/thermion_dart_js_extension_type.dart'; +import 'package:web/web.dart'; + +void main(List arguments) async { + var viewer = await WebViewer.initialize(); + + ThermionDartJSExportViewer.initializeBindings(viewer); + + print("Set wrapper, running!"); + + while (true) { + await Future.delayed(Duration(milliseconds: 16)); + } + print("Finisehd!"); +} + +class WebViewer { + static Future initialize() async { + var fc = FooChar(); + final canvas = document.getElementById("canvas") as HTMLCanvasElement; + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + + var resourceLoader = thermion_dart_web_get_resource_loader_wrapper(); + + var viewer = ThermionViewerFFI(resourceLoader: resourceLoader); + + await viewer.initialized; + var width = window.innerWidth; + var height = window.innerHeight; + await viewer.createSwapChain(width.toDouble(), height.toDouble()); + await viewer.updateViewportAndCameraProjection( + width.toDouble(), height.toDouble()); + return viewer; + } +} diff --git a/examples/flutter/example/web/main.mjs b/examples/flutter/example/web/main.mjs new file mode 100644 index 00000000..559c241f --- /dev/null +++ b/examples/flutter/example/web/main.mjs @@ -0,0 +1,358 @@ +let buildArgsList; + +// `modulePromise` is a promise to the `WebAssembly.module` object to be +// instantiated. +// `importObjectPromise` is a promise to an object that contains any additional +// imports needed by the module that aren't provided by the standard runtime. +// The fields on this object will be merged into the importObject with which +// the module will be instantiated. +// This function returns a promise to the instantiated module. +export const instantiate = async (modulePromise, importObjectPromise) => { + let dartInstance; + + function stringFromDartString(string) { + const totalLength = dartInstance.exports.$stringLength(string); + let result = ''; + let index = 0; + while (index < totalLength) { + let chunkLength = Math.min(totalLength - index, 0xFFFF); + const array = new Array(chunkLength); + for (let i = 0; i < chunkLength; i++) { + array[i] = dartInstance.exports.$stringRead(string, index++); + } + result += String.fromCharCode(...array); + } + return result; + } + + function stringToDartString(string) { + const length = string.length; + let range = 0; + for (let i = 0; i < length; i++) { + range |= string.codePointAt(i); + } + if (range < 256) { + const dartString = dartInstance.exports.$stringAllocate1(length); + for (let i = 0; i < length; i++) { + dartInstance.exports.$stringWrite1(dartString, i, string.codePointAt(i)); + } + return dartString; + } else { + const dartString = dartInstance.exports.$stringAllocate2(length); + for (let i = 0; i < length; i++) { + dartInstance.exports.$stringWrite2(dartString, i, string.charCodeAt(i)); + } + return dartString; + } + } + + // Prints to the console + function printToConsole(value) { + if (typeof dartPrint == "function") { + dartPrint(value); + return; + } + if (typeof console == "object" && typeof console.log != "undefined") { + console.log(value); + return; + } + if (typeof print == "function") { + print(value); + return; + } + + throw "Unable to print message: " + js; + } + + // Converts a Dart List to a JS array. Any Dart objects will be converted, but + // this will be cheap for JSValues. + function arrayFromDartList(constructor, list) { + const length = dartInstance.exports.$listLength(list); + const array = new constructor(length); + for (let i = 0; i < length; i++) { + array[i] = dartInstance.exports.$listRead(list, i); + } + return array; + } + + buildArgsList = function(list) { + const dartList = dartInstance.exports.$makeStringList(); + for (let i = 0; i < list.length; i++) { + dartInstance.exports.$listAdd(dartList, stringToDartString(list[i])); + } + return dartList; + } + + // A special symbol attached to functions that wrap Dart functions. + const jsWrappedDartFunctionSymbol = Symbol("JSWrappedDartFunction"); + + function finalizeWrapper(dartFunction, wrapped) { + wrapped.dartFunction = dartFunction; + wrapped[jsWrappedDartFunctionSymbol] = true; + return wrapped; + } + + // Imports + const dart2wasm = { + +_11: x0 => new Array(x0), +_12: x0 => new Promise(x0), +_17: (o,s,v) => o[s] = v, +_18: f => finalizeWrapper(f,x0 => dartInstance.exports._18(f,x0)), +_19: f => finalizeWrapper(f,x0 => dartInstance.exports._19(f,x0)), +_20: (x0,x1,x2) => x0.call(x1,x2), +_21: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._21(f,x0,x1)), +_22: (x0,x1) => x0.call(x1), +_23: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._23(f,x0,x1)), +_44: () => Symbol("jsBoxedDartObjectProperty"), +_75: (x0,x1) => x0.getElementById(x1), +_1495: (x0,x1) => x0.width = x1, +_1497: (x0,x1) => x0.height = x1, +_1874: () => globalThis.window, +_1916: x0 => x0.innerWidth, +_1917: x0 => x0.innerHeight, +_6850: () => globalThis.document, +_12719: () => globalThis.createVoidCallback(), +_12720: () => globalThis.createVoidPointerCallback(), +_12721: () => globalThis.createBoolCallback(), +_12722: () => globalThis.createBoolCallback(), +_12724: v => stringToDartString(v.toString()), +_12740: () => { + let stackString = new Error().stack.toString(); + let frames = stackString.split('\n'); + let drop = 2; + if (frames[0] === 'Error') { + drop += 1; + } + return frames.slice(drop).join('\n'); + }, +_12759: s => stringToDartString(JSON.stringify(stringFromDartString(s))), +_12760: s => printToConsole(stringFromDartString(s)), +_12761: f => finalizeWrapper(f,() => dartInstance.exports._12761(f)), +_12762: f => finalizeWrapper(f,() => dartInstance.exports._12762(f)), +_12763: f => finalizeWrapper(f,x0 => dartInstance.exports._12763(f,x0)), +_12764: f => finalizeWrapper(f,() => dartInstance.exports._12764(f)), +_12765: f => finalizeWrapper(f,x0 => dartInstance.exports._12765(f,x0)), +_12766: f => finalizeWrapper(f,() => dartInstance.exports._12766(f)), +_12767: f => finalizeWrapper(f,x0 => dartInstance.exports._12767(f,x0)), +_12768: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12768(f,x0,x1)), +_12769: f => finalizeWrapper(f,() => dartInstance.exports._12769(f)), +_12770: f => finalizeWrapper(f,(x0,x1,x2,x3) => dartInstance.exports._12770(f,x0,x1,x2,x3)), +_12771: f => finalizeWrapper(f,x0 => dartInstance.exports._12771(f,x0)), +_12772: f => finalizeWrapper(f,() => dartInstance.exports._12772(f)), +_12773: f => finalizeWrapper(f,x0 => dartInstance.exports._12773(f,x0)), +_12774: f => finalizeWrapper(f,x0 => dartInstance.exports._12774(f,x0)), +_12775: f => finalizeWrapper(f,() => dartInstance.exports._12775(f)), +_12776: f => finalizeWrapper(f,(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9) => dartInstance.exports._12776(f,x0,x1,x2,x3,x4,x5,x6,x7,x8,x9)), +_12777: f => finalizeWrapper(f,x0 => dartInstance.exports._12777(f,x0)), +_12778: f => finalizeWrapper(f,() => dartInstance.exports._12778(f)), +_12779: f => finalizeWrapper(f,x0 => dartInstance.exports._12779(f,x0)), +_12780: f => finalizeWrapper(f,x0 => dartInstance.exports._12780(f,x0)), +_12781: f => finalizeWrapper(f,x0 => dartInstance.exports._12781(f,x0)), +_12782: f => finalizeWrapper(f,x0 => dartInstance.exports._12782(f,x0)), +_12783: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12783(f,x0,x1)), +_12784: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12784(f,x0,x1)), +_12785: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12785(f,x0,x1)), +_12786: f => finalizeWrapper(f,() => dartInstance.exports._12786(f)), +_12787: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12787(f,x0,x1)), +_12788: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12788(f,x0,x1)), +_12789: f => finalizeWrapper(f,() => dartInstance.exports._12789(f)), +_12790: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12790(f,x0,x1)), +_12791: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12791(f,x0,x1)), +_12792: f => finalizeWrapper(f,x0 => dartInstance.exports._12792(f,x0)), +_12793: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12793(f,x0,x1)), +_12794: f => finalizeWrapper(f,(x0,x1,x2,x3,x4) => dartInstance.exports._12794(f,x0,x1,x2,x3,x4)), +_12795: f => finalizeWrapper(f,x0 => dartInstance.exports._12795(f,x0)), +_12796: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12796(f,x0,x1)), +_12797: f => finalizeWrapper(f,x0 => dartInstance.exports._12797(f,x0)), +_12798: f => finalizeWrapper(f,() => dartInstance.exports._12798(f)), +_12799: f => finalizeWrapper(f,() => dartInstance.exports._12799(f)), +_12800: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12800(f,x0,x1,x2)), +_12801: f => finalizeWrapper(f,() => dartInstance.exports._12801(f)), +_12802: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12802(f,x0,x1)), +_12803: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12803(f,x0,x1)), +_12804: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12804(f,x0,x1,x2)), +_12805: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12805(f,x0,x1)), +_12806: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12806(f,x0,x1)), +_12807: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12807(f,x0,x1)), +_12808: f => finalizeWrapper(f,() => dartInstance.exports._12808(f)), +_12809: f => finalizeWrapper(f,() => dartInstance.exports._12809(f)), +_12810: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12810(f,x0,x1,x2)), +_12811: f => finalizeWrapper(f,x0 => dartInstance.exports._12811(f,x0)), +_12812: f => finalizeWrapper(f,x0 => dartInstance.exports._12812(f,x0)), +_12813: f => finalizeWrapper(f,x0 => dartInstance.exports._12813(f,x0)), +_12814: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12814(f,x0,x1)), +_12815: f => finalizeWrapper(f,() => dartInstance.exports._12815(f)), +_12816: f => finalizeWrapper(f,() => dartInstance.exports._12816(f)), +_12817: f => finalizeWrapper(f,x0 => dartInstance.exports._12817(f,x0)), +_12818: f => finalizeWrapper(f,() => dartInstance.exports._12818(f)), +_12819: f => finalizeWrapper(f,() => dartInstance.exports._12819(f)), +_12820: f => finalizeWrapper(f,() => dartInstance.exports._12820(f)), +_12821: f => finalizeWrapper(f,() => dartInstance.exports._12821(f)), +_12822: f => finalizeWrapper(f,() => dartInstance.exports._12822(f)), +_12823: f => finalizeWrapper(f,() => dartInstance.exports._12823(f)), +_12824: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12824(f,x0,x1,x2)), +_12825: f => finalizeWrapper(f,() => dartInstance.exports._12825(f)), +_12826: f => finalizeWrapper(f,x0 => dartInstance.exports._12826(f,x0)), +_12827: f => finalizeWrapper(f,x0 => dartInstance.exports._12827(f,x0)), +_12828: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12828(f,x0,x1,x2)), +_12829: f => finalizeWrapper(f,x0 => dartInstance.exports._12829(f,x0)), +_12830: f => finalizeWrapper(f,x0 => dartInstance.exports._12830(f,x0)), +_12831: f => finalizeWrapper(f,(x0,x1,x2,x3,x4,x5,x6) => dartInstance.exports._12831(f,x0,x1,x2,x3,x4,x5,x6)), +_12832: f => finalizeWrapper(f,x0 => dartInstance.exports._12832(f,x0)), +_12833: f => finalizeWrapper(f,(x0,x1,x2,x3) => dartInstance.exports._12833(f,x0,x1,x2,x3)), +_12834: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12834(f,x0,x1)), +_12835: f => finalizeWrapper(f,(x0,x1,x2,x3,x4) => dartInstance.exports._12835(f,x0,x1,x2,x3,x4)), +_12836: f => finalizeWrapper(f,(x0,x1,x2,x3,x4) => dartInstance.exports._12836(f,x0,x1,x2,x3,x4)), +_12837: f => finalizeWrapper(f,(x0,x1,x2,x3,x4,x5) => dartInstance.exports._12837(f,x0,x1,x2,x3,x4,x5)), +_12838: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12838(f,x0,x1,x2)), +_12839: f => finalizeWrapper(f,x0 => dartInstance.exports._12839(f,x0)), +_12840: f => finalizeWrapper(f,(x0,x1,x2) => dartInstance.exports._12840(f,x0,x1,x2)), +_12841: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12841(f,x0,x1)), +_12842: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12842(f,x0,x1)), +_12843: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12843(f,x0,x1)), +_12844: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12844(f,x0,x1)), +_12845: f => finalizeWrapper(f,x0 => dartInstance.exports._12845(f,x0)), +_12846: f => finalizeWrapper(f,() => dartInstance.exports._12846(f)), +_12847: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12847(f,x0,x1)), +_12848: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12848(f,x0,x1)), +_12849: f => finalizeWrapper(f,(x0,x1) => dartInstance.exports._12849(f,x0,x1)), +_12850: f => finalizeWrapper(f,x0 => dartInstance.exports._12850(f,x0)), +_12851: f => finalizeWrapper(f,x0 => dartInstance.exports._12851(f,x0)), +_12852: f => finalizeWrapper(f,x0 => dartInstance.exports._12852(f,x0)), +_12853: f => finalizeWrapper(f,x0 => dartInstance.exports._12853(f,x0)), +_12854: f => finalizeWrapper(f,() => dartInstance.exports._12854(f)), +_12868: (ms, c) => + setTimeout(() => dartInstance.exports.$invokeCallback(c),ms), +_12872: (c) => + queueMicrotask(() => dartInstance.exports.$invokeCallback(c)), +_12874: (a, i) => a.push(i), +_12885: a => a.length, +_12887: (a, i) => a[i], +_12888: (a, i, v) => a[i] = v, +_12890: a => a.join(''), +_12900: (s, p, i) => s.indexOf(p, i), +_12903: (o, start, length) => new Uint8Array(o.buffer, o.byteOffset + start, length), +_12904: (o, start, length) => new Int8Array(o.buffer, o.byteOffset + start, length), +_12905: (o, start, length) => new Uint8ClampedArray(o.buffer, o.byteOffset + start, length), +_12906: (o, start, length) => new Uint16Array(o.buffer, o.byteOffset + start, length), +_12907: (o, start, length) => new Int16Array(o.buffer, o.byteOffset + start, length), +_12908: (o, start, length) => new Uint32Array(o.buffer, o.byteOffset + start, length), +_12909: (o, start, length) => new Int32Array(o.buffer, o.byteOffset + start, length), +_12912: (o, start, length) => new Float32Array(o.buffer, o.byteOffset + start, length), +_12913: (o, start, length) => new Float64Array(o.buffer, o.byteOffset + start, length), +_12918: (o) => new DataView(o.buffer, o.byteOffset, o.byteLength), +_12922: Function.prototype.call.bind(Object.getOwnPropertyDescriptor(DataView.prototype, 'byteLength').get), +_12923: (b, o) => new DataView(b, o), +_12925: Function.prototype.call.bind(DataView.prototype.getUint8), +_12927: Function.prototype.call.bind(DataView.prototype.getInt8), +_12929: Function.prototype.call.bind(DataView.prototype.getUint16), +_12931: Function.prototype.call.bind(DataView.prototype.getInt16), +_12933: Function.prototype.call.bind(DataView.prototype.getUint32), +_12935: Function.prototype.call.bind(DataView.prototype.getInt32), +_12941: Function.prototype.call.bind(DataView.prototype.getFloat32), +_12943: Function.prototype.call.bind(DataView.prototype.getFloat64), +_12962: (x0,x1,x2) => x0[x1] = x2, +_12964: o => o === undefined, +_12965: o => typeof o === 'boolean', +_12966: o => typeof o === 'number', +_12968: o => typeof o === 'string', +_12971: o => o instanceof Int8Array, +_12972: o => o instanceof Uint8Array, +_12973: o => o instanceof Uint8ClampedArray, +_12974: o => o instanceof Int16Array, +_12975: o => o instanceof Uint16Array, +_12976: o => o instanceof Int32Array, +_12977: o => o instanceof Uint32Array, +_12978: o => o instanceof Float32Array, +_12979: o => o instanceof Float64Array, +_12980: o => o instanceof ArrayBuffer, +_12981: o => o instanceof DataView, +_12982: o => o instanceof Array, +_12983: o => typeof o === 'function' && o[jsWrappedDartFunctionSymbol] === true, +_12987: (l, r) => l === r, +_12988: o => o, +_12989: o => o, +_12990: o => o, +_12991: b => !!b, +_12992: o => o.length, +_12995: (o, i) => o[i], +_12996: f => f.dartFunction, +_12997: l => arrayFromDartList(Int8Array, l), +_12998: l => arrayFromDartList(Uint8Array, l), +_12999: l => arrayFromDartList(Uint8ClampedArray, l), +_13000: l => arrayFromDartList(Int16Array, l), +_13001: l => arrayFromDartList(Uint16Array, l), +_13002: l => arrayFromDartList(Int32Array, l), +_13003: l => arrayFromDartList(Uint32Array, l), +_13004: l => arrayFromDartList(Float32Array, l), +_13005: l => arrayFromDartList(Float64Array, l), +_13006: (data, length) => { + const view = new DataView(new ArrayBuffer(length)); + for (let i = 0; i < length; i++) { + view.setUint8(i, dartInstance.exports.$byteDataGetUint8(data, i)); + } + return view; + }, +_13007: l => arrayFromDartList(Array, l), +_13008: stringFromDartString, +_13009: stringToDartString, +_13010: () => ({}), +_13012: l => new Array(l), +_13013: () => globalThis, +_13014: (constructor, args) => { + const factoryFunction = constructor.bind.apply( + constructor, [null, ...args]); + return new factoryFunction(); + }, +_13016: (o, p) => o[p], +_13018: (o, m, a) => o[m].apply(o, a), +_13020: o => String(o), +_13021: (p, s, f) => p.then(s, f), +_13040: (o, p) => o[p], +_13041: (o, p, v) => o[p] = v + }; + + const baseImports = { + dart2wasm: dart2wasm, + + + Math: Math, + Date: Date, + Object: Object, + Array: Array, + Reflect: Reflect, + }; + + const jsStringPolyfill = { + "charCodeAt": (s, i) => s.charCodeAt(i), + "compare": (s1, s2) => { + if (s1 < s2) return -1; + if (s1 > s2) return 1; + return 0; + }, + "concat": (s1, s2) => s1 + s2, + "equals": (s1, s2) => s1 === s2, + "fromCharCode": (i) => String.fromCharCode(i), + "length": (s) => s.length, + "substring": (s, a, b) => s.substring(a, b), + }; + + dartInstance = await WebAssembly.instantiate(await modulePromise, { + ...baseImports, + ...(await importObjectPromise), + "wasm:js-string": jsStringPolyfill, + }); + + return dartInstance; +} + +// Call the main function for the instantiated module +// `moduleInstance` is the instantiated dart2wasm module +// `args` are any arguments that should be passed into the main function. +export const invoke = (moduleInstance, ...args) => { + const dartMain = moduleInstance.exports.$getMain(); + const dartArgs = buildArgsList(args); + moduleInstance.exports.$invokeMain(dartMain, dartArgs); +} + diff --git a/examples/flutter/example/web/main.unopt.wasm b/examples/flutter/example/web/main.unopt.wasm new file mode 100644 index 00000000..a27decf0 Binary files /dev/null and b/examples/flutter/example/web/main.unopt.wasm differ diff --git a/examples/flutter/example/web/main.wasm b/examples/flutter/example/web/main.wasm new file mode 100644 index 00000000..d38184ee Binary files /dev/null and b/examples/flutter/example/web/main.wasm differ diff --git a/example/web/manifest.json b/examples/flutter/example/web/manifest.json similarity index 84% rename from example/web/manifest.json rename to examples/flutter/example/web/manifest.json index 48eb01be..ce87a996 100644 --- a/example/web/manifest.json +++ b/examples/flutter/example/web/manifest.json @@ -1,11 +1,11 @@ { - "name": "flutter_filament_example", - "short_name": "flutter_filament_example", + "name": "thermion_flutter_example", + "short_name": "thermion_flutter_example", "start_url": ".", "display": "standalone", "background_color": "#0175C2", "theme_color": "#0175C2", - "description": "Demonstrates how to use the flutter_filament plugin.", + "description": "Demonstrates how to use the thermion_flutter plugin.", "orientation": "portrait-primary", "prefer_related_applications": false, "icons": [ diff --git a/examples/flutter/example/web/thermion_dart.js b/examples/flutter/example/web/thermion_dart.js new file mode 120000 index 00000000..941603ed --- /dev/null +++ b/examples/flutter/example/web/thermion_dart.js @@ -0,0 +1 @@ +../../../../dart_filament/native/web/build/build/out/dart_filament.js \ No newline at end of file diff --git a/examples/flutter/example/web/thermion_dart.wasm b/examples/flutter/example/web/thermion_dart.wasm new file mode 120000 index 00000000..9aab600a --- /dev/null +++ b/examples/flutter/example/web/thermion_dart.wasm @@ -0,0 +1 @@ +../../../../dart_filament/native/web/build/build/out/dart_filament.wasm \ No newline at end of file diff --git a/examples/flutter/example/web/thermion_dart.worker.js b/examples/flutter/example/web/thermion_dart.worker.js new file mode 120000 index 00000000..6f8be374 --- /dev/null +++ b/examples/flutter/example/web/thermion_dart.worker.js @@ -0,0 +1 @@ +../../../../dart_filament/native/web/build/build/out/dart_filament.worker.js \ No newline at end of file diff --git a/example/windows/.gitignore b/examples/flutter/example/windows/.gitignore similarity index 100% rename from example/windows/.gitignore rename to examples/flutter/example/windows/.gitignore diff --git a/example/windows/CMakeLists.txt b/examples/flutter/example/windows/CMakeLists.txt similarity index 97% rename from example/windows/CMakeLists.txt rename to examples/flutter/example/windows/CMakeLists.txt index 99c90863..f80d4678 100644 --- a/example/windows/CMakeLists.txt +++ b/examples/flutter/example/windows/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.14) -project(flutter_filament_example LANGUAGES CXX) +project(thermion_flutter_example LANGUAGES CXX) -set(BINARY_NAME "flutter_filament_example") +set(BINARY_NAME "thermion_flutter_example") cmake_policy(SET CMP0063 NEW) diff --git a/example/windows/flutter/CMakeLists.txt b/examples/flutter/example/windows/flutter/CMakeLists.txt similarity index 100% rename from example/windows/flutter/CMakeLists.txt rename to examples/flutter/example/windows/flutter/CMakeLists.txt diff --git a/examples/flutter/example/windows/flutter/generated_plugin_registrant.cc b/examples/flutter/example/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 00000000..64919ad2 --- /dev/null +++ b/examples/flutter/example/windows/flutter/generated_plugin_registrant.cc @@ -0,0 +1,14 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + +#include + +void RegisterPlugins(flutter::PluginRegistry* registry) { + ThermionFlutterPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("ThermionFlutterPluginCApi")); +} diff --git a/example/windows/flutter/generated_plugin_registrant.h b/examples/flutter/example/windows/flutter/generated_plugin_registrant.h similarity index 100% rename from example/windows/flutter/generated_plugin_registrant.h rename to examples/flutter/example/windows/flutter/generated_plugin_registrant.h diff --git a/example/windows/flutter/generated_plugins.cmake b/examples/flutter/example/windows/flutter/generated_plugins.cmake similarity index 93% rename from example/windows/flutter/generated_plugins.cmake rename to examples/flutter/example/windows/flutter/generated_plugins.cmake index e1dea286..55f1a93d 100644 --- a/example/windows/flutter/generated_plugins.cmake +++ b/examples/flutter/example/windows/flutter/generated_plugins.cmake @@ -3,8 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST - flutter_filament - permission_handler_windows + thermion_flutter ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/example/windows/runner/CMakeLists.txt b/examples/flutter/example/windows/runner/CMakeLists.txt similarity index 100% rename from example/windows/runner/CMakeLists.txt rename to examples/flutter/example/windows/runner/CMakeLists.txt diff --git a/example/windows/runner/Runner.rc b/examples/flutter/example/windows/runner/Runner.rc similarity index 91% rename from example/windows/runner/Runner.rc rename to examples/flutter/example/windows/runner/Runner.rc index b85a561d..efe6dc2b 100644 --- a/example/windows/runner/Runner.rc +++ b/examples/flutter/example/windows/runner/Runner.rc @@ -90,12 +90,12 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "app.polyvox" "\0" - VALUE "FileDescription", "flutter_filament_example" "\0" + VALUE "FileDescription", "thermion_flutter_example" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "flutter_filament_example" "\0" + VALUE "InternalName", "thermion_flutter_example" "\0" VALUE "LegalCopyright", "Copyright (C) 2022 app.polyvox. All rights reserved." "\0" - VALUE "OriginalFilename", "flutter_filament_example.exe" "\0" - VALUE "ProductName", "flutter_filament_example" "\0" + VALUE "OriginalFilename", "thermion_flutter_example.exe" "\0" + VALUE "ProductName", "thermion_flutter_example" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" END END diff --git a/example/windows/runner/flutter_window.cpp b/examples/flutter/example/windows/runner/flutter_window.cpp similarity index 100% rename from example/windows/runner/flutter_window.cpp rename to examples/flutter/example/windows/runner/flutter_window.cpp diff --git a/example/windows/runner/flutter_window.h b/examples/flutter/example/windows/runner/flutter_window.h similarity index 100% rename from example/windows/runner/flutter_window.h rename to examples/flutter/example/windows/runner/flutter_window.h diff --git a/example/windows/runner/main.cpp b/examples/flutter/example/windows/runner/main.cpp similarity index 95% rename from example/windows/runner/main.cpp rename to examples/flutter/example/windows/runner/main.cpp index 9a6e00b8..97489729 100644 --- a/example/windows/runner/main.cpp +++ b/examples/flutter/example/windows/runner/main.cpp @@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, FlutterWindow window(project); Win32Window::Point origin(10, 10); Win32Window::Size size(1280, 720); - if (!window.CreateAndShow(L"flutter_filament_example", origin, size)) { + if (!window.CreateAndShow(L"thermion_flutter_example", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true); diff --git a/example/windows/runner/resource.h b/examples/flutter/example/windows/runner/resource.h similarity index 100% rename from example/windows/runner/resource.h rename to examples/flutter/example/windows/runner/resource.h diff --git a/example/windows/runner/resources/app_icon.ico b/examples/flutter/example/windows/runner/resources/app_icon.ico similarity index 100% rename from example/windows/runner/resources/app_icon.ico rename to examples/flutter/example/windows/runner/resources/app_icon.ico diff --git a/example/windows/runner/runner.exe.manifest b/examples/flutter/example/windows/runner/runner.exe.manifest similarity index 100% rename from example/windows/runner/runner.exe.manifest rename to examples/flutter/example/windows/runner/runner.exe.manifest diff --git a/example/windows/runner/utils.cpp b/examples/flutter/example/windows/runner/utils.cpp similarity index 100% rename from example/windows/runner/utils.cpp rename to examples/flutter/example/windows/runner/utils.cpp diff --git a/example/windows/runner/utils.h b/examples/flutter/example/windows/runner/utils.h similarity index 100% rename from example/windows/runner/utils.h rename to examples/flutter/example/windows/runner/utils.h diff --git a/example/windows/runner/win32_window.cpp b/examples/flutter/example/windows/runner/win32_window.cpp similarity index 100% rename from example/windows/runner/win32_window.cpp rename to examples/flutter/example/windows/runner/win32_window.cpp diff --git a/example/windows/runner/win32_window.h b/examples/flutter/example/windows/runner/win32_window.h similarity index 100% rename from example/windows/runner/win32_window.h rename to examples/flutter/example/windows/runner/win32_window.h diff --git a/examples/flutter/quickstart/.gitignore b/examples/flutter/quickstart/.gitignore new file mode 100644 index 00000000..29a3a501 --- /dev/null +++ b/examples/flutter/quickstart/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/examples/flutter/quickstart/.metadata b/examples/flutter/quickstart/.metadata new file mode 100644 index 00000000..62c6c8ef --- /dev/null +++ b/examples/flutter/quickstart/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "7b6d667701e38c1d9d700e2bcc29bc7a06598c59" + channel: "master" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + base_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + - platform: android + create_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + base_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + - platform: ios + create_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + base_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + - platform: linux + create_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + base_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + - platform: macos + create_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + base_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + - platform: web + create_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + base_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + - platform: windows + create_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + base_revision: 7b6d667701e38c1d9d700e2bcc29bc7a06598c59 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/examples/flutter/quickstart/README.md b/examples/flutter/quickstart/README.md new file mode 100644 index 00000000..3cc63a86 --- /dev/null +++ b/examples/flutter/quickstart/README.md @@ -0,0 +1,16 @@ +# quickstart + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/examples/flutter/quickstart/analysis_options.yaml b/examples/flutter/quickstart/analysis_options.yaml new file mode 100644 index 00000000..0d290213 --- /dev/null +++ b/examples/flutter/quickstart/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/examples/flutter/quickstart/android/.gitignore b/examples/flutter/quickstart/android/.gitignore new file mode 100644 index 00000000..6f568019 --- /dev/null +++ b/examples/flutter/quickstart/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/examples/flutter/quickstart/android/app/build.gradle b/examples/flutter/quickstart/android/app/build.gradle new file mode 100644 index 00000000..6519d2f7 --- /dev/null +++ b/examples/flutter/quickstart/android/app/build.gradle @@ -0,0 +1,44 @@ +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" +} + +android { + namespace = "com.example.quickstart" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.quickstart" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.debug + } + } +} + +flutter { + source = "../.." +} diff --git a/examples/flutter/quickstart/android/app/src/debug/AndroidManifest.xml b/examples/flutter/quickstart/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000..399f6981 --- /dev/null +++ b/examples/flutter/quickstart/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/examples/flutter/quickstart/android/app/src/main/AndroidManifest.xml b/examples/flutter/quickstart/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..d6b5b601 --- /dev/null +++ b/examples/flutter/quickstart/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/flutter/quickstart/android/app/src/main/kotlin/com/example/quickstart/MainActivity.kt b/examples/flutter/quickstart/android/app/src/main/kotlin/com/example/quickstart/MainActivity.kt new file mode 100644 index 00000000..067e280a --- /dev/null +++ b/examples/flutter/quickstart/android/app/src/main/kotlin/com/example/quickstart/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.quickstart + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/examples/flutter/quickstart/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/flutter/quickstart/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 00000000..f74085f3 --- /dev/null +++ b/examples/flutter/quickstart/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/examples/flutter/quickstart/android/app/src/main/res/drawable/launch_background.xml b/examples/flutter/quickstart/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 00000000..304732f8 --- /dev/null +++ b/examples/flutter/quickstart/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/examples/flutter/quickstart/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/flutter/quickstart/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..db77bb4b Binary files /dev/null and b/examples/flutter/quickstart/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/examples/flutter/quickstart/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/flutter/quickstart/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..17987b79 Binary files /dev/null and b/examples/flutter/quickstart/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/examples/flutter/quickstart/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/flutter/quickstart/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..09d43914 Binary files /dev/null and b/examples/flutter/quickstart/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/examples/flutter/quickstart/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/flutter/quickstart/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..d5f1c8d3 Binary files /dev/null and b/examples/flutter/quickstart/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/examples/flutter/quickstart/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/flutter/quickstart/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..4d6372ee Binary files /dev/null and b/examples/flutter/quickstart/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/examples/flutter/quickstart/android/app/src/main/res/values-night/styles.xml b/examples/flutter/quickstart/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 00000000..06952be7 --- /dev/null +++ b/examples/flutter/quickstart/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/examples/flutter/quickstart/android/app/src/main/res/values/styles.xml b/examples/flutter/quickstart/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..cb1ef880 --- /dev/null +++ b/examples/flutter/quickstart/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/examples/flutter/quickstart/android/app/src/profile/AndroidManifest.xml b/examples/flutter/quickstart/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 00000000..399f6981 --- /dev/null +++ b/examples/flutter/quickstart/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/examples/flutter/quickstart/android/build.gradle b/examples/flutter/quickstart/android/build.gradle new file mode 100644 index 00000000..d2ffbffa --- /dev/null +++ b/examples/flutter/quickstart/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = "../build" +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/examples/flutter/quickstart/android/gradle.properties b/examples/flutter/quickstart/android/gradle.properties new file mode 100644 index 00000000..25971708 --- /dev/null +++ b/examples/flutter/quickstart/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/examples/flutter/quickstart/android/gradle/wrapper/gradle-wrapper.properties b/examples/flutter/quickstart/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..e1ca574e --- /dev/null +++ b/examples/flutter/quickstart/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip diff --git a/examples/flutter/quickstart/android/settings.gradle b/examples/flutter/quickstart/android/settings.gradle new file mode 100644 index 00000000..536165d3 --- /dev/null +++ b/examples/flutter/quickstart/android/settings.gradle @@ -0,0 +1,25 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false +} + +include ":app" diff --git a/examples/flutter/quickstart/assets/cube.glb b/examples/flutter/quickstart/assets/cube.glb new file mode 100644 index 00000000..c8df3114 Binary files /dev/null and b/examples/flutter/quickstart/assets/cube.glb differ diff --git a/examples/flutter/quickstart/assets/default_env_ibl.ktx b/examples/flutter/quickstart/assets/default_env_ibl.ktx new file mode 100644 index 00000000..0765d521 Binary files /dev/null and b/examples/flutter/quickstart/assets/default_env_ibl.ktx differ diff --git a/examples/flutter/quickstart/assets/default_env_skybox.ktx b/examples/flutter/quickstart/assets/default_env_skybox.ktx new file mode 100644 index 00000000..9d72e5a0 Binary files /dev/null and b/examples/flutter/quickstart/assets/default_env_skybox.ktx differ diff --git a/examples/flutter/quickstart/ios/.gitignore b/examples/flutter/quickstart/ios/.gitignore new file mode 100644 index 00000000..7a7f9873 --- /dev/null +++ b/examples/flutter/quickstart/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/examples/flutter/quickstart/ios/Flutter/AppFrameworkInfo.plist b/examples/flutter/quickstart/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000..7c569640 --- /dev/null +++ b/examples/flutter/quickstart/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/examples/flutter/quickstart/ios/Flutter/Debug.xcconfig b/examples/flutter/quickstart/ios/Flutter/Debug.xcconfig new file mode 100644 index 00000000..ec97fc6f --- /dev/null +++ b/examples/flutter/quickstart/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/examples/flutter/quickstart/ios/Flutter/Release.xcconfig b/examples/flutter/quickstart/ios/Flutter/Release.xcconfig new file mode 100644 index 00000000..c4855bfe --- /dev/null +++ b/examples/flutter/quickstart/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/examples/flutter/quickstart/ios/Podfile b/examples/flutter/quickstart/ios/Podfile new file mode 100644 index 00000000..d97f17e2 --- /dev/null +++ b/examples/flutter/quickstart/ios/Podfile @@ -0,0 +1,44 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '12.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/examples/flutter/quickstart/ios/Runner.xcodeproj/project.pbxproj similarity index 79% rename from example/ios/Runner.xcodeproj/project.pbxproj rename to examples/flutter/quickstart/ios/Runner.xcodeproj/project.pbxproj index a88aead4..8f6ac5fd 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/examples/flutter/quickstart/ios/Runner.xcodeproj/project.pbxproj @@ -8,14 +8,24 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - EE85ADA13CE47012212956FB /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A258321425FD15835C0E85C8 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ 9705A1C41CF9048500538489 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; @@ -30,14 +40,14 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 0E69A8E4F4FBCA8CA51688D8 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 887CF3E1D8F177CD306AEE91 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -45,8 +55,6 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A258321425FD15835C0E85C8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E540D86FF0BEABF308A14DBB /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -54,19 +62,18 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - EE85ADA13CE47012212956FB /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 359B21BE5E35E51F8685F431 /* Frameworks */ = { + 331C8082294A63A400263BE5 /* RunnerTests */ = { isa = PBXGroup; children = ( - A258321425FD15835C0E85C8 /* Pods_Runner.framework */, + 331C807B294A618700263BE5 /* RunnerTests.swift */, ); - name = Frameworks; + path = RunnerTests; sourceTree = ""; }; 9740EEB11CF90186004384FC /* Flutter */ = { @@ -86,8 +93,7 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - D3880C741B2115E941EC88CD /* Pods */, - 359B21BE5E35E51F8685F431 /* Frameworks */, + 331C8082294A63A400263BE5 /* RunnerTests */, ); sourceTree = ""; }; @@ -95,6 +101,7 @@ isa = PBXGroup; children = ( 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, ); name = Products; sourceTree = ""; @@ -114,31 +121,36 @@ path = Runner; sourceTree = ""; }; - D3880C741B2115E941EC88CD /* Pods */ = { - isa = PBXGroup; - children = ( - 0E69A8E4F4FBCA8CA51688D8 /* Pods-Runner.debug.xcconfig */, - 887CF3E1D8F177CD306AEE91 /* Pods-Runner.release.xcconfig */, - E540D86FF0BEABF308A14DBB /* Pods-Runner.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; 97C146ED1CF9000F007C117D /* Runner */ = { isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 2ED3154DB81A6C5E50B63848 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - F9FAB8A67CF505858CCDA424 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -155,9 +167,14 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1430; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; LastSwiftMigration = 1100; @@ -178,11 +195,19 @@ projectRoot = ""; targets = ( 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EC1CF9000F007C117D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -197,28 +222,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2ED3154DB81A6C5E50B63848 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -250,26 +253,17 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - F9FAB8A67CF505858CCDA424 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EA1CF9000F007C117D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -281,6 +275,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 97C146FA1CF9000F007C117D /* Main.storyboard */ = { isa = PBXVariantGroup; @@ -305,7 +307,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD)"; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -325,7 +327,6 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -336,6 +337,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -357,11 +359,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = TM2B4SJXNJ; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -369,23 +369,66 @@ "$(inherited)", "@executable_path/Frameworks", ); - ONLY_ACTIVE_ARCH = YES; - OTHER_CFLAGS = "-fvisibility=default"; - PRODUCT_BUNDLE_IDENTIFIER = app.polyvox.example; + PRODUCT_BUNDLE_IDENTIFIER = com.example.quickstart; PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - STRIP_STYLE = "non-global"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Profile; }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.quickstart.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.quickstart.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.quickstart.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD)"; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -405,7 +448,6 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -416,6 +458,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -442,7 +485,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD)"; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -462,7 +505,6 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -473,6 +515,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -496,11 +539,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = TM2B4SJXNJ; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -508,12 +549,8 @@ "$(inherited)", "@executable_path/Frameworks", ); - ONLY_ACTIVE_ARCH = YES; - OTHER_CFLAGS = "-fvisibility=default"; - PRODUCT_BUNDLE_IDENTIFIER = app.polyvox.example; + PRODUCT_BUNDLE_IDENTIFIER = com.example.quickstart; PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - STRIP_STYLE = "non-global"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -525,11 +562,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = TM2B4SJXNJ; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -537,12 +572,8 @@ "$(inherited)", "@executable_path/Frameworks", ); - ONLY_ACTIVE_ARCH = YES; - OTHER_CFLAGS = "-fvisibility=default"; - PRODUCT_BUNDLE_IDENTIFIER = app.polyvox.example; + PRODUCT_BUNDLE_IDENTIFIER = com.example.quickstart; PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - STRIP_STYLE = "non-global"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -552,6 +583,16 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/examples/flutter/quickstart/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/flutter/quickstart/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/examples/flutter/quickstart/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/flutter/quickstart/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/examples/flutter/quickstart/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/flutter/quickstart/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/examples/flutter/quickstart/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/flutter/quickstart/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..8e3ca5df --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/flutter/quickstart/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/flutter/quickstart/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/examples/flutter/quickstart/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/flutter/quickstart/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/examples/flutter/quickstart/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/flutter/quickstart/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/examples/flutter/quickstart/ios/Runner/AppDelegate.swift b/examples/flutter/quickstart/ios/Runner/AppDelegate.swift new file mode 100644 index 00000000..62666446 --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d36b1fab --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 00000000..dc9ada47 Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 00000000..7353c41e Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 00000000..797d452e Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 00000000..6ed2d933 Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 00000000..4cd7b009 Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 00000000..fe730945 Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 00000000..321773cd Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 00000000..797d452e Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 00000000..502f463a Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 00000000..0ec30343 Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 00000000..0ec30343 Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 00000000..e9f5fea2 Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 00000000..84ac32ae Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 00000000..8953cba0 Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 00000000..0467bf12 Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 00000000..0bedcf2f --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 00000000..89c2725b --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/examples/flutter/quickstart/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/flutter/quickstart/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..f2e259c7 --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/flutter/quickstart/ios/Runner/Base.lproj/Main.storyboard b/examples/flutter/quickstart/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f3c28516 --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/flutter/quickstart/ios/Runner/Info.plist b/examples/flutter/quickstart/ios/Runner/Info.plist new file mode 100644 index 00000000..82ca91c3 --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Quickstart + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + quickstart + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/examples/flutter/quickstart/ios/Runner/Runner-Bridging-Header.h b/examples/flutter/quickstart/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 00000000..308a2a56 --- /dev/null +++ b/examples/flutter/quickstart/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/examples/flutter/quickstart/ios/RunnerTests/RunnerTests.swift b/examples/flutter/quickstart/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 00000000..86a7c3b1 --- /dev/null +++ b/examples/flutter/quickstart/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/examples/flutter/quickstart/lib/main.dart b/examples/flutter/quickstart/lib/main.dart new file mode 100644 index 00000000..9c8f5473 --- /dev/null +++ b/examples/flutter/quickstart/lib/main.dart @@ -0,0 +1,74 @@ +import 'package:flutter/material.dart'; +import 'package:thermion_flutter/thermion_flutter.dart'; + +import 'package:vector_math/vector_math_64.dart' as v; +import 'dart:math'; + + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Flutter Demo', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: const MyHomePage(title: 'Flutter Demo Home Page'), + ); + } +} + +class MyHomePage extends StatefulWidget { + const MyHomePage({super.key, required this.title}); + final String title; + + @override + State createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + bool _loaded = false; + late ThermionFlutterPlugin _thermionFlutterPlugin; + late Future _thermionViewer; + + @override + void initState() { + super.initState(); + _thermionFlutterPlugin = ThermionFlutterPlugin(); + _thermionViewer = _thermionFlutterPlugin.initialize(); + } + + @override + Widget build(BuildContext context) { + return Stack(children: [ + Positioned.fill(child: ThermionWidget(plugin: _thermionFlutterPlugin)), + if (!_loaded) + Center( + child: ElevatedButton( + child: const Text("Load"), + onPressed: () async { + var viewer = await _thermionViewer; + await viewer.loadSkybox("assets/default_env_skybox.ktx"); + await viewer.loadGlb("assets/cube.glb"); + + await viewer.setCameraPosition(0, 1, 10); + await viewer.setCameraRotation(v.Quaternion.axisAngle( + v.Vector3(1, 0, 0), -30 / 180 * pi) * + v.Quaternion.axisAngle( + v.Vector3(0, 1, 0), 15 / 180 * pi)); + await viewer.addLight( + LightType.SUN, 7500, 50000, 0, 0, 0, 1, -1, -1); + await viewer.setRendering(true); + _loaded = true; + setState(() {}); + })) + ]); + } +} diff --git a/examples/flutter/quickstart/linux/.gitignore b/examples/flutter/quickstart/linux/.gitignore new file mode 100644 index 00000000..d3896c98 --- /dev/null +++ b/examples/flutter/quickstart/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/examples/flutter/quickstart/linux/CMakeLists.txt b/examples/flutter/quickstart/linux/CMakeLists.txt new file mode 100644 index 00000000..f4a5227f --- /dev/null +++ b/examples/flutter/quickstart/linux/CMakeLists.txt @@ -0,0 +1,145 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.10) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "quickstart") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.example.quickstart") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Define the application target. To change its name, change BINARY_NAME above, +# not the value here, or `flutter run` will no longer work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/examples/flutter/quickstart/linux/flutter/CMakeLists.txt b/examples/flutter/quickstart/linux/flutter/CMakeLists.txt new file mode 100644 index 00000000..d5bd0164 --- /dev/null +++ b/examples/flutter/quickstart/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/examples/flutter/quickstart/linux/flutter/generated_plugin_registrant.cc b/examples/flutter/quickstart/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 00000000..01193c10 --- /dev/null +++ b/examples/flutter/quickstart/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + +#include + +void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) thermion_flutter_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "ThermionFlutterPlugin"); + thermion_flutter_plugin_register_with_registrar(thermion_flutter_registrar); +} diff --git a/examples/flutter/quickstart/linux/flutter/generated_plugin_registrant.h b/examples/flutter/quickstart/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 00000000..e0f0a47b --- /dev/null +++ b/examples/flutter/quickstart/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/examples/flutter/quickstart/linux/flutter/generated_plugins.cmake b/examples/flutter/quickstart/linux/flutter/generated_plugins.cmake new file mode 100644 index 00000000..274b5f60 --- /dev/null +++ b/examples/flutter/quickstart/linux/flutter/generated_plugins.cmake @@ -0,0 +1,24 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST + thermion_flutter +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/examples/flutter/quickstart/linux/main.cc b/examples/flutter/quickstart/linux/main.cc new file mode 100644 index 00000000..e7c5c543 --- /dev/null +++ b/examples/flutter/quickstart/linux/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/examples/flutter/quickstart/linux/my_application.cc b/examples/flutter/quickstart/linux/my_application.cc new file mode 100644 index 00000000..3901953a --- /dev/null +++ b/examples/flutter/quickstart/linux/my_application.cc @@ -0,0 +1,124 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "quickstart"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "quickstart"); + } + + gtk_window_set_default_size(window, 1280, 720); + gtk_widget_show(GTK_WIDGET(window)); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GApplication::startup. +static void my_application_startup(GApplication* application) { + //MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application startup. + + G_APPLICATION_CLASS(my_application_parent_class)->startup(application); +} + +// Implements GApplication::shutdown. +static void my_application_shutdown(GApplication* application) { + //MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application shutdown. + + G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_APPLICATION_CLASS(klass)->startup = my_application_startup; + G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, + "flags", G_APPLICATION_NON_UNIQUE, + nullptr)); +} diff --git a/examples/flutter/quickstart/linux/my_application.h b/examples/flutter/quickstart/linux/my_application.h new file mode 100644 index 00000000..72271d5e --- /dev/null +++ b/examples/flutter/quickstart/linux/my_application.h @@ -0,0 +1,18 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/examples/flutter/quickstart/macos/.gitignore b/examples/flutter/quickstart/macos/.gitignore new file mode 100644 index 00000000..746adbb6 --- /dev/null +++ b/examples/flutter/quickstart/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/examples/flutter/quickstart/macos/Flutter/Flutter-Debug.xcconfig b/examples/flutter/quickstart/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 00000000..4b81f9b2 --- /dev/null +++ b/examples/flutter/quickstart/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/examples/flutter/quickstart/macos/Flutter/Flutter-Release.xcconfig b/examples/flutter/quickstart/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 00000000..5caa9d15 --- /dev/null +++ b/examples/flutter/quickstart/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/examples/flutter/quickstart/macos/Flutter/GeneratedPluginRegistrant.swift b/examples/flutter/quickstart/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 00000000..b6c27f96 --- /dev/null +++ b/examples/flutter/quickstart/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,12 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + +import thermion_flutter + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + SwiftThermionFlutterPlugin.register(with: registry.registrar(forPlugin: "SwiftThermionFlutterPlugin")) +} diff --git a/examples/flutter/quickstart/macos/Podfile b/examples/flutter/quickstart/macos/Podfile new file mode 100644 index 00000000..90de47d4 --- /dev/null +++ b/examples/flutter/quickstart/macos/Podfile @@ -0,0 +1,43 @@ +platform :osx, '13.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/examples/flutter/quickstart/macos/Podfile.lock b/examples/flutter/quickstart/macos/Podfile.lock new file mode 100644 index 00000000..7b2ae237 --- /dev/null +++ b/examples/flutter/quickstart/macos/Podfile.lock @@ -0,0 +1,22 @@ +PODS: + - FlutterMacOS (1.0.0) + - thermion_flutter (0.0.1): + - FlutterMacOS + +DEPENDENCIES: + - FlutterMacOS (from `Flutter/ephemeral`) + - thermion_flutter (from `Flutter/ephemeral/.symlinks/plugins/thermion_flutter/macos`) + +EXTERNAL SOURCES: + FlutterMacOS: + :path: Flutter/ephemeral + thermion_flutter: + :path: Flutter/ephemeral/.symlinks/plugins/thermion_flutter/macos + +SPEC CHECKSUMS: + FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 + thermion_flutter: e4895ade6b14d9efb6e17ed2436e89dbb87fa998 + +PODFILE CHECKSUM: 1888651be91a8ad58692c1add9ce24279fd4e950 + +COCOAPODS: 1.15.2 diff --git a/examples/flutter/quickstart/macos/Runner.xcodeproj/project.pbxproj b/examples/flutter/quickstart/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..a3932134 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,803 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + 56F02897B820ADA2DE043C9B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93162ABED09E78126BD3CDE5 /* Pods_Runner.framework */; }; + 62AA8D6F0977DC04C5F3E47D /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9491FF37DFB0425E4EA0B397 /* Pods_RunnerTests.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* quickstart.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = quickstart.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 4DE9521732D230B91BB45C73 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 5C2B9597C21FB64F23F75F32 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 61CABADBE923C1C839256779 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 89306E3842C70B544B3CD9C8 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 914F20B2B6A55F4538F4FECA /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 93162ABED09E78126BD3CDE5 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9491FF37DFB0425E4EA0B397 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + E5EDF04F05E94A7EC21CBB16 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 62AA8D6F0977DC04C5F3E47D /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 56F02897B820ADA2DE043C9B /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0AD0DB307687B659B7995D8A /* Pods */ = { + isa = PBXGroup; + children = ( + 4DE9521732D230B91BB45C73 /* Pods-Runner.debug.xcconfig */, + 89306E3842C70B544B3CD9C8 /* Pods-Runner.release.xcconfig */, + 61CABADBE923C1C839256779 /* Pods-Runner.profile.xcconfig */, + 914F20B2B6A55F4538F4FECA /* Pods-RunnerTests.debug.xcconfig */, + 5C2B9597C21FB64F23F75F32 /* Pods-RunnerTests.release.xcconfig */, + E5EDF04F05E94A7EC21CBB16 /* Pods-RunnerTests.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 331C80D6294CF71000263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C80D7294CF71000263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + 0AD0DB307687B659B7995D8A /* Pods */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* quickstart.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 93162ABED09E78126BD3CDE5 /* Pods_Runner.framework */, + 9491FF37DFB0425E4EA0B397 /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 465FA95FF24452F333D1C1C1 /* [CP] Check Pods Manifest.lock */, + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + ED773E1A7DA74470DCD044C6 /* [CP] Check Pods Manifest.lock */, + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + CB1E43C40756BBF229674223 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* quickstart.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; + 465FA95FF24452F333D1C1C1 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + CB1E43C40756BBF229674223 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + ED773E1A7DA74470DCD044C6 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 914F20B2B6A55F4538F4FECA /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.quickstart.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/quickstart.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/quickstart"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5C2B9597C21FB64F23F75F32 /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.quickstart.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/quickstart.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/quickstart"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E5EDF04F05E94A7EC21CBB16 /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.quickstart.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/quickstart.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/quickstart"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 13.0; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 13.0; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 13.0; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/examples/flutter/quickstart/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/flutter/quickstart/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/examples/flutter/quickstart/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/flutter/quickstart/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..c9a58906 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/flutter/quickstart/macos/Runner.xcworkspace/contents.xcworkspacedata b/examples/flutter/quickstart/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..21a3cc14 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/examples/flutter/quickstart/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/flutter/quickstart/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/examples/flutter/quickstart/macos/Runner/AppDelegate.swift b/examples/flutter/quickstart/macos/Runner/AppDelegate.swift new file mode 100644 index 00000000..8e02df28 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@main +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..a2ec33f1 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 00000000..82b6f9d9 Binary files /dev/null and b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 00000000..13b35eba Binary files /dev/null and b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 00000000..0a3f5fa4 Binary files /dev/null and b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 00000000..bdb57226 Binary files /dev/null and b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 00000000..f083318e Binary files /dev/null and b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 00000000..326c0e72 Binary files /dev/null and b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 00000000..2f1632cf Binary files /dev/null and b/examples/flutter/quickstart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/examples/flutter/quickstart/macos/Runner/Base.lproj/MainMenu.xib b/examples/flutter/quickstart/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 00000000..80e867a4 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/flutter/quickstart/macos/Runner/Configs/AppInfo.xcconfig b/examples/flutter/quickstart/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 00000000..b638164d --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = quickstart + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.example.quickstart + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved. diff --git a/examples/flutter/quickstart/macos/Runner/Configs/Debug.xcconfig b/examples/flutter/quickstart/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 00000000..36b0fd94 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/examples/flutter/quickstart/macos/Runner/Configs/Release.xcconfig b/examples/flutter/quickstart/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 00000000..dff4f495 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/examples/flutter/quickstart/macos/Runner/Configs/Warnings.xcconfig b/examples/flutter/quickstart/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 00000000..42bcbf47 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/examples/flutter/quickstart/macos/Runner/DebugProfile.entitlements b/examples/flutter/quickstart/macos/Runner/DebugProfile.entitlements new file mode 100644 index 00000000..dddb8a30 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/examples/flutter/quickstart/macos/Runner/Info.plist b/examples/flutter/quickstart/macos/Runner/Info.plist new file mode 100644 index 00000000..4789daa6 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/examples/flutter/quickstart/macos/Runner/MainFlutterWindow.swift b/examples/flutter/quickstart/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 00000000..3cc05eb2 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/examples/flutter/quickstart/macos/Runner/Release.entitlements b/examples/flutter/quickstart/macos/Runner/Release.entitlements new file mode 100644 index 00000000..852fa1a4 --- /dev/null +++ b/examples/flutter/quickstart/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/examples/flutter/quickstart/macos/RunnerTests/RunnerTests.swift b/examples/flutter/quickstart/macos/RunnerTests/RunnerTests.swift new file mode 100644 index 00000000..61f3bd1f --- /dev/null +++ b/examples/flutter/quickstart/macos/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Cocoa +import FlutterMacOS +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/examples/flutter/quickstart/pubspec.yaml b/examples/flutter/quickstart/pubspec.yaml new file mode 100644 index 00000000..73825cd9 --- /dev/null +++ b/examples/flutter/quickstart/pubspec.yaml @@ -0,0 +1,49 @@ +name: quickstart +description: "A new Flutter project." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 1.0.0+1 + +environment: + sdk: '>=3.5.0-250.0.dev <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + thermion_flutter: + path: ../../../thermion_flutter/thermion_flutter + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.8 + vector_math: ^2.1.4 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^4.0.0 + +flutter: + uses-material-design: true + assets: + - assets/ diff --git a/examples/flutter/quickstart/test/widget_test.dart b/examples/flutter/quickstart/test/widget_test.dart new file mode 100644 index 00000000..fe677c1e --- /dev/null +++ b/examples/flutter/quickstart/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:quickstart/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/examples/flutter/quickstart/web/favicon.png b/examples/flutter/quickstart/web/favicon.png new file mode 100644 index 00000000..8aaa46ac Binary files /dev/null and b/examples/flutter/quickstart/web/favicon.png differ diff --git a/examples/flutter/quickstart/web/icons/Icon-192.png b/examples/flutter/quickstart/web/icons/Icon-192.png new file mode 100644 index 00000000..b749bfef Binary files /dev/null and b/examples/flutter/quickstart/web/icons/Icon-192.png differ diff --git a/examples/flutter/quickstart/web/icons/Icon-512.png b/examples/flutter/quickstart/web/icons/Icon-512.png new file mode 100644 index 00000000..88cfd48d Binary files /dev/null and b/examples/flutter/quickstart/web/icons/Icon-512.png differ diff --git a/examples/flutter/quickstart/web/icons/Icon-maskable-192.png b/examples/flutter/quickstart/web/icons/Icon-maskable-192.png new file mode 100644 index 00000000..eb9b4d76 Binary files /dev/null and b/examples/flutter/quickstart/web/icons/Icon-maskable-192.png differ diff --git a/examples/flutter/quickstart/web/icons/Icon-maskable-512.png b/examples/flutter/quickstart/web/icons/Icon-maskable-512.png new file mode 100644 index 00000000..d69c5669 Binary files /dev/null and b/examples/flutter/quickstart/web/icons/Icon-maskable-512.png differ diff --git a/examples/flutter/quickstart/web/index.html b/examples/flutter/quickstart/web/index.html new file mode 100644 index 00000000..4b963a54 --- /dev/null +++ b/examples/flutter/quickstart/web/index.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + quickstart + + + + + + diff --git a/examples/flutter/quickstart/web/manifest.json b/examples/flutter/quickstart/web/manifest.json new file mode 100644 index 00000000..1dd1a2f1 --- /dev/null +++ b/examples/flutter/quickstart/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "quickstart", + "short_name": "quickstart", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/examples/flutter/quickstart/windows/.gitignore b/examples/flutter/quickstart/windows/.gitignore new file mode 100644 index 00000000..d492d0d9 --- /dev/null +++ b/examples/flutter/quickstart/windows/.gitignore @@ -0,0 +1,17 @@ +flutter/ephemeral/ + +# Visual Studio user-specific files. +*.suo +*.user +*.userosscache +*.sln.docstates + +# Visual Studio build-related files. +x64/ +x86/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ diff --git a/examples/flutter/quickstart/windows/CMakeLists.txt b/examples/flutter/quickstart/windows/CMakeLists.txt new file mode 100644 index 00000000..21862f80 --- /dev/null +++ b/examples/flutter/quickstart/windows/CMakeLists.txt @@ -0,0 +1,108 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.14) +project(quickstart LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "quickstart") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(VERSION 3.14...3.25) + +# Define build configuration option. +get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(IS_MULTICONFIG) + set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" + CACHE STRING "" FORCE) +else() + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") + endif() +endif() +# Define settings for the Profile build mode. +set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") +set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") +set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") +set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") + +# Use Unicode for all projects. +add_definitions(-DUNICODE -D_UNICODE) + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_17) + target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") + target_compile_options(${TARGET} PRIVATE /EHsc) + target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") + target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# Support files are copied into place next to the executable, so that it can +# run in place. This is done instead of making a separate bundle (as on Linux) +# so that building and running from within Visual Studio will work. +set(BUILD_BUNDLE_DIR "$") +# Make the "install" step default, as it's required to run. +set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +if(PLUGIN_BUNDLED_LIBRARIES) + install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + CONFIGURATIONS Profile;Release + COMPONENT Runtime) diff --git a/examples/flutter/quickstart/windows/flutter/CMakeLists.txt b/examples/flutter/quickstart/windows/flutter/CMakeLists.txt new file mode 100644 index 00000000..903f4899 --- /dev/null +++ b/examples/flutter/quickstart/windows/flutter/CMakeLists.txt @@ -0,0 +1,109 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.14) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. +set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") + +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + +# === Flutter Library === +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "flutter_export.h" + "flutter_windows.h" + "flutter_messenger.h" + "flutter_plugin_registrar.h" + "flutter_texture_registrar.h" +) +list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") +add_dependencies(flutter flutter_assemble) + +# === Wrapper === +list(APPEND CPP_WRAPPER_SOURCES_CORE + "core_implementations.cc" + "standard_codec.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_PLUGIN + "plugin_registrar.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_APP + "flutter_engine.cc" + "flutter_view_controller.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") + +# Wrapper sources needed for a plugin. +add_library(flutter_wrapper_plugin STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} +) +apply_standard_settings(flutter_wrapper_plugin) +set_target_properties(flutter_wrapper_plugin PROPERTIES + POSITION_INDEPENDENT_CODE ON) +set_target_properties(flutter_wrapper_plugin PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) +target_include_directories(flutter_wrapper_plugin PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_plugin flutter_assemble) + +# Wrapper sources needed for the runner. +add_library(flutter_wrapper_app STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_APP} +) +apply_standard_settings(flutter_wrapper_app) +target_link_libraries(flutter_wrapper_app PUBLIC flutter) +target_include_directories(flutter_wrapper_app PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_app flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") +set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} + ${PHONY_OUTPUT} + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" + ${FLUTTER_TARGET_PLATFORM} $ + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} +) diff --git a/examples/flutter/quickstart/windows/flutter/generated_plugin_registrant.cc b/examples/flutter/quickstart/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 00000000..64919ad2 --- /dev/null +++ b/examples/flutter/quickstart/windows/flutter/generated_plugin_registrant.cc @@ -0,0 +1,14 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + +#include + +void RegisterPlugins(flutter::PluginRegistry* registry) { + ThermionFlutterPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("ThermionFlutterPluginCApi")); +} diff --git a/examples/flutter/quickstart/windows/flutter/generated_plugin_registrant.h b/examples/flutter/quickstart/windows/flutter/generated_plugin_registrant.h new file mode 100644 index 00000000..dc139d85 --- /dev/null +++ b/examples/flutter/quickstart/windows/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void RegisterPlugins(flutter::PluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/examples/flutter/quickstart/windows/flutter/generated_plugins.cmake b/examples/flutter/quickstart/windows/flutter/generated_plugins.cmake new file mode 100644 index 00000000..55f1a93d --- /dev/null +++ b/examples/flutter/quickstart/windows/flutter/generated_plugins.cmake @@ -0,0 +1,24 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST + thermion_flutter +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/examples/flutter/quickstart/windows/runner/CMakeLists.txt b/examples/flutter/quickstart/windows/runner/CMakeLists.txt new file mode 100644 index 00000000..394917c0 --- /dev/null +++ b/examples/flutter/quickstart/windows/runner/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.14) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} WIN32 + "flutter_window.cpp" + "main.cpp" + "utils.cpp" + "win32_window.cpp" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" + "Runner.rc" + "runner.exe.manifest" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the build version. +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") + +# Disable Windows macros that collide with C++ standard library functions. +target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") + +# Add dependency libraries and include directories. Add any application-specific +# dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) +target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/examples/flutter/quickstart/windows/runner/Runner.rc b/examples/flutter/quickstart/windows/runner/Runner.rc new file mode 100644 index 00000000..fb14283d --- /dev/null +++ b/examples/flutter/quickstart/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// Microsoft Visual C++ generated resource script. +// +#pragma code_page(65001) +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON "resources\\app_icon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD +#else +#define VERSION_AS_NUMBER 1,0,0,0 +#endif + +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION +#else +#define VERSION_AS_STRING "1.0.0" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_AS_NUMBER + PRODUCTVERSION VERSION_AS_NUMBER + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "com.example" "\0" + VALUE "FileDescription", "quickstart" "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "quickstart" "\0" + VALUE "LegalCopyright", "Copyright (C) 2024 com.example. All rights reserved." "\0" + VALUE "OriginalFilename", "quickstart.exe" "\0" + VALUE "ProductName", "quickstart" "\0" + VALUE "ProductVersion", VERSION_AS_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/examples/flutter/quickstart/windows/runner/flutter_window.cpp b/examples/flutter/quickstart/windows/runner/flutter_window.cpp new file mode 100644 index 00000000..955ee303 --- /dev/null +++ b/examples/flutter/quickstart/windows/runner/flutter_window.cpp @@ -0,0 +1,71 @@ +#include "flutter_window.h" + +#include + +#include "flutter/generated_plugin_registrant.h" + +FlutterWindow::FlutterWindow(const flutter::DartProject& project) + : project_(project) {} + +FlutterWindow::~FlutterWindow() {} + +bool FlutterWindow::OnCreate() { + if (!Win32Window::OnCreate()) { + return false; + } + + RECT frame = GetClientArea(); + + // The size here must match the window dimensions to avoid unnecessary surface + // creation / destruction in the startup path. + flutter_controller_ = std::make_unique( + frame.right - frame.left, frame.bottom - frame.top, project_); + // Ensure that basic setup of the controller was successful. + if (!flutter_controller_->engine() || !flutter_controller_->view()) { + return false; + } + RegisterPlugins(flutter_controller_->engine()); + SetChildContent(flutter_controller_->view()->GetNativeWindow()); + + flutter_controller_->engine()->SetNextFrameCallback([&]() { + this->Show(); + }); + + // Flutter can complete the first frame before the "show window" callback is + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. + flutter_controller_->ForceRedraw(); + + return true; +} + +void FlutterWindow::OnDestroy() { + if (flutter_controller_) { + flutter_controller_ = nullptr; + } + + Win32Window::OnDestroy(); +} + +LRESULT +FlutterWindow::MessageHandler(HWND hwnd, UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + // Give Flutter, including plugins, an opportunity to handle window messages. + if (flutter_controller_) { + std::optional result = + flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, + lparam); + if (result) { + return *result; + } + } + + switch (message) { + case WM_FONTCHANGE: + flutter_controller_->engine()->ReloadSystemFonts(); + break; + } + + return Win32Window::MessageHandler(hwnd, message, wparam, lparam); +} diff --git a/examples/flutter/quickstart/windows/runner/flutter_window.h b/examples/flutter/quickstart/windows/runner/flutter_window.h new file mode 100644 index 00000000..6da0652f --- /dev/null +++ b/examples/flutter/quickstart/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#ifndef RUNNER_FLUTTER_WINDOW_H_ +#define RUNNER_FLUTTER_WINDOW_H_ + +#include +#include + +#include + +#include "win32_window.h" + +// A window that does nothing but host a Flutter view. +class FlutterWindow : public Win32Window { + public: + // Creates a new FlutterWindow hosting a Flutter view running |project|. + explicit FlutterWindow(const flutter::DartProject& project); + virtual ~FlutterWindow(); + + protected: + // Win32Window: + bool OnCreate() override; + void OnDestroy() override; + LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, + LPARAM const lparam) noexcept override; + + private: + // The project to run. + flutter::DartProject project_; + + // The Flutter instance hosted by this window. + std::unique_ptr flutter_controller_; +}; + +#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/examples/flutter/quickstart/windows/runner/main.cpp b/examples/flutter/quickstart/windows/runner/main.cpp new file mode 100644 index 00000000..b7fd16b9 --- /dev/null +++ b/examples/flutter/quickstart/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#include +#include +#include + +#include "flutter_window.h" +#include "utils.h" + +int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, + _In_ wchar_t *command_line, _In_ int show_command) { + // Attach to console when present (e.g., 'flutter run') or create a + // new console when running with a debugger. + if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { + CreateAndAttachConsole(); + } + + // Initialize COM, so that it is available for use in the library and/or + // plugins. + ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + + flutter::DartProject project(L"data"); + + std::vector command_line_arguments = + GetCommandLineArguments(); + + project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); + + FlutterWindow window(project); + Win32Window::Point origin(10, 10); + Win32Window::Size size(1280, 720); + if (!window.Create(L"quickstart", origin, size)) { + return EXIT_FAILURE; + } + window.SetQuitOnClose(true); + + ::MSG msg; + while (::GetMessage(&msg, nullptr, 0, 0)) { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + + ::CoUninitialize(); + return EXIT_SUCCESS; +} diff --git a/examples/flutter/quickstart/windows/runner/resource.h b/examples/flutter/quickstart/windows/runner/resource.h new file mode 100644 index 00000000..66a65d1e --- /dev/null +++ b/examples/flutter/quickstart/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Runner.rc +// +#define IDI_APP_ICON 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/examples/flutter/quickstart/windows/runner/resources/app_icon.ico b/examples/flutter/quickstart/windows/runner/resources/app_icon.ico new file mode 100644 index 00000000..c04e20ca Binary files /dev/null and b/examples/flutter/quickstart/windows/runner/resources/app_icon.ico differ diff --git a/examples/flutter/quickstart/windows/runner/runner.exe.manifest b/examples/flutter/quickstart/windows/runner/runner.exe.manifest new file mode 100644 index 00000000..153653e8 --- /dev/null +++ b/examples/flutter/quickstart/windows/runner/runner.exe.manifest @@ -0,0 +1,14 @@ + + + + + PerMonitorV2 + + + + + + + + + diff --git a/examples/flutter/quickstart/windows/runner/utils.cpp b/examples/flutter/quickstart/windows/runner/utils.cpp new file mode 100644 index 00000000..3a0b4651 --- /dev/null +++ b/examples/flutter/quickstart/windows/runner/utils.cpp @@ -0,0 +1,65 @@ +#include "utils.h" + +#include +#include +#include +#include + +#include + +void CreateAndAttachConsole() { + if (::AllocConsole()) { + FILE *unused; + if (freopen_s(&unused, "CONOUT$", "w", stdout)) { + _dup2(_fileno(stdout), 1); + } + if (freopen_s(&unused, "CONOUT$", "w", stderr)) { + _dup2(_fileno(stdout), 2); + } + std::ios::sync_with_stdio(); + FlutterDesktopResyncOutputStreams(); + } +} + +std::vector GetCommandLineArguments() { + // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. + int argc; + wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); + if (argv == nullptr) { + return std::vector(); + } + + std::vector command_line_arguments; + + // Skip the first argument as it's the binary name. + for (int i = 1; i < argc; i++) { + command_line_arguments.push_back(Utf8FromUtf16(argv[i])); + } + + ::LocalFree(argv); + + return command_line_arguments; +} + +std::string Utf8FromUtf16(const wchar_t* utf16_string) { + if (utf16_string == nullptr) { + return std::string(); + } + unsigned int target_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, nullptr, 0, nullptr, nullptr) + -1; // remove the trailing null character + int input_length = (int)wcslen(utf16_string); + std::string utf8_string; + if (target_length == 0 || target_length > utf8_string.max_size()) { + return utf8_string; + } + utf8_string.resize(target_length); + int converted_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + input_length, utf8_string.data(), target_length, nullptr, nullptr); + if (converted_length == 0) { + return std::string(); + } + return utf8_string; +} diff --git a/examples/flutter/quickstart/windows/runner/utils.h b/examples/flutter/quickstart/windows/runner/utils.h new file mode 100644 index 00000000..3879d547 --- /dev/null +++ b/examples/flutter/quickstart/windows/runner/utils.h @@ -0,0 +1,19 @@ +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +#include +#include + +// Creates a console for the process, and redirects stdout and stderr to +// it for both the runner and the Flutter library. +void CreateAndAttachConsole(); + +// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string +// encoded in UTF-8. Returns an empty std::string on failure. +std::string Utf8FromUtf16(const wchar_t* utf16_string); + +// Gets the command line arguments passed in as a std::vector, +// encoded in UTF-8. Returns an empty std::vector on failure. +std::vector GetCommandLineArguments(); + +#endif // RUNNER_UTILS_H_ diff --git a/examples/flutter/quickstart/windows/runner/win32_window.cpp b/examples/flutter/quickstart/windows/runner/win32_window.cpp new file mode 100644 index 00000000..60608d0f --- /dev/null +++ b/examples/flutter/quickstart/windows/runner/win32_window.cpp @@ -0,0 +1,288 @@ +#include "win32_window.h" + +#include +#include + +#include "resource.h" + +namespace { + +/// Window attribute that enables dark mode window decorations. +/// +/// Redefined in case the developer's machine has a Windows SDK older than +/// version 10.0.22000.0. +/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute +#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE +#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 +#endif + +constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; + +/// Registry key for app theme preference. +/// +/// A value of 0 indicates apps should use dark mode. A non-zero or missing +/// value indicates apps should use light mode. +constexpr const wchar_t kGetPreferredBrightnessRegKey[] = + L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; +constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; + +// The number of Win32Window objects that currently exist. +static int g_active_window_count = 0; + +using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); + +// Scale helper to convert logical scaler values to physical using passed in +// scale factor +int Scale(int source, double scale_factor) { + return static_cast(source * scale_factor); +} + +// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. +// This API is only needed for PerMonitor V1 awareness mode. +void EnableFullDpiSupportIfAvailable(HWND hwnd) { + HMODULE user32_module = LoadLibraryA("User32.dll"); + if (!user32_module) { + return; + } + auto enable_non_client_dpi_scaling = + reinterpret_cast( + GetProcAddress(user32_module, "EnableNonClientDpiScaling")); + if (enable_non_client_dpi_scaling != nullptr) { + enable_non_client_dpi_scaling(hwnd); + } + FreeLibrary(user32_module); +} + +} // namespace + +// Manages the Win32Window's window class registration. +class WindowClassRegistrar { + public: + ~WindowClassRegistrar() = default; + + // Returns the singleton registrar instance. + static WindowClassRegistrar* GetInstance() { + if (!instance_) { + instance_ = new WindowClassRegistrar(); + } + return instance_; + } + + // Returns the name of the window class, registering the class if it hasn't + // previously been registered. + const wchar_t* GetWindowClass(); + + // Unregisters the window class. Should only be called if there are no + // instances of the window. + void UnregisterWindowClass(); + + private: + WindowClassRegistrar() = default; + + static WindowClassRegistrar* instance_; + + bool class_registered_ = false; +}; + +WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; + +const wchar_t* WindowClassRegistrar::GetWindowClass() { + if (!class_registered_) { + WNDCLASS window_class{}; + window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); + window_class.lpszClassName = kWindowClassName; + window_class.style = CS_HREDRAW | CS_VREDRAW; + window_class.cbClsExtra = 0; + window_class.cbWndExtra = 0; + window_class.hInstance = GetModuleHandle(nullptr); + window_class.hIcon = + LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + window_class.hbrBackground = 0; + window_class.lpszMenuName = nullptr; + window_class.lpfnWndProc = Win32Window::WndProc; + RegisterClass(&window_class); + class_registered_ = true; + } + return kWindowClassName; +} + +void WindowClassRegistrar::UnregisterWindowClass() { + UnregisterClass(kWindowClassName, nullptr); + class_registered_ = false; +} + +Win32Window::Win32Window() { + ++g_active_window_count; +} + +Win32Window::~Win32Window() { + --g_active_window_count; + Destroy(); +} + +bool Win32Window::Create(const std::wstring& title, + const Point& origin, + const Size& size) { + Destroy(); + + const wchar_t* window_class = + WindowClassRegistrar::GetInstance()->GetWindowClass(); + + const POINT target_point = {static_cast(origin.x), + static_cast(origin.y)}; + HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); + UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); + double scale_factor = dpi / 96.0; + + HWND window = CreateWindow( + window_class, title.c_str(), WS_OVERLAPPEDWINDOW, + Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), + Scale(size.width, scale_factor), Scale(size.height, scale_factor), + nullptr, nullptr, GetModuleHandle(nullptr), this); + + if (!window) { + return false; + } + + UpdateTheme(window); + + return OnCreate(); +} + +bool Win32Window::Show() { + return ShowWindow(window_handle_, SW_SHOWNORMAL); +} + +// static +LRESULT CALLBACK Win32Window::WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + if (message == WM_NCCREATE) { + auto window_struct = reinterpret_cast(lparam); + SetWindowLongPtr(window, GWLP_USERDATA, + reinterpret_cast(window_struct->lpCreateParams)); + + auto that = static_cast(window_struct->lpCreateParams); + EnableFullDpiSupportIfAvailable(window); + that->window_handle_ = window; + } else if (Win32Window* that = GetThisFromHandle(window)) { + return that->MessageHandler(window, message, wparam, lparam); + } + + return DefWindowProc(window, message, wparam, lparam); +} + +LRESULT +Win32Window::MessageHandler(HWND hwnd, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + switch (message) { + case WM_DESTROY: + window_handle_ = nullptr; + Destroy(); + if (quit_on_close_) { + PostQuitMessage(0); + } + return 0; + + case WM_DPICHANGED: { + auto newRectSize = reinterpret_cast(lparam); + LONG newWidth = newRectSize->right - newRectSize->left; + LONG newHeight = newRectSize->bottom - newRectSize->top; + + SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, + newHeight, SWP_NOZORDER | SWP_NOACTIVATE); + + return 0; + } + case WM_SIZE: { + RECT rect = GetClientArea(); + if (child_content_ != nullptr) { + // Size and position the child window. + MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, + rect.bottom - rect.top, TRUE); + } + return 0; + } + + case WM_ACTIVATE: + if (child_content_ != nullptr) { + SetFocus(child_content_); + } + return 0; + + case WM_DWMCOLORIZATIONCOLORCHANGED: + UpdateTheme(hwnd); + return 0; + } + + return DefWindowProc(window_handle_, message, wparam, lparam); +} + +void Win32Window::Destroy() { + OnDestroy(); + + if (window_handle_) { + DestroyWindow(window_handle_); + window_handle_ = nullptr; + } + if (g_active_window_count == 0) { + WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); + } +} + +Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { + return reinterpret_cast( + GetWindowLongPtr(window, GWLP_USERDATA)); +} + +void Win32Window::SetChildContent(HWND content) { + child_content_ = content; + SetParent(content, window_handle_); + RECT frame = GetClientArea(); + + MoveWindow(content, frame.left, frame.top, frame.right - frame.left, + frame.bottom - frame.top, true); + + SetFocus(child_content_); +} + +RECT Win32Window::GetClientArea() { + RECT frame; + GetClientRect(window_handle_, &frame); + return frame; +} + +HWND Win32Window::GetHandle() { + return window_handle_; +} + +void Win32Window::SetQuitOnClose(bool quit_on_close) { + quit_on_close_ = quit_on_close; +} + +bool Win32Window::OnCreate() { + // No-op; provided for subclasses. + return true; +} + +void Win32Window::OnDestroy() { + // No-op; provided for subclasses. +} + +void Win32Window::UpdateTheme(HWND const window) { + DWORD light_mode; + DWORD light_mode_size = sizeof(light_mode); + LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, + kGetPreferredBrightnessRegValue, + RRF_RT_REG_DWORD, nullptr, &light_mode, + &light_mode_size); + + if (result == ERROR_SUCCESS) { + BOOL enable_dark_mode = light_mode == 0; + DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, + &enable_dark_mode, sizeof(enable_dark_mode)); + } +} diff --git a/examples/flutter/quickstart/windows/runner/win32_window.h b/examples/flutter/quickstart/windows/runner/win32_window.h new file mode 100644 index 00000000..e901dde6 --- /dev/null +++ b/examples/flutter/quickstart/windows/runner/win32_window.h @@ -0,0 +1,102 @@ +#ifndef RUNNER_WIN32_WINDOW_H_ +#define RUNNER_WIN32_WINDOW_H_ + +#include + +#include +#include +#include + +// A class abstraction for a high DPI-aware Win32 Window. Intended to be +// inherited from by classes that wish to specialize with custom +// rendering and input handling +class Win32Window { + public: + struct Point { + unsigned int x; + unsigned int y; + Point(unsigned int x, unsigned int y) : x(x), y(y) {} + }; + + struct Size { + unsigned int width; + unsigned int height; + Size(unsigned int width, unsigned int height) + : width(width), height(height) {} + }; + + Win32Window(); + virtual ~Win32Window(); + + // Creates a win32 window with |title| that is positioned and sized using + // |origin| and |size|. New windows are created on the default monitor. Window + // sizes are specified to the OS in physical pixels, hence to ensure a + // consistent size this function will scale the inputted width and height as + // as appropriate for the default monitor. The window is invisible until + // |Show| is called. Returns true if the window was created successfully. + bool Create(const std::wstring& title, const Point& origin, const Size& size); + + // Show the current window. Returns true if the window was successfully shown. + bool Show(); + + // Release OS resources associated with window. + void Destroy(); + + // Inserts |content| into the window tree. + void SetChildContent(HWND content); + + // Returns the backing Window handle to enable clients to set icon and other + // window properties. Returns nullptr if the window has been destroyed. + HWND GetHandle(); + + // If true, closing this window will quit the application. + void SetQuitOnClose(bool quit_on_close); + + // Return a RECT representing the bounds of the current client area. + RECT GetClientArea(); + + protected: + // Processes and route salient window messages for mouse handling, + // size change and DPI. Delegates handling of these to member overloads that + // inheriting classes can handle. + virtual LRESULT MessageHandler(HWND window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Called when CreateAndShow is called, allowing subclass window-related + // setup. Subclasses should return false if setup fails. + virtual bool OnCreate(); + + // Called when Destroy is called. + virtual void OnDestroy(); + + private: + friend class WindowClassRegistrar; + + // OS callback called by message pump. Handles the WM_NCCREATE message which + // is passed when the non-client area is being created and enables automatic + // non-client DPI scaling so that the non-client area automatically + // responds to changes in DPI. All other messages are handled by + // MessageHandler. + static LRESULT CALLBACK WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Retrieves a class instance pointer for |window| + static Win32Window* GetThisFromHandle(HWND const window) noexcept; + + // Update the window frame's theme to match the system theme. + static void UpdateTheme(HWND const window); + + bool quit_on_close_ = false; + + // window handle for top level window. + HWND window_handle_ = nullptr; + + // window handle for hosted content. + HWND child_content_ = nullptr; +}; + +#endif // RUNNER_WIN32_WINDOW_H_ diff --git a/ios/Classes/PolyvoxFilamentPlugin.h b/ios/Classes/PolyvoxFilamentPlugin.h deleted file mode 100644 index 46fb930f..00000000 --- a/ios/Classes/PolyvoxFilamentPlugin.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface FlutterFilamentPlugin : NSObject -@end diff --git a/ios/Classes/PolyvoxFilamentPlugin.m b/ios/Classes/PolyvoxFilamentPlugin.m deleted file mode 100644 index c041c8e0..00000000 --- a/ios/Classes/PolyvoxFilamentPlugin.m +++ /dev/null @@ -1,18 +0,0 @@ -#import "FlutterFilamentPlugin.h" -#if __has_include() -#import -#else -// Support project import fallback if the generated compatibility header -// is not copied when this plugin is created as a library. -// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 -#import "flutter_filament-Swift.h" -#endif - -#include "FlutterFilamentApi.h" - -@implementation FlutterFilamentPlugin -+ (void)registerWithRegistrar:(NSObject*)registrar { - [SwiftFlutterFilamentPlugin registerWithRegistrar:registrar]; - ios_dummy(); -} -@end diff --git a/ios/flutter_filament.podspec b/ios/flutter_filament.podspec deleted file mode 100644 index f4feeebd..00000000 --- a/ios/flutter_filament.podspec +++ /dev/null @@ -1,46 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint flutter_filament.podspec` to validate before publishing. -# -Pod::Spec.new do |s| - s.name = 'flutter_filament' - s.version = '0.0.1' - s.summary = 'A new flutter plugin project.' - s.description = <<-DESC -A new flutter plugin project. - DESC - s.homepage = 'http://example.com' - s.license = { :file => '../LICENSE' } - s.author = { 'Your Company' => 'email@example.com' } - s.source = { :path => '.' } - s.source_files = 'Classes/*', 'src/*', "src/camutils/*", 'src/ios/*', 'include/filament/*', 'include/*', 'include/material/*.c' - s.public_header_files = 'include/SwiftFlutterFilamentPlugin-Bridging-Header.h', 'include/FlutterFilamentApi.h', 'include/FlutterFilamentFFIApi.h', 'include/ResourceBuffer.hpp', 'include/Log.hpp' - s.dependency 'Flutter' - s.platform = :ios, '12.1' - s.static_framework = true - s.vendored_libraries = "lib/*.a" - s.user_target_xcconfig = { - 'DEFINES_MODULE' => 'YES', - 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386', - "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", - 'OTHER_CFLAGS' => '"-fvisibility=default" "$(inherited)"', - 'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/flutter_filament/ios/include" "${PODS_ROOT}/../.symlinks/plugins/flutter_filament/ios/include/filament" "${PODS_ROOT}/../.symlinks/plugins/flutter_filament/ios/src" "${PODS_ROOT}/../.symlinks/plugins/flutter_filament/ios/src/image" "${PODS_ROOT}/../.symlinks/plugins/flutter_filament/ios/src/shaders" "$(inherited)"', - 'ALWAYS_SEARCH_USER_PATHS' => 'YES', - "OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -limageio -ltinyexr -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -lpng -lpng16 -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd -lstdc++', - 'LIBRARY_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/flutter_filament/ios/lib" "$(inherited)"', - } - - s.pod_target_xcconfig = { - 'DEFINES_MODULE' => 'YES', - 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386', - "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", - 'OTHER_CXXFLAGS' => '"--std=c++17" "-fmodules" "-fcxx-modules" "-fvisibility=default" "$(inherited)"', - 'OTHER_CFLAGS' => '"-fvisibility=default" "$(inherited)"', - 'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/flutter_filament/ios/include" "${PODS_ROOT}/../.symlinks/plugins/flutter_filament/ios/include/filament" "${PODS_ROOT}/../.symlinks/plugins/flutter_filament/ios/src" "${PODS_ROOT}/../.symlinks/plugins/flutter_filament/ios/src/image" "${PODS_ROOT}/../.symlinks/plugins/flutter_filament/ios/src/shaders" "$(inherited)"', - 'ALWAYS_SEARCH_USER_PATHS' => 'YES', - "OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -limageio -ltinyexr -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -lpng -lpng16 -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd -lstdc++', - 'LIBRARY_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/flutter_filament/ios/lib" "$(inherited)"', - } - - s.swift_version = '5.0' -end diff --git a/ios/include/AssetManager.hpp b/ios/include/AssetManager.hpp deleted file mode 100644 index fe2c76f5..00000000 --- a/ios/include/AssetManager.hpp +++ /dev/null @@ -1,104 +0,0 @@ -#pragma once - -#include - -#include - -#include -#include -#include - -#include "SceneAsset.hpp" -#include "ResourceBuffer.hpp" - -typedef int32_t EntityId; - -namespace polyvox { - using namespace filament; - using namespace filament::gltfio; - - class AssetManager { - public: - AssetManager(const ResourceLoaderWrapper* const loader, - NameComponentManager* ncm, - Engine* engine, - Scene* scene, - const char* uberArchivePath); - ~AssetManager(); - EntityId loadGltf(const char* uri, const char* relativeResourcePath); - EntityId loadGlb(const char* uri, bool unlit); - FilamentAsset* getAssetByEntityId(EntityId entityId); - void remove(EntityId entity); - void destroyAll(); - unique_ptr> getAnimationNames(EntityId entity); - float getAnimationDuration(EntityId entity, int animationIndex); - unique_ptr> getMorphTargetNames(EntityId entity, const char *meshName); - void transformToUnitCube(EntityId e); - inline void updateTransform(EntityId e); - void setScale(EntityId e, float scale); - void setPosition(EntityId e, float x, float y, float z); - void setRotation(EntityId e, float rads, float x, float y, float z); - const utils::Entity *getCameraEntities(EntityId e); - size_t getCameraEntityCount(EntityId e); - const utils::Entity* getLightEntities(EntityId e) const noexcept; - size_t getLightEntityCount(EntityId e) const noexcept; - void updateAnimations(); - bool setMaterialColor(EntityId e, const char* meshName, int materialInstance, const float r, const float g, const float b, const float a); - - bool setMorphAnimationBuffer( - EntityId entityId, - const char* entityName, - const float* const morphData, - const int* const morphIndices, - int numMorphTargets, - int numFrames, - float frameLengthInMs); - - void setMorphTargetWeights(EntityId entityId, const char* const entityName, const float* const weights, int count); - - bool setBoneAnimationBuffer( - EntityId entity, - const float* const frameData, - int numFrames, - int numBones, - const char** const boneNames, - const char** const meshName, - int numMeshTargets, - float frameLengthInMs); - void playAnimation(EntityId e, int index, bool loop, bool reverse, bool replaceActive, float crossfade = 0.3f); - void stopAnimation(EntityId e, int index); - void setMorphTargetWeights(const char* const entityName, float *weights, int count); - void loadTexture(EntityId entity, const char* resourcePath, int renderableIndex); - void setAnimationFrame(EntityId entity, int animationIndex, int animationFrame); - bool hide(EntityId entity, const char* meshName); - bool reveal(EntityId entity, const char* meshName); - const char* getNameForEntity(EntityId entityId); - - private: - AssetLoader* _assetLoader = nullptr; - const ResourceLoaderWrapper* const _resourceLoaderWrapper; - NameComponentManager* _ncm = nullptr; - Engine* _engine; - Scene* _scene; - MaterialProvider* _ubershaderProvider = nullptr; - gltfio::ResourceLoader* _gltfResourceLoader = nullptr; - gltfio::TextureProvider* _stbDecoder = nullptr; - gltfio::TextureProvider* _ktxDecoder = nullptr; - std::mutex _animationMutex; - - vector _assets; - tsl::robin_map _entityIdLookup; - - utils::Entity findEntityByName( - SceneAsset asset, - const char* entityName - ); - - inline void updateTransform(SceneAsset& asset); - - inline void setBoneTransform(SceneAsset& asset, int frameNumber); - - - - }; -} diff --git a/ios/include/FlutterFilamentApi.h b/ios/include/FlutterFilamentApi.h deleted file mode 100644 index 2e2629f6..00000000 --- a/ios/include/FlutterFilamentApi.h +++ /dev/null @@ -1,174 +0,0 @@ -#ifndef _FLUTTER_FILAMENT_API_H -#define _FLUTTER_FILAMENT_API_H - -#ifdef _WIN32 -#ifdef IS_DLL -#define FLUTTER_PLUGIN_EXPORT __declspec( dllimport ) -#else -#define FLUTTER_PLUGIN_EXPORT __declspec( dllexport ) -#endif -#else -#define FLUTTER_PLUGIN_EXPORT __attribute__((visibility("default"))) -#endif - -// we copy the LLVM here rather than including, -// because on Windows it's difficult to pin the exact location which confuses dart ffigen - -#ifndef __STDBOOL_H -#define __STDBOOL_H - -#define __bool_true_false_are_defined 1 - -#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L -/* FIXME: We should be issuing a deprecation warning here, but cannot yet due - * to system headers which include this header file unconditionally. - */ -#elif !defined(__cplusplus) -#define bool _Bool -#define true 1 -#define false 0 -#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) -/* Define _Bool as a GNU extension. */ -#define _Bool bool -#if defined(__cplusplus) && __cplusplus < 201103L -/* For C++98, define bool, false, true as a GNU extension. */ -#define bool bool -#define false false -#define true true -#endif -#endif - -#endif /* __STDBOOL_H */ - -#ifdef __APPLE__ -#include -#endif - -#include "ResourceBuffer.hpp" - -typedef int32_t EntityId; -typedef int32_t _ManipulatorMode; - -#ifdef __cplusplus -extern "C" { -#endif - -FLUTTER_PLUGIN_EXPORT const void* create_filament_viewer(const void* const context, const ResourceLoaderWrapper* const loader, void* const platform, const char* uberArchivePath); -FLUTTER_PLUGIN_EXPORT void destroy_filament_viewer(const void* const viewer); -FLUTTER_PLUGIN_EXPORT ResourceLoaderWrapper* make_resource_loader(LoadFilamentResourceFromOwner loadFn, FreeFilamentResourceFromOwner freeFn, void* owner); -FLUTTER_PLUGIN_EXPORT void* get_asset_manager(const void* const viewer); -FLUTTER_PLUGIN_EXPORT void create_render_target(const void* const viewer, intptr_t texture, uint32_t width, uint32_t height); -FLUTTER_PLUGIN_EXPORT void clear_background_image(const void* const viewer); -FLUTTER_PLUGIN_EXPORT void set_background_image(const void* const viewer, const char *path, bool fillHeight); -FLUTTER_PLUGIN_EXPORT void set_background_image_position(const void* const viewer, float x, float y, bool clamp); -FLUTTER_PLUGIN_EXPORT void set_background_color(const void* const viewer, const float r, const float g, const float b, const float a); -FLUTTER_PLUGIN_EXPORT void set_tone_mapping(const void* const viewer, int toneMapping); -FLUTTER_PLUGIN_EXPORT void set_bloom(const void* const viewer, float strength); -FLUTTER_PLUGIN_EXPORT void load_skybox(const void* const viewer, const char *skyboxPath); -FLUTTER_PLUGIN_EXPORT void load_ibl(const void* const viewer, const char *iblPath, float intensity); -FLUTTER_PLUGIN_EXPORT void remove_skybox(const void* const viewer); -FLUTTER_PLUGIN_EXPORT void remove_ibl(const void* const viewer); -FLUTTER_PLUGIN_EXPORT EntityId add_light(const void* const viewer, uint8_t type, float colour, float intensity, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, bool shadows); -FLUTTER_PLUGIN_EXPORT void remove_light(const void* const viewer, EntityId entityId); -FLUTTER_PLUGIN_EXPORT void clear_lights(const void* const viewer); -FLUTTER_PLUGIN_EXPORT EntityId load_glb(void *assetManager, const char *assetPath, bool unlit); -FLUTTER_PLUGIN_EXPORT EntityId load_gltf(void *assetManager, const char *assetPath, const char *relativePath); -FLUTTER_PLUGIN_EXPORT bool set_camera(const void* const viewer, EntityId asset, const char *nodeName); -FLUTTER_PLUGIN_EXPORT void set_view_frustum_culling(const void* const viewer, bool enabled); -FLUTTER_PLUGIN_EXPORT void render( - const void* const viewer, - uint64_t frameTimeInNanos, - void* pixelBuffer, - void (*callback)(void *buf, size_t size, void *data), - void* data - ); -FLUTTER_PLUGIN_EXPORT void create_swap_chain(const void* const viewer, const void* const window, uint32_t width, uint32_t height); -FLUTTER_PLUGIN_EXPORT void destroy_swap_chain(const void* const viewer); -FLUTTER_PLUGIN_EXPORT void set_frame_interval(const void* const viewer, float interval); -FLUTTER_PLUGIN_EXPORT void update_viewport_and_camera_projection(const void* const viewer, uint32_t width, uint32_t height, float scaleFactor); -FLUTTER_PLUGIN_EXPORT void scroll_begin(const void* const viewer); -FLUTTER_PLUGIN_EXPORT void scroll_update(const void* const viewer, float x, float y, float z); -FLUTTER_PLUGIN_EXPORT void scroll_end(const void* const viewer); -FLUTTER_PLUGIN_EXPORT void grab_begin(const void* const viewer, float x, float y, bool pan); -FLUTTER_PLUGIN_EXPORT void grab_update(const void* const viewer, float x, float y); -FLUTTER_PLUGIN_EXPORT void grab_end(const void* const viewer); -FLUTTER_PLUGIN_EXPORT void apply_weights( - void* assetManager, - EntityId asset, - const char *const entityName, - float *const weights, - int count - ); -FLUTTER_PLUGIN_EXPORT void set_morph_target_weights( - void* assetManager, - EntityId asset, - const char *const entityName, - const float *const morphData, - int numWeights - ); -FLUTTER_PLUGIN_EXPORT bool set_morph_animation( - void* assetManager, - EntityId asset, - const char *const entityName, - const float *const morphData, - const int* const morphIndices, - int numMorphTargets, - int numFrames, - float frameLengthInMs); -FLUTTER_PLUGIN_EXPORT void set_bone_animation( - void* assetManager, - EntityId asset, - const float* const frameData, - int numFrames, - int numBones, - const char** const boneNames, - const char** const meshName, - int numMeshTargets, - float frameLengthInMs); -FLUTTER_PLUGIN_EXPORT void play_animation(void* assetManager, EntityId asset, int index, bool loop, bool reverse, bool replaceActive, float crossfade); -FLUTTER_PLUGIN_EXPORT void set_animation_frame(void* assetManager, EntityId asset, int animationIndex, int animationFrame); -FLUTTER_PLUGIN_EXPORT void stop_animation(void* assetManager, EntityId asset, int index); -FLUTTER_PLUGIN_EXPORT int get_animation_count(void* assetManager, EntityId asset); -FLUTTER_PLUGIN_EXPORT void get_animation_name(void* assetManager, EntityId asset, char *const outPtr, int index); -FLUTTER_PLUGIN_EXPORT float get_animation_duration(void* assetManager, EntityId asset, int index); -FLUTTER_PLUGIN_EXPORT void get_morph_target_name(void* assetManager, EntityId asset, const char *meshName, char *const outPtr, int index); -FLUTTER_PLUGIN_EXPORT int get_morph_target_name_count(void* assetManager, EntityId asset, const char *meshName); -FLUTTER_PLUGIN_EXPORT void remove_asset(const void* const viewer, EntityId asset); -FLUTTER_PLUGIN_EXPORT void clear_assets(const void* const viewer); -FLUTTER_PLUGIN_EXPORT bool set_material_color(void* assetManager, EntityId asset, const char* meshName, int materialIndex, const float r, const float g, const float b, const float a); -FLUTTER_PLUGIN_EXPORT void transform_to_unit_cube(void* assetManager, EntityId asset); -FLUTTER_PLUGIN_EXPORT void set_position(void* assetManager, EntityId asset, float x, float y, float z); -FLUTTER_PLUGIN_EXPORT void set_rotation(void* assetManager, EntityId asset, float rads, float x, float y, float z); -FLUTTER_PLUGIN_EXPORT void set_scale(void* assetManager, EntityId asset, float scale); - -// Camera methods -FLUTTER_PLUGIN_EXPORT void move_camera_to_asset(const void* const viewer, EntityId asset); -FLUTTER_PLUGIN_EXPORT void set_view_frustum_culling(const void* const viewer, bool enabled); -FLUTTER_PLUGIN_EXPORT void set_camera_exposure(const void* const viewer, float aperture, float shutterSpeed, float sensitivity); -FLUTTER_PLUGIN_EXPORT void set_camera_position(const void* const viewer, float x, float y, float z); -FLUTTER_PLUGIN_EXPORT void get_camera_position(const void* const viewer); -FLUTTER_PLUGIN_EXPORT void set_camera_rotation(const void* const viewer, float rads, float x, float y, float z); -FLUTTER_PLUGIN_EXPORT void set_camera_model_matrix(const void* const viewer, const float *const matrix); -FLUTTER_PLUGIN_EXPORT const double* const get_camera_model_matrix(const void* const viewer); -FLUTTER_PLUGIN_EXPORT const double* const get_camera_view_matrix(const void* const viewer); -FLUTTER_PLUGIN_EXPORT const double* const get_camera_projection_matrix(const void* const viewer); -FLUTTER_PLUGIN_EXPORT void set_camera_projection_matrix(const void* const viewer, const double *const matrix, double near, double far); -FLUTTER_PLUGIN_EXPORT void set_camera_culling(const void* const viewer, double near, double far); -FLUTTER_PLUGIN_EXPORT const double* const get_camera_culling_projection_matrix(const void* const viewer); -FLUTTER_PLUGIN_EXPORT const double* const get_camera_frustum(const void* const viewer); -FLUTTER_PLUGIN_EXPORT void set_camera_focal_length(const void* const viewer, float focalLength); -FLUTTER_PLUGIN_EXPORT void set_camera_focus_distance(const void* const viewer, float focusDistance); -FLUTTER_PLUGIN_EXPORT void set_camera_manipulator_options(const void* const viewer, _ManipulatorMode mode, double orbitSpeedX, double orbitSpeedY, double zoomSpeed); - - -FLUTTER_PLUGIN_EXPORT int hide_mesh(void* assetManager, EntityId asset, const char* meshName); -FLUTTER_PLUGIN_EXPORT int reveal_mesh(void* assetManager, EntityId asset, const char* meshName); -FLUTTER_PLUGIN_EXPORT void set_post_processing(void* const viewer, bool enabled); -FLUTTER_PLUGIN_EXPORT void pick(void* const viewer, int x, int y, EntityId* entityId); -FLUTTER_PLUGIN_EXPORT const char* get_name_for_entity(void* const assetManager, const EntityId entityId); -FLUTTER_PLUGIN_EXPORT void ios_dummy(); -FLUTTER_PLUGIN_EXPORT void flutter_filament_free(void* ptr); -#ifdef __cplusplus -} -#endif -#endif diff --git a/ios/include/FlutterFilamentFFIApi.h b/ios/include/FlutterFilamentFFIApi.h deleted file mode 100644 index befbbcf1..00000000 --- a/ios/include/FlutterFilamentFFIApi.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef _FLUTTER_FILAMENT_FFI_API_H -#define _FLUTTER_FILAMENT_FFI_API_H - -#include "FlutterFilamentApi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/// -/// This header replicates most of the methods in FlutterFilamentApi.h, and is only intended to be used to generate client FFI bindings. -/// The intention is that calling one of these methods will call its respective method in FlutterFilamentApi.h, but wrapped in some kind of thread runner to ensure thread safety. -/// - -typedef int32_t EntityId; -typedef void (*FilamentRenderCallback)(void* const owner); - -FLUTTER_PLUGIN_EXPORT void* const create_filament_viewer_ffi(void* const context, void* const platform, const char* uberArchivePath, const ResourceLoaderWrapper* const loader, void (*renderCallback)(void* const renderCallbackOwner), void* const renderCallbackOwner); -FLUTTER_PLUGIN_EXPORT void create_swap_chain_ffi(void* const viewer, void* const surface, uint32_t width, uint32_t height); -FLUTTER_PLUGIN_EXPORT void destroy_swap_chain_ffi(void* const viewer); -FLUTTER_PLUGIN_EXPORT void create_render_target_ffi(void* const viewer, intptr_t nativeTextureId, uint32_t width, uint32_t height); -FLUTTER_PLUGIN_EXPORT void destroy_filament_viewer_ffi(void* const viewer); -FLUTTER_PLUGIN_EXPORT void render_ffi(void* const viewer); -FLUTTER_PLUGIN_EXPORT FilamentRenderCallback make_render_callback_fn_pointer(FilamentRenderCallback); -FLUTTER_PLUGIN_EXPORT void set_rendering_ffi(void* const viewer, bool rendering); -FLUTTER_PLUGIN_EXPORT void set_frame_interval_ffi(float frameInterval); -FLUTTER_PLUGIN_EXPORT void update_viewport_and_camera_projection_ffi(void* const viewer, const uint32_t width, const uint32_t height, const float scaleFactor); -FLUTTER_PLUGIN_EXPORT void set_background_color_ffi(void* const viewer, const float r, const float g, const float b, const float a); -FLUTTER_PLUGIN_EXPORT void clear_background_image_ffi(void* const viewer); -FLUTTER_PLUGIN_EXPORT void set_background_image_ffi(void* const viewer, const char *path, bool fillHeight); -FLUTTER_PLUGIN_EXPORT void set_background_image_position_ffi(void* const viewer, float x, float y, bool clamp); -FLUTTER_PLUGIN_EXPORT void set_tone_mapping_ffi(void* const viewer, int toneMapping); -FLUTTER_PLUGIN_EXPORT void set_bloom_ffi(void* const viewer, float strength); -FLUTTER_PLUGIN_EXPORT void load_skybox_ffi(void* const viewer, const char *skyboxPath); -FLUTTER_PLUGIN_EXPORT void load_ibl_ffi(void* const viewer, const char *iblPath, float intensity); -FLUTTER_PLUGIN_EXPORT void remove_skybox_ffi(void* const viewer); -FLUTTER_PLUGIN_EXPORT void remove_ibl_ffi(void* const viewer); -FLUTTER_PLUGIN_EXPORT EntityId add_light_ffi(void* const viewer, uint8_t type, float colour, float intensity, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, bool shadows); -FLUTTER_PLUGIN_EXPORT void remove_light_ffi(void* const viewer, EntityId entityId); -FLUTTER_PLUGIN_EXPORT void clear_lights_ffi(void* const viewer); -FLUTTER_PLUGIN_EXPORT EntityId load_glb_ffi(void* const assetManager, const char *assetPath, bool unlit); -FLUTTER_PLUGIN_EXPORT EntityId load_gltf_ffi(void* const assetManager, const char *assetPath, const char *relativePath); -FLUTTER_PLUGIN_EXPORT void remove_asset_ffi(void* const viewer, EntityId asset); -FLUTTER_PLUGIN_EXPORT void clear_assets_ffi(void* const viewer); -FLUTTER_PLUGIN_EXPORT bool set_camera_ffi(void* const viewer, EntityId asset, const char *nodeName); -FLUTTER_PLUGIN_EXPORT void apply_weights_ffi( - void* const assetManager, - EntityId asset, - const char *const entityName, - float *const weights, - int count - ); -FLUTTER_PLUGIN_EXPORT void set_morph_target_weights_ffi( - void* const assetManager, - EntityId asset, - const char *const entityName, - const float *const morphData, - int numWeights - ); -FLUTTER_PLUGIN_EXPORT bool set_morph_animation_ffi( - void* const assetManager, - EntityId asset, - const char *const entityName, - const float *const morphData, - const int* const morphIndices, - int numMorphTargets, - int numFrames, - float frameLengthInMs); -FLUTTER_PLUGIN_EXPORT -FLUTTER_PLUGIN_EXPORT void set_bone_animation_ffi( - void* const assetManager, - EntityId asset, - const float* const frameData, - int numFrames, - int numBones, - const char** const boneNames, - const char** const meshName, - int numMeshTargets, - float frameLengthInMs); -FLUTTER_PLUGIN_EXPORT void play_animation_ffi(void* const assetManager, EntityId asset, int index, bool loop, bool reverse, bool replaceActive, float crossfade); -FLUTTER_PLUGIN_EXPORT void set_animation_frame_ffi(void* const assetManager, EntityId asset, int animationIndex, int animationFrame); -FLUTTER_PLUGIN_EXPORT void stop_animation_ffi(void* const assetManager, EntityId asset, int index); -FLUTTER_PLUGIN_EXPORT int get_animation_count_ffi(void* const assetManager, EntityId asset); -FLUTTER_PLUGIN_EXPORT void get_animation_name_ffi(void* const assetManager, EntityId asset, char *const outPtr, int index); -FLUTTER_PLUGIN_EXPORT void get_morph_target_name_ffi(void* const assetManager, EntityId asset, const char *meshName, char *const outPtr, int index); -FLUTTER_PLUGIN_EXPORT int get_morph_target_name_count_ffi(void* const assetManager, EntityId asset, const char *meshName); -FLUTTER_PLUGIN_EXPORT void set_post_processing_ffi(void* const viewer, bool enabled); -FLUTTER_PLUGIN_EXPORT void pick_ffi(void* const viewer, int x, int y, EntityId* entityId); -FLUTTER_PLUGIN_EXPORT void ios_dummy_ffi(); - -#ifdef __cplusplus -} -#endif - -#endif // _FLUTTER_FILAMENT_FFI_API_H diff --git a/ios/include/FlutterFilamentPlugin.h b/ios/include/FlutterFilamentPlugin.h deleted file mode 100644 index 46fb930f..00000000 --- a/ios/include/FlutterFilamentPlugin.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface FlutterFilamentPlugin : NSObject -@end diff --git a/ios/include/ResourceBuffer.hpp b/ios/include/ResourceBuffer.hpp deleted file mode 100644 index d2306edb..00000000 --- a/ios/include/ResourceBuffer.hpp +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef RESOURCE_BUFFER_H -#define RESOURCE_BUFFER_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - // - // Since different platforms expose different interfaces for loading assets, we want single interface to represent the binary data backing an asset (as well as an ID that can be passed back to the native platform to free the data and unload the asset). - // - struct ResourceBuffer { - const void* const data; - const int32_t size; - const int32_t id; - - // These only need to be constructible from C++ on Linux & Windows. - // On iOS, MacOS & Android, this is constructed on the Swift/Kotlin side. - // These C++ constructors seem to interfere with that, so we omit them on those platforms. - #if defined(__cplusplus) && !defined(__ANDROID__) && !defined(__APPLE__) - ResourceBuffer(const void* const data, const int32_t size, const int32_t id) : data(data), size(size), id(id) {}; - ResourceBuffer(const ResourceBuffer& rb) : data(rb.data), size(rb.size), id(rb.id) { }; - ResourceBuffer(const ResourceBuffer&& rb) noexcept : data(rb.data), size(rb.size), id(rb.id) { }; - ResourceBuffer& operator=(const ResourceBuffer& other) = delete; - #endif - }; - - typedef struct ResourceBuffer ResourceBuffer; - typedef ResourceBuffer (*LoadFilamentResource)(const char* uri); - typedef ResourceBuffer (*LoadFilamentResourceFromOwner)(const char* const, void* const owner); - typedef void (*FreeFilamentResource)(ResourceBuffer); - typedef void (*FreeFilamentResourceFromOwner)(ResourceBuffer, void* const owner); - - // this may be compiled as either C or C++, depending on which compiler is being invoked (e.g. binding to Swift will compile as C). - // the former does not allow default initialization to be specified inline), so we need to explicitly set the unused members to nullptr - struct ResourceLoaderWrapper { - #if defined(__cplusplus) - ResourceLoaderWrapper(LoadFilamentResource loader, FreeFilamentResource freeResource) : mLoadFilamentResource(loader), mFreeFilamentResource(freeResource), mLoadFilamentResourceFromOwner(nullptr), mFreeFilamentResourceFromOwner(nullptr), - mOwner(nullptr) {} - - ResourceLoaderWrapper(LoadFilamentResourceFromOwner loader, FreeFilamentResourceFromOwner freeResource, void* const owner) : mLoadFilamentResource(nullptr), mFreeFilamentResource(nullptr), mLoadFilamentResourceFromOwner(loader), mFreeFilamentResourceFromOwner(freeResource), mOwner(owner) { - - }; - - ResourceBuffer load(const char* uri) const { - if(mLoadFilamentResourceFromOwner) { - auto rb = mLoadFilamentResourceFromOwner(uri, mOwner); - return rb; - } - auto rb =mLoadFilamentResource(uri); - return rb; - } - - void free(ResourceBuffer rb) const { - if(mFreeFilamentResourceFromOwner) { - mFreeFilamentResourceFromOwner(rb, mOwner); - } else { - mFreeFilamentResource(rb); - } - } - - - #endif - LoadFilamentResource mLoadFilamentResource; - FreeFilamentResource mFreeFilamentResource; - LoadFilamentResourceFromOwner mLoadFilamentResourceFromOwner; - FreeFilamentResourceFromOwner mFreeFilamentResourceFromOwner; - void* mOwner; - }; - typedef struct ResourceLoaderWrapper ResourceLoaderWrapper; - -#if defined(__cplusplus) -} -#endif -#endif diff --git a/ios/include/SceneAsset.hpp b/ios/include/SceneAsset.hpp deleted file mode 100644 index da5038f4..00000000 --- a/ios/include/SceneAsset.hpp +++ /dev/null @@ -1,110 +0,0 @@ -#pragma once - -#include "Log.hpp" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -extern "C" { - #include "FlutterFilamentApi.h" -} -template class std::vector; -namespace polyvox { - using namespace filament; - using namespace filament::gltfio; - using namespace utils; - using namespace std; - - typedef std::chrono::time_point time_point_t; - - enum AnimationType { - MORPH, BONE, GLTF - }; - - struct AnimationStatus { - time_point_t mStart = time_point_t::max(); - bool mLoop = false; - bool mReverse = false; - float mDuration = 0; - AnimationType type; - int gltfIndex = -1; - }; - - // - // Use this to manually construct a buffer of frame data for morph animations. - // - struct MorphAnimationBuffer { - utils::Entity mMeshTarget; - int mNumFrames = -1; - float mFrameLengthInMs = 0; - vector mFrameData; - vector mMorphIndices; - }; - - // - // Use this to construct a dynamic (i.e. non-glTF embedded) bone animation. - // Only a single animation is supported at any time (i.e you can't blend animations). - // Multiple bones are supported but these must be skinned to a single mesh target. - // - struct BoneAnimationBuffer { - vector mMeshTargets; - vector mBones; - vector mBaseTransforms; - // vector mBaseTranslations; // these are the base transforms for the bones we will animate; the translations/rotations in mFrameData will be relative to this. - // vector mBaseRotations; // these are the base transforms for the bones we will animate; the translations/rotations in mFrameData will be relative to this. - // vector mBaseScales; // these are the base transforms for the bones we will animate; the translations/rotations in mFrameData will be relative to this. - size_t skinIndex = 0; - int mNumFrames = -1; - float mFrameLengthInMs = 0; - vector mFrameData; - }; - - struct SceneAsset { - bool mAnimating = false; - FilamentAsset* mAsset = nullptr; - Animator* mAnimator = nullptr; - - // vector containing AnimationStatus structs for the morph, bone and/or glTF animations. - vector mAnimations; - - // the index of the last active glTF animation, - // used to cross-fade - int fadeGltfAnimationIndex = -1; - float fadeDuration = 0.0f; - float fadeOutAnimationStart = 0.0f; - - MorphAnimationBuffer mMorphAnimationBuffer; - BoneAnimationBuffer mBoneAnimationBuffer; - - // a slot to preload textures - filament::Texture* mTexture = nullptr; - - // initialized to identity - math::mat4f mPosition; - - // initialized to identity - math::mat4f mRotation; - - float mScale = 1; - - SceneAsset( - FilamentAsset* asset - ) : mAsset(asset) { - mAnimator = mAsset->getInstance()->getAnimator(); - } - }; -} diff --git a/ios/include/SwiftFlutterFilamentPlugin-Bridging-Header.h b/ios/include/SwiftFlutterFilamentPlugin-Bridging-Header.h deleted file mode 100644 index 09a5da82..00000000 --- a/ios/include/SwiftFlutterFilamentPlugin-Bridging-Header.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SwiftFlutterFilamentPlugin_Bridging_Header_h -#define SwiftFlutterFilamentPlugin_Bridging_Header_h - -#import "FlutterFilamentApi.h" -#import "FlutterFilamentFFIApi.h" - -#endif - diff --git a/ios/include/filament/backend/BufferDescriptor.h b/ios/include/filament/backend/BufferDescriptor.h deleted file mode 100644 index 80fe182a..00000000 --- a/ios/include/filament/backend/BufferDescriptor.h +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_BACKEND_BUFFERDESCRIPTOR_H -#define TNT_FILAMENT_BACKEND_BUFFERDESCRIPTOR_H - -#include -#include - -#include -#include - -namespace filament::backend { - -class CallbackHandler; - -/** - * A CPU memory-buffer descriptor, typically used to transfer data from the CPU to the GPU. - * - * A BufferDescriptor owns the memory buffer it references, therefore BufferDescriptor cannot - * be copied, but can be moved. - * - * BufferDescriptor releases ownership of the memory-buffer when it's destroyed. - */ -class UTILS_PUBLIC BufferDescriptor { -public: - /** - * Callback used to destroy the buffer data. - * Guarantees: - * Called on the main filament thread. - * - * Limitations: - * Must be lightweight. - * Must not call filament APIs. - */ - using Callback = void(*)(void* buffer, size_t size, void* user); - - //! creates an empty descriptor - BufferDescriptor() noexcept = default; - - //! calls the callback to advertise BufferDescriptor no-longer owns the buffer - ~BufferDescriptor() noexcept { - if (mCallback) { - mCallback(buffer, size, mUser); - } - } - - BufferDescriptor(const BufferDescriptor& rhs) = delete; - BufferDescriptor& operator=(const BufferDescriptor& rhs) = delete; - - BufferDescriptor(BufferDescriptor&& rhs) noexcept - : buffer(rhs.buffer), size(rhs.size), - mCallback(rhs.mCallback), mUser(rhs.mUser), mHandler(rhs.mHandler) { - rhs.buffer = nullptr; - rhs.mCallback = nullptr; - } - - BufferDescriptor& operator=(BufferDescriptor&& rhs) noexcept { - if (this != &rhs) { - buffer = rhs.buffer; - size = rhs.size; - mCallback = rhs.mCallback; - mUser = rhs.mUser; - mHandler = rhs.mHandler; - rhs.buffer = nullptr; - rhs.mCallback = nullptr; - } - return *this; - } - - /** - * Creates a BufferDescriptor that references a CPU memory-buffer - * @param buffer Memory address of the CPU buffer to reference - * @param size Size of the CPU buffer in bytes - * @param callback A callback used to release the CPU buffer from this BufferDescriptor - * @param user An opaque user pointer passed to the callback function when it's called - */ - BufferDescriptor(void const* buffer, size_t size, - Callback callback = nullptr, void* user = nullptr) noexcept - : buffer(const_cast(buffer)), size(size), mCallback(callback), mUser(user) { - } - - /** - * Creates a BufferDescriptor that references a CPU memory-buffer - * @param buffer Memory address of the CPU buffer to reference - * @param size Size of the CPU buffer in bytes - * @param callback A callback used to release the CPU buffer from this BufferDescriptor - * @param user An opaque user pointer passed to the callback function when it's called - */ - BufferDescriptor(void const* buffer, size_t size, - CallbackHandler* handler, Callback callback, void* user = nullptr) noexcept - : buffer(const_cast(buffer)), size(size), - mCallback(callback), mUser(user), mHandler(handler) { - } - - // -------------------------------------------------------------------------------------------- - - /** - * Helper to create a BufferDescriptor that uses a KNOWN method pointer w/ object passed - * by pointer as the callback. e.g.: - * auto bd = BufferDescriptor::make(buffer, size, &Foo::method, foo); - * - * @param buffer Memory address of the CPU buffer to reference - * @param size Size of the CPU buffer in bytes - * @param handler Handler to use to dispatch the callback, or nullptr for the default handler - * @return a new BufferDescriptor - */ - template - static BufferDescriptor make( - void const* buffer, size_t size, T* data, CallbackHandler* handler = nullptr) noexcept { - return { - buffer, size, - handler, [](void* b, size_t s, void* u) { - (*static_cast(u)->*method)(b, s); - }, data - }; - } - - /** - * Helper to create a BufferDescriptor that uses a functor as the callback. - * - * Caveats: - * - DO NOT CALL setCallback() when using this helper. - * - This make a heap allocation - * - * @param buffer Memory address of the CPU buffer to reference - * @param size Size of the CPU buffer in bytes - * @param functor functor of type f(void const* buffer, size_t size) - * @param handler Handler to use to dispatch the callback, or nullptr for the default handler - * @return a new BufferDescriptor - */ - template - static BufferDescriptor make( - void const* buffer, size_t size, T&& functor, CallbackHandler* handler = nullptr) noexcept { - return { - buffer, size, - handler, [](void* b, size_t s, void* u) { - T& that = *static_cast(u); - that(b, s); - delete &that; - }, - new T(std::forward(functor)) - }; - } - - // -------------------------------------------------------------------------------------------- - - /** - * Set or replace the release callback function - * @param callback The new callback function - * @param user An opaque user pointer passed to the callbeck function when it's called - */ - void setCallback(Callback callback, void* user = nullptr) noexcept { - this->mCallback = callback; - this->mUser = user; - this->mHandler = nullptr; - } - - /** - * Set or replace the release callback function - * @param handler The Handler to use to dispatch the callback - * @param callback The new callback function - * @param user An opaque user pointer passed to the callbeck function when it's called - */ - void setCallback(CallbackHandler* handler, Callback callback, void* user = nullptr) noexcept { - mCallback = callback; - mUser = user; - mHandler = handler; - } - - //! Returns whether a release callback is set - bool hasCallback() const noexcept { return mCallback != nullptr; } - - //! Returns the currently set release callback function - Callback getCallback() const noexcept { - return mCallback; - } - - //! Returns the handler for this callback or nullptr if the default handler is to be used. - CallbackHandler* getHandler() const noexcept { - return mHandler; - } - - //! Returns the user opaque pointer associated to this BufferDescriptor - void* getUser() const noexcept { - return mUser; - } - - //! CPU mempry-buffer virtual address - void* buffer = nullptr; - - //! CPU memory-buffer size in bytes - size_t size = 0; - -private: - // callback when the buffer is consumed. - Callback mCallback = nullptr; - void* mUser = nullptr; - CallbackHandler* mHandler = nullptr; -}; - -} // namespace filament::backend - -#if !defined(NDEBUG) -utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::BufferDescriptor& b); -#endif - -#endif // TNT_FILAMENT_BACKEND_BUFFERDESCRIPTOR_H diff --git a/ios/include/filament/backend/PipelineState.h b/ios/include/filament/backend/PipelineState.h deleted file mode 100644 index 8b31c5f3..00000000 --- a/ios/include/filament/backend/PipelineState.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_PIPELINESTATE_H -#define TNT_FILAMENT_BACKEND_PIPELINESTATE_H - -#include -#include - -#include - -#include - -namespace filament::backend { - -//! \privatesection - -struct PipelineState { - Handle program; - RasterState rasterState; - StencilState stencilState; - PolygonOffset polygonOffset; - Viewport scissor{ 0, 0, - (uint32_t)std::numeric_limits::max(), - (uint32_t)std::numeric_limits::max() - }; -}; - -} // namespace filament::backend - -#if !defined(NDEBUG) -utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::PipelineState& ps); -#endif - -#endif //TNT_FILAMENT_BACKEND_PIPELINESTATE_H diff --git a/ios/include/filament/filament/Color.h b/ios/include/filament/filament/Color.h deleted file mode 100644 index fa03b1e2..00000000 --- a/ios/include/filament/filament/Color.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_COLOR_H -#define TNT_FILAMENT_COLOR_H - -#include - -#include -#include - -namespace filament { - -//! RGB color in linear space -using LinearColor = math::float3; - -//! RGB color in sRGB space -using sRGBColor = math::float3; - -//! RGBA color in linear space, with alpha -using LinearColorA = math::float4; - -//! RGBA color in sRGB space, with alpha -using sRGBColorA = math::float4; - -//! types of RGB colors -enum class RgbType : uint8_t { - sRGB, //!< the color is defined in Rec.709-sRGB-D65 (sRGB) space - LINEAR, //!< the color is defined in Rec.709-Linear-D65 ("linear sRGB") space -}; - -//! types of RGBA colors -enum class RgbaType : uint8_t { - /** - * the color is defined in Rec.709-sRGB-D65 (sRGB) space and the RGB values - * have not been pre-multiplied by the alpha (for instance, a 50% - * transparent red is <1,0,0,0.5>) - */ - sRGB, - /** - * the color is defined in Rec.709-Linear-D65 ("linear sRGB") space and the - * RGB values have not been pre-multiplied by the alpha (for instance, a 50% - * transparent red is <1,0,0,0.5>) - */ - LINEAR, - /** - * the color is defined in Rec.709-sRGB-D65 (sRGB) space and the RGB values - * have been pre-multiplied by the alpha (for instance, a 50% - * transparent red is <0.5,0,0,0.5>) - */ - PREMULTIPLIED_sRGB, - /** - * the color is defined in Rec.709-Linear-D65 ("linear sRGB") space and the - * RGB values have been pre-multiplied by the alpha (for instance, a 50% - * transparent red is <0.5,0,0,0.5>) - */ - PREMULTIPLIED_LINEAR -}; - -//! type of color conversion to use when converting to/from sRGB and linear spaces -enum ColorConversion { - ACCURATE, //!< accurate conversion using the sRGB standard - FAST //!< fast conversion using a simple gamma 2.2 curve -}; - -/** - * Utilities to manipulate and convert colors - */ -class UTILS_PUBLIC Color { -public: - //! converts an RGB color to linear space, the conversion depends on the specified type - static LinearColor toLinear(RgbType type, math::float3 color); - - //! converts an RGBA color to linear space, the conversion depends on the specified type - static LinearColorA toLinear(RgbaType type, math::float4 color); - - //! converts an RGB color in sRGB space to an RGB color in linear space - template - static LinearColor toLinear(sRGBColor const& color); - - /** - * Converts an RGB color in Rec.709-Linear-D65 ("linear sRGB") space to an - * RGB color in Rec.709-sRGB-D65 (sRGB) space. - */ - template - static sRGBColor toSRGB(LinearColor const& color); - - /** - * Converts an RGBA color in Rec.709-sRGB-D65 (sRGB) space to an RGBA color in - * Rec.709-Linear-D65 ("linear sRGB") space the alpha component is left unmodified. - */ - template - static LinearColorA toLinear(sRGBColorA const& color); - - /** - * Converts an RGBA color in Rec.709-Linear-D65 ("linear sRGB") space to - * an RGBA color in Rec.709-sRGB-D65 (sRGB) space the alpha component is - * left unmodified. - */ - template - static sRGBColorA toSRGB(LinearColorA const& color); - - /** - * Converts a correlated color temperature to a linear RGB color in sRGB - * space the temperature must be expressed in kelvin and must be in the - * range 1,000K to 15,000K. - */ - static LinearColor cct(float K); - - /** - * Converts a CIE standard illuminant series D to a linear RGB color in - * sRGB space the temperature must be expressed in kelvin and must be in - * the range 4,000K to 25,000K - */ - static LinearColor illuminantD(float K); - - /** - * Computes the Beer-Lambert absorption coefficients from the specified - * transmittance color and distance. The computed absorption will guarantee - * the white light will become the specified color at the specified distance. - * The output of this function can be used as the absorption parameter of - * materials that use refraction. - * - * @param color the desired linear RGB color in sRGB space - * @param distance the distance at which white light should become the specified color - * - * @return absorption coefficients for the Beer-Lambert law - */ - static math::float3 absorptionAtDistance(LinearColor const& color, float distance); - -private: - static math::float3 sRGBToLinear(math::float3 color) noexcept; - static math::float3 linearToSRGB(math::float3 color) noexcept; -}; - -// Use the default implementation from the header -template<> -inline LinearColor Color::toLinear(sRGBColor const& color) { - return pow(color, 2.2f); -} - -template<> -inline LinearColorA Color::toLinear(sRGBColorA const& color) { - return LinearColorA{pow(color.rgb, 2.2f), color.a}; -} - -template<> -inline LinearColor Color::toLinear(sRGBColor const& color) { - return sRGBToLinear(color); -} - -template<> -inline LinearColorA Color::toLinear(sRGBColorA const& color) { - return LinearColorA{sRGBToLinear(color.rgb), color.a}; -} - -// Use the default implementation from the header -template<> -inline sRGBColor Color::toSRGB(LinearColor const& color) { - return pow(color, 1.0f / 2.2f); -} - -template<> -inline sRGBColorA Color::toSRGB(LinearColorA const& color) { - return sRGBColorA{pow(color.rgb, 1.0f / 2.2f), color.a}; -} - -template<> -inline sRGBColor Color::toSRGB(LinearColor const& color) { - return linearToSRGB(color); -} - -template<> -inline sRGBColorA Color::toSRGB(LinearColorA const& color) { - return sRGBColorA{linearToSRGB(color.rgb), color.a}; -} - -inline LinearColor Color::toLinear(RgbType type, math::float3 color) { - return (type == RgbType::LINEAR) ? color : Color::toLinear(color); -} - -// converts an RGBA color to linear space -// the conversion depends on the specified type -inline LinearColorA Color::toLinear(RgbaType type, math::float4 color) { - switch (type) { - case RgbaType::sRGB: - return Color::toLinear(color) * math::float4{color.a, color.a, color.a, 1.0f}; - case RgbaType::LINEAR: - return color * math::float4{color.a, color.a, color.a, 1.0f}; - case RgbaType::PREMULTIPLIED_sRGB: - return Color::toLinear(color); - case RgbaType::PREMULTIPLIED_LINEAR: - return color; - } -} - -} // namespace filament - -#endif // TNT_FILAMENT_COLOR_H diff --git a/ios/include/filament/filament/DebugRegistry.h b/ios/include/filament/filament/DebugRegistry.h deleted file mode 100644 index b5fb8f21..00000000 --- a/ios/include/filament/filament/DebugRegistry.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (C) 2018 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_DEBUGREGISTRY_H -#define TNT_FILAMENT_DEBUGREGISTRY_H - -#include - -#include - -#include - -#include - -namespace filament { - -/** - * A registry of runtime properties used exclusively for debugging - * - * Filament exposes a few properties that can be queried and set, which control certain debugging - * features of the engine. These properties can be set at runtime at anytime. - * - */ -class UTILS_PUBLIC DebugRegistry : public FilamentAPI { -public: - - /** - * Type of a property - */ - enum Type { - BOOL, INT, FLOAT, FLOAT2, FLOAT3, FLOAT4 - }; - - /** - * Information about a property - */ - struct Property { - const char* name; //!< property name - Type type; //!< property type - }; - - /** - * Queries whether a property exists - * @param name The name of the property to query - * @return true if the property exists, false otherwise - */ - bool hasProperty(const char* name) const noexcept; - - /** - * Queries the address of a property's data from its name - * @param name Name of the property we want the data address of - * @return Address of the data of the \p name property - * @{ - */ - void* getPropertyAddress(const char* name) noexcept; - - template - inline T* getPropertyAddress(const char* name) noexcept { - return static_cast(getPropertyAddress(name)); - } - - template - inline bool getPropertyAddress(const char* name, T** p) noexcept { - *p = getPropertyAddress(name); - return *p != nullptr; - } - /** @}*/ - - /** - * Set the value of a property - * @param name Name of the property to set the value of - * @param v Value to set - * @return true if the operation was successful, false otherwise. - * @{ - */ - bool setProperty(const char* name, bool v) noexcept; - bool setProperty(const char* name, int v) noexcept; - bool setProperty(const char* name, float v) noexcept; - bool setProperty(const char* name, math::float2 v) noexcept; - bool setProperty(const char* name, math::float3 v) noexcept; - bool setProperty(const char* name, math::float4 v) noexcept; - /** @}*/ - - /** - * Get the value of a property - * @param name Name of the property to get the value of - * @param v A pointer to a variable which will hold the result - * @return true if the call was successful and \p v was updated - * @{ - */ - bool getProperty(const char* name, bool* v) const noexcept; - bool getProperty(const char* name, int* v) const noexcept; - bool getProperty(const char* name, float* v) const noexcept; - bool getProperty(const char* name, math::float2* v) const noexcept; - bool getProperty(const char* name, math::float3* v) const noexcept; - bool getProperty(const char* name, math::float4* v) const noexcept; - /** @}*/ - - struct DataSource { - void const* data; - size_t count; - }; - - DataSource getDataSource(const char* name) const noexcept; - - struct FrameHistory { - using duration_ms = float; - duration_ms target{}; - duration_ms targetWithHeadroom{}; - duration_ms frameTime{}; - duration_ms frameTimeDenoised{}; - float scale = 1.0f; - float pid_e = 0.0f; - float pid_i = 0.0f; - float pid_d = 0.0f; - }; -}; - - -} // namespace filament - -#endif /* TNT_FILAMENT_DEBUGREGISTRY_H */ diff --git a/ios/include/filament/filament/FilamentAPI.h b/ios/include/filament/filament/FilamentAPI.h deleted file mode 100644 index 2925aca4..00000000 --- a/ios/include/filament/filament/FilamentAPI.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_FILAMENT_FILAMENTAPI_H -#define TNT_FILAMENT_FILAMENTAPI_H - -#include -#include - -#include - -namespace filament { - -/** - * \privatesection - * FilamentAPI is used to define an API in filament. - * It ensures the class defining the API can't be created, destroyed - * or copied by the caller. - */ -class UTILS_PUBLIC FilamentAPI { -protected: - // disallow creation on the stack - FilamentAPI() noexcept = default; - ~FilamentAPI() = default; - -public: - // disallow copy and assignment - FilamentAPI(FilamentAPI const&) = delete; - FilamentAPI(FilamentAPI&&) = delete; - FilamentAPI& operator=(FilamentAPI const&) = delete; - FilamentAPI& operator=(FilamentAPI&&) = delete; - - // allow placement-new allocation, don't use "noexcept", to avoid compiler null check - static void *operator new (size_t, void* p) { return p; } - - // prevent heap allocation - static void *operator new (size_t) = delete; - static void *operator new[] (size_t) = delete; - static void operator delete (void*) = delete; - static void operator delete[](void*) = delete; -}; - -template -using BuilderBase = utils::PrivateImplementation; - -} // namespace filament - -#endif // TNT_FILAMENT_FILAMENTAPI_H diff --git a/ios/include/filament/filament/Frustum.h b/ios/include/filament/filament/Frustum.h deleted file mode 100644 index bfd01b04..00000000 --- a/ios/include/filament/filament/Frustum.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_FRUSTUM_H -#define TNT_FILAMENT_FRUSTUM_H - -#include - -#include -#include - -#include // Because we define NEAR and FAR in the Plane enum. - -namespace filament { - -class Box; -class Culler; - -/** - * A frustum defined by six planes - */ -class UTILS_PUBLIC Frustum { -public: - enum class Plane : uint8_t { - LEFT, - RIGHT, - BOTTOM, - TOP, - FAR, - NEAR - }; - - Frustum() = default; - Frustum(const Frustum& rhs) = default; - Frustum(Frustum&& rhs) noexcept = default; - Frustum& operator=(const Frustum& rhs) = default; - Frustum& operator=(Frustum&& rhs) noexcept = default; - - /** - * Creates a frustum from a projection matrix in GL convention - * (usually the projection * view matrix) - * @param pv a 4x4 projection matrix in GL convention - */ - explicit Frustum(const math::mat4f& pv); - - /** - * Sets the frustum from the given projection matrix - * @param pv a 4x4 projection matrix - */ - void setProjection(const math::mat4f& pv); - - /** - * Returns the plane equation parameters with normalized normals - * @param plane Identifier of the plane to retrieve the equation of - * @return A plane equation encoded a float4 R such as R.x*x + R.y*y + R.z*z + R.w = 0 - */ - math::float4 getNormalizedPlane(Plane plane) const noexcept; - - /** - * Returns a copy of all six frustum planes in left, right, bottom, top, far, near order - * @param planes six plane equations encoded as in getNormalizedPlane() in - * left, right, bottom, top, far, near order - */ - void getNormalizedPlanes(math::float4 planes[6]) const noexcept; - - /** - * Returns all six frustum planes in left, right, bottom, top, far, near order - * @return six plane equations encoded as in getNormalizedPlane() in - * left, right, bottom, top, far, near order - */ - math::float4 const* getNormalizedPlanes() const noexcept { return mPlanes; } - - /** - * Returns whether a box intersects the frustum (i.e. is visible) - * @param box The box to test against the frustum - * @return true if the box may intersects the frustum, false otherwise. In some situations - * a box that doesn't intersect the frustum might be reported as though it does. However, - * a box that does intersect the frustum is always reported correctly (true). - */ - bool intersects(const Box& box) const noexcept; - - /** - * Returns whether a sphere intersects the frustum (i.e. is visible) - * @param sphere A sphere encoded as a center + radius. - * @return true if the sphere may intersects the frustum, false otherwise. In some situations - * a sphere that doesn't intersect the frustum might be reported as though it does. However, - * a sphere that does intersect the frustum is always reported correctly (true). - */ - bool intersects(const math::float4& sphere) const noexcept; - - /** - * Returns whether the frustum contains a given point. - * @param p the point to test - * @return the maximum signed distance to the frustum. Negative if p is inside. - */ - float contains(math::float3 p) const noexcept; - -private: - friend class Culler; - math::float4 mPlanes[6]; -}; - -} // namespace filament - -#if !defined(NDEBUG) -namespace utils::io { -class ostream; -} // namespace utils::io -utils::io::ostream& operator<<(utils::io::ostream& out, filament::Frustum const& frustum); -#endif - -#endif // TNT_FILAMENT_FRUSTUM_H diff --git a/ios/include/filament/filament/Scene.h b/ios/include/filament/filament/Scene.h deleted file mode 100644 index 3e6a63c4..00000000 --- a/ios/include/filament/filament/Scene.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_SCENE_H -#define TNT_FILAMENT_SCENE_H - -#include - -#include -#include - -namespace utils { - class Entity; -} // namespace utils - -namespace filament { - -class IndirectLight; -class Skybox; - -/** - * A Scene is a flat container of Renderable and Light instances. - * - * A Scene doesn't provide a hierarchy of Renderable objects, i.e.: it's not a scene-graph. - * However, it manages the list of objects to render and the list of lights. Renderable - * and Light objects can be added or removed from a Scene at any time. - * - * A Renderable *must* be added to a Scene in order to be rendered, and the Scene must be - * provided to a View. - * - * - * Creation and Destruction - * ======================== - * - * A Scene is created using Engine.createScene() and destroyed using - * Engine.destroy(const Scene*). - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * #include - * #include - * using namespace filament; - * - * Engine* engine = Engine::create(); - * - * Scene* scene = engine->createScene(); - * engine->destroy(&scene); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * @see View, Renderable, Light - */ -class UTILS_PUBLIC Scene : public FilamentAPI { -public: - - /** - * Sets the Skybox. - * - * The Skybox is drawn last and covers all pixels not touched by geometry. - * - * @param skybox The Skybox to use to fill untouched pixels, or nullptr to unset the Skybox. - */ - void setSkybox(Skybox* skybox) noexcept; - - /** - * Returns the Skybox associated with the Scene. - * - * @return The associated Skybox, or nullptr if there is none. - */ - Skybox* getSkybox() const noexcept; - - /** - * Set the IndirectLight to use when rendering the Scene. - * - * Currently, a Scene may only have a single IndirectLight. This call replaces the current - * IndirectLight. - * - * @param ibl The IndirectLight to use when rendering the Scene or nullptr to unset. - * @see getIndirectLight - */ - void setIndirectLight(IndirectLight* ibl) noexcept; - - /** - * Get the IndirectLight or nullptr if none is set. - * - * @return the the IndirectLight or nullptr if none is set - * @see setIndirectLight - */ - IndirectLight* getIndirectLight() const noexcept; - - /** - * Adds an Entity to the Scene. - * - * @param entity The entity is ignored if it doesn't have a Renderable or Light component. - * - * \attention - * A given Entity object can only be added once to a Scene. - * - */ - void addEntity(utils::Entity entity); - - /** - * Adds a list of entities to the Scene. - * - * @param entities Array containing entities to add to the scene. - * @param count Size of the entity array. - */ - void addEntities(const utils::Entity* entities, size_t count); - - /** - * Removes the Renderable from the Scene. - * - * @param entity The Entity to remove from the Scene. If the specified - * \p entity doesn't exist, this call is ignored. - */ - void remove(utils::Entity entity); - - /** - * Removes a list of entities to the Scene. - * - * This is equivalent to calling remove in a loop. - * If any of the specified entities do not exist in the scene, they are skipped. - * - * @param entities Array containing entities to remove from the scene. - * @param count Size of the entity array. - */ - void removeEntities(const utils::Entity* entities, size_t count); - - /** - * Returns the number of Renderable objects in the Scene. - * - * @return number of Renderable objects in the Scene. - */ - size_t getRenderableCount() const noexcept; - - /** - * Returns the total number of Light objects in the Scene. - * - * @return The total number of Light objects in the Scene. - */ - size_t getLightCount() const noexcept; - - /** - * Returns true if the given entity is in the Scene. - * - * @return Whether the given entity is in the Scene. - */ - bool hasEntity(utils::Entity entity) const noexcept; - - /** - * Invokes user functor on each entity in the scene. - * - * It is not allowed to add or remove an entity from the scene within the functor. - * - * @param functor User provided functor called for each entity in the scene - */ - void forEach(utils::Invocable&& functor) const noexcept; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_SCENE_H diff --git a/ios/include/filament/filament/Stream.h b/ios/include/filament/filament/Stream.h deleted file mode 100644 index 7fccecfe..00000000 --- a/ios/include/filament/filament/Stream.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_FILAMENT_STREAM_H -#define TNT_FILAMENT_STREAM_H - -#include - -#include - -#include -#include - -#include - -namespace filament { - -class FStream; - -class Engine; - -/** - * Stream is used to attach a video stream to a Filament `Texture`. - * - * Note that the `Stream` class is fairly Android centric. It supports two different - * configurations: - * - * - ACQUIRED.....connects to an Android AHardwareBuffer - * - NATIVE.......connects to an Android SurfaceTexture - * - * Before explaining these different configurations, let's review the high-level structure of an AR - * or video application that uses Filament: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * while (true) { - * - * // Misc application work occurs here, such as: - * // - Writing the image data for a video frame into a Stream - * // - Moving the Filament Camera - * - * if (renderer->beginFrame(swapChain)) { - * renderer->render(view); - * renderer->endFrame(); - * } - * } - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * Let's say that the video image data at the time of a particular invocation of `beginFrame` - * becomes visible to users at time A. The 3D scene state (including the camera) at the time of - * that same invocation becomes apparent to users at time B. - * - * - If time A matches time B, we say that the stream is \em{synchronized}. - * - Filament invokes low-level graphics commands on the \em{driver thread}. - * - The thread that calls `beginFrame` is called the \em{main thread}. - * - * For ACQUIRED streams, there is no need to perform the copy because Filament explictly acquires - * the stream, then releases it later via a callback function. This configuration is especially - * useful when the Vulkan backend is enabled. - * - * For NATIVE streams, Filament does not make any synchronization guarantee. However they are simple - * to use and do not incur a copy. These are often appropriate in video applications. - * - * Please see `sample-stream-test` and `sample-hello-camera` for usage examples. - * - * @see backend::StreamType - * @see Texture#setExternalStream - * @see Engine#destroyStream - */ -class UTILS_PUBLIC Stream : public FilamentAPI { - struct BuilderDetails; - -public: - using Callback = backend::StreamCallback; - using StreamType = backend::StreamType; - - /** - * Constructs a Stream object instance. - * - * By default, Stream objects are ACQUIRED and must have external images pushed to them via - *
Stream::setAcquiredImage
. - * - * To create a NATIVE stream, call the
stream
method on the builder. - */ - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - Builder() noexcept; - Builder(Builder const& rhs) noexcept; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder const& rhs) noexcept; - Builder& operator=(Builder&& rhs) noexcept; - - /** - * Creates a NATIVE stream. Native streams can sample data directly from an - * opaque platform object such as a SurfaceTexture on Android. - * - * @param stream An opaque native stream handle. e.g.: on Android this is an - * `android/graphics/SurfaceTexture` JNI jobject. The wrap mode must - * be CLAMP_TO_EDGE. - * - * @return This Builder, for chaining calls. - */ - Builder& stream(void* stream) noexcept; - - /** - * - * @param width initial width of the incoming stream. Whether this value is used is - * stream dependent. On Android, it must be set when using - * Builder::stream(long externalTextureId). - * - * @return This Builder, for chaining calls. - */ - Builder& width(uint32_t width) noexcept; - - /** - * - * @param height initial height of the incoming stream. Whether this value is used is - * stream dependent. On Android, it must be set when using - * Builder::stream(long externalTextureId). - * - * @return This Builder, for chaining calls. - */ - Builder& height(uint32_t height) noexcept; - - /** - * Creates the Stream object and returns a pointer to it. - * - * @param engine Reference to the filament::Engine to associate this Stream with. - * - * @return pointer to the newly created object, or nullptr if the stream couldn't be created. - */ - Stream* build(Engine& engine); - - private: - friend class FStream; - }; - - /** - * Indicates whether this stream is a NATIVE stream or ACQUIRED stream. - */ - StreamType getStreamType() const noexcept; - - /** - * Updates an ACQUIRED stream with an image that is guaranteed to be used in the next frame. - * - * This method tells Filament to immediately "acquire" the image and trigger a callback - * when it is done with it. This should be called by the user outside of beginFrame / endFrame, - * and should be called only once per frame. If the user pushes images to the same stream - * multiple times in a single frame, only the final image is honored, but all callbacks are - * invoked. - * - * This method should be called on the same thread that calls Renderer::beginFrame, which is - * also where the callback is invoked. This method can only be used for streams that were - * constructed without calling the `stream` method on the builder. - * - * @see Stream for more information about NATIVE and ACQUIRED configurations. - * - * @param image Pointer to AHardwareBuffer, casted to void* since this is a public header. - * @param callback This is triggered by Filament when it wishes to release the image. - * It callback tales two arguments: the AHardwareBuffer and the userdata. - * @param userdata Optional closure data. Filament will pass this into the callback when it - * releases the image. - */ - void setAcquiredImage(void* image, Callback callback, void* userdata) noexcept; - - /** - * @see setAcquiredImage(void*, Callback, void*) - * - * @param image Pointer to AHardwareBuffer, casted to void* since this is a public header. - * @param handler Handler to dispatch the AcquiredImage or nullptr for the default handler. - * @param callback This is triggered by Filament when it wishes to release the image. - * It callback tales two arguments: the AHardwareBuffer and the userdata. - * @param userdata Optional closure data. Filament will pass this into the callback when it - * releases the image. - */ - void setAcquiredImage(void* image, backend::CallbackHandler* handler, Callback callback, void* userdata) noexcept; - - /** - * Updates the size of the incoming stream. Whether this value is used is - * stream dependent. On Android, it must be set when using - * Builder::stream(long externalTextureId). - * - * @param width new width of the incoming stream - * @param height new height of the incoming stream - */ - void setDimensions(uint32_t width, uint32_t height) noexcept; - - /** - * Returns the presentation time of the currently displayed frame in nanosecond. - * - * This value can change at any time. - * - * @return timestamp in nanosecond. - */ - int64_t getTimestamp() const noexcept; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_STREAM_H diff --git a/ios/include/filament/filament/Texture.h b/ios/include/filament/filament/Texture.h deleted file mode 100644 index c005c2b1..00000000 --- a/ios/include/filament/filament/Texture.h +++ /dev/null @@ -1,548 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_TEXTURE_H -#define TNT_FILAMENT_TEXTURE_H - -#include -#include -#include - -#include - -#include - -namespace filament { - -class FTexture; - -class Engine; -class Stream; - -/** - * Texture - * - * The Texture class supports: - * - 2D textures - * - 3D textures - * - Cube maps - * - mip mapping - * - * - * Creation and destruction - * ======================== - * - * A Texture object is created using the Texture::Builder and destroyed by calling - * Engine::destroy(const Texture*). - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp} - * filament::Engine* engine = filament::Engine::create(); - * - * filament::Texture* texture = filament::Texture::Builder() - * .width(64) - * .height(64) - * .build(*engine); - * - * engine->destroy(texture); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - */ -class UTILS_PUBLIC Texture : public FilamentAPI { - struct BuilderDetails; - -public: - static constexpr const size_t BASE_LEVEL = 0; - - //! Face offsets for all faces of a cubemap - struct FaceOffsets; - - using PixelBufferDescriptor = backend::PixelBufferDescriptor; //!< Geometry of a pixel buffer - using Sampler = backend::SamplerType; //!< Type of sampler - using InternalFormat = backend::TextureFormat; //!< Internal texel format - using CubemapFace = backend::TextureCubemapFace; //!< Cube map faces - using Format = backend::PixelDataFormat; //!< Pixel color format - using Type = backend::PixelDataType; //!< Pixel data format - using CompressedType = backend::CompressedPixelDataType; //!< Compressed pixel data format - using Usage = backend::TextureUsage; //!< Usage affects texel layout - using Swizzle = backend::TextureSwizzle; //!< Texture swizzle - - /** @return whether a backend supports a particular format. */ - static bool isTextureFormatSupported(Engine& engine, InternalFormat format) noexcept; - - /** @return whether a backend supports texture swizzling. */ - static bool isTextureSwizzleSupported(Engine& engine) noexcept; - - static size_t computeTextureDataSize(Texture::Format format, Texture::Type type, - size_t stride, size_t height, size_t alignment) noexcept; - - - /** - * Options for environment prefiltering into reflection map - * - * @see generatePrefilterMipmap() - */ - struct PrefilterOptions { - uint16_t sampleCount = 8; //!< sample count used for filtering - bool mirror = true; //!< whether the environment must be mirrored - private: - UTILS_UNUSED uintptr_t reserved[3] = {}; - }; - - - //! Use Builder to construct a Texture object instance - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - Builder() noexcept; - Builder(Builder const& rhs) noexcept; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder const& rhs) noexcept; - Builder& operator=(Builder&& rhs) noexcept; - - /** - * Specifies the width in texels of the texture. Doesn't need to be a power-of-two. - * @param width Width of the texture in texels (default: 1). - * @return This Builder, for chaining calls. - */ - Builder& width(uint32_t width) noexcept; - - /** - * Specifies the height in texels of the texture. Doesn't need to be a power-of-two. - * @param height Height of the texture in texels (default: 1). - * @return This Builder, for chaining calls. - */ - Builder& height(uint32_t height) noexcept; - - /** - * Specifies the depth in texels of the texture. Doesn't need to be a power-of-two. - * The depth controls the number of layers in a 2D array texture. Values greater than 1 - * effectively create a 3D texture. - * @param depth Depth of the texture in texels (default: 1). - * @return This Builder, for chaining calls. - * @attention This Texture instance must use Sampler::SAMPLER_3D or - * Sampler::SAMPLER_2D_ARRAY or it has no effect. - */ - Builder& depth(uint32_t depth) noexcept; - - /** - * Specifies the numbers of mip map levels. - * This creates a mip-map pyramid. The maximum number of levels a texture can have is - * such that max(width, height, level) / 2^MAX_LEVELS = 1 - * @param levels Number of mipmap levels for this texture. - * @return This Builder, for chaining calls. - */ - Builder& levels(uint8_t levels) noexcept; - - /** - * Specifies the type of sampler to use. - * @param target Sampler type - * @return This Builder, for chaining calls. - * @see Sampler - */ - Builder& sampler(Sampler target) noexcept; - - /** - * Specifies the *internal* format of this texture. - * - * The internal format specifies how texels are stored (which may be different from how - * they're specified in setImage()). InternalFormat specifies both the color components - * and the data type used. - * - * @param format Format of the texture's texel. - * @return This Builder, for chaining calls. - * @see InternalFormat, setImage - */ - Builder& format(InternalFormat format) noexcept; - - /** - * Specifies if the texture will be used as a render target attachment. - * - * If the texture is potentially rendered into, it may require a different memory layout, - * which needs to be known during construction. - * - * @param usage Defaults to Texture::Usage::DEFAULT; c.f. Texture::Usage::COLOR_ATTACHMENT. - * @return This Builder, for chaining calls. - */ - Builder& usage(Usage usage) noexcept; - - /** - * Specifies how a texture's channels map to color components - * - * Texture Swizzle is only supported if isTextureSwizzleSupported() returns true. - * - * @param r texture channel for red component - * @param g texture channel for green component - * @param b texture channel for blue component - * @param a texture channel for alpha component - * @return This Builder, for chaining calls. - * @see Texture::isTextureSwizzleSupported() - */ - Builder& swizzle(Swizzle r, Swizzle g, Swizzle b, Swizzle a) noexcept; - - /** - * Creates the Texture object and returns a pointer to it. - * - * @param engine Reference to the filament::Engine to associate this Texture with. - * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. - * - * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of - * memory or other resources. - * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. - */ - Texture* build(Engine& engine); - - /* no user serviceable parts below */ - - /** - * Specify a native texture to import as a Filament texture. - * - * The texture id is backend-specific: - * - OpenGL: GLuint texture ID - * - Metal: id - * - * With Metal, the id object should be cast to an intptr_t using - * CFBridgingRetain to transfer ownership to Filament. Filament will release ownership of - * the texture object when the Filament texture is destroyed. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp} - * id metalTexture = ... - * filamentTexture->import((intptr_t) CFBridgingRetain(metalTexture)); - * // free to release metalTexture - * - * // after using texture: - * engine->destroy(filamentTexture); // metalTexture is released - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * @warning This method should be used as a last resort. This API is subject to change or - * removal. - * - * @param id a backend specific texture identifier - * - * @return This Builder, for chaining calls. - */ - Builder& import(intptr_t id) noexcept; - - private: - friend class FTexture; - }; - - /** - * Returns the width of a 2D or 3D texture level - * @param level texture level. - * @return Width in texel of the specified \p level, clamped to 1. - * @attention If this texture is using Sampler::SAMPLER_EXTERNAL, the dimension - * of the texture are unknown and this method always returns whatever was set on the Builder. - */ - size_t getWidth(size_t level = BASE_LEVEL) const noexcept; - - /** - * Returns the height of a 2D or 3D texture level - * @param level texture level. - * @return Height in texel of the specified \p level, clamped to 1. - * @attention If this texture is using Sampler::SAMPLER_EXTERNAL, the dimension - * of the texture are unknown and this method always returns whatever was set on the Builder. - */ - size_t getHeight(size_t level = BASE_LEVEL) const noexcept; - - /** - * Returns the depth of a 3D texture level - * @param level texture level. - * @return Depth in texel of the specified \p level, clamped to 1. - * @attention If this texture is using Sampler::SAMPLER_EXTERNAL, the dimension - * of the texture are unknown and this method always returns whatever was set on the Builder. - */ - size_t getDepth(size_t level = BASE_LEVEL) const noexcept; - - /** - * Returns the maximum number of levels this texture can have. - * @return maximum number of levels this texture can have. - * @attention If this texture is using Sampler::SAMPLER_EXTERNAL, the dimension - * of the texture are unknown and this method always returns whatever was set on the Builder. - */ - size_t getLevels() const noexcept; - - /** - * Return this texture Sampler as set by Builder::sampler(). - * @return this texture Sampler as set by Builder::sampler() - */ - Sampler getTarget() const noexcept; - - /** - * Return this texture InternalFormat as set by Builder::format(). - * @return this texture InternalFormat as set by Builder::format(). - */ - InternalFormat getFormat() const noexcept; - - /** - * Updates a sub-image of a 3D texture or 2D texture array for a level. Cubemaps are treated - * like a 2D array of six layers. - * - * @param engine Engine this texture is associated to. - * @param level Level to set the image for. - * @param xoffset Left offset of the sub-region to update. - * @param yoffset Bottom offset of the sub-region to update. - * @param zoffset Depth offset of the sub-region to update. - * @param width Width of the sub-region to update. - * @param height Height of the sub-region to update. - * @param depth Depth of the sub-region to update. - * @param buffer Client-side buffer containing the image to set. - * - * @attention \p engine must be the instance passed to Builder::build() - * @attention \p level must be less than getLevels(). - * @attention \p buffer's Texture::Format must match that of getFormat(). - * @attention This Texture instance must use Sampler::SAMPLER_3D, Sampler::SAMPLER_2D_ARRAY - * or Sampler::SAMPLER_CUBEMAP. - * - * @see Builder::sampler() - */ - void setImage(Engine& engine, size_t level, - uint32_t xoffset, uint32_t yoffset, uint32_t zoffset, - uint32_t width, uint32_t height, uint32_t depth, - PixelBufferDescriptor&& buffer) const; - - /** - * inline helper to update a 2D texture - * - * @see setImage(Engine& engine, size_t level, - * uint32_t xoffset, uint32_t yoffset, uint32_t zoffset, - * uint32_t width, uint32_t height, uint32_t depth, - * PixelBufferDescriptor&& buffer) - */ - inline void setImage(Engine& engine, size_t level, PixelBufferDescriptor&& buffer) const { - setImage(engine, level, 0, 0, 0, - uint32_t(getWidth(level)), uint32_t(getHeight(level)), 1, std::move(buffer)); - } - - /** - * inline helper to update a 2D texture - * - * @see setImage(Engine& engine, size_t level, - * uint32_t xoffset, uint32_t yoffset, uint32_t zoffset, - * uint32_t width, uint32_t height, uint32_t depth, - * PixelBufferDescriptor&& buffer) - */ - inline void setImage(Engine& engine, size_t level, - uint32_t xoffset, uint32_t yoffset, uint32_t width, uint32_t height, - PixelBufferDescriptor&& buffer) const { - setImage(engine, level, xoffset, yoffset, 0, width, height, 1, std::move(buffer)); - } - - /** - * Specify all six images of a cube map level. - * - * This method follows exactly the OpenGL conventions. - * - * @param engine Engine this texture is associated to. - * @param level Level to set the image for. - * @param buffer Client-side buffer containing the images to set. - * @param faceOffsets Offsets in bytes into \p buffer for all six images. The offsets - * are specified in the following order: +x, -x, +y, -y, +z, -z - * - * @attention \p engine must be the instance passed to Builder::build() - * @attention \p level must be less than getLevels(). - * @attention \p buffer's Texture::Format must match that of getFormat(). - * @attention This Texture instance must use Sampler::SAMPLER_CUBEMAP or it has no effect - * - * @see Texture::CubemapFace, Builder::sampler() - * - * @deprecated Instead, use setImage(Engine& engine, size_t level, - * uint32_t xoffset, uint32_t yoffset, uint32_t zoffset, - * uint32_t width, uint32_t height, uint32_t depth, - * PixelBufferDescriptor&& buffer) - */ - UTILS_DEPRECATED - void setImage(Engine& engine, size_t level, - PixelBufferDescriptor&& buffer, const FaceOffsets& faceOffsets) const; - - - /** - * Specify the external image to associate with this Texture. Typically the external - * image is OS specific, and can be a video or camera frame. - * There are many restrictions when using an external image as a texture, such as: - * - only the level of detail (lod) 0 can be specified - * - only nearest or linear filtering is supported - * - the size and format of the texture is defined by the external image - * - only the CLAMP_TO_EDGE wrap mode is supported - * - * @param engine Engine this texture is associated to. - * @param image An opaque handle to a platform specific image. Supported types are - * eglImageOES on Android and CVPixelBufferRef on iOS. - * - * On iOS the following pixel formats are supported: - * - kCVPixelFormatType_32BGRA - * - kCVPixelFormatType_420YpCbCr8BiPlanarFullRange - * - * @attention \p engine must be the instance passed to Builder::build() - * @attention This Texture instance must use Sampler::SAMPLER_EXTERNAL or it has no effect - * - * @see Builder::sampler() - * - */ - void setExternalImage(Engine& engine, void* image) noexcept; - - /** - * Specify the external image and plane to associate with this Texture. Typically the external - * image is OS specific, and can be a video or camera frame. When using this method, the - * external image must be a planar type (such as a YUV camera frame). The plane parameter - * selects which image plane is bound to this texture. - * - * A single external image can be bound to different Filament textures, with each texture - * associated with a separate plane: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * textureA->setExternalImage(engine, image, 0); - * textureB->setExternalImage(engine, image, 1); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * There are many restrictions when using an external image as a texture, such as: - * - only the level of detail (lod) 0 can be specified - * - only nearest or linear filtering is supported - * - the size and format of the texture is defined by the external image - * - only the CLAMP_TO_EDGE wrap mode is supported - * - * @param engine Engine this texture is associated to. - * @param image An opaque handle to a platform specific image. Supported types are - * eglImageOES on Android and CVPixelBufferRef on iOS. - * @param plane The plane index of the external image to associate with this texture. - * - * This method is only meaningful on iOS with - * kCVPixelFormatType_420YpCbCr8BiPlanarFullRange images. On platforms - * other than iOS, this method is a no-op. - */ - void setExternalImage(Engine& engine, void* image, size_t plane) noexcept; - - /** - * Specify the external stream to associate with this Texture. Typically the external - * stream is OS specific, and can be a video or camera stream. - * There are many restrictions when using an external stream as a texture, such as: - * - only the level of detail (lod) 0 can be specified - * - only nearest or linear filtering is supported - * - the size and format of the texture is defined by the external stream - * - * @param engine Engine this texture is associated to. - * @param stream A Stream object - * - * @attention \p engine must be the instance passed to Builder::build() - * @attention This Texture instance must use Sampler::SAMPLER_EXTERNAL or it has no effect - * - * @see Builder::sampler(), Stream - * - */ - void setExternalStream(Engine& engine, Stream* stream) noexcept; - - /** - * Generates all the mipmap levels automatically. This requires the texture to have a - * color-renderable format. - * - * @param engine Engine this texture is associated to. - * - * @attention \p engine must be the instance passed to Builder::build() - * @attention This Texture instance must NOT use Sampler::SAMPLER_CUBEMAP or it has no effect - */ - void generateMipmaps(Engine& engine) const noexcept; - - /** - * Creates a reflection map from an environment map. - * - * This is a utility function that replaces calls to Texture::setImage(). - * The provided environment map is processed and all mipmap levels are populated. The - * processing is similar to the offline tool `cmgen` as a lower quality setting. - * - * This function is intended to be used when the environment cannot be processed offline, - * for instance if it's generated at runtime. - * - * The source data must obey to some constraints: - * - the data type must be PixelDataFormat::RGB - * - the data format must be one of - * - PixelDataType::FLOAT - * - PixelDataType::HALF - * - * The current texture must be a cubemap - * - * The reflections cubemap's internal format cannot be a compressed format. - * - * The reflections cubemap's dimension must be a power-of-two. - * - * @warning This operation is computationally intensive, especially with large environments and - * is currently synchronous. Expect about 1ms for a 16x16 cubemap. - * - * @param engine Reference to the filament::Engine to associate this IndirectLight with. - * @param buffer Client-side buffer containing the images to set. - * @param faceOffsets Offsets in bytes into \p buffer for all six images. The offsets - * are specified in the following order: +x, -x, +y, -y, +z, -z - * @param options Optional parameter to controlling user-specified quality and options. - * - * @exception utils::PreConditionPanic if the source data constraints are not respected. - * - */ - void generatePrefilterMipmap(Engine& engine, - PixelBufferDescriptor&& buffer, const FaceOffsets& faceOffsets, - PrefilterOptions const* options = nullptr); - - - /** @deprecated */ - struct FaceOffsets { - using size_type = size_t; - union { - struct { - size_type px; //!< +x face offset in bytes - size_type nx; //!< -x face offset in bytes - size_type py; //!< +y face offset in bytes - size_type ny; //!< -y face offset in bytes - size_type pz; //!< +z face offset in bytes - size_type nz; //!< -z face offset in bytes - }; - size_type offsets[6]; - }; - size_type operator[](size_t n) const noexcept { return offsets[n]; } - size_type& operator[](size_t n) { return offsets[n]; } - FaceOffsets() noexcept = default; - explicit FaceOffsets(size_type faceSize) noexcept { - px = faceSize * 0; - nx = faceSize * 1; - py = faceSize * 2; - ny = faceSize * 3; - pz = faceSize * 4; - nz = faceSize * 5; - } - FaceOffsets(const FaceOffsets& rhs) noexcept { - px = rhs.px; - nx = rhs.nx; - py = rhs.py; - ny = rhs.ny; - pz = rhs.pz; - nz = rhs.nz; - } - FaceOffsets& operator=(const FaceOffsets& rhs) noexcept { - px = rhs.px; - nx = rhs.nx; - py = rhs.py; - ny = rhs.ny; - pz = rhs.pz; - nz = rhs.nz; - return *this; - } - }; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_TEXTURE_H diff --git a/ios/include/filament/filament/ToneMapper.h b/ios/include/filament/filament/ToneMapper.h deleted file mode 100644 index 8d19c597..00000000 --- a/ios/include/filament/filament/ToneMapper.h +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -#ifndef TNT_FILAMENT_TONEMAPPER_H -#define TNT_FILAMENT_TONEMAPPER_H - -#include - -#include - -namespace filament { - -/** - * Interface for tone mapping operators. A tone mapping operator, or tone mapper, - * is responsible for compressing the dynamic range of the rendered scene to a - * dynamic range suitable for display. - * - * In Filament, tone mapping is a color grading step. ToneMapper instances are - * created and passed to the ColorGrading::Builder to produce a 3D LUT that will - * be used during post-processing to prepare the final color buffer for display. - * - * Filament provides several default tone mapping operators that fall into three - * categories: - * - * - Configurable tone mapping operators - * - GenericToneMapper - * - Fixed-aesthetic tone mapping operators - * - ACESToneMapper - * - ACESLegacyToneMapper - * - FilmicToneMapper - * - Debug/validation tone mapping operators - * - LinearToneMapper - * - DisplayRangeToneMapper - * - * You can create custom tone mapping operators by subclassing ToneMapper. - */ -struct UTILS_PUBLIC ToneMapper { - ToneMapper() noexcept; - virtual ~ToneMapper() noexcept; - - /** - * Maps an open domain (or "scene referred" values) color value to display - * domain (or "display referred") color value. Both the input and output - * color values are defined in the Rec.2020 color space, with no transfer - * function applied ("linear Rec.2020"). - * - * @param c Input color to tone map, in the Rec.2020 color space with no - * transfer function applied ("linear") - * - * @return A tone mapped color in the Rec.2020 color space, with no transfer - * function applied ("linear") - */ - virtual math::float3 operator()(math::float3 c) const noexcept = 0; -}; - -/** - * Linear tone mapping operator that returns the input color but clamped to - * the 0..1 range. This operator is mostly useful for debugging. - */ -struct UTILS_PUBLIC LinearToneMapper final : public ToneMapper { - LinearToneMapper() noexcept; - ~LinearToneMapper() noexcept final; - - math::float3 operator()(math::float3 c) const noexcept override; -}; - -/** - * ACES tone mapping operator. This operator is an implementation of the - * ACES Reference Rendering Transform (RRT) combined with the Output Device - * Transform (ODT) for sRGB monitors (dim surround, 100 nits). - */ -struct UTILS_PUBLIC ACESToneMapper final : public ToneMapper { - ACESToneMapper() noexcept; - ~ACESToneMapper() noexcept final; - - math::float3 operator()(math::float3 c) const noexcept override; -}; - -/** - * ACES tone mapping operator, modified to match the perceived brightness - * of FilmicToneMapper. This operator is the same as ACESToneMapper but - * applies a brightness multiplier of ~1.6 to the input color value to - * target brighter viewing environments. - */ -struct UTILS_PUBLIC ACESLegacyToneMapper final : public ToneMapper { - ACESLegacyToneMapper() noexcept; - ~ACESLegacyToneMapper() noexcept final; - - math::float3 operator()(math::float3 c) const noexcept override; -}; - -/** - * "Filmic" tone mapping operator. This tone mapper was designed to - * approximate the aesthetics of the ACES RRT + ODT for Rec.709 - * and historically Filament's default tone mapping operator. It exists - * only for backward compatibility purposes and is not otherwise recommended. - */ -struct UTILS_PUBLIC FilmicToneMapper final : public ToneMapper { - FilmicToneMapper() noexcept; - ~FilmicToneMapper() noexcept final; - - math::float3 operator()(math::float3 x) const noexcept override; -}; - -/** - * Generic tone mapping operator that gives control over the tone mapping - * curve. This operator can be used to control the aesthetics of the final - * image. This operator also allows to control the dynamic range of the - * scene referred values. - * - * The tone mapping curve is defined by 5 parameters: - * - contrast: controls the contrast of the curve - * - midGrayIn: sets the input middle gray - * - midGrayOut: sets the output middle gray - * - hdrMax: defines the maximum input value that will be mapped to - * output white - */ -struct UTILS_PUBLIC GenericToneMapper final : public ToneMapper { - /** - * Builds a new generic tone mapper. The default values of the - * constructor parameters approximate an ACES tone mapping curve - * and the maximum input value is set to 10.0. - * - * @param contrast controls the contrast of the curve, must be > 0.0, values - * in the range 0.5..2.0 are recommended. - * @param midGrayIn sets the input middle gray, between 0.0 and 1.0. - * @param midGrayOut sets the output middle gray, between 0.0 and 1.0. - * @param hdrMax defines the maximum input value that will be mapped to - * output white. Must be >= 1.0. - */ - explicit GenericToneMapper( - float contrast = 1.55f, - float midGrayIn = 0.18f, - float midGrayOut = 0.215f, - float hdrMax = 10.0f - ) noexcept; - ~GenericToneMapper() noexcept final; - - GenericToneMapper(GenericToneMapper const&) = delete; - GenericToneMapper& operator=(GenericToneMapper const&) = delete; - GenericToneMapper(GenericToneMapper&& rhs) noexcept; - GenericToneMapper& operator=(GenericToneMapper&& rhs) noexcept; - - math::float3 operator()(math::float3 x) const noexcept override; - - /** Returns the contrast of the curve as a strictly positive value. */ - float getContrast() const noexcept; - - /** Returns how fast scene referred values map to output white as a value between 0.0 and 1.0. */ - float getShoulder() const noexcept; - - /** Returns the middle gray point for input values as a value between 0.0 and 1.0. */ - float getMidGrayIn() const noexcept; - - /** Returns the middle gray point for output values as a value between 0.0 and 1.0. */ - float getMidGrayOut() const noexcept; - - /** Returns the maximum input value that will map to output white, as a value >= 1.0. */ - float getHdrMax() const noexcept; - - /** Sets the contrast of the curve, must be > 0.0, values in the range 0.5..2.0 are recommended. */ - void setContrast(float contrast) noexcept; - - /** Sets the input middle gray, between 0.0 and 1.0. */ - void setMidGrayIn(float midGrayIn) noexcept; - - /** Sets the output middle gray, between 0.0 and 1.0. */ - void setMidGrayOut(float midGrayOut) noexcept; - - /** Defines the maximum input value that will be mapped to output white. Must be >= 1.0. */ - void setHdrMax(float hdrMax) noexcept; - -private: - struct Options; - Options* mOptions; -}; - -/** - * A tone mapper that converts the input HDR RGB color into one of 16 debug colors - * that represent the pixel's exposure. When the output is cyan, the input color - * represents middle gray (18% exposure). Every exposure stop above or below middle - * gray causes a color shift. - * - * The relationship between exposures and colors is: - * - * - -5EV black - * - -4EV darkest blue - * - -3EV darker blue - * - -2EV dark blue - * - -1EV blue - * - OEV cyan - * - +1EV dark green - * - +2EV green - * - +3EV yellow - * - +4EV yellow-orange - * - +5EV orange - * - +6EV bright red - * - +7EV red - * - +8EV magenta - * - +9EV purple - * - +10EV white - * - * This tone mapper is useful to validate and tweak scene lighting. - */ -struct UTILS_PUBLIC DisplayRangeToneMapper final : public ToneMapper { - DisplayRangeToneMapper() noexcept; - ~DisplayRangeToneMapper() noexcept override; - - math::float3 operator()(math::float3 c) const noexcept override; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_TONEMAPPER_H diff --git a/ios/include/filament/filament/VertexBuffer.h b/ios/include/filament/filament/VertexBuffer.h deleted file mode 100644 index 9557a541..00000000 --- a/ios/include/filament/filament/VertexBuffer.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_VERTEXBUFFER_H -#define TNT_FILAMENT_VERTEXBUFFER_H - -#include -#include - -#include -#include - -#include - -namespace filament { - -class FVertexBuffer; - -class BufferObject; -class Engine; - -/** - * Holds a set of buffers that define the geometry of a Renderable. - * - * The geometry of the Renderable itself is defined by a set of vertex attributes such as - * position, color, normals, tangents, etc... - * - * There is no need to have a 1-to-1 mapping between attributes and buffer. A buffer can hold the - * data of several attributes -- attributes are then referred as being "interleaved". - * - * The buffers themselves are GPU resources, therefore mutating their data can be relatively slow. - * For this reason, it is best to separate the constant data from the dynamic data into multiple - * buffers. - * - * It is possible, and even encouraged, to use a single vertex buffer for several Renderables. - * - * @see IndexBuffer, RenderableManager - */ -class UTILS_PUBLIC VertexBuffer : public FilamentAPI { - struct BuilderDetails; - -public: - using AttributeType = backend::ElementType; - using BufferDescriptor = backend::BufferDescriptor; - - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - Builder() noexcept; - Builder(Builder const& rhs) noexcept; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder const& rhs) noexcept; - Builder& operator=(Builder&& rhs) noexcept; - - /** - * Defines how many buffers will be created in this vertex buffer set. These buffers are - * later referenced by index from 0 to \p bufferCount - 1. - * - * This call is mandatory. The default is 0. - * - * @param bufferCount Number of buffers in this vertex buffer set. The maximum value is 8. - * @return A reference to this Builder for chaining calls. - */ - Builder& bufferCount(uint8_t bufferCount) noexcept; - - /** - * Size of each buffer in the set in vertex. - * - * @param vertexCount Number of vertices in each buffer in this set. - * @return A reference to this Builder for chaining calls. - */ - Builder& vertexCount(uint32_t vertexCount) noexcept; - - /** - * Allows buffers to be swapped out and shared using BufferObject. - * - * If buffer objects mode is enabled, clients must call setBufferObjectAt rather than - * setBufferAt. This allows sharing of data between VertexBuffer objects, but it may - * slightly increase the memory footprint of Filament's internal bookkeeping. - * - * @param enabled If true, enables buffer object mode. False by default. - */ - Builder& enableBufferObjects(bool enabled = true) noexcept; - - /** - * Sets up an attribute for this vertex buffer set. - * - * Using \p byteOffset and \p byteStride, attributes can be interleaved in the same buffer. - * - * @param attribute The attribute to set up. - * @param bufferIndex The index of the buffer containing the data for this attribute. Must - * be between 0 and bufferCount() - 1. - * @param attributeType The type of the attribute data (e.g. byte, float3, etc...) - * @param byteOffset Offset in *bytes* into the buffer \p bufferIndex - * @param byteStride Stride in *bytes* to the next element of this attribute. When set to - * zero the attribute size, as defined by \p attributeType is used. - * - * @return A reference to this Builder for chaining calls. - * - * @warning VertexAttribute::TANGENTS must be specified as a quaternion and is how normals - * are specified. - * - * @warning Not all backends support 3-component attributes that are not floats. For help - * with conversion, see geometry::Transcoder. - * - * @see VertexAttribute - * - * This is a no-op if the \p attribute is an invalid enum. - * This is a no-op if the \p bufferIndex is out of bounds. - * - */ - Builder& attribute(VertexAttribute attribute, uint8_t bufferIndex, - AttributeType attributeType, - uint32_t byteOffset = 0, uint8_t byteStride = 0) noexcept; - - /** - * Sets whether a given attribute should be normalized. By default attributes are not - * normalized. A normalized attribute is mapped between 0 and 1 in the shader. This applies - * only to integer types. - * - * @param attribute Enum of the attribute to set the normalization flag to. - * @param normalize true to automatically normalize the given attribute. - * @return A reference to this Builder for chaining calls. - * - * This is a no-op if the \p attribute is an invalid enum. - */ - Builder& normalized(VertexAttribute attribute, bool normalize = true) noexcept; - - /** - * Creates the VertexBuffer object and returns a pointer to it. - * - * @param engine Reference to the filament::Engine to associate this VertexBuffer with. - * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. - * - * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of - * memory or other resources. - * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. - */ - VertexBuffer* build(Engine& engine); - - private: - friend class FVertexBuffer; - }; - - /** - * Returns the vertex count. - * @return Number of vertices in this vertex buffer set. - */ - size_t getVertexCount() const noexcept; - - /** - * Asynchronously copy-initializes the specified buffer from the given buffer data. - * - * Do not use this if you called enableBufferObjects() on the Builder. - * - * @param engine Reference to the filament::Engine to associate this VertexBuffer with. - * @param bufferIndex Index of the buffer to initialize. Must be between 0 - * and Builder::bufferCount() - 1. - * @param buffer A BufferDescriptor representing the data used to initialize the buffer at - * index \p bufferIndex. BufferDescriptor points to raw, untyped data that will - * be copied as-is into the buffer. - * @param byteOffset Offset in *bytes* into the buffer at index \p bufferIndex of this vertex - * buffer set. - */ - void setBufferAt(Engine& engine, uint8_t bufferIndex, BufferDescriptor&& buffer, - uint32_t byteOffset = 0); - - /** - * Swaps in the given buffer object. - * - * To use this, you must first call enableBufferObjects() on the Builder. - * - * @param engine Reference to the filament::Engine to associate this VertexBuffer with. - * @param bufferIndex Index of the buffer to initialize. Must be between 0 - * and Builder::bufferCount() - 1. - * @param bufferObject The handle to the GPU data that will be used in this buffer slot. - */ - void setBufferObjectAt(Engine& engine, uint8_t bufferIndex, BufferObject const* bufferObject); -}; - -} // namespace filament - -#endif // TNT_FILAMENT_VERTEXBUFFER_H diff --git a/ios/include/filament/filament/Viewport.h b/ios/include/filament/filament/Viewport.h deleted file mode 100644 index a641e7ab..00000000 --- a/ios/include/filament/filament/Viewport.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_VIEWPORT_H -#define TNT_FILAMENT_VIEWPORT_H - -#include - -#include - -#include -#include - -#include -#include - -namespace filament { - -/** - * Viewport describes a view port in pixel coordinates - * - * A view port is represented by its left-bottom coordinate, width and height in pixels. - */ -class UTILS_PUBLIC Viewport : public backend::Viewport { -public: - /** - * Creates a Viewport of zero width and height at the origin. - */ - Viewport() noexcept : backend::Viewport{} {} - - /** - * Creates a Viewport from its left-bottom coordinates, width and height in pixels - * - * @param left left coordinate in pixel - * @param bottom bottom coordinate in pixel - * @param width width in pixel - * @param height height in pixel - */ - Viewport(int32_t left, int32_t bottom, uint32_t width, uint32_t height) noexcept - : backend::Viewport{ left, bottom, width, height } { - } - - /** - * Returns whether the area of the view port is null. - * - * @return true if either width or height is 0 pixel. - */ - bool empty() const noexcept { return !width || !height; } - -private: - /** - * Compares two Viewports for equality - * @param lhs reference to the left hand side Viewport - * @param rhs reference to the right hand side Viewport - * @return true if \p rhs and \p lhs are identical. - */ - friend bool operator==(Viewport const& lhs, Viewport const& rhs) noexcept { - return (&rhs == &lhs) || - (rhs.left == lhs.left && rhs.bottom == lhs.bottom && - rhs.width == lhs.width && rhs.height == lhs.height); - } - - /** - * Compares two Viewports for inequality - * @param lhs reference to the left hand side Viewport - * @param rhs reference to the right hand side Viewport - * @return true if \p rhs and \p lhs are different. - */ - friend bool operator!=(Viewport const& lhs, Viewport const& rhs) noexcept { - return !(rhs == lhs); - } -}; - -} // namespace filament - -#endif // TNT_FILAMENT_VIEWPORT_H diff --git a/ios/include/filament/geometry/TangentSpaceMesh.h b/ios/include/filament/geometry/TangentSpaceMesh.h deleted file mode 100644 index 616245a5..00000000 --- a/ios/include/filament/geometry/TangentSpaceMesh.h +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -#ifndef TNT_GEOMETRY_TANGENTSPACEMESH_H -#define TNT_GEOMETRY_TANGENTSPACEMESH_H - -#include -#include -#include - -namespace filament { -namespace geometry { - -struct TangentSpaceMeshInput; -struct TangentSpaceMeshOutput; - - /** - * This class builds Filament-style TANGENTS buffers given an input mesh. - * - * This class enables the client to chose between several algorithms. The client can retrieve the - * result through the `get` methods on the class. If the chosen algorithm did not remesh the input, - * the client is advised to just use the data they provided instead of querying. For example, if - * the chosen method is Algorithm::FRISVAD, then the client should not need to call getPositions(). - * We will simply copy from the input `positions` in that case. - * - * If the client calls getPositions() and positions were not provided as input, we will throw - * and exception. Similar behavior will apply to UVs. - * - * This class supersedes the implementation in SurfaceOrientation.h - */ -class TangentSpaceMesh { -public: - enum class Algorithm : uint8_t { - /** - * default - * - * Tries to select the best possible algorithm given the input. The corresponding algorithms - * are detailed in the corresponding enums. - *
-         *   INPUT                                  ALGORITHM
-         *   -----------------------------------------------------------
-         *   normals                                FRISVAD
-         *   positions + indices                    FLAT_SHADING
-         *   normals + uvs + positions + indices    MIKKTSPACE
-         * 
- */ - DEFAULT = 0, - - /** - * mikktspace - * - * **Requires**: `normals + uvs + positions + indices`
- * **Reference**: - * - Mikkelsen, M., 2008. Simulation of wrinkled surfaces revisited. - * - https://github.com/mmikk/MikkTSpace - * - https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes-overview - * - * **Note**: Will remesh - */ - MIKKTSPACE = 1, - - /** - * Lengyel's method - * - * **Requires**: `normals + uvs + positions + indices`
- * **Reference**: Lengyel, E., 2019. Foundations of Game Engine Development: Rendering. Terathon - * Software LLC.. (Chapter 7) - */ - LENGYEL = 2, - - /** - * Hughes-Moller method - * - * **Requires**: `normals`
- * **Reference**: - * - Hughes, J.F. and Moller, T., 1999. Building an orthonormal basis from a unit - * vector. journal of graphics tools, 4(4), pp.33-35. - * - Parker, S.G., Bigler, J., Dietrich, A., Friedrich, H., Hoberock, J., Luebke, D., - * McAllister, D., McGuire, M., Morley, K., Robison, A. and Stich, M., 2010. - * Optix: a general purpose ray tracing engine. Acm transactions on graphics (tog), - * 29(4), pp.1-13. - * **Note**: We implement the Optix variant, which is documented in the second reference above. - */ - HUGHES_MOLLER = 3, - - /** - * Frisvad's method - * - * **Requires**: `normals`
- * **Reference**: - * - Frisvad, J.R., 2012. Building an orthonormal basis from a 3D unit vector without - * normalization. Journal of Graphics Tools, 16(3), pp.151-159. - * - http://people.compute.dtu.dk/jerf/code/hairy/ - */ - FRISVAD = 4, - - /** - * Flat Shading - * - * **Requires**: `positions + indices`
- * **Note**: Will remesh - */ - FLAT_SHADING = 5 - }; - - /** - * Use this class to provide input to the TangentSpaceMesh computation. **Important**: - * Computation of the tangent space is intended to be synchronous (working on the same thread). - * Client is expected to keep the input immutable and in a good state for the duration of both - * computation *and* query. That is, when querying the result of the tangent spaces, part of the - * result might depend on the input data. - */ - class Builder { - public: - Builder() noexcept; - ~Builder() noexcept; - - /** - * Move constructor - */ - Builder(Builder&& that) noexcept; - - /** - * Move constructor - */ - Builder& operator=(Builder&& that) noexcept; - - Builder(Builder const&) = delete; - Builder& operator=(Builder const&) = delete; - - /** - * Client must provide this parameter - * - * @param vertexCount The input number of vertcies - */ - Builder& vertexCount(size_t vertexCount) noexcept; - - /** - * @param normals The input normals - * @param stride The stride for iterating through `normals` - * @return Builder - */ - Builder& normals(filament::math::float3 const* normals, size_t stride = 0) noexcept; - - /** - * @param tangents The input tangents. The `w` component is for use with - * Algorithm::SIGN_OF_W. - * @param stride The stride for iterating through `tangents` - * @return Builder - */ - Builder& tangents(filament::math::float4 const* tangents, size_t stride = 0) noexcept; - - /** - * @param uvs The input uvs - * @param stride The stride for iterating through `uvs` - * @return Builder - */ - Builder& uvs(filament::math::float2 const* uvs, size_t stride = 0) noexcept; - - /** - * @param positions The input positions - * @param stride The stride for iterating through `positions` - * @return Builder - */ - Builder& positions(filament::math::float3 const* positions, size_t stride = 0) noexcept; - - Builder& triangleCount(size_t triangleCount) noexcept; - Builder& triangles(filament::math::uint3 const* triangles) noexcept; - Builder& triangles(filament::math::ushort3 const* triangles) noexcept; - - Builder& algorithm(Algorithm algorithm) noexcept; - - /** - * Computes the tangent space mesh. The resulting mesh object is owned by the callee. The - * callee must call TangentSpaceMesh::destroy on the object once they are finished with it. - * - * The state of the Builder will be reset after each call to build(). The client needs to - * populate the builder with parameters again if they choose to re-use it. - * - * @return A TangentSpaceMesh - */ - TangentSpaceMesh* build(); - - private: - TangentSpaceMesh* mMesh = nullptr; - }; - - /** - * Destory the mesh object - * @param mesh A pointer to a TangentSpaceMesh ready to be destroyed - */ - static void destroy(TangentSpaceMesh* mesh) noexcept; - - /** - * Move constructor - */ - TangentSpaceMesh(TangentSpaceMesh&& that) noexcept; - - /** - * Move constructor - */ - TangentSpaceMesh& operator=(TangentSpaceMesh&& that) noexcept; - - TangentSpaceMesh(TangentSpaceMesh const&) = delete; - TangentSpaceMesh& operator=(TangentSpaceMesh const&) = delete; - - /** - * Number of output vertices - * - * The number of output vertices can be the same as the input if the selected algorithm did not - * "remesh" the input. - * - * @return The number of vertices - */ - size_t getVertexCount() const noexcept; - - /** - * Get output vertex positions. - * Assumes the `out` param is at least of getVertexCount() length (while accounting for - * `stride`). The output vertices can be the same as the input if the selected algorithm did - * not "remesh" the input. The remeshed vertices are not guarranteed to have correlation in - * order with the input mesh. - * - * @param out Client-allocated array that will be used for copying out positions. - * @param stride Stride for iterating through `out` - */ - void getPositions(filament::math::float3* out, size_t stride = 0) const; - - /** - * Get output UVs. - * Assumes the `out` param is at least of getVertexCount() length (while accounting for - * `stride`). The output uvs can be the same as the input if the selected algorithm did - * not "remesh" the input. The remeshed UVs are not guarranteed to have correlation in order - * with the input mesh. - * - * @param out Client-allocated array that will be used for copying out UVs. - * @param stride Stride for iterating through `out` - */ - void getUVs(filament::math::float2* out, size_t stride = 0) const; - - /** - * Get output tangent space. - * Assumes the `out` param is at least of getVertexCount() length (while accounting for - * `stride`). - * - * @param out Client-allocated array that will be used for copying out tangent space in - * 32-bit floating points. - * @param stride Stride for iterating through `out` - */ - void getQuats(filament::math::quatf* out, size_t stride = 0) const noexcept; - - /** - * Get output tangent space. - * Assumes the `out` param is at least of getVertexCount() length (while accounting for - * `stride`). - * - * @param out Client-allocated array that will be used for copying out tangent space in - * 16-bit signed integers. - * @param stride Stride for iterating through `out` - */ - void getQuats(filament::math::short4* out, size_t stride = 0) const noexcept; - - /** - * Get output tangent space. - * Assumes the `out` param is at least of getVertexCount() length (while accounting for - * `stride`). - * - * @param out Client-allocated array that will be used for copying out tangent space in - * 16-bit floating points. - * @param stride Stride for iterating through `out` - */ - void getQuats(filament::math::quath* out, size_t stride = 0) const noexcept; - - /** - * Get number of output triangles. - * The number of output triangles is the same as the number of input triangles. However, when a - * "remesh" is carried out the output triangles are not guarranteed to have any correlation with - * the input. - * - * @return The number of vertices - */ - size_t getTriangleCount() const noexcept; - - /** - * Get output triangles. - * This method assumes that the `out` param provided by the client is at least of - * getTriangleCount() length. If the client calls getTriangles() and triangles were not - * provided as input, we will throw and exception. - * - * @param out Client's array for the output triangles in unsigned 32-bit indices. - */ - void getTriangles(filament::math::uint3* out) const; - - /** - * Get output triangles. - * This method assumes that the `out` param provided by the client is at least of - * getTriangleCount() length. If the client calls getTriangles() and triangles were not - * provided as input, we will throw and exception. - * - * @param out Client's array for the output triangles in unsigned 16-bit indices. - */ - void getTriangles(filament::math::ushort3* out) const; - - /** - * @return The algorithm used to compute the output mesh. - */ - Algorithm getAlgorithm() const noexcept; - -private: - ~TangentSpaceMesh() noexcept; - TangentSpaceMesh() noexcept; - TangentSpaceMeshInput* mInput; - TangentSpaceMeshOutput* mOutput; - - friend class Builder; -}; - -} // namespace geometry -} // namespace filament - -#endif //TNT_GEOMETRY_TANGENTSPACEMESH_H diff --git a/ios/include/filament/gltfio/AssetLoader.h b/ios/include/filament/gltfio/AssetLoader.h deleted file mode 100644 index c031850f..00000000 --- a/ios/include/filament/gltfio/AssetLoader.h +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef GLTFIO_ASSETLOADER_H -#define GLTFIO_ASSETLOADER_H - -#include -#include - -#include -#include -#include - -#include - -namespace utils { - class EntityManager; - class NameComponentManager; -} - -/** - * Loader and pipeline for glTF 2.0 assets. - */ -namespace filament::gltfio { - -class NodeManager; - -/** - * \struct AssetConfiguration AssetLoader.h gltfio/AssetLoader.h - * \brief Construction parameters for AssetLoader. - */ -struct AssetConfiguration { - //! The engine that the loader should pass to builder objects (e.g. - //! filament::VertexBuffer::Builder). - class filament::Engine* engine; - - //! Controls whether the loader uses filamat to generate materials on the fly, or loads a small - //! set of precompiled ubershader materials. Deleting the MaterialProvider is the client's - //! responsibility. See createJitShaderProvider() and createUbershaderProvider(). - MaterialProvider* materials; - - //! Optional manager for associating string names with entities in the transform hierarchy. - utils::NameComponentManager* names = nullptr; - - //! Overrides the factory used for creating entities in the transform hierarchy. If this is not - //! specified, AssetLoader will use the singleton EntityManager associated with the current - //! process. - utils::EntityManager* entities = nullptr; - - //! Optional default node name for anonymous nodes - char* defaultNodeName = nullptr; -}; - -/** - * \class AssetLoader AssetLoader.h gltfio/AssetLoader.h - * \brief Consumes glTF content and produces FilamentAsset objects. - * - * AssetLoader consumes a blob of glTF 2.0 content (either JSON or GLB) and produces a FilamentAsset - * object, which is a bundle of Filament textures, vertex buffers, index buffers, etc. An asset is - * composed of 1 or more FilamentInstance objects which contain entities and components. - * - * Clients must use AssetLoader to create and destroy FilamentAsset objects. This is similar to - * how filament::Engine is used to create and destroy core objects like VertexBuffer. - * - * AssetLoader does not fetch external buffer data or create textures on its own. Clients can use - * ResourceLoader for this, which obtains the URI list from the asset. This is demonstrated in the - * code snippet below. - * - * AssetLoader also owns a cache of filament::Material objects that may be re-used across multiple - * loads. - * - * Example usage: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * auto engine = Engine::create(); - * auto materials = createJitShaderProvider(engine); - * auto decoder = createStbProvider(engine); - * auto loader = AssetLoader::create({engine, materials}); - * - * // Parse the glTF content and create Filament entities. - * std::vector content(...); - * FilamentAsset* asset = loader->createAsset(content.data(), content.size()); - * content.clear(); - * - * // Load buffers and textures from disk. - * ResourceLoader resourceLoader({engine, ".", true}); - * resourceLoader.addTextureProvider("image/png", decoder) - * resourceLoader.addTextureProvider("image/jpeg", decoder) - * resourceLoader.loadResources(asset); - * - * // Free the glTF hierarchy as it is no longer needed. - * asset->releaseSourceData(); - * - * // Add renderables to the scene. - * scene->addEntities(asset->getEntities(), asset->getEntityCount()); - * - * // Extract the animator interface from the FilamentInstance. - * auto animator = asset->getInstance()->getAnimator(); - * - * // Execute the render loop and play the first animation. - * do { - * animator->applyAnimation(0, time); - * animator->updateBoneMatrices(); - * if (renderer->beginFrame(swapChain)) { - * renderer->render(view); - * renderer->endFrame(); - * } - * } while (!quit); - * - * scene->removeEntities(asset->getEntities(), asset->getEntityCount()); - * loader->destroyAsset(asset); - * materials->destroyMaterials(); - * delete materials; - * delete decoder; - * AssetLoader::destroy(&loader); - * Engine::destroy(&engine); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - */ -class UTILS_PUBLIC AssetLoader { -public: - - /** - * Creates an asset loader for the given configuration, which specifies the Filament engine. - * - * The engine is held weakly, used only for the creation and destruction of Filament objects. - * The optional name component manager can be used to assign names to renderables. - * The material source specifies whether to use filamat to generate materials on the fly, or to - * load a small set of precompiled ubershader materials. - */ - static AssetLoader* create(const AssetConfiguration& config); - - /** - * Frees the loader. - * - * This does not not automatically free the cache of materials, nor - * does it free the entities for created assets (see destroyAsset). - */ - static void destroy(AssetLoader** loader); - - /** - * Takes a pointer to the contents of a GLB or a JSON-based glTF 2.0 file and returns an asset - * with one instance, or null on failure. - */ - FilamentAsset* createAsset(const uint8_t* bytes, uint32_t nbytes); - - /** - * Consumes the contents of a glTF 2.0 file and produces a primary asset with one or more - * instances. The primary asset has ownership over the instances. - * - * The returned instances share their textures, materials, and vertex buffers with the primary - * asset. However each instance has its own unique set of entities, transform components, - * material instances, and renderable components. Instances are freed when the primary asset is - * freed. - * - * Light components are not instanced, they belong only to the primary asset. - * - * Clients must use ResourceLoader to load resources on the primary asset. - * - * The entity accessor and renderable stack API in the primary asset can be used to control the - * union of all instances. The individual FilamentInstance objects can be used to access each - * instance's partition of entities. Similarly, the Animator in the primary asset controls all - * instances. To animate instances individually, use FilamentInstance::getAnimator(). - * - * @param bytes the contents of a glTF 2.0 file (JSON or GLB) - * @param numBytes the number of bytes in "bytes" - * @param instances destination pointer, to be populated by the requested number of instances - * @param numInstances requested number of instances - * @return the primary asset that has ownership over all instances - */ - FilamentAsset* createInstancedAsset(const uint8_t* bytes, uint32_t numBytes, - FilamentInstance** instances, size_t numInstances); - - /** - * Adds a new instance to the asset. - * - * Use this with caution. It is more efficient to pre-allocate a max number of instances, and - * gradually add them to the scene as needed. Instances can also be "recycled" by removing and - * re-adding them to the scene. - * - * NOTE: destroyInstance() does not exist because gltfio favors flat arrays for storage of - * entity lists and instance lists, which would be slow to shift. We also wish to discourage - * create/destroy churn, as noted above. - * - * This cannot be called after FilamentAsset::releaseSourceData(). - * See also AssetLoader::createInstancedAsset(). - */ - FilamentInstance* createInstance(FilamentAsset* primary); - - /** - * Allows clients to enable diagnostic shading on newly-loaded assets. - */ - void enableDiagnostics(bool enable = true); - - /** - * Destroys the given asset, all of its associated Filament objects, and all associated - * FilamentInstance objects. - * - * This destroys entities, components, material instances, vertex buffers, index buffers, - * and textures. This does not necessarily immediately free all source data, since - * texture decoding or GPU uploading might be underway. - */ - void destroyAsset(const FilamentAsset* asset); - - /** - * Gets a weak reference to an array of cached materials, used internally to create material - * instances for assets. - */ - const filament::Material* const* getMaterials() const noexcept; - - /** - * Gets the number of cached materials. - */ - size_t getMaterialsCount() const noexcept; - - utils::NameComponentManager* getNames() const noexcept; - - NodeManager& getNodeManager() noexcept; - - MaterialProvider& getMaterialProvider() noexcept; - - /*! \cond PRIVATE */ -protected: - AssetLoader() noexcept = default; - ~AssetLoader() = default; - -public: - AssetLoader(AssetLoader const&) = delete; - AssetLoader(AssetLoader&&) = delete; - AssetLoader& operator=(AssetLoader const&) = delete; - AssetLoader& operator=(AssetLoader&&) = delete; - /*! \endcond */ -}; - -} // namespace filament::gltfio - -#endif // GLTFIO_ASSETLOADER_H diff --git a/ios/include/filament/utils/EntityInstance.h b/ios/include/filament/utils/EntityInstance.h deleted file mode 100644 index b164ed3f..00000000 --- a/ios/include/filament/utils/EntityInstance.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_UTILS_ENTITYINSTANCE_H -#define TNT_UTILS_ENTITYINSTANCE_H - -#include - -#include - -#include - - -namespace utils { - -class UTILS_PUBLIC EntityInstanceBase { -public: - using Type = uint32_t; -protected: - Type mInstance = 0; -}; - -template -class UTILS_PUBLIC EntityInstance : public EntityInstanceBase { -public: - // default Instance is invalid - constexpr EntityInstance() noexcept = default; - - // check if this Instance is valid - constexpr bool isValid() const noexcept { return mInstance != 0; } - - // Instances of same type can be copied/assigned - constexpr EntityInstance(EntityInstance const& other) noexcept = default; - constexpr EntityInstance& operator=(EntityInstance const& other) noexcept = default; - - // EDIT instances can be converted to "read" Instances of same type - template > - constexpr explicit EntityInstance(EntityInstance const& other) noexcept { - mInstance = other.asValue(); - } - template > - EntityInstance& operator=(EntityInstance const& other) noexcept { - mInstance = other.asValue(); - return *this; - } - - // Instances can be compared - constexpr bool operator!=(EntityInstance e) const { return mInstance != e.mInstance; } - constexpr bool operator==(EntityInstance e) const { return mInstance == e.mInstance; } - - // Instances can be sorted - constexpr bool operator<(EntityInstance e) const { return mInstance < e.mInstance; } - constexpr bool operator<=(EntityInstance e) const { return mInstance <= e.mInstance; } - constexpr bool operator>(EntityInstance e) const { return mInstance > e.mInstance; } - constexpr bool operator>=(EntityInstance e) const { return mInstance >= e.mInstance; } - - // and we can iterate - constexpr EntityInstance& operator++() noexcept { ++mInstance; return *this; } - constexpr EntityInstance& operator--() noexcept { --mInstance; return *this; } - constexpr const EntityInstance operator++(int) const noexcept { return EntityInstance{ mInstance + 1 }; } - constexpr const EntityInstance operator--(int) const noexcept { return EntityInstance{ mInstance - 1 }; } - - - // return a value for this Instance (mostly needed for debugging - constexpr uint32_t asValue() const noexcept { return mInstance; } - - // auto convert to Type so it can be used as an index - constexpr operator Type() const noexcept { return mInstance; } // NOLINT(google-explicit-constructor) - - // conversion from Type so we can initialize from an index - constexpr EntityInstance(Type value) noexcept { mInstance = value; } // NOLINT(google-explicit-constructor) -}; - -} // namespace utils - -#endif // TNT_UTILS_ENTITYINSTANCE_H diff --git a/ios/include/filament/utils/EntityManager.h b/ios/include/filament/utils/EntityManager.h deleted file mode 100644 index 9674cac2..00000000 --- a/ios/include/filament/utils/EntityManager.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_UTILS_ENTITYMANAGER_H -#define TNT_UTILS_ENTITYMANAGER_H - -#include -#include - -#include -#include - -#ifndef FILAMENT_UTILS_TRACK_ENTITIES -#define FILAMENT_UTILS_TRACK_ENTITIES false -#endif - -#if FILAMENT_UTILS_TRACK_ENTITIES -#include -#include -#endif - -namespace utils { - -class UTILS_PUBLIC EntityManager { -public: - // Get the global EntityManager. It is recommended to cache this value. - // Thread Safe. - static EntityManager& get() noexcept; - - class Listener { - public: - virtual void onEntitiesDestroyed(size_t n, Entity const* entities) noexcept = 0; - protected: - ~Listener() noexcept; - }; - - - // maximum number of entities that can exist at the same time - static size_t getMaxEntityCount() noexcept { - // because index 0 is reserved, we only have 2^GENERATION_SHIFT - 1 valid indices - return RAW_INDEX_COUNT - 1; - } - - // create n entities. Thread safe. - void create(size_t n, Entity* entities); - - // destroys n entities. Thread safe. - void destroy(size_t n, Entity* entities) noexcept; - - // create a new Entity. Thread safe. - // Return Entity.isNull() if the entity cannot be allocated. - Entity create() { - Entity e; - create(1, &e); - return e; - } - - // destroys an Entity. Thread safe. - void destroy(Entity e) noexcept { - destroy(1, &e); - } - - // return whether the given Entity has been destroyed (false) or not (true). - // Thread safe. - bool isAlive(Entity e) const noexcept { - assert(getIndex(e) < RAW_INDEX_COUNT); - return (!e.isNull()) && (getGeneration(e) == mGens[getIndex(e)]); - } - - // registers a listener to be called when an entity is destroyed. thread safe. - // if the listener is already register, this method has no effect. - void registerListener(Listener* l) noexcept; - - // unregisters a listener. - void unregisterListener(Listener* l) noexcept; - - - /* no user serviceable parts below */ - - // current generation of the given index. Use for debugging and testing. - uint8_t getGenerationForIndex(size_t index) const noexcept { - return mGens[index]; - } - // singleton, can't be copied - EntityManager(const EntityManager& rhs) = delete; - EntityManager& operator=(const EntityManager& rhs) = delete; - -#if FILAMENT_UTILS_TRACK_ENTITIES - std::vector getActiveEntities() const; - void dumpActiveEntities(utils::io::ostream& out) const; -#endif - -private: - friend class EntityManagerImpl; - EntityManager(); - ~EntityManager(); - - // GENERATION_SHIFT determines how many simultaneous Entities are available, the - // minimum memory requirement is 2^GENERATION_SHIFT bytes. - static constexpr const int GENERATION_SHIFT = 17; - static constexpr const size_t RAW_INDEX_COUNT = (1 << GENERATION_SHIFT); - static constexpr const Entity::Type INDEX_MASK = (1 << GENERATION_SHIFT) - 1u; - - static inline Entity::Type getGeneration(Entity e) noexcept { - return e.getId() >> GENERATION_SHIFT; - } - static inline Entity::Type getIndex(Entity e) noexcept { - return e.getId() & INDEX_MASK; - } - static inline Entity::Type makeIdentity(Entity::Type g, Entity::Type i) noexcept { - return (g << GENERATION_SHIFT) | (i & INDEX_MASK); - } - - // stores the generation of each index. - uint8_t * const mGens; -}; - -} // namespace utils - -#endif // TNT_UTILS_ENTITYMANAGER_H diff --git a/ios/include/filament/utils/FixedCapacityVector.h b/ios/include/filament/utils/FixedCapacityVector.h deleted file mode 100644 index 540b42b2..00000000 --- a/ios/include/filament/utils/FixedCapacityVector.h +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#ifndef TNT_UTILS_FIXEDCAPACITYVECTOR_H -#define TNT_UTILS_FIXEDCAPACITYVECTOR_H - -#include -#include - -#include -#include -#include -#include -#include -#include // TODO: is this necessary? - -#include -#include - -#ifndef NDEBUG -#define FILAMENT_FORCE_CAPACITY_CHECK true -#else -#define FILAMENT_FORCE_CAPACITY_CHECK false -#endif - -namespace utils { - -/** - * FixedCapacityVector is (almost) a drop-in replacement for std::vector<> except it has a - * fixed capacity decided at runtime. The vector storage is never reallocated unless reserve() - * is called. Operations that add elements to the vector can fail if there is not enough - * capacity. - * - * An empty vector with a given capacity is created with - * FixedCapacityVector::with_capacity( capacity ); - * - * NOTE: When passing an initial size into the FixedCapacityVector constructor, default construction - * of the elements is skipped when their construction is trivial. This behavior is different from - * std::vector. e.g., std::vector(4) constructs 4 zeros while FixedCapacityVector(4) - * allocates 4 uninitialized values. Note that zero initialization is easily achieved by passing in - * the optional value argument, e.g. FixedCapacityVector(4, 0) or foo.resize(4, 0). - */ -template, bool CapacityCheck = true> -class UTILS_PUBLIC FixedCapacityVector { -public: - using allocator_type = A; - using value_type = T; - using reference = T&; - using const_reference = T const&; - using size_type = uint32_t; - using difference_type = int32_t; - using pointer = T*; - using const_pointer = T const*; - using iterator = pointer; - using const_iterator = const_pointer; - using reverse_iterator = std::reverse_iterator; - using const_reverse_iterator = std::reverse_iterator; - -private: - using storage_traits = std::allocator_traits; - -public: - /** returns an empty vector with the specified capacity */ - static FixedCapacityVector with_capacity( - size_type capacity, const allocator_type& allocator = allocator_type()) { - return FixedCapacityVector(construct_with_capacity, capacity, allocator); - } - - FixedCapacityVector() = default; - - explicit FixedCapacityVector(const allocator_type& allocator) noexcept - : mCapacityAllocator({}, allocator) { - } - - explicit FixedCapacityVector(size_type size, const allocator_type& allocator = allocator_type()) - : mSize(size), - mCapacityAllocator(size, allocator) { - mData = this->allocator().allocate(this->capacity()); - construct(begin(), end()); - } - - FixedCapacityVector(std::initializer_list list, - const allocator_type& alloc = allocator_type()) - : mSize(list.size()), - mCapacityAllocator(list.size(), alloc) { - mData = this->allocator().allocate(this->capacity()); - std::uninitialized_copy(list.begin(), list.end(), begin()); - } - - FixedCapacityVector(size_type size, const_reference value, - const allocator_type& alloc = allocator_type()) - : mSize(size), - mCapacityAllocator(size, alloc) { - mData = this->allocator().allocate(this->capacity()); - construct(begin(), end(), value); - } - - FixedCapacityVector(FixedCapacityVector const& rhs) - : mSize(rhs.mSize), - mCapacityAllocator(rhs.capacity(), - storage_traits::select_on_container_copy_construction(rhs.allocator())) { - mData = allocator().allocate(capacity()); - std::uninitialized_copy(rhs.begin(), rhs.end(), begin()); - } - - FixedCapacityVector(FixedCapacityVector&& rhs) noexcept { - this->swap(rhs); - } - - ~FixedCapacityVector() noexcept { - destroy(begin(), end()); - allocator().deallocate(data(), capacity()); - } - - FixedCapacityVector& operator=(FixedCapacityVector const& rhs) { - if (this != &rhs) { - FixedCapacityVector t(rhs); - this->swap(t); - } - return *this; - } - - FixedCapacityVector& operator=(FixedCapacityVector&& rhs) noexcept { - this->swap(rhs); - return *this; - } - - allocator_type get_allocator() const noexcept { - return mCapacityAllocator.second(); - } - - // -------------------------------------------------------------------------------------------- - - iterator begin() noexcept { return data(); } - iterator end() noexcept { return data() + size(); } - const_iterator begin() const noexcept { return data(); } - const_iterator end() const noexcept { return data() + size(); } - reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } - const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } - reverse_iterator rend() noexcept { return reverse_iterator(begin()); } - const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } - const_iterator cbegin() const noexcept { return begin(); } - const_iterator cend() const noexcept { return end(); } - const_reverse_iterator crbegin() const noexcept { return rbegin(); } - const_reverse_iterator crend() const noexcept { return rend(); } - - // -------------------------------------------------------------------------------------------- - - size_type size() const noexcept { return mSize; } - size_type capacity() const noexcept { return mCapacityAllocator.first(); } - bool empty() const noexcept { return size() == 0; } - size_type max_size() const noexcept { - return std::min(storage_traits::max_size(allocator()), - std::numeric_limits::max()); - } - - // -------------------------------------------------------------------------------------------- - - reference operator[](size_type n) noexcept { - assert(n < size()); - return *(begin() + n); - } - - const_reference operator[](size_type n) const noexcept { - assert(n < size()); - return *(begin() + n); - } - - reference front() noexcept { return *begin(); } - const_reference front() const noexcept { return *begin(); } - reference back() noexcept { return *(end() - 1); } - const_reference back() const noexcept { return *(end() - 1); } - value_type* data() noexcept { return mData; } - const value_type* data() const noexcept { return mData; } - - // -------------------------------------------------------------------------------------------- - - void push_back(const_reference v) { - auto pos = assertCapacityForSize(size() + 1); - ++mSize; - storage_traits::construct(allocator(), pos, v); - } - - void push_back(value_type&& v) { - auto pos = assertCapacityForSize(size() + 1); - ++mSize; - storage_traits::construct(allocator(), pos, std::move(v)); - } - - template - reference emplace_back(ARGS&& ... args) { - auto pos = assertCapacityForSize(size() + 1); - ++mSize; - storage_traits::construct(allocator(), pos, std::forward(args)...); - return *pos; - } - - void pop_back() { - assert(!empty()); - --mSize; - destroy(end(), end() + 1); - } - - iterator insert(const_iterator position, const_reference v) { - if (position == end()) { - push_back(v); - } else { - assertCapacityForSize(size() + 1); - pointer p = const_cast(position); - move_range(p, end(), p + 1); - ++mSize; - // here we handle inserting an element of this vector! - const_pointer pv = std::addressof(v); - if (p <= pv && pv < end()) { - *p = *(pv + 1); - } else { - *p = v; - } - } - return const_cast(position); - } - - iterator insert(const_iterator position, value_type&& v) { - if (position == end()) { - push_back(std::move(v)); - } else { - assertCapacityForSize(size() + 1); - pointer p = const_cast(position); - move_range(p, end(), p + 1); - ++mSize; - *p = std::move(v); - } - return const_cast(position); - } - - iterator erase(const_iterator pos) { - assert(pos != end()); - return erase(pos, pos + 1); - } - - iterator erase(const_iterator first, const_iterator last) { - assert(first <= last); - auto e = std::move(const_cast(last), end(), const_cast(first)); - destroy(e, end()); - mSize -= std::distance(first, last); - return const_cast(first); - } - - void clear() noexcept { - destroy(begin(), end()); - mSize = 0; - } - - void resize(size_type count) { - assertCapacityForSize(count); - if constexpr(std::is_trivially_constructible_v && - std::is_trivially_destructible_v) { - // we check for triviality here so that the implementation could be non-inline - mSize = count; - } else { - resize_non_trivial(count); - } - } - - void resize(size_type count, const_reference v) { - assertCapacityForSize(count); - resize_non_trivial(count, v); - } - - void swap(FixedCapacityVector& other) { - using std::swap; - swap(mData, other.mData); - swap(mSize, other.mSize); - mCapacityAllocator.swap(other.mCapacityAllocator); - } - - UTILS_NOINLINE - void reserve(size_type c) { - if (c > capacity()) { - FixedCapacityVector t(construct_with_capacity, c, allocator()); - t.mSize = size(); - std::uninitialized_move(begin(), end(), t.begin()); - this->swap(t); - } - } - -private: - enum construct_with_capacity_tag{ construct_with_capacity }; - - FixedCapacityVector(construct_with_capacity_tag, - size_type capacity, const allocator_type& allocator = allocator_type()) - : mCapacityAllocator(capacity, allocator) { - mData = this->allocator().allocate(this->capacity()); - } - - allocator_type& allocator() noexcept { - return mCapacityAllocator.second(); - } - - allocator_type const& allocator() const noexcept { - return mCapacityAllocator.second(); - } - - iterator assertCapacityForSize(size_type s) { - if constexpr(CapacityCheck || FILAMENT_FORCE_CAPACITY_CHECK) { - ASSERT_PRECONDITION(capacity() >= s, - "capacity exceeded: requested size %lu, available capacity %lu.", - (unsigned long)s, (unsigned long)capacity()); - } - return end(); - } - - inline void construct(iterator first, iterator last) noexcept { - // we check for triviality here so that the implementation could be non-inline - if constexpr(!std::is_trivially_constructible_v) { - construct_non_trivial(first, last); - } - } - - void construct(iterator first, iterator last, const_reference proto) noexcept { - UTILS_NOUNROLL - while (first != last) { - storage_traits::construct(allocator(), first++, proto); - } - } - - // should this be NOINLINE? - void construct_non_trivial(iterator first, iterator last) noexcept { - UTILS_NOUNROLL - while (first != last) { - storage_traits::construct(allocator(), first++); - } - } - - - inline void destroy(iterator first, iterator last) noexcept { - // we check for triviality here so that the implementation could be non-inline - if constexpr(!std::is_trivially_destructible_v) { - destroy_non_trivial(first, last); - } - } - - // should this be NOINLINE? - void destroy_non_trivial(iterator first, iterator last) noexcept { - UTILS_NOUNROLL - while (first != last) { - storage_traits::destroy(allocator(), --last); - } - } - - // should this be NOINLINE? - void resize_non_trivial(size_type count) { - if (count > size()) { - construct(end(), begin() + count); - } else if (count < size()) { - destroy(begin() + count, end()); - } - mSize = count; - } - - // should this be NOINLINE? - void resize_non_trivial(size_type count, const_reference v) { - if (count > size()) { - construct(end(), begin() + count, v); - } else if (count < size()) { - destroy(begin() + count, end()); - } - mSize = count; - } - - // should this be NOINLINE? - void move_range(pointer s, pointer e, pointer to) { - if constexpr(std::is_trivially_copy_assignable_v - && std::is_trivially_destructible_v) { - // this generates memmove -- which doesn't happen otherwise - std::move_backward(s, e, to + std::distance(s, e)); - } else { - pointer our_end = end(); - difference_type n = our_end - to; // nb of elements to move by operator= - pointer i = s + n; // 1st element to move by move ctor - for (pointer d = our_end ; i < our_end ; ++i, ++d) { - storage_traits::construct(allocator(), d, std::move(*i)); - } - std::move_backward(s, s + n, our_end); - } - } - - template - class SizeTypeWrapper { - TYPE value{}; - public: - SizeTypeWrapper() noexcept = default; - SizeTypeWrapper(SizeTypeWrapper const& rhs) noexcept = default; - explicit SizeTypeWrapper(TYPE value) noexcept : value(value) { } - SizeTypeWrapper& operator=(TYPE rhs) noexcept { value = rhs; return *this; } - SizeTypeWrapper& operator=(SizeTypeWrapper& rhs) noexcept = delete; - operator TYPE() const noexcept { return value; } - }; - - pointer mData{}; - size_type mSize{}; - compressed_pair, allocator_type> mCapacityAllocator{}; -}; - -} // namespace utils - -#endif // TNT_UTILS_FIXEDCAPACITYVECTOR_H diff --git a/ios/include/filament/utils/NameComponentManager.h b/ios/include/filament/utils/NameComponentManager.h deleted file mode 100644 index 9e31e461..00000000 --- a/ios/include/filament/utils/NameComponentManager.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_UTILS_NAMECOMPONENTMANAGER_H -#define TNT_UTILS_NAMECOMPONENTMANAGER_H - -#include -#include -#include -#include -#include - -#include -#include - -namespace utils { - -class EntityManager; - -/** - * \class NameComponentManager NameComponentManager.h utils/NameComponentManager.h - * \brief Allows clients to associate string labels with entities. - * - * To access the name of an existing entity, clients should first use NameComponentManager to get a - * temporary handle called an \em instance. Please note that instances are ephemeral; clients should - * store entities, not instances. - * - * Usage example: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * auto names = new NameComponentManager(EntityManager::get()); - * names->addComponent(myEntity); - * names->setName(names->getInstance(myEntity), "Jeanne d'Arc"); - * ... - * printf("%s\n", names->getName(names->getInstance(myEntity)); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - */ -class UTILS_PUBLIC NameComponentManager : public SingleInstanceComponentManager { -public: - using Instance = EntityInstance; - - /** - * Creates a new name manager associated with the given entity manager. - * - * Note that multiple string labels could be associated with each entity simply by - * creating multiple instances of NameComponentManager. - */ - explicit NameComponentManager(EntityManager& em); - ~NameComponentManager(); - - /** - * Checks if the given entity already has a name component. - */ - using SingleInstanceComponentManager::hasComponent; - - /** - * Gets a temporary handle that can be used to access the name. - * - * @return Non-zero handle if the entity has a name component, 0 otherwise. - */ - Instance getInstance(Entity e) const noexcept { - return { SingleInstanceComponentManager::getInstance(e) }; - } - - /*! \cond PRIVATE */ - // these are implemented in SingleInstanceComponentManager<>, but we need to - // reimplement them in each manager, to ensure they are generated in an implementation file - // for backward binary compatibility reasons. - size_t getComponentCount() const noexcept; - Entity const* getEntities() const noexcept; - void gc(const EntityManager& em, size_t ratio = 4) noexcept; - /*! \endcond */ - - /** - * Adds a name component to the given entity if it doesn't already exist. - */ - void addComponent(Entity e); - - /** - * Removes the name component to the given entity if it exists. - */ - void removeComponent(Entity e); - - /** - * Stores a copy of the given string and associates it with the given instance. - */ - void setName(Instance instance, const char* name) noexcept; - - /** - * Retrieves the string associated with the given instance, or nullptr if none exists. - * - * @return pointer to the copy that was made during setName() - */ - const char* getName(Instance instance) const noexcept; -}; - -} // namespace utils - -#endif // TNT_UTILS_NAMECOMPONENTMANAGER_H diff --git a/ios/include/filament/utils/Panic.h b/ios/include/filament/utils/Panic.h deleted file mode 100644 index df24cac2..00000000 --- a/ios/include/filament/utils/Panic.h +++ /dev/null @@ -1,563 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_UTILS_PANIC_H -#define TNT_UTILS_PANIC_H - -#include - -#include -#include - -#ifdef __EXCEPTIONS -# define UTILS_EXCEPTIONS 1 -#else -#endif - -/** - * @defgroup errors Handling Catastrophic Failures (Panics) - * - * @brief Failure detection and reporting facilities - * - * ## What's a Panic? ## - * - * In the context of this document, a _panic_ is a type of error due to a _contract violation_, - * it shouldn't be confused with a _result_ or _status_ code. The POSIX API for instance, - * unfortunately often conflates the two. - * @see - * - * - * Here we give the following definition of a _panic_: - * - * 1. Failures to meet a function's own **postconditions**\n - * The function cannot establish one of its own postconditions, such as (but not limited to) - * producing a valid return value object. - * - * Often these failures are only detectable at runtime, for instance they can be caused by - * arithmetic errors, as it was the case for the Ariane 5 rocket. Ariane 5 crashed because it - * reused an inertial module from Ariane 4, which didn't account for the greater horizontal - * acceleration of Ariane 5 and caused an overflow in the computations. Ariane 4's module - * wasn't per-say buggy, but was improperly used and failed to meet, obviously, certain - * postconditions. - * @see - * - * 2. Failures to meet the **preconditions** of any of a function's callees\n - * The function cannot meet a precondition of another function it must call, such as a - * restriction on a parameter. - * - * Not to be confused with the case where the preconditions of a function are already - * violated upon entry, which indicates a programming error from the caller. - * - * Typically these failures can be avoided and arise because of programming errors. - * - * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * ## Failure reporting vs. handling ## - * - * Very often when a panic, as defined above, is detected, the program has little other choice - * but to terminate.\n - * Typically these situations can be handled by _assert()_. However, _assert()_ also conflates two - * very different concepts: detecting and handling failures.\n - * The place where a failure is detected is rarely the place where there is enough - * context to decide what to do. _assert()_ terminates the program which, may or may not be - * appropriate. At the very least the failure must be logged (which _assert()_ does in a crude way), - * but some other actions might need to happen, such as:\n - * - * - logging the failure in the system-wide logger - * - providing enough information in development builds to analyze/debug the problem - * - cleanly releasing some resources, such as communication channels with other processes\n - * e.g.: to avoid their pre- or postconditions from being violated as well. - * - * In some _rare_ cases, the failure might even be ignored altogether because it doesn't matter in - * the context where it happened. This decision clearly doesn't always lie at the failure-site. - * - * It is therefore important to separate failure detection from handling. - * - * - * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * ## Failure detection and handling facilities ## - * - * Clearly, catastrophic failures should be **rare**; in fact they should - * never happen, except possibly for "failures to meet a function's own postconditions", which - * may depend on external factors and should still be very rare. Yet, when a failure happens, it - * must be detected and handled appropriately.\n - * Since panics are rare, it is desirable that the handling mechanism be as unobtrusive - * as possible, without allowing such failures to go unnoticed or swallowed by mistake. Ideally, the - * programmer using an API should have nothing special to do to handle that API's failure - * conditions.\n\n - * - * An important feature of the Panic Handling facilities here is that **panics are not part of - * the API of a function or method**\n\n - * - * - * The panic handling facility has the following benefits: - * - provides an easy way to detect and report failure - * - separates failure detection from handling - * - makes it hard for detected failures to be ignored (i.e.: not handled) - * - doesn't add burden on the API design - * - doesn't add overhead (visual or otherwise) at call sites - * - has very little performance overhead for failure detection - * - has little to no performance impact for failure handling in the common (success) case - * - is flexible and extensible - * - * Since we have established that failures are **rare**, **exceptional** situations, it would be - * appropriate to handle them with an _assert_ mechanism and that's what the API below - * provides. However, under-the-hood it uses C++ exceptions as a means to separate - * _reporting_ from _handling_. - * - * \note On devices where exceptions are not supported or appropriate, these APIs can be turned - * into a regular _std::terminate()_. - * - * - * ASSERT_PRECONDITION(condition, format, ...) - * ASSERT_POSTCONDITION(condition, format, ...) - * ASSERT_ARITHMETIC(condition, format, ...) - * ASSERT_DESTRUCTOR(condition, format, ...) - * - * - * @see ASSERT_PRECONDITION, ASSERT_POSTCONDITION, ASSERT_ARITHMETIC - * @see ASSERT_DESTRUCTOR - * - * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * ## Writing code that can assert ## - * - * Because we've separated failure reporting from failure handling, there are some considerations - * that need to be thought about when writing code that calls the macros above (i.e.: the program - * won't terminate at the point where the failure is detected).\n\n - * - * - * ### Panic guarantees ### - * - * After the failure condition is reported by a function, additional guarantees may be provided - * with regards to the state of the program. The following four levels of guarantee are - * generally recognized, each of which is a strict superset of its successors: - * - * 1. Nothrow exception guarantee\n - * The function never asserts. e.g.: This should always be the case with destructors.\n\n - * - * 2. Strong exception guarantee\n - * If the function asserts, the state of the program is rolled back to the state just before - * the function call.\n\n - * - * 3. Basic exception guarantee\n - * If the function asserts, the program is in a valid state. It may require cleanup, - * but all invariants are intact.\n\n - * - * 4. No exception guarantee\n - * If the function asserts, the program may not be in a valid state: resource leaks, memory - * corruption, or other invariant-destroying failures may have occurred. - * - * In each function, give the **strongest** safety guarantee that won't penalize callers who - * don't need it, but **always give at least the basic guarantee**. The RAII (Resource - * Acquisition Is Initialization) pattern can help with achieving these guarantees. - * - * @see [RAII](http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization) - * - * ### Special considerations for Constructors ### - * - * Constructors are a bit special because if a failure occurs during their execution, the - * destructor won't be called (how could it? since the object wasn't constructed!). This can lead - * to leaked resources allocated in the constructor prior to the failure. Thankfully there is - * a nice C++ syntax to handle this case: - * - * @code - * Foo::Foo(size_t s) try : m_size(s), m_buf(new uint32_t[s]) { - * ASSERT_POSTCONDITION(s&0xF==0, - * "object size is %u, but must be multiple of 16", s); - * } catch (...) { - * delete [] m_buf; - * // the exception will be automatically re-thrown - * } - * @endcode - * - * Unfortunately, this usage leaks the underlying, exception-based, implementation of the - * panic handling macros. For this reason, it is best to keep constructors simple and guarantee - * they can't fail. An _init()_ function with a factory can be used for actual initialization. - * - * - * ### Special considerations for Destructors ### - * - * In C++ destructors cannot throw exceptions and since the above macros internally use exceptions - * they cannot be used in destructors. Doing so will result in immediate termination of the - * program by _std::terminate()_.\n - * It is therefore best to always guarantee that destructors won't fail. In case of such a - * failure in a destructor the ASSERT_DESTRUCTOR() macro can be used instead, it - * will log the failure but won't terminate the program, instead it'll proceed as if nothing - * happened. Generally this will result in some resource leak which, eventually, will cause - * another failure (typically a postcondition violation).\n\n - * - * Rationale for this behavior: There are fundamentally no way to report a failure from a - * destructor in C++, violently terminating the process is inadequate because it again conflates - * failure reporting and failure handling; for instance a failure in glDeleteTextures() shouldn't - * be necessarily fatal (certainly not without saving the user's data first). The alternative - * would be for the caller to swallow the failure entirely, but that's not great either because the - * failure would go unnoticed. The solution retained here is a compromise. - * - * @see ASSERT_DESTRUCTOR - * - * ### Testing Code that Uses Panics ### - * - * Since panics use exceptions for their underlying implementation, you can test code that uses - * panics with EXPECT_THROW by doing the following things: - * \li Set panic mode to THROW (default is TERMINATE) - * \li Pass Panic to EXPECT_THROW as the exception type - * - * Example code for your test file: - * - * @code - * #include // since your code uses panics, this should include utils/Panic.hpp - * - * using utils::Panic; - * - * TEST(MyClassTest, value_that_causes_panic) { - * EXPECT_THROW(MyClass::function(value_that_causes_panic), Panic); - * } - * - * // ... other tests ... - * - * int main(int argc, char** argv) { - * ::testing::InitGoogleTest(&argc, argv); - * Panic::setMode(Panic::Mode::THROW); - * return RUN_ALL_TESTS(); - * } - * @endcode - * - */ - -namespace utils { - -// ----------------------------------------------------------------------------------------------- - -/** - * @ingroup errors - * - * \brief Base class of all exceptions thrown by all the ASSERT macros - * - * The Panic class provides the std::exception protocol, it is the base exception object - * used for all thrown exceptions. - */ -class UTILS_PUBLIC Panic { -public: - virtual ~Panic() noexcept; - - /** - * @return a detailed description of the error - * @see std::exception - */ - virtual const char* what() const noexcept = 0; - - /** - * Get the function name where the panic was detected - * @return a C string containing the function name where the panic was detected - */ - virtual const char* getFunction() const noexcept = 0; - - /** - * Get the file name where the panic was detected - * @return a C string containing the file name where the panic was detected - */ - virtual const char* getFile() const noexcept = 0; - - /** - * Get the line number in the file where the panic was detected - * @return an integer containing the line number in the file where the panic was detected - */ - virtual int getLine() const noexcept = 0; - - /** - * Logs this exception to the system-log - */ - virtual void log() const noexcept = 0; - - /** - * Get the CallStack when the panic was detected - * @return the CallStack when the panic was detected - */ - virtual const CallStack& getCallStack() const noexcept = 0; -}; - -// ----------------------------------------------------------------------------------------------- - -/** - * @ingroup errors - * - * \brief Concrete implementation of the Panic interface. - * - * The TPanic<> class implements the std::exception protocol as well as the Panic - * interface common to all exceptions thrown by the framework. - */ -template -class UTILS_PUBLIC TPanic : public Panic { -public: - // std::exception protocol - const char* what() const noexcept override; - - // Panic interface - const char* getFunction() const noexcept override; - const char* getFile() const noexcept override; - int getLine() const noexcept override; - const CallStack& getCallStack() const noexcept override; - void log() const noexcept override; - - /** - * Depending on the mode set, either throws an exception of type T with the given reason plus - * extra information about the error-site, or logs the error and calls std::terminate(). - * This function never returns. - * @param function the name of the function where the error was detected - * @param file the file where the above function in implemented - * @param line the line in the above file where the error was detected - * @param format printf style string describing the error - * @see ASSERT_PRECONDITION, ASSERT_POSTCONDITION, ASSERT_ARITHMETIC - * @see PANIC_PRECONDITION, PANIC_POSTCONDITION, PANIC_ARITHMETIC - * @see setMode() - */ - static void panic(char const* function, char const* file, int line, const char* format, ...) - UTILS_NORETURN; - - /** - * Depending on the mode set, either throws an exception of type T with the given reason plus - * extra information about the error-site, or logs the error and calls std::terminate(). - * This function never returns. - * @param function the name of the function where the error was detected - * @param file the file where the above function in implemented - * @param line the line in the above file where the error was detected - * @param s std::string describing the error - * @see ASSERT_PRECONDITION, ASSERT_POSTCONDITION, ASSERT_ARITHMETIC - * @see PANIC_PRECONDITION, PANIC_POSTCONDITION, PANIC_ARITHMETIC - * @see setMode() - */ - static inline void panic(char const* function, char const* file, int line, const std::string& s) - UTILS_NORETURN { - panic(function, file, line, s.c_str()); - } - -protected: - /** - * Creates a Panic. - * @param reason a description of the cause of the error - */ - explicit TPanic(std::string reason); - - /** - * Creates a Panic with extra information about the error-site. - * @param function the name of the function where the error was detected - * @param file the file where the above function in implemented - * @param line the line in the above file where the error was detected - * @param reason a description of the cause of the error - */ - TPanic(char const* function, char const* file, int line, std::string reason); - - ~TPanic() override; - -private: - void buildMessage(); - - CallStack m_callstack; - std::string m_reason; - char const* const m_function = nullptr; - char const* const m_file = nullptr; - const int m_line = -1; - mutable std::string m_msg; -}; - -namespace details { -// these are private, don't use -void panicLog( - char const* function, char const* file, int line, const char* format, ...) noexcept; -} // namespace details - -// ----------------------------------------------------------------------------------------------- - -/** - * @ingroup errors - * - * ASSERT_PRECONDITION uses this Panic to report a precondition failure. - * @see ASSERT_PRECONDITION - */ -class UTILS_PUBLIC PreconditionPanic : public TPanic { - // Programming error, can be avoided - // e.g.: invalid arguments - using TPanic::TPanic; - friend class TPanic; -}; - -/** - * @ingroup errors - * - * ASSERT_POSTCONDITION uses this Panic to report a postcondition failure. - * @see ASSERT_POSTCONDITION - */ -class UTILS_PUBLIC PostconditionPanic : public TPanic { - // Usually only detectable at runtime - // e.g.: dead-lock would occur, arithmetic errors - using TPanic::TPanic; - friend class TPanic; -}; - -/** - * @ingroup errors - * - * ASSERT_ARITHMETIC uses this Panic to report an arithmetic (postcondition) failure. - * @see ASSERT_ARITHMETIC - */ -class UTILS_PUBLIC ArithmeticPanic : public TPanic { - // A common case of post-condition error - // e.g.: underflow, overflow, internal computations errors - using TPanic::TPanic; - friend class TPanic; -}; - -// ----------------------------------------------------------------------------------------------- -} // namespace utils - -#ifndef NDEBUG -# define PANIC_FILE(F) (F) -# define PANIC_FUNCTION __PRETTY_FUNCTION__ -#else -# define PANIC_FILE(F) "" -# define PANIC_FUNCTION __func__ -#endif - -/** - * PANIC_PRECONDITION is a macro that reports a PreconditionPanic - * @param format printf-style string describing the error in more details - */ -#define PANIC_PRECONDITION(format, ...) \ - ::utils::PreconditionPanic::panic(PANIC_FUNCTION, \ - PANIC_FILE(__FILE__), __LINE__, format, ##__VA_ARGS__) - -/** - * PANIC_POSTCONDITION is a macro that reports a PostconditionPanic - * @param format printf-style string describing the error in more details - */ -#define PANIC_POSTCONDITION(format, ...) \ - ::utils::PostconditionPanic::panic(PANIC_FUNCTION, \ - PANIC_FILE(__FILE__), __LINE__, format, ##__VA_ARGS__) - -/** - * PANIC_ARITHMETIC is a macro that reports a ArithmeticPanic - * @param format printf-style string describing the error in more details - */ -#define PANIC_ARITHMETIC(format, ...) \ - ::utils::ArithmeticPanic::panic(PANIC_FUNCTION, \ - PANIC_FILE(__FILE__), __LINE__, format, ##__VA_ARGS__) - -/** - * PANIC_LOG is a macro that logs a Panic, and continues as usual. - * @param format printf-style string describing the error in more details - */ -#define PANIC_LOG(format, ...) \ - ::utils::details::panicLog(PANIC_FUNCTION, \ - PANIC_FILE(__FILE__), __LINE__, format, ##__VA_ARGS__) - -/** - * @ingroup errors - * - * ASSERT_PRECONDITION is a macro that checks the given condition and reports a PreconditionPanic - * if it evaluates to false. - * @param cond a boolean expression - * @param format printf-style string describing the error in more details - */ -#define ASSERT_PRECONDITION(cond, format, ...) \ - (!UTILS_LIKELY(cond) ? PANIC_PRECONDITION(format, ##__VA_ARGS__) : (void)0) - -#if defined(UTILS_EXCEPTIONS) || !defined(NDEBUG) -#define ASSERT_PRECONDITION_NON_FATAL(cond, format, ...) \ - (!UTILS_LIKELY(cond) ? PANIC_PRECONDITION(format, ##__VA_ARGS__), false : true) -#else -#define ASSERT_PRECONDITION_NON_FATAL(cond, format, ...) \ - (!UTILS_LIKELY(cond) ? PANIC_LOG(format, ##__VA_ARGS__), false : true) -#endif - - -/** - * @ingroup errors - * - * ASSERT_POSTCONDITION is a macro that checks the given condition and reports a PostconditionPanic - * if it evaluates to false. - * @param cond a boolean expression - * @param format printf-style string describing the error in more details - * - * Example: - * @code - * int& Foo::operator[](size_t index) { - * ASSERT_POSTCONDITION(index=0 && v<65536, "overflow occurred"); - * return uint32_t(v); - * } - * @endcode - */ -#define ASSERT_ARITHMETIC(cond, format, ...) \ - (!(cond) ? PANIC_ARITHMETIC(format, ##__VA_ARGS__) : (void)0) - -#if defined(UTILS_EXCEPTIONS) || !defined(NDEBUG) -#define ASSERT_ARITHMETIC_NON_FATAL(cond, format, ...) \ - (!UTILS_LIKELY(cond) ? PANIC_ARITHMETIC(format, ##__VA_ARGS__), false : true) -#else -#define ASSERT_ARITHMETIC_NON_FATAL(cond, format, ...) \ - (!UTILS_LIKELY(cond) ? PANIC_LOG(format, ##__VA_ARGS__), false : true) -#endif - -/** - * @ingroup errors - * - * ASSERT_DESTRUCTOR is a macro that checks the given condition and logs an error - * if it evaluates to false. - * @param cond a boolean expression - * @param format printf-style string describing the error in more details - * - * @warning Use this macro if a destructor can fail, which should be avoided at all costs. - * Unlike the other ASSERT macros, this will never result in the process termination. Instead, - * the error will be logged and the program will continue as if nothing happened. - * - * Example: - * @code - * Foo::~Foo() { - * glDeleteTextures(1, &m_texture); - * GLint err = glGetError(); - * ASSERT_DESTRUCTOR(err == GL_NO_ERROR, "cannot free GL resource!"); - * } - * @endcode - */ -#define ASSERT_DESTRUCTOR(cond, format, ...) (!(cond) ? PANIC_LOG(format, ##__VA_ARGS__) : (void)0) - -#endif // TNT_UTILS_PANIC_H diff --git a/ios/include/filament/utils/SpinLock.h b/ios/include/filament/utils/SpinLock.h deleted file mode 100644 index e7ce00af..00000000 --- a/ios/include/filament/utils/SpinLock.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef TNT_UTILS_SPINLOCK_H -#define TNT_UTILS_SPINLOCK_H - -#include - -#include - -#include -#include - -#include -#include - -namespace utils { -namespace details { - -class SpinLock { - std::atomic_flag mLock = ATOMIC_FLAG_INIT; - -public: - void lock() noexcept { - UTILS_PREFETCHW(&mLock); -#ifdef __ARM_ACLE - // we signal an event on this CPU, so that the first yield() will be a no-op, - // and falls through the test_and_set(). This is more efficient than a while { } - // construct. - UTILS_SIGNAL_EVENT(); - do { - yield(); - } while (mLock.test_and_set(std::memory_order_acquire)); -#else - goto start; - do { - yield(); -start: ; - } while (mLock.test_and_set(std::memory_order_acquire)); -#endif - } - - void unlock() noexcept { - mLock.clear(std::memory_order_release); -#ifdef __ARM_ARCH_7A__ - // on ARMv7a SEL is needed - UTILS_SIGNAL_EVENT(); - // as well as a memory barrier is needed - __dsb(0xA); // ISHST = 0xA (b1010) -#else - // on ARMv8 we could avoid the call to SE, but we'd need to write the - // test_and_set() above by hand, so the WFE only happens without a STRX first. - UTILS_BROADCAST_EVENT(); -#endif - } - -private: - inline void yield() noexcept { - // on x86 call pause instruction, on ARM call WFE - UTILS_WAIT_FOR_EVENT(); - } -}; -} // namespace details - -#if UTILS_HAS_SANITIZE_THREAD -// Active spins with atomics slow down execution too much under ThreadSanitizer. -using SpinLock = Mutex; -#elif defined(__ARM_ARCH_7A__) -// We've had problems with "wfe" on some ARM-V7 devices, causing spurious SIGILL -using SpinLock = Mutex; -#else -using SpinLock = details::SpinLock; -#endif - -} // namespace utils - -#endif // TNT_UTILS_SPINLOCK_H diff --git a/ios/include/filament/utils/StructureOfArrays.h b/ios/include/filament/utils/StructureOfArrays.h deleted file mode 100644 index b6ea3bfb..00000000 --- a/ios/include/filament/utils/StructureOfArrays.h +++ /dev/null @@ -1,691 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_UTILS_STRUCTUREOFARRAYS_H -#define TNT_UTILS_STRUCTUREOFARRAYS_H - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include // note: this is safe, see how std::array is used below (inline / private) -#include -#include // for std::random_access_iterator_tag -#include -#include - -namespace utils { - -template -class StructureOfArraysBase { - // number of elements - static constexpr const size_t kArrayCount = sizeof...(Elements); - -public: - using SoA = StructureOfArraysBase; - - using Structure = std::tuple; - - // Type of the Nth array - template - using TypeAt = typename std::tuple_element_t; - - // Number of arrays - static constexpr size_t getArrayCount() noexcept { return kArrayCount; } - - // Size needed to store "size" array elements - static size_t getNeededSize(size_t size) noexcept { - return getOffset(kArrayCount - 1, size) + sizeof(TypeAt) * size; - } - - // -------------------------------------------------------------------------------------------- - - class IteratorValue; - template class Iterator; - using iterator = Iterator; - using const_iterator = Iterator; - using size_type = size_t; - using difference_type = ptrdiff_t; - - /* - * An object that represents a reference to the type dereferenced by iterator. - * In other words, it's the return type of iterator::operator*(), and since it - * cannot be a C++ reference (&), it's an object that acts like it. - */ - class IteratorValueRef { - friend class IteratorValue; - friend iterator; - friend const_iterator; - StructureOfArraysBase* const UTILS_RESTRICT soa; - size_t const index; - - IteratorValueRef(StructureOfArraysBase* soa, size_t index) : soa(soa), index(index) { } - - // assigns a value_type to a reference (i.e. assigns to what's pointed to by the reference) - template - IteratorValueRef& assign(IteratorValue const& rhs, std::index_sequence); - - // assigns a value_type to a reference (i.e. assigns to what's pointed to by the reference) - template - IteratorValueRef& assign(IteratorValue&& rhs, std::index_sequence) noexcept; - - // objects pointed to by reference can be swapped, so provide the special swap() function. - friend void swap(IteratorValueRef lhs, IteratorValueRef rhs) { - lhs.soa->swap(lhs.index, rhs.index); - } - - public: - // references can be created by copy-assignment only - IteratorValueRef(IteratorValueRef const& rhs) noexcept : soa(rhs.soa), index(rhs.index) { } - - // copy the content of a reference to the content of this one - IteratorValueRef& operator=(IteratorValueRef const& rhs); - - // move the content of a reference to the content of this one - IteratorValueRef& operator=(IteratorValueRef&& rhs) noexcept; - - // copy a value_type to the content of this reference - IteratorValueRef& operator=(IteratorValue const& rhs) { - return assign(rhs, std::make_index_sequence()); - } - - // move a value_type to the content of this reference - IteratorValueRef& operator=(IteratorValue&& rhs) noexcept { - return assign(rhs, std::make_index_sequence()); - } - - // access the elements of this reference (i.e. the "fields" of the structure) - template TypeAt const& get() const { return soa->elementAt(index); } - template TypeAt& get() { return soa->elementAt(index); } - }; - - - /* - * The value_type of iterator. This is basically the "structure" of the SoA. - * Internally we're using a tuple<> to store the data. - * This object is not trivial to construct, as it copies an entry of the SoA. - */ - class IteratorValue { - friend class IteratorValueRef; - friend iterator; - friend const_iterator; - using Type = std::tuple::type...>; - Type elements; - - template - static Type init(IteratorValueRef const& rhs, std::index_sequence) { - return Type{ rhs.soa->template elementAt(rhs.index)... }; - } - - template - static Type init(IteratorValueRef&& rhs, std::index_sequence) noexcept { - return Type{ std::move(rhs.soa->template elementAt(rhs.index))... }; - } - - public: - IteratorValue(IteratorValue const& rhs) = default; - IteratorValue(IteratorValue&& rhs) noexcept = default; - IteratorValue& operator=(IteratorValue const& rhs) = default; - IteratorValue& operator=(IteratorValue&& rhs) noexcept = default; - - // initialize and assign from a StructureRef - IteratorValue(IteratorValueRef const& rhs) - : elements(init(rhs, std::make_index_sequence())) {} - IteratorValue(IteratorValueRef&& rhs) noexcept - : elements(init(rhs, std::make_index_sequence())) {} - IteratorValue& operator=(IteratorValueRef const& rhs) { return operator=(IteratorValue(rhs)); } - IteratorValue& operator=(IteratorValueRef&& rhs) noexcept { return operator=(IteratorValue(rhs)); } - - // access the elements of this value_Type (i.e. the "fields" of the structure) - template TypeAt const& get() const { return std::get(elements); } - template TypeAt& get() { return std::get(elements); } - }; - - - /* - * An iterator to the SoA. This is only intended to be used with STL's algorithm, e.g.: sort(). - * Normally, SoA is not iterated globally, but rather an array at a time. - * Iterating itself is not too costly, as well as dereferencing by reference. However, - * dereferencing by value is. - */ - template - class Iterator { - friend class StructureOfArraysBase; - CVQualifiedSOAPointer soa; // don't use restrict, can have aliases if multiple iterators are created - size_t index; - - Iterator(CVQualifiedSOAPointer soa, size_t index) : soa(soa), index(index) {} - - public: - using value_type = IteratorValue; - using reference = IteratorValueRef; - using pointer = IteratorValueRef*; // FIXME: this should be a StructurePtr type - using difference_type = ptrdiff_t; - using iterator_category = std::random_access_iterator_tag; - - Iterator(Iterator const& rhs) noexcept = default; - Iterator& operator=(Iterator const& rhs) = default; - - reference operator*() const { return { soa, index }; } - reference operator*() { return { soa, index }; } - reference operator[](size_t n) { return *(*this + n); } - - template TypeAt const& get() const { return soa->template elementAt(index); } - template TypeAt& get() { return soa->template elementAt(index); } - - Iterator& operator++() { ++index; return *this; } - Iterator& operator--() { --index; return *this; } - Iterator& operator+=(size_t n) { index += n; return *this; } - Iterator& operator-=(size_t n) { index -= n; return *this; } - Iterator operator+(size_t n) const { return { soa, index + n }; } - Iterator operator-(size_t n) const { return { soa, index - n }; } - difference_type operator-(Iterator const& rhs) const { return index - rhs.index; } - bool operator==(Iterator const& rhs) const { return (index == rhs.index); } - bool operator!=(Iterator const& rhs) const { return (index != rhs.index); } - bool operator>=(Iterator const& rhs) const { return (index >= rhs.index); } - bool operator> (Iterator const& rhs) const { return (index > rhs.index); } - bool operator<=(Iterator const& rhs) const { return (index <= rhs.index); } - bool operator< (Iterator const& rhs) const { return (index < rhs.index); } - - // Postfix operator needed by Microsoft STL. - const Iterator operator++(int) { Iterator it(*this); index++; return it; } - const Iterator operator--(int) { Iterator it(*this); index--; return it; } - }; - - iterator begin() noexcept { return { this, 0u }; } - iterator end() noexcept { return { this, mSize }; } - const_iterator begin() const noexcept { return { this, 0u }; } - const_iterator end() const noexcept { return { this, mSize }; } - - // -------------------------------------------------------------------------------------------- - - StructureOfArraysBase() = default; - - explicit StructureOfArraysBase(size_t capacity) { - setCapacity(capacity); - } - - // not copyable for now - StructureOfArraysBase(StructureOfArraysBase const& rhs) = delete; - StructureOfArraysBase& operator=(StructureOfArraysBase const& rhs) = delete; - - // movability is trivial, so support it - StructureOfArraysBase(StructureOfArraysBase&& rhs) noexcept { - using std::swap; - swap(mCapacity, rhs.mCapacity); - swap(mSize, rhs.mSize); - swap(mArrays, rhs.mArrays); - swap(mAllocator, rhs.mAllocator); - } - - StructureOfArraysBase& operator=(StructureOfArraysBase&& rhs) noexcept { - if (this != &rhs) { - using std::swap; - swap(mCapacity, rhs.mCapacity); - swap(mSize, rhs.mSize); - swap(mArrays, rhs.mArrays); - swap(mAllocator, rhs.mAllocator); - } - return *this; - } - - ~StructureOfArraysBase() { - destroy_each(0, mSize); - mAllocator.free(std::get<0>(mArrays)); - } - - // -------------------------------------------------------------------------------------------- - - // return the size the array - size_t size() const noexcept { - return mSize; - } - - // return the capacity of the array - size_t capacity() const noexcept { - return mCapacity; - } - - // set the capacity of the array. the capacity cannot be smaller than the current size, - // the call is a no-op in that case. - UTILS_NOINLINE - void setCapacity(size_t capacity) { - // allocate enough space for "capacity" elements of each array - // capacity cannot change when optional storage is specified - if (capacity >= mSize) { - // TODO: not entirely sure if "max" of all alignments is always correct - constexpr size_t align = std::max({ std::max(alignof(std::max_align_t), alignof(Elements))... }); - const size_t sizeNeeded = getNeededSize(capacity); - void* buffer = mAllocator.alloc(sizeNeeded, align); - auto const oldBuffer = std::get<0>(mArrays); - - // move all the items (one array at a time) from the old allocation to the new - // this also update the array pointers - move_each(buffer, capacity); - - // free the old buffer - mAllocator.free(oldBuffer); - - // and make sure to update the capacity - mCapacity = capacity; - } - } - - void ensureCapacity(size_t needed) { - if (UTILS_UNLIKELY(needed > mCapacity)) { - // not enough space, increase the capacity - const size_t capacity = (needed * 3 + 1) / 2; - setCapacity(capacity); - } - } - - // grow or shrink the array to the given size. When growing, new elements are constructed - // with their default constructor. when shrinking, discarded elements are destroyed. - // If the arrays don't have enough capacity, the capacity is increased accordingly - // (the capacity is set to 3/2 of the asked size). - UTILS_NOINLINE - void resize(size_t needed) { - ensureCapacity(needed); - resizeNoCheck(needed); - if (needed <= mCapacity) { - // TODO: see if we should shrink the arrays - } - } - - void clear() noexcept { - resizeNoCheck(0); - } - - - inline void swap(size_t i, size_t j) noexcept { - forEach([i, j](auto p) { - using std::swap; - swap(p[i], p[j]); - }); - } - - // remove and destroy the last element of each array - inline void pop_back() noexcept { - if (mSize) { - destroy_each(mSize - 1, mSize); - mSize--; - } - } - - // create an element at the end of each array - StructureOfArraysBase& push_back() noexcept { - resize(mSize + 1); - return *this; - } - - StructureOfArraysBase& push_back(Structure&& args) noexcept { - ensureCapacity(mSize + 1); - return push_back_unsafe(std::forward(args)); - } - - StructureOfArraysBase& push_back(Elements const& ... args) noexcept { - ensureCapacity(mSize + 1); - return push_back_unsafe(args...); - } - - StructureOfArraysBase& push_back(Elements&& ... args) noexcept { - ensureCapacity(mSize + 1); - return push_back_unsafe(std::forward(args)...); - } - - // in C++20 we could use a lambda with explicit template parameter instead - struct PushBackUnsafeClosure { - size_t last; - std::tuple args; - inline explicit PushBackUnsafeClosure(size_t last, Structure&& args) - : last(last), args(std::forward(args)) {} - template - inline void operator()(TypeAt* p) { - new(p + last) TypeAt{ std::get(args) }; - } - }; - - StructureOfArraysBase& push_back_unsafe(Structure&& args) noexcept { - for_each_index(mArrays, - PushBackUnsafeClosure{ mSize++, std::forward(args) }); - return *this; - } - - StructureOfArraysBase& push_back_unsafe(Elements const& ... args) noexcept { - for_each_index(mArrays, - PushBackUnsafeClosure{ mSize++, { args... } }); - return *this; - } - - StructureOfArraysBase& push_back_unsafe(Elements&& ... args) noexcept { - for_each_index(mArrays, - PushBackUnsafeClosure{ mSize++, { std::forward(args)... }}); - return *this; - } - - template - void forEach(F&& f, ARGS&& ... args) { - for_each(mArrays, [&](size_t, auto* p) { - f(p, std::forward(args)...); - }); - } - - // return a pointer to the first element of the ElementIndex]th array - template - TypeAt* data() noexcept { - return std::get(mArrays); - } - - template - TypeAt const* data() const noexcept { - return std::get(mArrays); - } - - template - TypeAt* begin() noexcept { - return std::get(mArrays); - } - - template - TypeAt const* begin() const noexcept { - return std::get(mArrays); - } - - template - TypeAt* end() noexcept { - return std::get(mArrays) + size(); - } - - template - TypeAt const* end() const noexcept { - return std::get(mArrays) + size(); - } - - template - Slice> slice() noexcept { - return { begin(), end() }; - } - - template - Slice> slice() const noexcept { - return { begin(), end() }; - } - - // return a reference to the index'th element of the ElementIndex'th array - template - TypeAt& elementAt(size_t index) noexcept { - return data()[index]; - } - - template - TypeAt const& elementAt(size_t index) const noexcept { - return data()[index]; - } - - // return a reference to the last element of the ElementIndex'th array - template - TypeAt& back() noexcept { - return data()[size() - 1]; - } - - template - TypeAt const& back() const noexcept { - return data()[size() - 1]; - } - - template - struct Field { - SoA& soa; - IndexType i; - using Type = typename SoA::template TypeAt; - - UTILS_ALWAYS_INLINE Field& operator = (Field&& rhs) noexcept { - soa.elementAt(i) = soa.elementAt(rhs.i); - return *this; - } - - // auto-conversion to the field's type - UTILS_ALWAYS_INLINE operator Type&() noexcept { - return soa.elementAt(i); - } - UTILS_ALWAYS_INLINE operator Type const&() const noexcept { - return soa.elementAt(i); - } - // dereferencing the selected field - UTILS_ALWAYS_INLINE Type& operator ->() noexcept { - return soa.elementAt(i); - } - UTILS_ALWAYS_INLINE Type const& operator ->() const noexcept { - return soa.elementAt(i); - } - // address-of the selected field - UTILS_ALWAYS_INLINE Type* operator &() noexcept { - return &soa.elementAt(i); - } - UTILS_ALWAYS_INLINE Type const* operator &() const noexcept { - return &soa.elementAt(i); - } - // assignment to the field - UTILS_ALWAYS_INLINE Type const& operator = (Type const& other) noexcept { - return (soa.elementAt(i) = other); - } - UTILS_ALWAYS_INLINE Type const& operator = (Type&& other) noexcept { - return (soa.elementAt(i) = other); - } - // comparisons - UTILS_ALWAYS_INLINE bool operator==(Type const& other) const { - return (soa.elementAt(i) == other); - } - UTILS_ALWAYS_INLINE bool operator!=(Type const& other) const { - return (soa.elementAt(i) != other); - } - // calling the field - template - UTILS_ALWAYS_INLINE decltype(auto) operator()(ARGS&& ... args) noexcept { - return soa.elementAt(i)(std::forward(args)...); - } - template - UTILS_ALWAYS_INLINE decltype(auto) operator()(ARGS&& ... args) const noexcept { - return soa.elementAt(i)(std::forward(args)...); - } - }; - -private: - template - inline typename std::enable_if::type - for_each(std::tuple&, FuncT) {} - - template - inline typename std::enable_if::type - for_each(std::tuple& t, FuncT f) { - f(I, std::get(t)); - for_each(t, f); - } - - template - inline typename std::enable_if::type - for_each_index(std::tuple&, FuncT) {} - - template - inline typename std::enable_if::type - for_each_index(std::tuple& t, FuncT f) { - f.template operator()(std::get(t)); - for_each_index(t, f); - } - - inline void resizeNoCheck(size_t needed) noexcept { - assert(mCapacity >= needed); - if (needed < mSize) { - // we shrink the arrays - destroy_each(needed, mSize); - } else if (needed > mSize) { - // we grow the arrays - construct_each(mSize, needed); - } - // record the new size of the arrays - mSize = needed; - } - - // this calculates the offset adjusted for all data alignment of a given array - static inline size_t getOffset(size_t index, size_t capacity) noexcept { - auto offsets = getOffsets(capacity); - return offsets[index]; - } - - static inline std::array getOffsets(size_t capacity) noexcept { - // compute the required size of each array - const size_t sizes[] = { (sizeof(Elements) * capacity)... }; - - // we align each array to at least the same alignment guaranteed by malloc - constexpr size_t const alignments[] = { std::max(alignof(std::max_align_t), alignof(Elements))... }; - - // hopefully most of this gets unrolled and inlined - std::array offsets; - offsets[0] = 0; - UTILS_UNROLL - for (size_t i = 1; i < kArrayCount; i++) { - size_t unalignment = (offsets[i - 1] + sizes[i - 1]) % alignments[i]; - size_t alignment = unalignment ? (alignments[i] - unalignment) : 0; - offsets[i] = offsets[i - 1] + (sizes[i - 1] + alignment); - assert_invariant(offsets[i] % alignments[i] == 0); - } - return offsets; - } - - void construct_each(size_t from, size_t to) noexcept { - forEach([from, to](auto p) { - using T = typename std::decay::type; - // note: scalar types like int/float get initialized to zero - if constexpr (!std::is_trivially_default_constructible_v) { - for (size_t i = from; i < to; i++) { - new(p + i) T(); - } - } - }); - } - - void destroy_each(size_t from, size_t to) noexcept { - forEach([from, to](auto p) { - using T = typename std::decay::type; - if constexpr (!std::is_trivially_destructible_v) { - for (size_t i = from; i < to; i++) { - p[i].~T(); - } - } - }); - } - - void move_each(void* buffer, size_t capacity) noexcept { - auto offsets = getOffsets(capacity); - size_t index = 0; - if (mSize) { - auto size = mSize; // placate a compiler warning - forEach([buffer, &index, &offsets, size](auto p) { - using T = typename std::decay::type; - T* UTILS_RESTRICT b = static_cast(buffer); - - // go through each element and move them from the old array to the new - // then destroy them from the old array - T* UTILS_RESTRICT const arrayPointer = - reinterpret_cast(uintptr_t(b) + offsets[index]); - - // for trivial cases, just call memcpy() - if constexpr (std::is_trivially_copyable_v && - std::is_trivially_destructible_v) { - memcpy(arrayPointer, p, size * sizeof(T)); - } else { - for (size_t i = 0; i < size; i++) { - // we move an element by using the in-place move-constructor - new(arrayPointer + i) T(std::move(p[i])); - if constexpr (!std::is_trivially_destructible_v) { - // and delete them by calling the destructor directly - p[i].~T(); - } - } - } - index++; - }); - } - - // update the pointers - for_each(mArrays, [buffer, &offsets](size_t i, auto&& p) { - using Type = std::remove_reference_t; - p = Type((char*)buffer + offsets[i]); - }); - } - - // capacity in array elements - size_t mCapacity = 0; - // size in array elements - size_t mSize = 0; - // N pointers to each arrays - std::tuple...> mArrays{}; - Allocator mAllocator; -}; - - -template -inline -typename StructureOfArraysBase::IteratorValueRef& -StructureOfArraysBase::IteratorValueRef::operator=( - StructureOfArraysBase::IteratorValueRef const& rhs) { - return operator=(IteratorValue(rhs)); -} - -template -inline -typename StructureOfArraysBase::IteratorValueRef& -StructureOfArraysBase::IteratorValueRef::operator=( - StructureOfArraysBase::IteratorValueRef&& rhs) noexcept { - return operator=(IteratorValue(rhs)); -} - -template -template -inline -typename StructureOfArraysBase::IteratorValueRef& -StructureOfArraysBase::IteratorValueRef::assign( - StructureOfArraysBase::IteratorValue const& rhs, std::index_sequence) { - // implements IteratorValueRef& IteratorValueRef::operator=(IteratorValue const& rhs) - auto UTILS_UNUSED l = { (soa->elementAt(index) = std::get(rhs.elements), 0)... }; - return *this; -} - -template -template -inline -typename StructureOfArraysBase::IteratorValueRef& -StructureOfArraysBase::IteratorValueRef::assign( - StructureOfArraysBase::IteratorValue&& rhs, std::index_sequence) noexcept { - // implements IteratorValueRef& IteratorValueRef::operator=(IteratorValue&& rhs) noexcept - auto UTILS_UNUSED l = { - (soa->elementAt(index) = std::move(std::get(rhs.elements)), 0)... }; - return *this; -} - -template -using StructureOfArrays = StructureOfArraysBase, Elements ...>; - -} // namespace utils - -#endif // TNT_UTILS_STRUCTUREOFARRAYS_H - diff --git a/ios/include/filament/utils/android/Systrace.h b/ios/include/filament/utils/android/Systrace.h deleted file mode 100644 index 41b64f16..00000000 --- a/ios/include/filament/utils/android/Systrace.h +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Copyright (C) 2023 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. -*/ - -#ifndef TNT_UTILS_ANDROID_SYSTRACE_H -#define TNT_UTILS_ANDROID_SYSTRACE_H - -#include - -#include -#include -#include - -#include - -// enable tracing -#define SYSTRACE_ENABLE() ::utils::details::Systrace::enable(SYSTRACE_TAG) - -// disable tracing -#define SYSTRACE_DISABLE() ::utils::details::Systrace::disable(SYSTRACE_TAG) - - -/** - * Creates a Systrace context in the current scope. needed for calling all other systrace - * commands below. - */ -#define SYSTRACE_CONTEXT() ::utils::details::Systrace ___trctx(SYSTRACE_TAG) - - -// SYSTRACE_NAME traces the beginning and end of the current scope. To trace -// the correct start and end times this macro should be declared first in the -// scope body. -// It also automatically creates a Systrace context -#define SYSTRACE_NAME(name) ::utils::details::ScopedTrace ___tracer(SYSTRACE_TAG, name) - -// Denotes that a new frame has started processing. -#define SYSTRACE_FRAME_ID(frame) \ - { /* scope for frame id trace */ \ - char buf[64]; \ - snprintf(buf, 64, "frame %u", frame); \ - SYSTRACE_NAME(buf); \ - } - -// SYSTRACE_CALL is an SYSTRACE_NAME that uses the current function name. -#define SYSTRACE_CALL() SYSTRACE_NAME(__FUNCTION__) - -#define SYSTRACE_NAME_BEGIN(name) \ - ___trctx.traceBegin(SYSTRACE_TAG, name) - -#define SYSTRACE_NAME_END() \ - ___trctx.traceEnd(SYSTRACE_TAG) - - -/** - * Trace the beginning of an asynchronous event. Unlike ATRACE_BEGIN/ATRACE_END - * contexts, asynchronous events do not need to be nested. The name describes - * the event, and the cookie provides a unique identifier for distinguishing - * simultaneous events. The name and cookie used to begin an event must be - * used to end it. - */ -#define SYSTRACE_ASYNC_BEGIN(name, cookie) \ - ___trctx.asyncBegin(SYSTRACE_TAG, name, cookie) - -/** - * Trace the end of an asynchronous event. - * This should have a corresponding SYSTRACE_ASYNC_BEGIN. - */ -#define SYSTRACE_ASYNC_END(name, cookie) \ - ___trctx.asyncEnd(SYSTRACE_TAG, name, cookie) - -/** - * Traces an integer counter value. name is used to identify the counter. - * This can be used to track how a value changes over time. - */ -#define SYSTRACE_VALUE32(name, val) \ - ___trctx.value(SYSTRACE_TAG, name, int32_t(val)) - -#define SYSTRACE_VALUE64(name, val) \ - ___trctx.value(SYSTRACE_TAG, name, int64_t(val)) - -// ------------------------------------------------------------------------------------------------ -// No user serviceable code below... -// ------------------------------------------------------------------------------------------------ - -namespace utils { -namespace details { - -class Systrace { - public: - - enum tags { - NEVER = SYSTRACE_TAG_NEVER, - ALWAYS = SYSTRACE_TAG_ALWAYS, - FILAMENT = SYSTRACE_TAG_FILAMENT, - JOBSYSTEM = SYSTRACE_TAG_JOBSYSTEM - // we could define more TAGS here, as we need them. - }; - - explicit Systrace(uint32_t tag) noexcept { - if (tag) init(tag); - } - - static void enable(uint32_t tags) noexcept; - static void disable(uint32_t tags) noexcept; - - - inline void traceBegin(uint32_t tag, const char* name) noexcept { - if (tag && UTILS_UNLIKELY(mIsTracingEnabled)) { - beginSection(this, name); - } - } - - inline void traceEnd(uint32_t tag) noexcept { - if (tag && UTILS_UNLIKELY(mIsTracingEnabled)) { - endSection(this); - } - } - - inline void asyncBegin(uint32_t tag, const char* name, int32_t cookie) noexcept { - if (tag && UTILS_UNLIKELY(mIsTracingEnabled)) { - beginAsyncSection(this, name, cookie); - } - } - - inline void asyncEnd(uint32_t tag, const char* name, int32_t cookie) noexcept { - if (tag && UTILS_UNLIKELY(mIsTracingEnabled)) { - endAsyncSection(this, name, cookie); - } - } - - inline void value(uint32_t tag, const char* name, int32_t value) noexcept { - if (tag && UTILS_UNLIKELY(mIsTracingEnabled)) { - setCounter(this, name, value); - } - } - - inline void value(uint32_t tag, const char* name, int64_t value) noexcept { - if (tag && UTILS_UNLIKELY(mIsTracingEnabled)) { - setCounter(this, name, value); - } - } - - private: - friend class ScopedTrace; - - // whether tracing is supported at all by the platform - - using ATrace_isEnabled_t = bool (*)(); - using ATrace_beginSection_t = void (*)(const char* sectionName); - using ATrace_endSection_t = void (*)(); - using ATrace_beginAsyncSection_t = void (*)(const char* sectionName, int32_t cookie); - using ATrace_endAsyncSection_t = void (*)(const char* sectionName, int32_t cookie); - using ATrace_setCounter_t = void (*)(const char* counterName, int64_t counterValue); - - struct GlobalState { - bool isTracingAvailable; - std::atomic isTracingEnabled; - int markerFd; - - ATrace_isEnabled_t ATrace_isEnabled; - ATrace_beginSection_t ATrace_beginSection; - ATrace_endSection_t ATrace_endSection; - ATrace_beginAsyncSection_t ATrace_beginAsyncSection; - ATrace_endAsyncSection_t ATrace_endAsyncSection; - ATrace_setCounter_t ATrace_setCounter; - - void (*beginSection)(Systrace* that, const char* name); - void (*endSection)(Systrace* that); - void (*beginAsyncSection)(Systrace* that, const char* name, int32_t cookie); - void (*endAsyncSection)(Systrace* that, const char* name, int32_t cookie); - void (*setCounter)(Systrace* that, const char* name, int64_t value); - }; - - static GlobalState sGlobalState; - - - // per-instance versions for better performance - ATrace_isEnabled_t ATrace_isEnabled; - ATrace_beginSection_t ATrace_beginSection; - ATrace_endSection_t ATrace_endSection; - ATrace_beginAsyncSection_t ATrace_beginAsyncSection; - ATrace_endAsyncSection_t ATrace_endAsyncSection; - ATrace_setCounter_t ATrace_setCounter; - - void (*beginSection)(Systrace* that, const char* name); - void (*endSection)(Systrace* that); - void (*beginAsyncSection)(Systrace* that, const char* name, int32_t cookie); - void (*endAsyncSection)(Systrace* that, const char* name, int32_t cookie); - void (*setCounter)(Systrace* that, const char* name, int64_t value); - - void init(uint32_t tag) noexcept; - - // cached values for faster access, no need to be initialized - bool mIsTracingEnabled; - int mMarkerFd = -1; - pid_t mPid; - - static void setup() noexcept; - static void init_once() noexcept; - static bool isTracingEnabled(uint32_t tag) noexcept; - - static void begin_body(int fd, int pid, const char* name) noexcept; - static void end_body(int fd, int pid) noexcept; - static void async_begin_body(int fd, int pid, const char* name, int32_t cookie) noexcept; - static void async_end_body(int fd, int pid, const char* name, int32_t cookie) noexcept; - static void int64_body(int fd, int pid, const char* name, int64_t value) noexcept; -}; - -// ------------------------------------------------------------------------------------------------ - -class ScopedTrace { -public: - // we don't inline this because it's relatively heavy due to a global check - ScopedTrace(uint32_t tag, const char* name) noexcept: mTrace(tag), mTag(tag) { - mTrace.traceBegin(tag, name); - } - - inline ~ScopedTrace() noexcept { - mTrace.traceEnd(mTag); - } - -private: - Systrace mTrace; - const uint32_t mTag; -}; - -} // namespace details -} // namespace utils - -#endif // TNT_UTILS_ANDROID_SYSTRACE_H diff --git a/ios/include/filament/utils/android/ThermalManager.h b/ios/include/filament/utils/android/ThermalManager.h deleted file mode 100644 index 6c303b04..00000000 --- a/ios/include/filament/utils/android/ThermalManager.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -#ifndef TNT_UTILS_ANDROID_THERMALMANAGER_H -#define TNT_UTILS_ANDROID_THERMALMANAGER_H - -#include - -#include - -struct AThermalManager; - -namespace utils { - -class ThermalManager { -public: - enum class ThermalStatus : int8_t { - ERROR = -1, - NONE, - LIGHT, - MODERATE, - SEVERE, - CRITICAL, - EMERGENCY, - SHUTDOWN - }; - - ThermalManager(); - ~ThermalManager(); - - // Movable - ThermalManager(ThermalManager&& rhs) noexcept; - ThermalManager& operator=(ThermalManager&& rhs) noexcept; - - // not copiable - ThermalManager(ThermalManager const& rhs) = delete; - ThermalManager& operator=(ThermalManager const& rhs) = delete; - - ThermalStatus getCurrentThermalStatus() const noexcept; - -private: - AThermalManager* mThermalManager = nullptr; -}; - -} // namespace utils - -#endif // TNT_UTILS_ANDROID_THERMALMANAGER_H diff --git a/ios/include/filament/utils/ostream.h b/ios/include/filament/utils/ostream.h deleted file mode 100644 index cc4df031..00000000 --- a/ios/include/filament/utils/ostream.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef TNT_UTILS_OSTREAM_H -#define TNT_UTILS_OSTREAM_H - -#include -#include -#include - -#include -#include -#include - -namespace utils::io { - -struct ostream_; - -class UTILS_PUBLIC ostream : protected utils::PrivateImplementation { - friend struct ostream_; - -public: - virtual ~ostream(); - - ostream& operator<<(short value) noexcept; - ostream& operator<<(unsigned short value) noexcept; - - ostream& operator<<(char value) noexcept; - ostream& operator<<(unsigned char value) noexcept; - - ostream& operator<<(int value) noexcept; - ostream& operator<<(unsigned int value) noexcept; - - ostream& operator<<(long value) noexcept; - ostream& operator<<(unsigned long value) noexcept; - - ostream& operator<<(long long value) noexcept; - ostream& operator<<(unsigned long long value) noexcept; - - ostream& operator<<(float value) noexcept; - ostream& operator<<(double value) noexcept; - ostream& operator<<(long double value) noexcept; - - ostream& operator<<(bool value) noexcept; - - ostream& operator<<(const void* value) noexcept; - - ostream& operator<<(const char* string) noexcept; - ostream& operator<<(const unsigned char* string) noexcept; - - ostream& operator<<(std::string const& s) noexcept; - ostream& operator<<(std::string_view const& s) noexcept; - - ostream& operator<<(ostream& (* f)(ostream&)) noexcept { return f(*this); } - - ostream& dec() noexcept; - ostream& hex() noexcept; - -protected: - ostream& print(const char* format, ...) noexcept; - - class Buffer { - public: - Buffer() noexcept; - ~Buffer() noexcept; - - Buffer(const Buffer&) = delete; - Buffer& operator=(const Buffer&) = delete; - - const char* get() const noexcept { return buffer; } - - std::pair grow(size_t s) noexcept; - void advance(ssize_t n) noexcept; - void reset() noexcept; - - private: - void reserve(size_t newSize) noexcept; - - char* buffer = nullptr; // buffer address - char* curr = nullptr; // current pointer - size_t size = 0; // size remaining - size_t capacity = 0; // total capacity of the buffer - }; - - Buffer& getBuffer() noexcept; - Buffer const& getBuffer() const noexcept; - -private: - virtual ostream& flush() noexcept = 0; - - friend ostream& hex(ostream& s) noexcept; - friend ostream& dec(ostream& s) noexcept; - friend ostream& endl(ostream& s) noexcept; - friend ostream& flush(ostream& s) noexcept; - - enum type { - SHORT, USHORT, CHAR, UCHAR, INT, UINT, LONG, ULONG, LONG_LONG, ULONG_LONG, FLOAT, DOUBLE, - LONG_DOUBLE - }; - - const char* getFormat(type t) const noexcept; -}; - -// handles utils::bitset -inline ostream& operator << (ostream& o, utils::bitset32 const& s) noexcept { - return o << (void*)uintptr_t(s.getValue()); -} - -// handles vectors from libmath (but we do this generically, without needing a dependency on libmath) -template class VECTOR, typename T> -inline ostream& operator<<(ostream& stream, const VECTOR& v) { - stream << "< "; - for (size_t i = 0; i < v.size() - 1; i++) { - stream << v[i] << ", "; - } - stream << v[v.size() - 1] << " >"; - return stream; -} - -inline ostream& hex(ostream& s) noexcept { return s.hex(); } -inline ostream& dec(ostream& s) noexcept { return s.dec(); } -inline ostream& endl(ostream& s) noexcept { s << '\n'; return s.flush(); } -inline ostream& flush(ostream& s) noexcept { return s.flush(); } - -} // namespace utils::io - -#endif // TNT_UTILS_OSTREAM_H diff --git a/ios/include/filament/viewer/ViewerGui.h b/ios/include/filament/viewer/ViewerGui.h deleted file mode 100644 index 0130e28c..00000000 --- a/ios/include/filament/viewer/ViewerGui.h +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -#ifndef VIEWER_VIEWERGUI_H -#define VIEWER_VIEWERGUI_H - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -#include -#include - -#include -#include - -namespace filagui { - class ImGuiHelper; -} - -namespace filament { -namespace viewer { - -/** - * \class ViewerGui ViewerGui.h viewer/ViewerGui.h - * \brief Builds ImGui widgets for a simple glTF viewer and manages the associated state. - * - * This is a utility that can be used across multiple platforms, including web. - * - * \note If you don't need ImGui controls, there is no need to use this class, just use AssetLoader - * instead. - */ -class UTILS_PUBLIC ViewerGui { -public: - using Animator = gltfio::Animator; - using FilamentAsset = gltfio::FilamentAsset; - using FilamentInstance = gltfio::FilamentInstance; - - static constexpr int DEFAULT_SIDEBAR_WIDTH = 350; - - /** - * Constructs a ViewerGui that has a fixed association with the given Filament objects. - * - * Upon construction, the simple viewer may create some additional Filament objects (such as - * light sources) that it owns. - */ - ViewerGui(Engine* engine, Scene* scene, View* view, - int sidebarWidth = DEFAULT_SIDEBAR_WIDTH); - - /** - * Destroys the ViewerGui and any Filament entities that it owns. - */ - ~ViewerGui(); - - /** - * Sets the viewer's current asset and instance. - * - * The viewer does not claim ownership over the asset or its entities. Clients should use - * AssetLoader and ResourceLoader to load an asset before passing it in. - * - * This method does not add renderables to the scene; see populateScene(). - * - * @param instance The asset to view. - * @param instance The instance to view. - */ - void setAsset(FilamentAsset* asset, FilamentInstance* instance); - - /** - * Adds the asset's ready-to-render entities into the scene. - * - * This is used for asychronous loading. It can be called once per frame to gradually add - * entities into the scene as their textures are loaded. - */ - void populateScene(); - - /** - * Removes the current asset from the viewer. - * - * This removes all the asset entities from the Scene, but does not destroy them. - */ - void removeAsset(); - - /** - * Sets or changes the current scene's IBL to allow the UI manipulate it. - */ - void setIndirectLight(IndirectLight* ibl, math::float3 const* sh3); - - /** - * Applies the currently-selected glTF animation to the transformation hierarchy and updates - * the bone matrices on all renderables. - * - * If an instance is provided, animation is applied to it rather than the "set" instance. - */ - void applyAnimation(double currentTime, FilamentInstance* instance = nullptr); - - /** - * Constructs ImGui controls for the current frame and responds to everything that the user has - * changed since the previous frame. - * - * If desired this can be used in conjunction with the filagui library, which allows clients to - * render ImGui controls with Filament. - */ - void updateUserInterface(); - - /** - * Alternative to updateUserInterface that uses an internal instance of ImGuiHelper. - * - * This utility method is designed for clients that do not want to manage their own instance of - * ImGuiHelper (e.g., JavaScript clients). - * - * Behind the scenes this simply calls ImGuiHelper->render() and passes updateUserInterface into - * its callback. Note that the first call might be slower since it requires the creation of the - * internal ImGuiHelper instance. - */ - void renderUserInterface(float timeStepInSeconds, View* guiView, float pixelRatio); - - /** - * Event-passing methods, useful only when ViewerGui manages its own instance of ImGuiHelper. - * The key codes used in these methods are just normal ASCII/ANSI codes. - * @{ - */ - void mouseEvent(float mouseX, float mouseY, bool mouseButton, float mouseWheelY, bool control); - void keyDownEvent(int keyCode); - void keyUpEvent(int keyCode); - void keyPressEvent(int charCode); - /** @}*/ - - /** - * Retrieves the current width of the ImGui "window" which we are using as a sidebar. - * Clients can monitor this value to adjust the size of the view. - */ - int getSidebarWidth() const { return mSidebarWidth; } - - /** - * Allows clients to inject custom UI. - */ - void setUiCallback(std::function callback) { mCustomUI = callback; } - - /** - * Draws the bounding box of each renderable. - * Defaults to false. - */ - void enableWireframe(bool b) { mEnableWireframe = b; } - - /** - * Enables a built-in light source (useful for creating shadows). - * Defaults to true. - */ - void enableSunlight(bool b) { mSettings.lighting.enableSunlight = b; } - - /** - * Enables dithering on the view. - * Defaults to true. - */ - void enableDithering(bool b) { - mSettings.view.dithering = b ? Dithering::TEMPORAL : Dithering::NONE; - } - - /** - * Enables FXAA antialiasing in the post-process pipeline. - * Defaults to true. - */ - void enableFxaa(bool b) { - mSettings.view.antiAliasing = b ? AntiAliasing::FXAA : AntiAliasing::NONE; - } - - /** - * Enables hardware-based MSAA antialiasing. - * Defaults to true. - */ - void enableMsaa(bool b) { - mSettings.view.msaa.sampleCount = 4; - mSettings.view.msaa.enabled = b; - } - - /** - * Enables screen-space ambient occlusion in the post-process pipeline. - * Defaults to true. - */ - void enableSSAO(bool b) { mSettings.view.ssao.enabled = b; } - - /** - * Enables Bloom. - * Defaults to true. - */ - void enableBloom(bool bloom) { mSettings.view.bloom.enabled = bloom; } - - /** - * Adjusts the intensity of the IBL. - * See also IndirectLight::setIntensity(). - * Defaults to 30000.0. - */ - void setIBLIntensity(float brightness) { mSettings.lighting.iblIntensity = brightness; } - - /** - * Updates the transform at the root node according to the autoScaleEnabled setting. - */ - void updateRootTransform(); - - /** - * Gets a modifiable reference to stashed state. - */ - Settings& getSettings() { return mSettings; } - - void stopAnimation() { mCurrentAnimation = 0; } - - int getCurrentCamera() const { return mCurrentCamera; } - - float getOcularDistance() const { return mOcularDistance; } - -private: - using SceneMask = gltfio::NodeManager::SceneMask; - - bool isRemoteMode() const { return mAsset == nullptr; } - - void sceneSelectionUI(); - - // Immutable properties set from the constructor. - Engine* const mEngine; - Scene* const mScene; - View* const mView; - const utils::Entity mSunlight; - - // Lazily instantiated fields. - filagui::ImGuiHelper* mImGuiHelper = nullptr; - - // Properties that can be changed from the application. - FilamentAsset* mAsset = nullptr; - FilamentInstance* mInstance = nullptr; - IndirectLight* mIndirectLight = nullptr; - std::function mCustomUI; - - // Properties that can be changed from the UI. - int mCurrentAnimation = 1; // It is a 1-based index and 0 means not playing animation - int mCurrentVariant = 0; - bool mEnableWireframe = false; - int mVsmMsaaSamplesLog2 = 1; - Settings mSettings; - int mSidebarWidth; - uint32_t mFlags; - utils::Entity mCurrentMorphingEntity; - std::vector mMorphWeights; - SceneMask mVisibleScenes; - bool mShowingRestPose = false; - - // Stereoscopic debugging - float mOcularDistance = 0.0f; - - // 0 is the default "free camera". Additional cameras come from the gltf file (1-based index). - int mCurrentCamera = 0; - - // Cross fade animation parameters. - float mCrossFadeDuration = 0.5f; // number of seconds to transition between animations - int mPreviousAnimation = 0; // one-based index of the previous animation - double mCurrentStartTime = 0.0f; // start time of most recent cross-fade (seconds) - double mPreviousStartTime = 0.0f; // start time of previous cross-fade (seconds) - bool mResetAnimation = true; // set when building ImGui widgets, honored in applyAnimation - - // Color grading UI state. - float mToneMapPlot[1024]; - float mRangePlot[1024 * 3]; - float mCurvePlot[1024 * 3]; -}; - -UTILS_PUBLIC -math::mat4f fitIntoUnitCube(const Aabb& bounds, float zoffset); - -} // namespace viewer -} // namespace filament - -#endif // VIEWER_VIEWERGUI_H diff --git a/ios/include/material/image.bin b/ios/include/material/image.bin deleted file mode 100644 index ae04dc11..00000000 Binary files a/ios/include/material/image.bin and /dev/null differ diff --git a/ios/include/material/image.c b/ios/include/material/image.c deleted file mode 100644 index 7d2712e3..00000000 --- a/ios/include/material/image.c +++ /dev/null @@ -1,1813 +0,0 @@ -#include - -const uint8_t IMAGE_PACKAGE[] = { -// IMAGE -0x53, 0x52, 0x45, 0x56, 0x5f, 0x54, 0x41, 0x4d, 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x54, 0x41, 0x45, 0x46, -0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x45, 0x4d, 0x41, 0x4e, 0x5f, 0x54, 0x41, 0x4d, 0x06, 0x00, 0x00, -0x00, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x00, 0x4c, 0x44, 0x4d, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x04, 0x00, 0x00, 0x00, 0x06, -0x00, 0x00, 0x00, 0x4e, 0x4d, 0x4f, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x46, 0x49, 0x4e, 0x55, -0x5f, 0x54, 0x41, 0x4d, 0x98, 0x00, 0x00, 0x00, 0x09, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x00, 0x00, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x01, -0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x04, 0x53, 0x68, 0x61, 0x64, -0x6f, 0x77, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x05, 0x46, 0x72, 0x6f, 0x78, 0x65, 0x6c, 0x52, 0x65, -0x63, 0x6f, 0x72, 0x64, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x06, 0x46, 0x72, 0x6f, 0x78, 0x65, 0x6c, -0x73, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x07, 0x42, 0x6f, 0x6e, 0x65, 0x73, 0x55, 0x6e, 0x69, 0x66, -0x6f, 0x72, 0x6d, 0x73, 0x00, 0x02, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x69, 0x6e, 0x67, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x00, 0x03, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x08, -0x50, 0x4d, 0x41, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0xbf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x02, 0x07, 0x07, 0x01, 0x02, 0x09, -0x07, 0x01, 0x0a, 0x00, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x4d, 0x61, 0x70, 0x00, -0x01, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x69, 0x62, 0x6c, 0x44, 0x46, 0x47, 0x00, 0x02, 0x6c, 0x69, 0x67, 0x68, 0x74, -0x5f, 0x69, 0x62, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x00, 0x03, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, -0x73, 0x73, 0x61, 0x6f, 0x00, 0x04, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x73, 0x72, 0x00, 0x05, 0x6c, 0x69, 0x67, -0x68, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x00, 0x06, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, -0x66, 0x6f, 0x67, 0x00, 0x07, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, -0x65, 0x72, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x00, 0x08, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x54, -0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x6e, 0x67, 0x65, 0x6e, 0x74, 0x73, -0x00, 0x09, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, -0x67, 0x65, 0x00, 0x20, 0x42, 0x49, 0x55, 0x5f, 0x54, 0x41, 0x4d, 0x59, 0x00, 0x00, 0x00, 0x4d, 0x61, 0x74, 0x65, 0x72, -0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x72, -0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x02, 0x62, 0x61, -0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x06, 0x03, 0x73, 0x68, 0x6f, 0x77, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x08, 0x03, 0x20, 0x42, 0x49, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x21, 0x00, 0x00, 0x00, 0x4d, 0x61, 0x74, 0x65, -0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, -0x6d, 0x61, 0x67, 0x65, 0x00, 0x00, 0x02, 0x03, 0x00, 0x53, 0x4e, 0x4f, 0x43, 0x5f, 0x54, 0x41, 0x4d, 0x08, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x17, 0x00, 0x00, -0x00, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x53, 0x53, 0x4f, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x4f, -0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x45, 0x4c, 0x42, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, -0x00, 0x00, 0x00, 0x44, 0x4d, 0x52, 0x54, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x46, 0x45, 0x52, -0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x49, 0x52, 0x57, 0x43, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, -0x00, 0x01, 0x53, 0x57, 0x45, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x49, 0x52, 0x57, 0x44, 0x5f, -0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x53, 0x45, 0x54, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, -0x01, 0x54, 0x53, 0x4e, 0x49, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x53, 0x43, 0x32, 0x41, 0x5f, 0x54, -0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x43, 0x32, 0x41, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, -0x4f, 0x4d, 0x55, 0x43, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x50, 0x4f, 0x52, 0x50, 0x5f, 0x54, 0x41, -0x4d, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x49, 0x55, 0x55, 0x5f, 0x54, 0x41, -0x4d, 0x08, 0x00, 0x00, 0x00, 0x9f, 0x16, 0x61, 0xc5, 0x23, 0x03, 0xad, 0xfb, 0x44, 0x41, 0x48, 0x53, 0x5f, 0x54, 0x41, -0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x4d, 0x48, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4d, -0x46, 0x45, 0x52, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x54, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x41, 0x4d, -0x01, 0x00, 0x00, 0x00, 0x00, 0x52, 0x4f, 0x49, 0x43, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x41, 0x51, -0x45, 0x52, 0x5f, 0x54, 0x41, 0x4d, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x41, 0x41, 0x50, 0x53, 0x5f, 0x54, -0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x52, 0x41, 0x56, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x04, 0x00, 0x00, 0x00, 0x9a, -0x99, 0x19, 0x3e, 0x52, 0x48, 0x54, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x04, 0x00, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x4f, -0x44, 0x45, 0x56, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x03, 0x52, 0x54, 0x4e, 0x49, 0x5f, 0x54, 0x41, 0x4d, -0x01, 0x00, 0x00, 0x00, 0x00, 0x50, 0x44, 0x53, 0x43, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x54, 0x58, -0x45, 0x54, 0x5f, 0x43, 0x49, 0x44, 0x7a, 0x70, 0x00, 0x00, 0x6d, 0x03, 0x00, 0x00, 0x23, 0x76, 0x65, 0x72, 0x73, 0x69, -0x6f, 0x6e, 0x20, 0x33, 0x30, 0x30, 0x20, 0x65, 0x73, 0x00, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x4d, 0x61, 0x74, -0x65, 0x72, 0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x00, 0x7b, 0x00, -0x76, 0x65, 0x63, 0x34, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x77, -0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x7d, 0x3b, 0x00, 0x23, 0x69, 0x66, -0x6e, 0x64, 0x65, 0x66, 0x20, 0x53, 0x50, 0x49, 0x52, 0x56, 0x5f, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4e, -0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x35, 0x00, 0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x53, -0x50, 0x49, 0x52, 0x56, 0x5f, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, -0x49, 0x44, 0x5f, 0x35, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x00, 0x23, 0x65, 0x6e, 0x64, 0x69, 0x66, 0x00, 0x63, 0x6f, -0x6e, 0x73, 0x74, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x50, 0x4f, 0x57, 0x45, -0x52, 0x5f, 0x56, 0x52, 0x5f, 0x53, 0x48, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x41, 0x52, 0x4f, 0x55, -0x4e, 0x44, 0x53, 0x20, 0x3d, 0x20, 0x53, 0x50, 0x49, 0x52, 0x56, 0x5f, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x4f, -0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x35, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, -0x73, 0x74, 0x64, 0x31, 0x34, 0x30, 0x29, 0x20, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x46, 0x72, 0x61, 0x6d, -0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x61, 0x3b, 0x00, 0x6d, 0x61, -0x74, 0x34, 0x20, 0x62, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x63, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x64, -0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x65, 0x5b, 0x32, 0x5d, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x66, 0x3b, -0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x67, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x68, 0x3b, 0x00, 0x76, 0x65, 0x63, -0x32, 0x20, 0x69, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, -0x6b, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6c, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6d, 0x3b, 0x00, 0x76, -0x65, 0x63, 0x32, 0x20, 0x6e, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6f, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, -0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x70, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, -0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x71, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x3b, 0x00, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x20, 0x73, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x75, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, -0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x77, 0x3b, 0x00, 0x6d, -0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x78, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, -0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x79, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x20, 0x61, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, -0x20, 0x62, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x75, 0x76, 0x65, 0x63, 0x33, 0x20, 0x63, -0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x64, 0x7a, 0x3b, 0x00, 0x6d, -0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x65, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, -0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, -0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x67, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, -0x76, 0x65, 0x63, 0x33, 0x20, 0x68, 0x7a, 0x5b, 0x39, 0x5d, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x69, 0x7a, 0x3b, -0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6a, 0x7a, 0x3b, 0x00, 0x6d, -0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6b, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, -0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6c, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, -0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6d, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x69, 0x6e, -0x74, 0x20, 0x6e, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, -0x6f, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x70, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, -0x20, 0x69, 0x6e, 0x74, 0x20, 0x71, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x72, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x20, 0x73, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, -0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x7a, 0x3b, -0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x7a, 0x3b, 0x00, 0x6d, -0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x77, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, -0x69, 0x75, 0x6d, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x78, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x79, -0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x61, 0x7a, 0x7a, 0x3b, 0x00, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x62, 0x7a, 0x7a, -0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x63, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, -0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x65, 0x7a, 0x7a, -0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x7a, 0x7a, 0x3b, -0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x67, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, -0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x68, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x69, 0x7a, 0x7a, -0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6a, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x33, 0x20, 0x6b, 0x7a, -0x7a, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x6c, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x6d, 0x7a, -0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6e, 0x7a, 0x7a, -0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6f, 0x7a, 0x7a, 0x3b, -0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x70, 0x7a, 0x7a, 0x3b, 0x00, -0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x71, 0x7a, 0x7a, 0x3b, 0x00, 0x76, -0x65, 0x63, 0x34, 0x20, 0x72, 0x7a, 0x7a, 0x5b, 0x34, 0x5d, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, -0x69, 0x6e, 0x74, 0x20, 0x73, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x74, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x75, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x20, 0x76, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x77, -0x7a, 0x7a, 0x5b, 0x34, 0x38, 0x5d, 0x3b, 0x00, 0x7d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, -0x20, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, -0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x69, 0x6e, -0x74, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3b, 0x00, 0x6f, 0x75, -0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, -0x65, 0x55, 0x56, 0x3b, 0x00, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, -0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x6f, 0x75, 0x74, 0x20, -0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, -0x3b, 0x00, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x29, 0x00, 0x69, 0x66, 0x20, 0x28, 0x43, 0x4f, -0x4e, 0x46, 0x49, 0x47, 0x5f, 0x50, 0x4f, 0x57, 0x45, 0x52, 0x5f, 0x56, 0x52, 0x5f, 0x53, 0x48, 0x41, 0x44, 0x45, 0x52, -0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x41, 0x52, 0x4f, 0x55, 0x4e, 0x44, 0x53, 0x29, 0x00, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, -0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x28, 0x31, 0x20, 0x2b, 0x20, 0x67, 0x6c, 0x5f, 0x49, -0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x29, 0x20, 0x2d, 0x20, 0x31, 0x3b, 0x00, 0x7d, 0x00, 0x65, 0x6c, -0x73, 0x65, 0x00, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, -0x67, 0x6c, 0x5f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, -0x5f, 0x33, 0x30, 0x31, 0x20, 0x3d, 0x20, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, -0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x34, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x30, 0x31, 0x3b, 0x00, -0x5f, 0x33, 0x34, 0x33, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x33, 0x30, 0x31, 0x2e, 0x7a, 0x20, 0x2a, 0x20, 0x28, -0x2d, 0x30, 0x2e, 0x35, 0x29, 0x29, 0x20, 0x2b, 0x20, 0x30, 0x2e, 0x35, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, -0x32, 0x37, 0x37, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, -0x66, 0x20, 0x2a, 0x20, 0x5f, 0x33, 0x34, 0x33, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x37, 0x39, -0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x37, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x36, 0x30, -0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x32, 0x37, 0x39, 0x29, 0x20, 0x3c, 0x20, 0x31, 0x2e, -0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, -0x34, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x37, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x37, 0x2e, 0x77, 0x20, 0x3d, 0x20, -0x28, 0x5f, 0x32, 0x37, 0x39, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x20, 0x3f, 0x20, 0x28, 0x2d, 0x31, 0x2e, 0x30, -0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x20, 0x3a, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, -0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x3b, 0x00, 0x5f, 0x33, 0x36, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x34, 0x37, -0x3b, 0x00, 0x5f, 0x33, 0x36, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x37, 0x3b, 0x00, 0x4d, 0x61, 0x74, 0x65, 0x72, -0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x20, 0x5f, 0x33, 0x33, 0x31, -0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x70, -0x75, 0x74, 0x73, 0x28, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x5f, 0x33, 0x36, 0x30, 0x20, -0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2f, 0x20, 0x5f, 0x33, 0x36, 0x30, 0x2e, 0x77, 0x29, 0x29, 0x3b, 0x00, 0x76, -0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x33, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x31, 0x2e, 0x69, 0x6d, 0x61, 0x67, -0x65, 0x55, 0x56, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x33, 0x30, 0x38, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x33, -0x30, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, -0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x5f, 0x33, 0x33, 0x34, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x30, 0x38, 0x2e, -0x78, 0x3b, 0x00, 0x5f, 0x33, 0x33, 0x34, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x30, 0x38, 0x2e, 0x79, 0x3b, 0x00, -0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, -0x20, 0x5f, 0x33, 0x33, 0x38, 0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, -0x65, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x28, 0x5f, 0x33, 0x33, 0x34, 0x2c, 0x20, 0x5f, 0x33, 0x33, 0x31, 0x2e, -0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x3b, 0x00, 0x76, 0x61, 0x72, 0x69, -0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x38, 0x2e, -0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x31, 0x39, 0x32, 0x20, 0x3d, -0x20, 0x5f, 0x33, 0x33, 0x38, 0x2e, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, -0x78, 0x79, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, -0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x31, 0x39, 0x32, 0x2e, 0x78, 0x3b, 0x00, 0x76, 0x65, -0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x79, -0x20, 0x3d, 0x20, 0x5f, 0x31, 0x39, 0x32, 0x2e, 0x79, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, -0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x31, 0x39, 0x32, -0x2e, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, -0x3d, 0x20, 0x5f, 0x33, 0x34, 0x33, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x33, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x33, -0x34, 0x33, 0x2e, 0x7a, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, -0x2e, 0x69, 0x2e, 0x78, 0x29, 0x20, 0x2b, 0x20, 0x28, 0x5f, 0x33, 0x34, 0x33, 0x2e, 0x77, 0x20, 0x2a, 0x20, 0x66, 0x72, -0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x2e, 0x79, 0x29, 0x3b, 0x00, 0x67, 0x6c, -0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x34, 0x33, 0x3b, 0x00, 0x70, 0x72, -0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x3b, 0x00, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, -0x20, 0x69, 0x6e, 0x74, 0x3b, 0x00, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, -0x6c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6c, -0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x76, 0x65, 0x3b, 0x00, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x43, 0x6f, 0x61, 0x74, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x43, 0x6f, 0x61, 0x74, 0x52, 0x6f, 0x75, 0x67, 0x68, 0x6e, 0x65, 0x73, 0x73, -0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x61, 0x6e, 0x69, 0x73, 0x6f, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x3b, 0x00, -0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x6e, 0x69, 0x73, 0x6f, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, -0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x35, 0x30, 0x31, 0x3b, 0x00, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x5f, 0x35, 0x30, 0x32, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x35, 0x30, 0x33, 0x3b, 0x00, -0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x35, 0x33, 0x31, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x35, 0x33, -0x32, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x61, 0x3b, 0x00, 0x68, 0x69, 0x67, -0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x62, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, -0x34, 0x20, 0x63, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x64, 0x3b, 0x00, 0x68, -0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x65, 0x5b, 0x32, 0x5d, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, -0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x66, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, -0x20, 0x67, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x68, 0x3b, 0x00, 0x68, 0x69, -0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x69, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x20, 0x6a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6b, -0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6c, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, -0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6d, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, -0x20, 0x6e, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6f, 0x3b, 0x00, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x20, 0x70, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x71, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, -0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x73, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x3b, -0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x76, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x77, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, -0x78, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x79, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x7a, 0x3b, -0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x61, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x62, 0x7a, 0x3b, 0x00, -0x75, 0x76, 0x65, 0x63, 0x33, 0x20, 0x63, 0x7a, 0x3b, 0x00, 0x69, 0x6e, 0x74, 0x20, 0x64, 0x7a, 0x3b, 0x00, 0x76, 0x65, -0x63, 0x32, 0x20, 0x65, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x67, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x68, 0x7a, 0x5b, 0x39, 0x5d, 0x3b, 0x00, 0x68, -0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x69, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, -0x6a, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6b, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6c, 0x7a, -0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6d, 0x7a, 0x3b, 0x00, 0x69, 0x6e, 0x74, 0x20, 0x6e, 0x7a, 0x3b, 0x00, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6f, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, -0x70, 0x7a, 0x3b, 0x00, 0x69, 0x6e, 0x74, 0x20, 0x71, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x7a, -0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x7a, -0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x7a, -0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x77, 0x7a, 0x3b, 0x00, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x78, 0x7a, 0x3b, -0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x79, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, -0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x61, 0x7a, -0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x62, 0x7a, 0x7a, 0x3b, 0x00, 0x68, -0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x63, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, -0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x7a, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x65, 0x7a, -0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, -0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x67, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x68, 0x7a, 0x7a, -0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x69, 0x7a, 0x7a, 0x3b, 0x00, 0x68, -0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6a, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, -0x70, 0x20, 0x6d, 0x61, 0x74, 0x33, 0x20, 0x6b, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, -0x74, 0x34, 0x20, 0x6c, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x6d, -0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6e, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x20, 0x6f, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x70, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x71, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x72, -0x7a, 0x7a, 0x5b, 0x34, 0x5d, 0x3b, 0x00, 0x69, 0x6e, 0x74, 0x20, 0x73, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x74, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x20, 0x76, 0x7a, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x77, 0x7a, 0x7a, 0x5b, 0x34, 0x38, -0x5d, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x73, 0x74, 0x64, 0x31, 0x34, 0x30, 0x29, 0x20, 0x75, 0x6e, -0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, -0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x62, 0x3b, 0x00, 0x69, 0x6e, 0x74, 0x20, 0x63, 0x3b, 0x00, 0x7d, 0x20, 0x6d, 0x61, -0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, -0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, -0x3b, 0x00, 0x69, 0x6e, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x61, 0x72, 0x69, -0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, -0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x76, -0x65, 0x63, 0x34, 0x20, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, -0x5f, 0x33, 0x39, 0x30, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, -0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, -0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x34, 0x30, 0x32, 0x20, 0x3d, 0x20, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, -0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x61, 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x63, -0x6c, 0x61, 0x6d, 0x70, 0x28, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, -0x56, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, -0x32, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2e, -0x78, 0x79, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x30, 0x35, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, -0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x63, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x3b, 0x00, 0x62, -0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x31, 0x32, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x30, 0x35, 0x29, -0x00, 0x5f, 0x34, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x32, 0x2e, 0x78, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, -0x3b, 0x00, 0x5f, 0x34, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x35, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, -0x5f, 0x34, 0x31, 0x39, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x31, 0x32, 0x29, 0x00, 0x5f, 0x34, 0x31, -0x39, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x32, 0x2e, 0x78, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x34, -0x31, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x31, 0x32, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x32, 0x36, -0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x31, 0x39, 0x29, 0x00, 0x5f, 0x34, 0x32, 0x36, 0x20, 0x3d, 0x20, -0x5f, 0x34, 0x30, 0x32, 0x2e, 0x79, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x34, 0x32, 0x36, 0x20, 0x3d, -0x20, 0x5f, 0x34, 0x31, 0x39, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x33, 0x33, 0x3b, 0x00, 0x69, 0x66, -0x20, 0x28, 0x21, 0x5f, 0x34, 0x32, 0x36, 0x29, 0x00, 0x5f, 0x34, 0x33, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x32, -0x2e, 0x79, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x34, 0x33, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x32, -0x36, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x35, 0x34, 0x31, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x34, -0x33, 0x33, 0x29, 0x00, 0x5f, 0x35, 0x34, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x39, 0x30, 0x3b, 0x00, 0x5f, 0x34, 0x30, -0x32, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x34, 0x30, 0x32, 0x2e, 0x79, 0x3b, 0x00, -0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x34, 0x34, 0x37, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x74, 0x65, 0x78, 0x74, -0x75, 0x72, 0x65, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, -0x6d, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x5f, 0x34, 0x30, 0x32, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, -0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x70, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x29, -0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x34, 0x35, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x34, 0x37, 0x2e, 0x78, -0x79, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x34, 0x34, 0x37, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x35, -0x31, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x34, 0x37, 0x3b, 0x00, 0x5f, 0x35, 0x31, 0x39, 0x2e, 0x78, 0x20, 0x3d, 0x20, -0x5f, 0x34, 0x35, 0x32, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x35, 0x31, 0x39, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x35, -0x32, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x35, 0x31, 0x39, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x35, 0x32, 0x2e, 0x7a, -0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x34, 0x36, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x31, 0x39, 0x2e, 0x78, -0x79, 0x7a, 0x20, 0x2b, 0x20, 0x28, 0x5f, 0x33, 0x39, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, -0x30, 0x20, 0x2d, 0x20, 0x5f, 0x35, 0x31, 0x39, 0x2e, 0x77, 0x29, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, -0x35, 0x32, 0x36, 0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, -0x28, 0x76, 0x65, 0x63, 0x34, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, -0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x5f, 0x35, -0x33, 0x32, 0x2c, 0x20, 0x5f, 0x35, 0x33, 0x32, 0x2c, 0x20, 0x5f, 0x35, 0x33, 0x32, 0x2c, 0x20, 0x5f, 0x35, 0x33, 0x31, -0x29, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x5f, 0x35, 0x32, 0x36, 0x2e, 0x78, 0x20, -0x3d, 0x20, 0x5f, 0x34, 0x36, 0x37, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x35, 0x32, 0x36, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, -0x34, 0x36, 0x37, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x35, 0x32, 0x36, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x36, 0x37, -0x2e, 0x7a, 0x3b, 0x00, 0x5f, 0x35, 0x34, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x32, 0x36, 0x3b, 0x00, 0x66, 0x72, 0x61, -0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x70, -0x75, 0x74, 0x73, 0x28, 0x5f, 0x35, 0x34, 0x31, 0x2c, 0x20, 0x5f, 0x35, 0x30, 0x31, 0x2c, 0x20, 0x5f, 0x35, 0x30, 0x32, -0x2c, 0x20, 0x5f, 0x35, 0x30, 0x32, 0x2c, 0x20, 0x5f, 0x35, 0x30, 0x32, 0x2c, 0x20, 0x5f, 0x35, 0x30, 0x33, 0x29, 0x2e, -0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x37, 0x33, 0x35, -0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, 0x33, 0x36, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, -0x37, 0x33, 0x37, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x37, 0x37, 0x31, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x5f, 0x37, 0x37, 0x32, 0x3b, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x65, 0x64, 0x69, -0x75, 0x6d, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x20, 0x6c, 0x69, 0x67, 0x68, -0x74, 0x5f, 0x66, 0x6f, 0x67, 0x3b, 0x00, 0x69, 0x6e, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, -0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, -0x6e, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x66, 0x6f, 0x67, 0x28, 0x69, 0x6e, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, -0x63, 0x34, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, -0x20, 0x76, 0x69, 0x65, 0x77, 0x29, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, -0x31, 0x37, 0x39, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x28, 0x76, 0x69, 0x65, 0x77, 0x29, 0x3b, 0x00, -0x69, 0x66, 0x20, 0x28, 0x5f, 0x31, 0x37, 0x39, 0x20, 0x3e, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, -0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x64, 0x7a, 0x7a, 0x29, 0x00, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x6f, 0x6c, -0x6f, 0x72, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x30, 0x36, -0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x63, 0x7a, 0x7a, -0x20, 0x2a, 0x20, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x79, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x5f, 0x37, 0x38, 0x32, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x32, 0x30, -0x36, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x2e, 0x30, 0x30, 0x31, 0x32, 0x35, 0x29, 0x00, 0x5f, 0x37, 0x38, 0x32, 0x20, 0x3d, -0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x7a, -0x20, 0x2d, 0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, -0x2e, 0x78, 0x20, 0x2a, 0x20, 0x65, 0x78, 0x70, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x79, 0x20, 0x2d, 0x20, 0x5f, 0x32, 0x30, 0x36, 0x29, 0x29, 0x29, 0x20, 0x2f, 0x20, -0x5f, 0x32, 0x30, 0x36, 0x3b, 0x00, 0x5f, 0x37, 0x38, 0x32, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, -0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x33, 0x39, 0x20, 0x3d, 0x20, 0x65, 0x78, 0x70, 0x28, 0x2d, 0x28, 0x5f, 0x37, -0x38, 0x32, 0x20, 0x2a, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x5f, 0x31, 0x37, 0x39, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, -0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x7a, 0x7a, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, -0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x32, 0x33, 0x39, 0x20, -0x3d, 0x20, 0x5f, 0x32, 0x33, 0x39, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x34, 0x36, 0x20, 0x3d, -0x20, 0x6d, 0x69, 0x6e, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x32, -0x33, 0x39, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x61, 0x7a, -0x7a, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x37, 0x38, 0x33, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x66, -0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x7a, 0x7a, 0x20, 0x3e, 0x20, 0x30, -0x2e, 0x30, 0x29, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x36, 0x36, -0x20, 0x3d, 0x20, 0x28, 0x5f, 0x31, 0x37, 0x39, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, -0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x7a, 0x7a, 0x29, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, -0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6a, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6d, 0x70, 0x5f, -0x63, 0x6f, 0x70, 0x79, 0x5f, 0x32, 0x36, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x36, 0x36, 0x3b, 0x00, 0x68, 0x69, 0x67, -0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x32, 0x37, 0x33, 0x20, 0x3d, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, -0x6b, 0x48, 0x61, 0x6c, 0x66, 0x32, 0x78, 0x31, 0x36, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x2e, 0x62, 0x7a, 0x7a, 0x29, 0x3b, 0x00, 0x5f, 0x37, 0x38, 0x33, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, -0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x65, 0x7a, 0x7a, 0x20, 0x2a, 0x20, 0x74, 0x65, 0x78, -0x74, 0x75, 0x72, 0x65, 0x4c, 0x6f, 0x64, 0x28, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x66, 0x6f, 0x67, 0x2c, 0x20, 0x74, -0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x28, 0x6d, 0x61, 0x74, 0x33, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, -0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x67, 0x5b, 0x30, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x66, 0x72, -0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x67, 0x5b, 0x31, 0x5d, 0x2e, 0x78, 0x79, 0x7a, -0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x67, 0x5b, 0x32, 0x5d, -0x2e, 0x78, 0x79, 0x7a, 0x29, 0x29, 0x20, 0x2a, 0x20, 0x76, 0x69, 0x65, 0x77, 0x2c, 0x20, 0x6d, 0x69, 0x78, 0x28, 0x5f, -0x32, 0x37, 0x33, 0x2e, 0x79, 0x2c, 0x20, 0x5f, 0x32, 0x37, 0x33, 0x2e, 0x78, 0x2c, 0x20, 0x63, 0x6c, 0x61, 0x6d, 0x70, -0x28, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x32, 0x36, 0x36, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, -0x2e, 0x30, 0x29, 0x29, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x5f, 0x37, 0x38, 0x33, 0x20, 0x3d, 0x20, 0x66, 0x72, -0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x65, 0x7a, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, -0x33, 0x20, 0x5f, 0x33, 0x31, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x38, 0x33, 0x20, 0x2a, 0x20, 0x28, 0x66, 0x72, 0x61, -0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x32, 0x34, 0x36, -0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x37, 0x38, 0x35, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x66, 0x72, -0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x68, 0x7a, 0x7a, 0x20, 0x3e, 0x20, 0x30, 0x2e, -0x30, 0x29, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x33, 0x33, 0x33, 0x20, -0x3d, 0x20, 0x65, 0x78, 0x70, 0x28, 0x2d, 0x28, 0x5f, 0x37, 0x38, 0x32, 0x20, 0x2a, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x5f, -0x31, 0x37, 0x39, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, -0x67, 0x7a, 0x7a, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6d, -0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x33, 0x33, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x33, 0x3b, 0x00, 0x68, -0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x33, 0x34, 0x39, 0x20, 0x3d, 0x20, 0x6d, 0x61, -0x78, 0x28, 0x64, 0x6f, 0x74, 0x28, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x28, 0x76, 0x69, 0x65, 0x77, -0x29, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x7a, 0x29, -0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, -0x79, 0x5f, 0x33, 0x34, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x34, 0x39, 0x3b, 0x00, 0x5f, 0x37, 0x38, 0x35, 0x20, 0x3d, -0x20, 0x5f, 0x33, 0x31, 0x34, 0x20, 0x2b, 0x20, 0x28, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x2e, 0x6b, 0x7a, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, -0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6b, 0x7a, 0x2e, 0x77, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x28, -0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x33, 0x34, 0x39, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, -0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x68, 0x7a, 0x7a, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, -0x20, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x33, 0x33, 0x33, 0x29, 0x29, 0x29, 0x3b, 0x00, 0x5f, 0x37, 0x38, -0x35, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x31, 0x34, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x36, 0x33, 0x20, -0x3d, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x33, 0x36, 0x39, 0x20, 0x3d, -0x20, 0x28, 0x5f, 0x33, 0x36, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, -0x5f, 0x32, 0x34, 0x36, 0x29, 0x29, 0x20, 0x2b, 0x20, 0x5f, 0x37, 0x38, 0x35, 0x3b, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, -0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x36, 0x39, 0x2e, 0x78, 0x3b, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x79, -0x20, 0x3d, 0x20, 0x5f, 0x33, 0x36, 0x39, 0x2e, 0x79, 0x3b, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x7a, 0x20, 0x3d, -0x20, 0x5f, 0x33, 0x36, 0x39, 0x2e, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x36, 0x31, 0x36, 0x20, 0x3d, -0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, -0x2e, 0x62, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, -0x20, 0x5f, 0x36, 0x32, 0x38, 0x20, 0x3d, 0x20, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, -0x61, 0x6d, 0x73, 0x2e, 0x61, 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, 0x76, -0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x2e, 0x78, 0x79, 0x2c, 0x20, -0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x31, 0x2e, 0x30, 0x29, -0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2e, 0x78, 0x79, 0x3b, 0x00, 0x62, 0x6f, -0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x33, 0x31, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, -0x72, 0x61, 0x6d, 0x73, 0x2e, 0x63, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, -0x33, 0x38, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x36, 0x33, 0x31, 0x29, 0x00, 0x5f, 0x36, 0x33, 0x38, 0x20, -0x3d, 0x20, 0x5f, 0x36, 0x32, 0x38, 0x2e, 0x78, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x33, 0x38, -0x20, 0x3d, 0x20, 0x5f, 0x36, 0x33, 0x31, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x34, 0x35, 0x3b, 0x00, -0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x36, 0x33, 0x38, 0x29, 0x00, 0x5f, 0x36, 0x34, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x36, -0x32, 0x38, 0x2e, 0x78, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x34, 0x35, 0x20, 0x3d, 0x20, 0x5f, -0x36, 0x33, 0x38, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x35, 0x32, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, -0x21, 0x5f, 0x36, 0x34, 0x35, 0x29, 0x00, 0x5f, 0x36, 0x35, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x32, 0x38, 0x2e, 0x79, -0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x35, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x34, 0x35, 0x3b, -0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x35, 0x39, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x36, 0x35, -0x32, 0x29, 0x00, 0x5f, 0x36, 0x35, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x32, 0x38, 0x2e, 0x79, 0x20, 0x3e, 0x20, 0x31, -0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x35, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x35, 0x32, 0x3b, 0x00, 0x76, 0x65, 0x63, -0x34, 0x20, 0x5f, 0x37, 0x38, 0x31, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x36, 0x35, 0x39, 0x29, 0x00, 0x5f, 0x37, -0x38, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x31, 0x36, 0x3b, 0x00, 0x5f, 0x36, 0x32, 0x38, 0x2e, 0x79, 0x20, 0x3d, 0x20, -0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x36, 0x32, 0x38, 0x2e, 0x79, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, -0x36, 0x37, 0x33, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x6d, 0x61, -0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2c, 0x20, -0x5f, 0x36, 0x32, 0x38, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, -0x70, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, -0x20, 0x5f, 0x36, 0x37, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x37, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x5f, -0x36, 0x37, 0x33, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x37, 0x35, 0x33, 0x20, 0x3d, 0x20, 0x5f, -0x36, 0x37, 0x33, 0x3b, 0x00, 0x5f, 0x37, 0x35, 0x33, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x37, 0x38, 0x2e, 0x78, -0x3b, 0x00, 0x5f, 0x37, 0x35, 0x33, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x37, 0x38, 0x2e, 0x79, 0x3b, 0x00, 0x5f, -0x37, 0x35, 0x33, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x37, 0x38, 0x2e, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, -0x20, 0x5f, 0x36, 0x39, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x35, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2b, 0x20, 0x28, -0x5f, 0x36, 0x31, 0x36, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x37, -0x35, 0x33, 0x2e, 0x77, 0x29, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x37, 0x36, 0x30, 0x20, 0x3d, 0x20, -0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x28, 0x76, 0x65, 0x63, 0x34, 0x28, -0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, -0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x5f, 0x37, 0x37, 0x32, 0x2c, 0x20, 0x5f, 0x37, -0x37, 0x32, 0x2c, 0x20, 0x5f, 0x37, 0x37, 0x32, 0x2c, 0x20, 0x5f, 0x37, 0x37, 0x31, 0x29, 0x2e, 0x62, 0x61, 0x73, 0x65, -0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x5f, 0x37, 0x36, 0x30, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x39, 0x33, -0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x37, 0x36, 0x30, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x39, 0x33, 0x2e, 0x79, 0x3b, -0x00, 0x5f, 0x37, 0x36, 0x30, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x39, 0x33, 0x2e, 0x7a, 0x3b, 0x00, 0x5f, 0x37, -0x38, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x36, 0x30, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, -0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x28, 0x5f, 0x37, -0x38, 0x31, 0x2c, 0x20, 0x5f, 0x37, 0x33, 0x35, 0x2c, 0x20, 0x5f, 0x37, 0x33, 0x36, 0x2c, 0x20, 0x5f, 0x37, 0x33, 0x36, -0x2c, 0x20, 0x5f, 0x37, 0x33, 0x36, 0x2c, 0x20, 0x5f, 0x37, 0x33, 0x37, 0x29, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, -0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x20, 0x3d, 0x20, 0x66, 0x72, -0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, -0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x2e, 0x6b, 0x7a, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, -0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2d, 0x20, 0x66, 0x72, -0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x62, 0x5b, 0x33, 0x5d, 0x2e, 0x78, 0x79, 0x7a, -0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x35, 0x32, 0x35, 0x20, 0x3d, 0x20, 0x66, 0x6f, 0x67, 0x28, 0x70, -0x61, 0x72, 0x61, 0x6d, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x31, 0x29, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, -0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x32, 0x35, 0x3b, 0x00, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, -0x20, 0x50, 0x65, 0x72, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x00, 0x68, -0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4d, -0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, -0x74, 0x33, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x6f, 0x72, -0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x69, 0x6e, 0x74, -0x20, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x00, 0x68, -0x69, 0x67, 0x68, 0x70, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, -0x6c, 0x73, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, -0x49, 0x64, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, 0x72, -0x44, 0x61, 0x74, 0x61, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x72, 0x65, 0x73, -0x65, 0x72, 0x76, 0x65, 0x64, 0x5b, 0x38, 0x5d, 0x3b, 0x00, 0x23, 0x69, 0x66, 0x6e, 0x64, 0x65, 0x66, 0x20, 0x53, 0x50, -0x49, 0x52, 0x56, 0x5f, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, 0x49, -0x44, 0x5f, 0x31, 0x00, 0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x53, 0x50, 0x49, 0x52, 0x56, 0x5f, 0x43, 0x52, -0x4f, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x31, 0x20, 0x36, 0x34, -0x00, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x4d, 0x41, -0x58, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x53, 0x20, 0x3d, 0x20, 0x53, 0x50, 0x49, 0x52, 0x56, 0x5f, -0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x31, 0x3b, -0x00, 0x69, 0x6e, 0x74, 0x20, 0x5f, 0x31, 0x36, 0x34, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x73, 0x74, -0x64, 0x31, 0x34, 0x30, 0x29, 0x20, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, -0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x50, 0x65, 0x72, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x61, 0x62, -0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x20, 0x61, 0x5b, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x4d, 0x41, 0x58, 0x5f, -0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x53, 0x5d, 0x3b, 0x00, 0x7d, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, -0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, -0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, -0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6f, 0x75, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3b, 0x00, 0x69, 0x6e, -0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, -0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x6f, 0x75, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x2e, -0x78, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x74, 0x42, 0x69, 0x74, 0x73, 0x54, 0x6f, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x28, 0x6f, -0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x61, 0x5b, 0x5f, 0x31, 0x36, 0x34, -0x5d, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x29, 0x3b, 0x00, 0x6f, 0x75, 0x74, 0x50, 0x69, 0x63, 0x6b, -0x69, 0x6e, 0x67, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, -0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x2f, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, -0x69, 0x6f, 0x6e, 0x2e, 0x77, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, -0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x23, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, -0x20, 0x47, 0x4c, 0x5f, 0x45, 0x58, 0x54, 0x5f, 0x63, 0x6c, 0x69, 0x70, 0x5f, 0x63, 0x75, 0x6c, 0x6c, 0x5f, 0x64, 0x69, -0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x3a, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x00, 0x76, 0x65, 0x63, -0x34, 0x20, 0x5f, 0x37, 0x35, 0x20, 0x3d, 0x20, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, -0x6e, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x37, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x35, 0x3b, 0x00, 0x5f, -0x37, 0x39, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x37, 0x35, 0x2e, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x2d, 0x30, 0x2e, -0x35, 0x29, 0x29, 0x20, 0x2b, 0x20, 0x30, 0x2e, 0x35, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x38, 0x30, 0x20, -0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x20, 0x2a, 0x20, -0x5f, 0x37, 0x39, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x38, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x30, -0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x38, 0x39, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, -0x73, 0x28, 0x5f, 0x38, 0x31, 0x29, 0x20, 0x3c, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, -0x31, 0x39, 0x29, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x38, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x30, 0x3b, 0x00, -0x5f, 0x38, 0x38, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x38, 0x31, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x20, -0x3f, 0x20, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x20, 0x3a, -0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x3b, 0x00, 0x5f, 0x38, 0x39, 0x20, -0x3d, 0x20, 0x5f, 0x38, 0x38, 0x3b, 0x00, 0x5f, 0x38, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x30, 0x3b, 0x00, 0x4d, 0x61, -0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x20, 0x5f, -0x39, 0x33, 0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, -0x6e, 0x70, 0x75, 0x74, 0x73, 0x28, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x5f, 0x38, 0x39, -0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2f, 0x20, 0x5f, 0x38, 0x39, 0x2e, 0x77, 0x29, 0x29, 0x3b, 0x00, 0x76, -0x65, 0x63, 0x34, 0x20, 0x5f, 0x39, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x39, 0x33, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, -0x56, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x39, 0x38, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x37, 0x35, 0x2e, 0x78, -0x79, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x35, 0x29, -0x3b, 0x00, 0x5f, 0x39, 0x34, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x39, 0x38, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x39, 0x34, -0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x39, 0x38, 0x2e, 0x79, 0x3b, 0x00, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, -0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x20, 0x5f, 0x31, 0x30, 0x33, 0x20, 0x3d, 0x20, -0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, -0x28, 0x5f, 0x39, 0x34, 0x2c, 0x20, 0x5f, 0x39, 0x33, 0x2e, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, -0x69, 0x6f, 0x6e, 0x29, 0x3b, 0x00, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, -0x55, 0x56, 0x20, 0x3d, 0x20, 0x5f, 0x31, 0x30, 0x33, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x76, -0x65, 0x63, 0x33, 0x20, 0x5f, 0x31, 0x30, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x31, 0x30, 0x33, 0x2e, 0x77, 0x6f, 0x72, 0x6c, -0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, -0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x20, 0x3d, 0x20, -0x5f, 0x31, 0x30, 0x36, 0x2e, 0x78, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, -0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x31, 0x30, 0x36, 0x2e, 0x79, 0x3b, -0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, -0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x31, 0x30, 0x36, 0x2e, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, -0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x39, 0x3b, 0x00, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x5f, 0x31, 0x31, 0x37, 0x20, 0x3d, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x28, 0x69, 0x6e, 0x73, -0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x25, 0x20, 0x32, 0x29, 0x20, 0x2a, 0x20, 0x32, -0x2e, 0x30, 0x29, 0x20, 0x2d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x37, 0x39, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x28, -0x5f, 0x37, 0x39, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x28, 0x28, 0x5f, 0x37, 0x39, -0x2e, 0x77, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2a, 0x20, 0x5f, 0x31, 0x31, 0x37, 0x29, 0x3b, 0x00, 0x67, -0x6c, 0x5f, 0x43, 0x6c, 0x69, 0x70, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, -0x5f, 0x37, 0x39, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x5f, 0x31, 0x31, 0x37, 0x3b, 0x00, 0x5f, 0x37, 0x39, 0x2e, 0x7a, 0x20, -0x3d, 0x20, 0x28, 0x5f, 0x37, 0x39, 0x2e, 0x7a, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, -0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x2e, 0x78, 0x29, 0x20, 0x2b, 0x20, 0x28, 0x5f, 0x37, 0x39, 0x2e, 0x77, 0x20, 0x2a, -0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x2e, 0x79, 0x29, 0x3b, -0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x39, 0x3b, 0x00, -0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x73, -0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3e, 0x3e, 0x20, 0x31, 0x3b, 0x00, 0x23, 0x76, -0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x34, 0x31, 0x30, 0x00, 0x23, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, -0x6e, 0x20, 0x47, 0x4c, 0x5f, 0x41, 0x52, 0x42, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x61, 0x6e, -0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x3a, 0x20, 0x65, 0x6e, 0x61, 0x62, -0x6c, 0x65, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, -0x20, 0x38, 0x29, 0x20, 0x66, 0x6c, 0x61, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x73, -0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, -0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, -0x63, 0x34, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, -0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x34, -0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, -0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, -0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x37, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, -0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, -0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x30, 0x32, 0x20, 0x3d, 0x20, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x73, -0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x34, 0x34, 0x20, 0x3d, 0x20, 0x5f, -0x33, 0x30, 0x32, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x34, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x33, 0x30, 0x32, 0x2e, -0x7a, 0x20, 0x2a, 0x20, 0x28, 0x2d, 0x30, 0x2e, 0x35, 0x29, 0x29, 0x20, 0x2b, 0x20, 0x30, 0x2e, 0x35, 0x3b, 0x00, 0x76, -0x65, 0x63, 0x34, 0x20, 0x5f, 0x32, 0x37, 0x38, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, -0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x20, 0x2a, 0x20, 0x5f, 0x33, 0x34, 0x34, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x20, 0x5f, 0x32, 0x38, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x38, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, -0x20, 0x5f, 0x33, 0x36, 0x31, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x32, 0x38, 0x30, 0x29, -0x20, 0x3c, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x00, 0x76, 0x65, -0x63, 0x34, 0x20, 0x5f, 0x33, 0x34, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x38, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x38, -0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x32, 0x38, 0x30, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x20, 0x3f, 0x20, -0x28, 0x2d, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x20, 0x3a, 0x20, 0x31, -0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x3b, 0x00, 0x5f, 0x33, 0x36, 0x31, 0x20, 0x3d, -0x20, 0x5f, 0x33, 0x34, 0x38, 0x3b, 0x00, 0x5f, 0x33, 0x36, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x38, 0x3b, 0x00, -0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, -0x20, 0x5f, 0x33, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, -0x65, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x28, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, -0x5f, 0x33, 0x36, 0x31, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2f, 0x20, 0x5f, 0x33, 0x36, 0x31, 0x2e, 0x77, -0x29, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x33, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x32, -0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x33, 0x30, 0x39, 0x20, -0x3d, 0x20, 0x28, 0x5f, 0x33, 0x30, 0x32, 0x2e, 0x78, 0x79, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, -0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x5f, 0x33, 0x33, 0x35, 0x2e, 0x78, 0x20, 0x3d, 0x20, -0x5f, 0x33, 0x30, 0x39, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x33, 0x33, 0x35, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x30, -0x39, 0x2e, 0x79, 0x3b, 0x00, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, -0x6e, 0x70, 0x75, 0x74, 0x73, 0x20, 0x5f, 0x33, 0x33, 0x39, 0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, -0x6c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x28, 0x5f, 0x33, 0x33, 0x35, 0x2c, 0x20, -0x5f, 0x33, 0x33, 0x32, 0x2e, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x3b, -0x00, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x20, 0x3d, 0x20, -0x5f, 0x33, 0x33, 0x39, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, -0x31, 0x39, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x39, 0x2e, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, -0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, -0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x34, 0x34, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x34, 0x2e, 0x7a, -0x20, 0x3d, 0x20, 0x28, 0x5f, 0x33, 0x34, 0x34, 0x2e, 0x7a, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, -0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x2e, 0x78, 0x29, 0x20, 0x2b, 0x20, 0x28, 0x5f, 0x33, 0x34, 0x34, 0x2e, -0x77, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x2e, -0x79, 0x29, 0x3b, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x33, -0x34, 0x34, 0x3b, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, -0x44, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, -0x67, 0x65, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, -0x3d, 0x20, 0x30, 0x29, 0x20, 0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, -0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x35, 0x30, 0x34, -0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x28, 0x76, 0x65, -0x63, 0x34, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x30, -0x2e, 0x30, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x5f, 0x35, 0x33, 0x32, 0x2c, -0x20, 0x5f, 0x35, 0x33, 0x32, 0x2c, 0x20, 0x5f, 0x35, 0x33, 0x32, 0x2c, 0x20, 0x5f, 0x35, 0x33, 0x31, 0x29, 0x2e, 0x62, -0x61, 0x73, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x34, 0x30, 0x32, 0x20, -0x3d, 0x20, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x61, 0x20, -0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, -0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, -0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, -0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2e, 0x78, 0x79, 0x3b, 0x00, 0x5f, 0x35, 0x30, 0x34, 0x2e, 0x78, 0x20, 0x3d, -0x20, 0x5f, 0x34, 0x36, 0x37, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x35, 0x30, 0x34, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x34, -0x36, 0x37, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x35, 0x30, 0x34, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x36, 0x37, 0x2e, -0x7a, 0x3b, 0x00, 0x5f, 0x35, 0x34, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x30, 0x34, 0x3b, 0x00, 0x75, 0x6e, 0x69, 0x66, -0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x20, 0x6c, 0x69, 0x67, 0x68, -0x74, 0x5f, 0x66, 0x6f, 0x67, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, -0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x34, 0x29, 0x20, 0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, -0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x76, 0x65, -0x63, 0x34, 0x20, 0x66, 0x6f, 0x67, 0x28, 0x69, 0x6e, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x63, 0x6f, -0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x69, 0x65, 0x77, 0x29, 0x00, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x5f, 0x31, 0x37, 0x39, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x28, 0x76, 0x69, 0x65, 0x77, -0x29, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x30, 0x36, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, -0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x63, 0x7a, 0x7a, 0x20, 0x2a, 0x20, 0x76, 0x69, 0x65, 0x77, -0x2e, 0x79, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, 0x38, 0x32, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x5f, 0x32, 0x34, 0x36, 0x20, 0x3d, 0x20, 0x6d, 0x69, 0x6e, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x65, -0x78, 0x70, 0x28, 0x2d, 0x28, 0x5f, 0x37, 0x38, 0x32, 0x20, 0x2a, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x5f, 0x31, 0x37, 0x39, -0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x7a, 0x7a, 0x2c, -0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x61, 0x7a, 0x7a, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x32, 0x37, 0x33, 0x20, 0x3d, -0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x48, 0x61, 0x6c, 0x66, 0x32, 0x78, 0x31, 0x36, 0x28, 0x66, 0x72, 0x61, 0x6d, -0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x62, 0x7a, 0x7a, 0x29, 0x3b, 0x00, 0x5f, 0x37, 0x38, 0x33, -0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x65, 0x7a, 0x7a, -0x20, 0x2a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x6f, 0x64, 0x28, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, -0x66, 0x6f, 0x67, 0x2c, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x28, 0x6d, 0x61, 0x74, 0x33, 0x28, -0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x67, 0x5b, 0x30, 0x5d, 0x2e, 0x78, -0x79, 0x7a, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x67, 0x5b, -0x31, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, -0x73, 0x2e, 0x67, 0x5b, 0x32, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x29, 0x20, 0x2a, 0x20, 0x76, 0x69, 0x65, 0x77, 0x2c, -0x20, 0x6d, 0x69, 0x78, 0x28, 0x5f, 0x32, 0x37, 0x33, 0x2e, 0x79, 0x2c, 0x20, 0x5f, 0x32, 0x37, 0x33, 0x2e, 0x78, 0x2c, -0x20, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, 0x28, 0x5f, 0x31, 0x37, 0x39, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, -0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x7a, 0x7a, 0x29, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, -0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6a, 0x7a, 0x7a, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, -0x31, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x5f, 0x37, 0x38, 0x35, 0x20, 0x3d, 0x20, 0x5f, -0x33, 0x31, 0x34, 0x20, 0x2b, 0x20, 0x28, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, -0x73, 0x2e, 0x6b, 0x7a, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, -0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6b, 0x7a, 0x2e, 0x77, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x28, 0x6d, 0x61, -0x78, 0x28, 0x64, 0x6f, 0x74, 0x28, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x28, 0x76, 0x69, 0x65, 0x77, -0x29, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x7a, 0x29, -0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, -0x73, 0x2e, 0x68, 0x7a, 0x7a, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x65, 0x78, 0x70, 0x28, -0x2d, 0x28, 0x5f, 0x37, 0x38, 0x32, 0x20, 0x2a, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x5f, 0x31, 0x37, 0x39, 0x20, 0x2d, 0x20, -0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x67, 0x7a, 0x7a, 0x2c, 0x20, 0x30, -0x2e, 0x30, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x37, 0x33, 0x38, 0x20, -0x3d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x28, 0x76, 0x65, 0x63, -0x34, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x30, 0x2e, -0x30, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x5f, 0x37, 0x37, 0x32, 0x2c, 0x20, -0x5f, 0x37, 0x37, 0x32, 0x2c, 0x20, 0x5f, 0x37, 0x37, 0x32, 0x2c, 0x20, 0x5f, 0x37, 0x37, 0x31, 0x29, 0x2e, 0x62, 0x61, -0x73, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x36, 0x32, 0x38, 0x20, 0x3d, -0x20, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x61, 0x20, 0x2a, -0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, -0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, -0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, -0x20, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2e, 0x78, 0x79, 0x3b, 0x00, 0x5f, 0x37, 0x33, 0x38, 0x2e, 0x78, 0x20, 0x3d, 0x20, -0x5f, 0x36, 0x39, 0x33, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x37, 0x33, 0x38, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x39, -0x33, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x37, 0x33, 0x38, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x39, 0x33, 0x2e, 0x7a, -0x3b, 0x00, 0x5f, 0x37, 0x38, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x33, 0x38, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, -0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x2e, 0x6b, 0x7a, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, -0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2d, 0x20, 0x66, 0x72, -0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x62, 0x5b, 0x33, 0x5d, 0x2e, 0x78, 0x79, 0x7a, -0x29, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, -0x65, 0x6c, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x33, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, -0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x74, 0x72, 0x69, -0x78, 0x3b, 0x00, 0x69, 0x6e, 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, -0x75, 0x6e, 0x74, 0x3b, 0x00, 0x69, 0x6e, 0x74, 0x20, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, -0x6c, 0x73, 0x3b, 0x00, 0x69, 0x6e, 0x74, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x3b, 0x00, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x72, -0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5b, 0x38, 0x5d, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, -0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, -0x32, 0x20, 0x6f, 0x75, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, -0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x37, 0x29, 0x20, 0x69, 0x6e, 0x20, 0x76, 0x65, -0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, -0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x32, 0x39, 0x20, 0x3d, 0x20, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x73, -0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x37, 0x31, 0x20, 0x3d, 0x20, 0x5f, -0x33, 0x32, 0x39, 0x3b, 0x00, 0x5f, 0x33, 0x37, 0x31, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x33, 0x32, 0x39, 0x2e, -0x7a, 0x20, 0x2a, 0x20, 0x28, 0x2d, 0x30, 0x2e, 0x35, 0x29, 0x29, 0x20, 0x2b, 0x20, 0x30, 0x2e, 0x35, 0x3b, 0x00, 0x76, -0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x30, 0x35, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, -0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x20, 0x2a, 0x20, 0x5f, 0x33, 0x37, 0x31, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x20, 0x5f, 0x33, 0x30, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x30, 0x35, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, -0x20, 0x5f, 0x33, 0x39, 0x33, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x33, 0x30, 0x37, 0x29, -0x20, 0x3c, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x00, 0x76, 0x65, -0x63, 0x34, 0x20, 0x5f, 0x33, 0x37, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x30, 0x35, 0x3b, 0x00, 0x5f, 0x33, 0x37, 0x35, -0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x33, 0x30, 0x37, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x20, 0x3f, 0x20, -0x28, 0x2d, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x20, 0x3a, 0x20, 0x31, -0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x3b, 0x00, 0x5f, 0x33, 0x39, 0x33, 0x20, 0x3d, -0x20, 0x5f, 0x33, 0x37, 0x35, 0x3b, 0x00, 0x5f, 0x33, 0x39, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x30, 0x35, 0x3b, 0x00, -0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, -0x20, 0x5f, 0x33, 0x35, 0x39, 0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, -0x65, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x28, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, -0x5f, 0x33, 0x39, 0x33, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2f, 0x20, 0x5f, 0x33, 0x39, 0x33, 0x2e, 0x77, -0x29, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x36, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x35, 0x39, -0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x33, 0x33, 0x36, 0x20, -0x3d, 0x20, 0x28, 0x5f, 0x33, 0x32, 0x39, 0x2e, 0x78, 0x79, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, -0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x5f, 0x33, 0x36, 0x32, 0x2e, 0x78, 0x20, 0x3d, 0x20, -0x5f, 0x33, 0x33, 0x36, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x33, 0x36, 0x32, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, -0x36, 0x2e, 0x79, 0x3b, 0x00, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, -0x6e, 0x70, 0x75, 0x74, 0x73, 0x20, 0x5f, 0x33, 0x36, 0x36, 0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, -0x6c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x28, 0x5f, 0x33, 0x36, 0x32, 0x2c, 0x20, -0x5f, 0x33, 0x35, 0x39, 0x2e, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x3b, -0x00, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x20, 0x3d, 0x20, -0x5f, 0x33, 0x36, 0x36, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, -0x31, 0x39, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x36, 0x36, 0x2e, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, -0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, -0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x31, 0x39, 0x34, 0x2e, -0x78, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, -0x69, 0x6f, 0x6e, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x31, 0x39, 0x34, 0x2e, 0x79, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, -0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, -0x20, 0x5f, 0x31, 0x39, 0x34, 0x2e, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, -0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x37, 0x31, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, -0x32, 0x31, 0x39, 0x20, 0x3d, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x28, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, -0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x25, 0x20, 0x32, 0x29, 0x20, 0x2a, 0x20, 0x32, 0x2e, 0x30, 0x29, 0x20, -0x2d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x33, 0x37, 0x31, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x33, 0x37, -0x31, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x28, 0x28, 0x5f, 0x33, 0x37, 0x31, 0x2e, -0x77, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2a, 0x20, 0x5f, 0x32, 0x31, 0x39, 0x29, 0x3b, 0x00, 0x67, 0x6c, -0x5f, 0x43, 0x6c, 0x69, 0x70, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x5f, -0x33, 0x37, 0x31, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x5f, 0x32, 0x31, 0x39, 0x3b, 0x00, 0x5f, 0x33, 0x37, 0x31, 0x2e, 0x7a, -0x20, 0x3d, 0x20, 0x28, 0x5f, 0x33, 0x37, 0x31, 0x2e, 0x7a, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, -0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x2e, 0x78, 0x29, 0x20, 0x2b, 0x20, 0x28, 0x5f, 0x33, 0x37, 0x31, 0x2e, -0x77, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x2e, -0x79, 0x29, 0x3b, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x33, -0x37, 0x31, 0x3b, 0x00, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, -0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x3e, 0x00, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x73, 0x69, -0x6d, 0x64, 0x2f, 0x73, 0x69, 0x6d, 0x64, 0x2e, 0x68, 0x3e, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, -0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x00, 0x73, 0x74, 0x72, 0x75, 0x63, -0x74, 0x20, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x20, 0x20, 0x20, 0x20, -0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x76, 0x69, 0x65, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x57, 0x6f, 0x72, -0x6c, 0x64, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, -0x78, 0x34, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x69, 0x65, 0x77, 0x4d, 0x61, 0x74, 0x72, -0x69, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x63, 0x6c, 0x69, -0x70, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x69, 0x65, 0x77, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x76, 0x69, 0x65, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x6c, -0x69, 0x70, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, -0x78, 0x34, 0x20, 0x63, 0x6c, 0x69, 0x70, 0x46, 0x72, 0x6f, 0x6d, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x72, -0x69, 0x78, 0x5b, 0x32, 0x5d, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, -0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x6c, 0x69, 0x70, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x73, 0x65, 0x72, 0x57, 0x6f, -0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x63, 0x6c, 0x69, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, -0x66, 0x6f, 0x72, 0x6d, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x63, 0x6c, 0x69, -0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, -0x74, 0x69, 0x6d, 0x65, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x65, 0x6d, 0x70, -0x6f, 0x72, 0x61, 0x6c, 0x4e, 0x6f, 0x69, 0x73, 0x65, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x34, 0x20, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x34, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x70, 0x6f, 0x72, -0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x6c, -0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6c, 0x6f, 0x64, 0x42, 0x69, 0x61, 0x73, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x65, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, -0x6e, 0x4c, 0x6f, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x6f, 0x6e, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x4d, 0x69, 0x6e, 0x75, 0x73, 0x4e, 0x65, 0x61, -0x72, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6e, 0x65, 0x61, 0x72, 0x4f, 0x76, 0x65, -0x72, 0x46, 0x61, 0x72, 0x4d, 0x69, 0x6e, 0x75, 0x73, 0x4e, 0x65, 0x61, 0x72, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x46, 0x61, 0x72, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x75, 0x72, 0x65, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x65, 0x76, 0x31, 0x30, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x73, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x61, 0x6f, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, -0x6e, 0x67, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x64, 0x45, 0x64, 0x67, 0x65, 0x44, 0x69, 0x73, 0x74, -0x61, 0x6e, 0x63, 0x65, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x61, 0x6f, 0x42, 0x65, -0x6e, 0x74, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x73, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x20, 0x61, 0x6f, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x20, 0x61, 0x6f, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x7a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x20, 0x66, 0x50, 0x61, 0x72, 0x61, 0x6d, -0x73, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x68, 0x61, 0x6e, -0x6e, 0x65, 0x6c, 0x73, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x66, 0x72, 0x6f, -0x78, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x58, 0x59, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x69, 0x62, 0x6c, 0x4c, 0x75, 0x6d, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x69, 0x62, 0x6c, 0x52, 0x6f, 0x75, 0x67, 0x68, 0x6e, 0x65, 0x73, 0x73, 0x4f, 0x6e, -0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x69, -0x62, 0x6c, 0x53, 0x48, 0x5b, 0x39, 0x5d, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, -0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, -0x6e, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, -0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, -0x6f, 0x6c, 0x6f, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x73, 0x75, 0x6e, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x32, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x46, 0x61, 0x72, 0x41, 0x74, 0x74, 0x65, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, -0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x64, 0x69, 0x72, -0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x53, 0x68, 0x61, 0x64, -0x6f, 0x77, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x34, 0x20, 0x63, 0x61, 0x73, 0x63, 0x61, 0x64, 0x65, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x73, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x63, 0x61, 0x73, 0x63, 0x61, 0x64, 0x65, 0x73, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x50, 0x65, 0x6e, 0x75, 0x6d, 0x62, -0x72, 0x61, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x20, 0x76, 0x73, 0x6d, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x73, 0x6d, 0x44, 0x65, 0x70, 0x74, 0x68, 0x53, 0x63, 0x61, 0x6c, 0x65, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x73, 0x6d, 0x4c, 0x69, 0x67, 0x68, 0x74, -0x42, 0x6c, 0x65, 0x65, 0x64, 0x52, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x75, 0x69, 0x6e, 0x74, 0x20, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x54, -0x79, 0x70, 0x65, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x33, 0x20, 0x66, 0x6f, 0x67, 0x44, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x6f, 0x67, 0x53, 0x74, 0x61, 0x72, 0x74, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x6f, 0x67, 0x4d, 0x61, 0x78, 0x4f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x66, 0x6f, 0x67, 0x4d, 0x69, 0x6e, 0x4d, 0x61, 0x78, 0x4d, 0x69, -0x70, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x6f, 0x67, 0x48, 0x65, 0x69, 0x67, -0x68, 0x74, 0x46, 0x61, 0x6c, 0x6c, 0x6f, 0x66, 0x66, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x20, 0x66, 0x6f, 0x67, 0x43, 0x75, 0x74, 0x4f, 0x66, 0x66, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x66, 0x6f, -0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x6f, -0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x49, 0x62, 0x6c, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x6f, 0x67, 0x49, 0x6e, 0x73, 0x63, 0x61, 0x74, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, -0x53, 0x74, 0x61, 0x72, 0x74, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x6f, 0x67, -0x49, 0x6e, 0x73, 0x63, 0x61, 0x74, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x6f, 0x67, 0x4f, 0x6e, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x46, 0x61, -0x72, 0x4d, 0x69, 0x6e, 0x75, 0x73, 0x4e, 0x65, 0x61, 0x72, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x66, 0x6f, 0x67, 0x4e, 0x65, 0x61, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x4d, 0x69, 0x6e, 0x75, -0x73, 0x4e, 0x65, 0x61, 0x72, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x78, 0x33, 0x20, -0x66, 0x6f, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x73, 0x73, 0x72, 0x52, 0x65, 0x70, 0x72, -0x6f, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, -0x78, 0x34, 0x20, 0x73, 0x73, 0x72, 0x55, 0x76, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x69, 0x65, 0x77, 0x4d, 0x61, 0x74, 0x72, -0x69, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x73, 0x72, 0x54, 0x68, 0x69, -0x63, 0x6b, 0x6e, 0x65, 0x73, 0x73, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x73, -0x72, 0x42, 0x69, 0x61, 0x73, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x73, 0x72, -0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, -0x73, 0x73, 0x72, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x34, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5b, 0x34, 0x5d, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x74, -0x20, 0x72, 0x65, 0x63, 0x37, 0x30, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x65, -0x73, 0x32, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x65, 0x73, 0x32, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x65, 0x73, 0x32, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x32, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, -0x5b, 0x34, 0x38, 0x5d, 0x3b, 0x00, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, 0x6f, -0x75, 0x74, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, -0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, -0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, -0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, -0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x34, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, -0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x37, 0x29, 0x5d, 0x5d, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, -0x64, 0x65, 0x78, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c, 0x6f, 0x63, 0x6e, 0x38, 0x29, 0x5d, 0x5d, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, -0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x00, 0x73, 0x74, -0x72, 0x75, 0x63, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, 0x69, 0x6e, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x34, 0x20, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, -0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x76, 0x65, 0x72, -0x74, 0x65, 0x78, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x28, -0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, -0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x46, 0x72, 0x61, 0x6d, 0x65, -0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x26, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x31, 0x37, 0x29, 0x5d, 0x5d, 0x2c, 0x20, -0x75, 0x69, 0x6e, 0x74, 0x20, 0x67, 0x6c, 0x5f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x64, 0x65, -0x78, 0x20, 0x5b, 0x5b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x5d, 0x5d, 0x29, 0x00, 0x20, -0x20, 0x20, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x7b, -0x7d, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, -0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x74, 0x28, 0x67, 0x6c, 0x5f, 0x49, 0x6e, 0x73, 0x74, 0x61, -0x6e, 0x63, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x34, 0x20, 0x5f, 0x32, 0x38, 0x31, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x73, -0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x33, -0x32, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x31, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x32, 0x33, 0x2e, -0x7a, 0x20, 0x3d, 0x20, 0x66, 0x6d, 0x61, 0x28, 0x5f, 0x32, 0x38, 0x31, 0x2e, 0x7a, 0x2c, 0x20, 0x2d, 0x30, 0x2e, 0x35, -0x2c, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, -0x32, 0x35, 0x37, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, -0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x6c, 0x69, 0x70, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x20, -0x2a, 0x20, 0x5f, 0x33, 0x32, 0x33, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, -0x35, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x35, 0x37, 0x2e, 0x77, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x34, 0x20, 0x5f, 0x33, 0x33, 0x36, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, -0x73, 0x28, 0x5f, 0x32, 0x35, 0x39, 0x29, 0x20, 0x3c, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, -0x2d, 0x31, 0x39, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x33, 0x32, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x35, 0x37, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x32, 0x37, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x32, 0x35, -0x39, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x20, 0x3f, 0x20, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, -0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x20, 0x3a, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, -0x2d, 0x31, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x33, 0x36, 0x20, 0x3d, 0x20, -0x5f, 0x33, 0x32, 0x37, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x00, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, -0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x33, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x35, 0x37, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x32, 0x37, 0x33, 0x20, 0x3d, 0x20, -0x5f, 0x33, 0x33, 0x36, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2f, 0x20, 0x5f, 0x33, 0x33, 0x36, 0x2e, 0x77, -0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x5f, 0x32, 0x38, 0x38, 0x20, 0x3d, -0x20, 0x28, 0x5f, 0x32, 0x38, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x34, 0x20, 0x5f, 0x33, 0x33, 0x30, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x30, 0x2e, 0x30, -0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x33, 0x30, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x38, -0x2e, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x33, 0x30, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, -0x38, 0x2e, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, -0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x30, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, -0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x33, 0x2e, 0x78, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, -0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x33, 0x2e, 0x79, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, -0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x33, 0x2e, 0x7a, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, -0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x32, 0x33, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, -0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x32, 0x33, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, 0x00, 0x73, 0x74, 0x72, -0x75, 0x63, 0x74, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x20, -0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, -0x6d, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, -0x20, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x3b, 0x00, 0x63, 0x6f, 0x6e, -0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x5f, 0x35, 0x35, 0x39, 0x20, 0x3d, 0x20, 0x7b, -0x7d, 0x3b, 0x00, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, -0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x33, 0x20, 0x7b, 0x00, 0x74, 0x65, 0x78, 0x74, -0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, -0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x5b, 0x5b, 0x69, 0x64, 0x28, 0x30, -0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, -0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x6d, 0x70, 0x6c, 0x72, 0x20, 0x5b, -0x5b, 0x69, 0x64, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, -0x20, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, -0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, -0x6f, 0x75, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x28, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, 0x69, 0x6e, 0x20, 0x69, -0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, -0x74, 0x61, 0x6e, 0x74, 0x20, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, -0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x33, 0x26, 0x20, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, -0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x33, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x32, 0x39, 0x29, -0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, -0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x26, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, -0x73, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x31, 0x37, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, -0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, -0x73, 0x26, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x20, 0x5b, 0x5b, -0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x32, 0x35, 0x29, 0x5d, 0x5d, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, -0x6c, 0x66, 0x20, 0x5f, 0x35, 0x35, 0x31, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x5f, 0x33, 0x39, 0x30, 0x20, 0x3d, 0x20, 0x68, 0x61, -0x6c, 0x66, 0x34, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x28, 0x6d, 0x61, 0x74, -0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, -0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x29, 0x29, 0x2c, 0x20, 0x5f, 0x35, 0x35, 0x31, 0x29, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x34, 0x30, 0x31, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, -0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, -0x20, 0x2a, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x66, 0x61, 0x73, 0x74, 0x3a, 0x3a, 0x63, 0x6c, 0x61, 0x6d, -0x70, 0x28, 0x69, 0x6e, 0x2e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, -0x56, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, -0x30, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x32, 0x20, 0x5f, 0x34, 0x30, 0x32, 0x20, 0x3d, -0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x34, 0x30, 0x31, 0x29, 0x2e, 0x78, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x30, 0x35, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, -0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x3d, -0x20, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x31, 0x32, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x30, 0x35, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x5f, 0x34, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x31, 0x2e, 0x78, 0x20, 0x3e, 0x20, 0x31, 0x2e, -0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x34, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x34, -0x30, 0x35, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x31, 0x39, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x31, 0x32, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x5f, 0x34, 0x31, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x31, 0x2e, 0x78, 0x20, 0x3c, 0x20, 0x30, 0x2e, -0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x34, 0x31, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x34, -0x31, 0x32, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x32, 0x36, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x31, 0x39, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x5f, 0x34, 0x32, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x31, 0x2e, 0x79, 0x20, 0x3c, 0x20, 0x30, 0x2e, -0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x34, 0x32, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x34, -0x31, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x33, 0x33, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x32, 0x36, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x5f, 0x34, 0x33, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x31, 0x2e, 0x79, 0x20, 0x3e, 0x20, 0x31, 0x2e, -0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x34, 0x33, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x34, -0x32, 0x36, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x5f, 0x35, 0x34, 0x31, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x34, 0x33, 0x33, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x5f, 0x35, 0x34, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x39, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x5f, 0x34, 0x30, 0x32, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x28, 0x31, 0x2e, 0x30, -0x20, 0x2d, 0x20, 0x5f, 0x34, 0x30, 0x31, 0x2e, 0x79, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x5f, 0x34, 0x34, 0x37, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x68, 0x61, 0x6c, -0x66, 0x34, 0x28, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x33, -0x2e, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, -0x65, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, -0x6f, 0x72, 0x53, 0x65, 0x74, 0x33, 0x2e, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, -0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x6d, 0x70, 0x6c, 0x72, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, -0x28, 0x5f, 0x34, 0x30, 0x32, 0x29, 0x2c, 0x20, 0x62, 0x69, 0x61, 0x73, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, -0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6c, 0x6f, 0x64, 0x42, 0x69, 0x61, 0x73, 0x29, 0x29, 0x29, 0x2c, 0x20, 0x68, -0x61, 0x6c, 0x66, 0x34, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x20, 0x5f, 0x34, 0x34, 0x39, 0x20, 0x3d, 0x20, -0x5f, 0x34, 0x34, 0x37, 0x2e, 0x77, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, -0x33, 0x20, 0x5f, 0x34, 0x35, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x34, 0x37, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, -0x5f, 0x34, 0x34, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, -0x5f, 0x35, 0x31, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x35, 0x31, 0x39, 0x2e, 0x78, -0x20, 0x3d, 0x20, 0x5f, 0x34, 0x35, 0x32, 0x2e, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, -0x35, 0x31, 0x39, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x35, 0x32, 0x2e, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x5f, 0x35, 0x31, 0x39, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x35, 0x32, 0x2e, 0x7a, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x20, 0x5f, 0x34, 0x36, 0x37, 0x20, -0x3d, 0x20, 0x5f, 0x35, 0x31, 0x39, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2b, 0x20, 0x28, 0x5f, 0x33, 0x39, 0x30, 0x2e, 0x78, -0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x5f, 0x35, 0x35, 0x31, 0x20, 0x2d, 0x20, 0x5f, 0x34, 0x34, 0x39, 0x29, 0x29, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x5f, 0x35, 0x36, 0x31, 0x20, -0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x29, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x35, 0x36, 0x31, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, -0x34, 0x36, 0x37, 0x2e, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x35, 0x36, 0x31, 0x2e, -0x79, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x36, 0x37, 0x2e, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x5f, 0x35, 0x36, 0x31, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x36, 0x37, 0x2e, 0x7a, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x35, 0x34, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x36, 0x31, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x34, 0x28, 0x5f, 0x35, 0x34, 0x31, 0x29, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, -0x20, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x28, 0x29, 0x00, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, -0x6e, 0x74, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x5f, 0x31, 0x30, 0x30, 0x32, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, -0x00, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, -0x72, 0x53, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x31, 0x20, 0x7b, 0x00, 0x64, 0x65, 0x70, 0x74, 0x68, 0x32, -0x64, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, -0x5f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x4d, 0x61, 0x70, 0x20, 0x5b, 0x5b, 0x69, 0x64, 0x28, 0x30, 0x29, 0x5d, 0x5d, -0x3b, 0x00, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x64, -0x6f, 0x77, 0x4d, 0x61, 0x70, 0x53, 0x6d, 0x70, 0x6c, 0x72, 0x20, 0x5b, 0x5b, 0x69, 0x64, 0x28, 0x31, 0x29, 0x5d, 0x5d, -0x3b, 0x00, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x6c, -0x69, 0x67, 0x68, 0x74, 0x5f, 0x69, 0x62, 0x6c, 0x44, 0x46, 0x47, 0x20, 0x5b, 0x5b, 0x69, 0x64, 0x28, 0x32, 0x29, 0x5d, -0x5d, 0x3b, 0x00, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x69, 0x62, 0x6c, -0x44, 0x46, 0x47, 0x53, 0x6d, 0x70, 0x6c, 0x72, 0x20, 0x5b, 0x5b, 0x69, 0x64, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, 0x00, -0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x63, 0x75, 0x62, 0x65, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x6c, -0x69, 0x67, 0x68, 0x74, 0x5f, 0x69, 0x62, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x5b, 0x5b, 0x69, -0x64, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x67, 0x68, -0x74, 0x5f, 0x69, 0x62, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x53, 0x6d, 0x70, 0x6c, 0x72, 0x20, 0x5b, -0x5b, 0x69, 0x64, 0x28, 0x35, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x5f, -0x61, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, -0x73, 0x61, 0x6f, 0x20, 0x5b, 0x5b, 0x69, 0x64, 0x28, 0x36, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x73, 0x61, 0x6d, 0x70, 0x6c, -0x65, 0x72, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x73, 0x61, 0x6f, 0x53, 0x6d, 0x70, 0x6c, 0x72, 0x20, 0x5b, -0x5b, 0x69, 0x64, 0x28, 0x37, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x5f, -0x61, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, -0x73, 0x72, 0x20, 0x5b, 0x5b, 0x69, 0x64, 0x28, 0x38, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, -0x72, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x73, 0x72, 0x53, 0x6d, 0x70, 0x6c, 0x72, 0x20, 0x5b, 0x5b, 0x69, -0x64, 0x28, 0x39, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x3e, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, -0x20, 0x5b, 0x5b, 0x69, 0x64, 0x28, 0x31, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, -0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x53, 0x6d, 0x70, 0x6c, -0x72, 0x20, 0x5b, 0x5b, 0x69, 0x64, 0x28, 0x31, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, -0x65, 0x63, 0x75, 0x62, 0x65, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x66, -0x6f, 0x67, 0x20, 0x5b, 0x5b, 0x69, 0x64, 0x28, 0x31, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x73, 0x61, 0x6d, 0x70, 0x6c, -0x65, 0x72, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x66, 0x6f, 0x67, 0x53, 0x6d, 0x70, 0x6c, 0x72, 0x20, 0x5b, 0x5b, -0x69, 0x64, 0x28, 0x31, 0x33, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6d, -0x61, 0x69, 0x6e, 0x30, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x28, 0x6d, 0x61, 0x69, 0x6e, 0x30, -0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, -0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, -0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x31, 0x26, 0x20, 0x73, 0x70, 0x76, 0x44, 0x65, -0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x31, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, -0x72, 0x28, 0x32, 0x37, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x73, 0x70, -0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, -0x33, 0x26, 0x20, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x33, -0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x32, 0x39, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, -0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x26, -0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, -0x66, 0x65, 0x72, 0x28, 0x31, 0x37, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, -0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x26, 0x20, 0x6d, 0x61, 0x74, 0x65, -0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, -0x32, 0x35, 0x29, 0x5d, 0x5d, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x20, 0x5f, 0x39, 0x39, 0x34, -0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, -0x6c, 0x66, 0x34, 0x20, 0x5f, 0x36, 0x32, 0x33, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x68, 0x61, 0x6c, -0x66, 0x33, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, -0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, -0x29, 0x29, 0x2c, 0x20, 0x5f, 0x39, 0x39, 0x34, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x34, 0x20, 0x5f, 0x36, 0x33, 0x34, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, -0x61, 0x6d, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x2a, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x34, 0x28, 0x66, 0x61, 0x73, 0x74, 0x3a, 0x3a, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, 0x69, 0x6e, 0x2e, 0x76, 0x61, -0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x31, -0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x68, 0x61, 0x6c, 0x66, 0x32, 0x20, 0x5f, 0x36, 0x33, 0x35, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, -0x5f, 0x36, 0x33, 0x34, 0x29, 0x2e, 0x78, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, -0x36, 0x33, 0x38, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, -0x2e, 0x73, 0x68, 0x6f, 0x77, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x34, 0x35, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, -0x21, 0x5f, 0x36, 0x33, 0x38, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x36, 0x34, 0x35, 0x20, -0x3d, 0x20, 0x5f, 0x36, 0x33, 0x34, 0x2e, 0x78, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x5f, 0x36, 0x34, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x33, 0x38, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x35, 0x32, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, -0x21, 0x5f, 0x36, 0x34, 0x35, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x36, 0x35, 0x32, 0x20, -0x3d, 0x20, 0x5f, 0x36, 0x33, 0x34, 0x2e, 0x78, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x5f, 0x36, 0x35, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x34, 0x35, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x35, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, -0x21, 0x5f, 0x36, 0x35, 0x32, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x36, 0x35, 0x39, 0x20, -0x3d, 0x20, 0x5f, 0x36, 0x33, 0x34, 0x2e, 0x79, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x5f, 0x36, 0x35, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x35, 0x32, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x36, 0x36, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, -0x21, 0x5f, 0x36, 0x35, 0x39, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x36, 0x36, 0x36, 0x20, -0x3d, 0x20, 0x5f, 0x36, 0x33, 0x34, 0x2e, 0x79, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x5f, 0x36, 0x36, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x35, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x5f, 0x39, 0x37, 0x33, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, -0x28, 0x5f, 0x36, 0x36, 0x36, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x37, 0x33, 0x20, -0x3d, 0x20, 0x5f, 0x36, 0x32, 0x33, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x36, 0x33, 0x35, -0x2e, 0x79, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x36, 0x33, 0x34, -0x2e, 0x79, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x5f, -0x36, 0x38, 0x30, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x73, 0x70, 0x76, 0x44, -0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x33, 0x2e, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, -0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, -0x65, 0x28, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x33, 0x2e, -0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, -0x53, 0x6d, 0x70, 0x6c, 0x72, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x5f, 0x36, 0x33, 0x35, 0x29, 0x2c, -0x20, 0x62, 0x69, 0x61, 0x73, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, -0x6c, 0x6f, 0x64, 0x42, 0x69, 0x61, 0x73, 0x29, 0x29, 0x29, 0x2c, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x68, 0x61, 0x6c, 0x66, 0x20, 0x5f, 0x36, 0x38, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x38, 0x30, 0x2e, 0x77, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x20, 0x5f, 0x36, 0x38, 0x35, 0x20, -0x3d, 0x20, 0x5f, 0x36, 0x38, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x36, 0x38, 0x32, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x5f, 0x39, 0x33, 0x38, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x33, 0x38, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x38, 0x35, -0x2e, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x33, 0x38, 0x2e, 0x79, 0x20, 0x3d, -0x20, 0x5f, 0x36, 0x38, 0x35, 0x2e, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x33, -0x38, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x38, 0x35, 0x2e, 0x7a, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x20, 0x5f, 0x37, 0x30, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x39, 0x33, 0x38, 0x2e, -0x78, 0x79, 0x7a, 0x20, 0x2b, 0x20, 0x28, 0x5f, 0x36, 0x32, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x5f, -0x39, 0x39, 0x34, 0x20, 0x2d, 0x20, 0x5f, 0x36, 0x38, 0x32, 0x29, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x5f, 0x31, 0x30, 0x30, 0x34, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, -0x34, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x5f, 0x31, 0x30, 0x30, 0x34, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x30, 0x30, 0x2e, 0x78, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x31, 0x30, 0x30, 0x34, 0x2e, 0x79, 0x20, 0x3d, 0x20, -0x5f, 0x37, 0x30, 0x30, 0x2e, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x31, 0x30, 0x30, -0x34, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x30, 0x30, 0x2e, 0x7a, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x5f, 0x39, 0x37, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x31, 0x30, 0x30, 0x34, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x6f, 0x75, 0x74, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x34, 0x28, 0x5f, 0x39, 0x37, 0x33, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, -0x20, 0x5f, 0x35, 0x32, 0x30, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, -0x73, 0x2e, 0x66, 0x6f, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, -0x20, 0x2a, 0x20, 0x28, 0x69, 0x6e, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, -0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, -0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x69, 0x65, -0x77, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5b, 0x33, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x5f, 0x39, 0x38, 0x31, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x00, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, 0x35, 0x31, 0x20, 0x3d, -0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x28, 0x5f, 0x35, 0x32, 0x30, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x37, 0x35, 0x31, 0x20, 0x3e, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, -0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x43, 0x75, 0x74, 0x4f, 0x66, 0x66, 0x44, 0x69, 0x73, -0x74, 0x61, 0x6e, 0x63, 0x65, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x38, 0x31, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, -0x34, 0x28, 0x6f, 0x75, 0x74, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x29, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x20, 0x5f, 0x37, 0x36, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x32, 0x30, 0x2e, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, 0x36, 0x38, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, -0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, -0x46, 0x61, 0x6c, 0x6c, 0x6f, 0x66, 0x66, 0x20, 0x2a, 0x20, 0x5f, 0x37, 0x36, 0x37, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x39, 0x37, 0x34, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x37, 0x36, 0x38, 0x29, 0x20, 0x3e, 0x20, -0x30, 0x2e, 0x30, 0x30, 0x31, 0x32, 0x35, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x5f, 0x39, 0x37, 0x34, 0x20, 0x3d, 0x20, 0x66, 0x6d, 0x61, 0x28, 0x2d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, -0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x44, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x5b, 0x30, 0x5d, -0x2c, 0x20, 0x65, 0x78, 0x70, 0x28, 0x66, 0x6d, 0x61, 0x28, 0x2d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, -0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x46, 0x61, 0x6c, 0x6c, 0x6f, 0x66, -0x66, 0x2c, 0x20, 0x5f, 0x37, 0x36, 0x37, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x44, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x5b, 0x31, 0x5d, 0x29, 0x29, 0x2c, 0x20, -0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x44, 0x65, 0x6e, -0x73, 0x69, 0x74, 0x79, 0x5b, 0x32, 0x5d, 0x29, 0x20, 0x2f, 0x20, 0x5f, 0x37, 0x36, 0x38, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x5f, 0x39, 0x37, 0x34, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x44, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x5b, 0x32, 0x5d, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x20, 0x5f, 0x38, 0x30, 0x31, 0x20, 0x3d, 0x20, 0x6d, 0x69, -0x6e, 0x28, 0x5f, 0x39, 0x39, 0x34, 0x20, 0x2d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x28, 0x65, 0x78, 0x70, 0x28, 0x2d, 0x28, -0x5f, 0x39, 0x37, 0x34, 0x20, 0x2a, 0x20, 0x66, 0x61, 0x73, 0x74, 0x3a, 0x3a, 0x6d, 0x61, 0x78, 0x28, 0x5f, 0x37, 0x35, -0x31, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, -0x67, 0x53, 0x74, 0x61, 0x72, 0x74, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x29, 0x2c, 0x20, 0x68, 0x61, 0x6c, -0x66, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x4d, -0x61, 0x78, 0x4f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x29, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x20, 0x5f, 0x31, 0x30, 0x31, 0x37, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, -0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, -0x73, 0x2e, 0x66, 0x6f, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x29, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x20, 0x5f, 0x39, 0x37, 0x35, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, -0x66, 0x6f, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x49, 0x62, 0x6c, 0x20, 0x3e, 0x20, 0x30, 0x2e, -0x30, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x32, -0x20, 0x5f, 0x31, 0x30, 0x30, 0x39, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x32, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x32, 0x28, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x3c, 0x68, 0x61, 0x6c, 0x66, 0x32, 0x3e, 0x28, 0x66, 0x72, 0x61, -0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x4d, 0x69, 0x6e, 0x4d, 0x61, 0x78, -0x4d, 0x69, 0x70, 0x29, 0x29, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x5f, 0x39, 0x37, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x31, 0x30, 0x31, 0x37, 0x20, 0x2a, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, -0x28, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x31, 0x2e, 0x6c, -0x69, 0x67, 0x68, 0x74, 0x5f, 0x66, 0x6f, 0x67, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x73, 0x70, 0x76, 0x44, -0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x31, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, -0x66, 0x6f, 0x67, 0x53, 0x6d, 0x70, 0x6c, 0x72, 0x2c, 0x20, 0x28, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x73, 0x65, -0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x78, 0x33, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x57, 0x6f, 0x72, -0x6c, 0x64, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5b, 0x30, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x66, 0x72, 0x61, -0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6c, 0x64, -0x46, 0x72, 0x6f, 0x6d, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5b, 0x31, 0x5d, 0x2e, 0x78, -0x79, 0x7a, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x75, 0x73, -0x65, 0x72, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x72, -0x69, 0x78, 0x5b, 0x32, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x29, 0x20, 0x2a, 0x20, 0x5f, 0x35, 0x32, 0x30, 0x29, 0x2c, -0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, 0x6d, 0x69, 0x78, 0x28, 0x5f, 0x31, 0x30, 0x30, 0x39, 0x2e, 0x79, 0x2c, 0x20, -0x5f, 0x31, 0x30, 0x30, 0x39, 0x2e, 0x78, 0x2c, 0x20, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x28, -0x66, 0x6d, 0x61, 0x28, 0x5f, 0x37, 0x35, 0x31, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x4f, 0x6e, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x4d, 0x69, 0x6e, -0x75, 0x73, 0x4e, 0x65, 0x61, 0x72, 0x2c, 0x20, 0x2d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x4e, 0x65, 0x61, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x4d, 0x69, 0x6e, -0x75, 0x73, 0x4e, 0x65, 0x61, 0x72, 0x29, 0x29, 0x2c, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, -0x20, 0x5f, 0x39, 0x39, 0x34, 0x29, 0x29, 0x29, 0x29, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x37, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x31, 0x30, 0x31, 0x37, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x20, 0x5f, 0x38, 0x35, 0x30, -0x20, 0x3d, 0x20, 0x5f, 0x39, 0x37, 0x35, 0x20, 0x2a, 0x20, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x28, 0x66, 0x72, 0x61, 0x6d, -0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x62, 0x6c, 0x4c, 0x75, 0x6d, 0x69, 0x6e, 0x61, 0x6e, -0x63, 0x65, 0x29, 0x20, 0x2a, 0x20, 0x5f, 0x38, 0x30, 0x31, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x20, 0x5f, 0x39, 0x38, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x69, 0x66, 0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, -0x6f, 0x67, 0x49, 0x6e, 0x73, 0x63, 0x61, 0x74, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x20, 0x3e, -0x20, 0x30, 0x2e, 0x30, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, -0x38, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x35, 0x30, 0x20, 0x2b, 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, -0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, -0x6f, 0x6c, 0x6f, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, -0x20, 0x68, 0x61, 0x6c, 0x66, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, -0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x2e, -0x77, 0x29, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x28, 0x66, 0x61, 0x73, 0x74, -0x3a, 0x3a, 0x6d, 0x61, 0x78, 0x28, 0x64, 0x6f, 0x74, 0x28, 0x66, 0x61, 0x73, 0x74, 0x3a, 0x3a, 0x6e, 0x6f, 0x72, 0x6d, -0x61, 0x6c, 0x69, 0x7a, 0x65, 0x28, 0x5f, 0x35, 0x32, 0x30, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x28, -0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, -0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x68, -0x61, 0x6c, 0x66, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, -0x67, 0x49, 0x6e, 0x73, 0x63, 0x61, 0x74, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x29, 0x29, 0x20, -0x2a, 0x20, 0x28, 0x5f, 0x39, 0x39, 0x34, 0x20, 0x2d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x28, 0x65, 0x78, 0x70, 0x28, 0x2d, -0x28, 0x5f, 0x39, 0x37, 0x34, 0x20, 0x2a, 0x20, 0x66, 0x61, 0x73, 0x74, 0x3a, 0x3a, 0x6d, 0x61, 0x78, 0x28, 0x5f, 0x37, -0x35, 0x31, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, -0x6f, 0x67, 0x49, 0x6e, 0x73, 0x63, 0x61, 0x74, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x72, 0x74, 0x2c, -0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x38, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x35, 0x30, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x5f, 0x31, 0x30, 0x32, 0x36, 0x20, 0x3d, 0x20, -0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x6f, 0x75, 0x74, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x29, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x33, 0x20, 0x5f, 0x38, 0x39, 0x36, -0x20, 0x3d, 0x20, 0x28, 0x5f, 0x31, 0x30, 0x32, 0x36, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x5f, 0x39, 0x39, -0x34, 0x20, 0x2d, 0x20, 0x5f, 0x38, 0x30, 0x31, 0x29, 0x29, 0x20, 0x2b, 0x20, 0x5f, 0x39, 0x38, 0x30, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x5f, 0x39, 0x35, 0x38, 0x20, 0x3d, 0x20, -0x5f, 0x31, 0x30, 0x32, 0x36, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x35, 0x38, 0x2e, -0x78, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x39, 0x36, 0x2e, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x5f, 0x39, 0x35, 0x38, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x39, 0x36, 0x2e, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x35, 0x38, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x39, 0x36, 0x2e, 0x7a, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x38, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x39, 0x35, -0x38, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x7d, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x28, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x34, 0x28, 0x5f, 0x39, 0x38, 0x31, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x34, 0x78, 0x34, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, -0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x78, 0x33, 0x20, -0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, -0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x70, -0x68, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, -0x74, 0x20, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x69, 0x6e, 0x74, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5b, 0x38, 0x5d, 0x3b, 0x00, 0x63, -0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x4d, -0x41, 0x58, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x53, 0x20, 0x3d, 0x20, 0x53, 0x50, 0x49, 0x52, 0x56, -0x5f, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x31, -0x3b, 0x00, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x00, 0x20, 0x20, 0x20, 0x20, 0x50, 0x65, 0x72, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x61, 0x62, 0x6c, -0x65, 0x44, 0x61, 0x74, 0x61, 0x20, 0x64, 0x61, 0x74, 0x61, 0x5b, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x4d, 0x41, -0x58, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x53, 0x5d, 0x3b, 0x00, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, -0x6e, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x5f, 0x31, 0x36, 0x34, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x6f, 0x75, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, -0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, -0x6e, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x28, 0x6d, -0x61, 0x69, 0x6e, 0x30, 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, -0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, -0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x26, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x69, 0x66, -0x6f, 0x72, 0x6d, 0x73, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x31, 0x38, 0x29, 0x5d, 0x5d, 0x29, -0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x6f, 0x75, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x2e, -0x78, 0x20, 0x3d, 0x20, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x28, 0x6f, -0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x5b, 0x5f, -0x31, 0x36, 0x34, 0x5d, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x6f, 0x75, 0x74, 0x2e, 0x6f, 0x75, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x69, -0x6e, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, -0x2f, 0x20, 0x69, 0x6e, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, -0x2e, 0x77, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, 0x6f, -0x75, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x28, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x66, -0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x30, 0x2e, -0x30, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x67, 0x6c, 0x5f, 0x43, 0x6c, 0x69, -0x70, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x5b, 0x5b, 0x63, 0x6c, 0x69, 0x70, 0x5f, 0x64, 0x69, 0x73, -0x74, 0x61, 0x6e, 0x63, 0x65, 0x5d, 0x5d, 0x20, 0x5b, 0x31, 0x5d, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x67, 0x6c, 0x5f, 0x43, 0x6c, 0x69, 0x70, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x30, -0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x63, 0x6c, 0x69, 0x70, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x36, 0x36, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x6d, 0x65, -0x73, 0x68, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x34, 0x20, 0x5f, 0x36, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x36, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, -0x36, 0x39, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x66, 0x6d, 0x61, 0x28, 0x5f, 0x36, 0x36, 0x2e, 0x7a, 0x2c, 0x20, 0x2d, 0x30, -0x2e, 0x35, 0x2c, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, -0x20, 0x5f, 0x37, 0x30, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, -0x2e, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x6c, 0x69, 0x70, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, -0x20, 0x2a, 0x20, 0x5f, 0x36, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, -0x31, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x30, 0x2e, 0x77, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x34, 0x20, 0x5f, 0x37, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, -0x37, 0x31, 0x29, 0x20, 0x3c, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, -0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x37, 0x38, 0x20, -0x3d, 0x20, 0x5f, 0x37, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x37, 0x38, 0x2e, 0x77, -0x20, 0x3d, 0x20, 0x28, 0x5f, 0x37, 0x31, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x20, 0x3f, 0x20, 0x28, 0x2d, 0x31, -0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x20, 0x3a, 0x20, 0x31, 0x2e, 0x30, 0x38, -0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, -0x37, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x38, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x37, -0x39, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, -0x5f, 0x38, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x39, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2f, 0x20, 0x5f, -0x37, 0x39, 0x2e, 0x77, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x5f, 0x38, -0x35, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x36, 0x36, 0x2e, 0x78, 0x79, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x38, 0x37, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x30, 0x2e, -0x30, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x38, 0x37, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x35, 0x2e, -0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x38, 0x37, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x35, 0x2e, 0x79, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, -0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x37, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, -0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, -0x6f, 0x6e, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x32, 0x2e, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, -0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, -0x6f, 0x6e, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x32, 0x2e, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, -0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, -0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x32, 0x2e, 0x7a, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, -0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, -0x5f, 0x36, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x39, 0x39, 0x20, 0x3d, -0x20, 0x66, 0x6d, 0x61, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x28, 0x6f, 0x75, 0x74, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, -0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x25, 0x20, 0x32, 0x29, 0x2c, 0x20, 0x32, 0x2e, 0x30, 0x2c, -0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x31, -0x30, 0x34, 0x20, 0x3d, 0x20, 0x66, 0x6d, 0x61, 0x28, 0x5f, 0x36, 0x36, 0x2e, 0x78, 0x2c, 0x20, 0x30, 0x2e, 0x35, 0x2c, -0x20, 0x28, 0x5f, 0x36, 0x36, 0x2e, 0x77, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2a, 0x20, 0x5f, 0x39, 0x39, -0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x36, 0x39, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x31, 0x30, 0x34, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x43, 0x6c, 0x69, 0x70, 0x44, 0x69, 0x73, 0x74, -0x61, 0x6e, 0x63, 0x65, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x5f, 0x31, 0x30, 0x34, 0x20, 0x2a, 0x20, 0x5f, 0x39, 0x39, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, -0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x69, 0x6e, 0x73, -0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x69, 0x6e, -0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3e, 0x3e, 0x20, 0x31, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x43, 0x6c, 0x69, 0x70, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, -0x63, 0x65, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x43, 0x6c, 0x69, 0x70, 0x44, 0x69, -0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5b, 0x30, 0x5d, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x34, 0x20, 0x5f, 0x32, 0x38, 0x32, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x73, -0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x33, -0x32, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x32, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x32, 0x34, 0x2e, -0x7a, 0x20, 0x3d, 0x20, 0x66, 0x6d, 0x61, 0x28, 0x5f, 0x32, 0x38, 0x32, 0x2e, 0x7a, 0x2c, 0x20, 0x2d, 0x30, 0x2e, 0x35, -0x2c, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, -0x32, 0x35, 0x38, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, -0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x6c, 0x69, 0x70, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x20, -0x2a, 0x20, 0x5f, 0x33, 0x32, 0x34, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, -0x36, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x35, 0x38, 0x2e, 0x77, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x34, 0x20, 0x5f, 0x33, 0x33, 0x37, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, -0x73, 0x28, 0x5f, 0x32, 0x36, 0x30, 0x29, 0x20, 0x3c, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, -0x2d, 0x31, 0x39, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, -0x5f, 0x33, 0x32, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x35, 0x38, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x5f, 0x33, 0x32, 0x38, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x32, 0x36, 0x30, 0x20, 0x3c, 0x20, 0x30, 0x2e, -0x30, 0x29, 0x20, 0x3f, 0x20, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, -0x29, 0x20, 0x3a, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x33, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x32, 0x38, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x33, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x35, 0x38, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x32, 0x37, 0x34, 0x20, 0x3d, 0x20, 0x5f, -0x33, 0x33, 0x37, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2f, 0x20, 0x5f, 0x33, 0x33, 0x37, 0x2e, 0x77, 0x29, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x5f, 0x32, 0x38, 0x39, 0x20, 0x3d, 0x20, -0x28, 0x5f, 0x32, 0x38, 0x32, 0x2e, 0x78, 0x79, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x32, 0x28, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x34, 0x20, 0x5f, 0x33, 0x33, 0x31, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x33, 0x31, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x39, 0x2e, -0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x33, 0x31, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x39, -0x2e, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, -0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x31, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, -0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x34, 0x2e, 0x78, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, -0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x34, 0x2e, 0x79, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, -0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x34, 0x2e, 0x7a, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, -0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x32, 0x34, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, -0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x32, 0x34, 0x3b, 0x00, -0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x35, 0x34, 0x35, -0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x33, -0x39, 0x30, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, -0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, -0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x2c, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, -0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, -0x2c, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, 0x61, 0x63, -0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x2c, 0x20, 0x31, 0x2e, 0x30, -0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x5f, 0x34, 0x30, 0x32, 0x20, 0x3d, -0x20, 0x5f, 0x34, 0x30, 0x31, 0x2e, 0x78, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, -0x20, 0x5f, 0x35, 0x34, 0x31, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x34, 0x30, 0x32, 0x2e, -0x79, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x34, 0x30, 0x31, 0x2e, 0x79, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x34, 0x34, 0x37, 0x20, 0x3d, 0x20, -0x66, 0x61, 0x73, 0x74, 0x3a, 0x3a, 0x6d, 0x61, 0x78, 0x28, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, -0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x33, 0x2e, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, -0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x73, 0x70, 0x76, 0x44, -0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x33, 0x2e, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, -0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x6d, 0x70, 0x6c, 0x72, 0x2c, -0x20, 0x5f, 0x34, 0x30, 0x32, 0x2c, 0x20, 0x62, 0x69, 0x61, 0x73, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, -0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6c, 0x6f, 0x64, 0x42, 0x69, 0x61, 0x73, 0x29, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x34, 0x34, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x34, 0x37, 0x2e, 0x77, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x5f, 0x34, 0x35, 0x32, 0x20, -0x3d, 0x20, 0x5f, 0x34, 0x34, 0x37, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x34, 0x34, 0x39, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x35, 0x31, 0x39, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x5f, 0x34, 0x36, 0x37, 0x20, -0x3d, 0x20, 0x5f, 0x35, 0x31, 0x39, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2b, 0x20, 0x28, 0x5f, 0x33, 0x39, 0x30, 0x2e, 0x78, -0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x34, 0x34, 0x39, 0x29, 0x29, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x35, 0x32, 0x36, 0x20, -0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x5f, 0x35, 0x32, 0x36, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x36, 0x37, 0x2e, 0x78, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x35, 0x32, 0x36, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x36, -0x37, 0x2e, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x35, 0x32, 0x36, 0x2e, 0x7a, 0x20, -0x3d, 0x20, 0x5f, 0x34, 0x36, 0x37, 0x2e, 0x7a, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x35, -0x34, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x32, 0x36, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x66, -0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x34, 0x31, 0x3b, 0x00, 0x63, 0x6f, 0x6e, -0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x39, 0x38, 0x38, 0x20, 0x3d, 0x20, -0x7b, 0x7d, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x36, 0x32, 0x33, 0x20, -0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, -0x61, 0x6d, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, -0x30, 0x5d, 0x2c, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, -0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x2c, 0x20, 0x6d, -0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, -0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x5f, 0x36, 0x33, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x36, -0x33, 0x34, 0x2e, 0x78, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x39, -0x37, 0x33, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x36, 0x33, 0x35, 0x2e, 0x79, 0x20, 0x3d, -0x20, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x36, 0x33, 0x34, 0x2e, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x36, 0x38, 0x30, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x73, -0x74, 0x3a, 0x3a, 0x6d, 0x61, 0x78, 0x28, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, -0x53, 0x65, 0x74, 0x33, 0x2e, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, -0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, -0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x33, 0x2e, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, -0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x6d, 0x70, 0x6c, 0x72, 0x2c, 0x20, 0x5f, 0x36, -0x33, 0x35, 0x2c, 0x20, 0x62, 0x69, 0x61, 0x73, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x6c, 0x6f, 0x64, 0x42, 0x69, 0x61, 0x73, 0x29, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, -0x28, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x5f, 0x36, 0x38, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x38, 0x30, 0x2e, 0x77, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x5f, 0x36, 0x38, 0x35, 0x20, 0x3d, 0x20, 0x5f, -0x36, 0x38, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x36, 0x38, 0x32, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x39, 0x33, 0x38, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x5f, 0x37, 0x30, 0x30, 0x20, 0x3d, 0x20, 0x5f, -0x39, 0x33, 0x38, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2b, 0x20, 0x28, 0x5f, 0x36, 0x32, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x20, -0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x36, 0x38, 0x32, 0x29, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x39, 0x34, 0x35, 0x20, 0x3d, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x5f, 0x39, 0x34, 0x35, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x30, 0x30, 0x2e, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x34, 0x35, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x30, 0x30, 0x2e, 0x79, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x34, 0x35, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, -0x37, 0x30, 0x30, 0x2e, 0x7a, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x37, 0x33, 0x20, -0x3d, 0x20, 0x5f, 0x39, 0x34, 0x35, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x66, 0x72, 0x61, 0x67, -0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x39, 0x37, 0x33, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x35, 0x32, 0x32, 0x20, 0x3d, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x66, 0x72, 0x61, 0x67, -0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x39, -0x38, 0x31, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x38, 0x31, -0x20, 0x3d, 0x20, 0x5f, 0x35, 0x32, 0x32, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x5f, 0x38, 0x30, 0x31, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x73, 0x74, 0x3a, 0x3a, 0x6d, 0x69, 0x6e, 0x28, -0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x65, 0x78, 0x70, 0x28, 0x2d, 0x28, 0x5f, 0x39, 0x37, 0x34, 0x20, 0x2a, 0x20, 0x66, -0x61, 0x73, 0x74, 0x3a, 0x3a, 0x6d, 0x61, 0x78, 0x28, 0x5f, 0x37, 0x35, 0x31, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, -0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x53, 0x74, 0x61, 0x72, 0x74, 0x2c, 0x20, -0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, -0x73, 0x2e, 0x66, 0x6f, 0x67, 0x4d, 0x61, 0x78, 0x4f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x29, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x5f, 0x39, 0x37, 0x35, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x32, 0x20, 0x5f, 0x39, 0x39, -0x31, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x32, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x61, 0x73, 0x5f, -0x74, 0x79, 0x70, 0x65, 0x3c, 0x68, 0x61, 0x6c, 0x66, 0x32, 0x3e, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, -0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x4d, 0x69, 0x6e, 0x4d, 0x61, 0x78, 0x4d, 0x69, 0x70, 0x29, 0x29, -0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x39, 0x37, 0x35, 0x20, -0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x29, 0x20, 0x2a, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x33, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, -0x72, 0x53, 0x65, 0x74, 0x31, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x66, 0x6f, 0x67, 0x2e, 0x73, 0x61, 0x6d, 0x70, -0x6c, 0x65, 0x28, 0x73, 0x70, 0x76, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x31, -0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x66, 0x6f, 0x67, 0x53, 0x6d, 0x70, 0x6c, 0x72, 0x2c, 0x20, 0x28, 0x74, 0x72, -0x61, 0x6e, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x78, 0x33, 0x28, 0x66, 0x72, 0x61, -0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6c, 0x64, -0x46, 0x72, 0x6f, 0x6d, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5b, 0x30, 0x5d, 0x2e, 0x78, -0x79, 0x7a, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x75, 0x73, -0x65, 0x72, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x72, -0x69, 0x78, 0x5b, 0x31, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, -0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x57, 0x6f, -0x72, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5b, 0x32, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x29, 0x20, 0x2a, -0x20, 0x5f, 0x35, 0x32, 0x30, 0x29, 0x2c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, 0x6d, 0x69, 0x78, 0x28, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x28, 0x5f, 0x39, 0x39, 0x31, 0x2e, 0x79, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x28, 0x5f, -0x39, 0x39, 0x31, 0x2e, 0x78, 0x29, 0x2c, 0x20, 0x66, 0x61, 0x73, 0x74, 0x3a, 0x3a, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, -0x66, 0x6d, 0x61, 0x28, 0x5f, 0x37, 0x35, 0x31, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x4f, 0x6e, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x4d, 0x69, 0x6e, -0x75, 0x73, 0x4e, 0x65, 0x61, 0x72, 0x2c, 0x20, 0x2d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x4e, 0x65, 0x61, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x46, 0x61, 0x72, 0x4d, 0x69, 0x6e, -0x75, 0x73, 0x4e, 0x65, 0x61, 0x72, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x29, -0x29, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x5f, 0x39, 0x37, 0x35, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, -0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x29, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x5f, 0x38, 0x35, 0x30, 0x20, -0x3d, 0x20, 0x5f, 0x39, 0x37, 0x35, 0x20, 0x2a, 0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x2e, 0x69, 0x62, 0x6c, 0x4c, 0x75, 0x6d, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x2a, 0x20, 0x5f, -0x38, 0x30, 0x31, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, -0x20, 0x5f, 0x39, 0x38, 0x30, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, -0x39, 0x38, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x35, 0x30, 0x20, 0x2b, 0x20, 0x28, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, -0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x49, -0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, -0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x49, -0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x2e, 0x77, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x28, 0x66, -0x61, 0x73, 0x74, 0x3a, 0x3a, 0x6d, 0x61, 0x78, 0x28, 0x64, 0x6f, 0x74, 0x28, 0x66, 0x61, 0x73, 0x74, 0x3a, 0x3a, 0x6e, -0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x28, 0x5f, 0x35, 0x32, 0x30, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x33, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6c, 0x69, 0x67, -0x68, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x2c, -0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x49, 0x6e, -0x73, 0x63, 0x61, 0x74, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x31, -0x2e, 0x30, 0x20, 0x2d, 0x20, 0x65, 0x78, 0x70, 0x28, 0x2d, 0x28, 0x5f, 0x39, 0x37, 0x34, 0x20, 0x2a, 0x20, 0x66, 0x61, -0x73, 0x74, 0x3a, 0x3a, 0x6d, 0x61, 0x78, 0x28, 0x5f, 0x37, 0x35, 0x31, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, -0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x67, 0x49, 0x6e, 0x73, 0x63, 0x61, 0x74, 0x74, 0x65, -0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x72, 0x74, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x5f, 0x38, 0x39, -0x36, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x35, 0x32, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, -0x20, 0x2d, 0x20, 0x5f, 0x38, 0x30, 0x31, 0x29, 0x29, 0x20, 0x2b, 0x20, 0x5f, 0x39, 0x38, 0x30, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x39, 0x35, 0x38, 0x20, 0x3d, 0x20, -0x5f, 0x35, 0x32, 0x32, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, -0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x39, 0x38, 0x31, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x34, 0x20, 0x5f, 0x33, 0x30, 0x39, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, -0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, -0x33, 0x35, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x30, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x35, 0x31, -0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x66, 0x6d, 0x61, 0x28, 0x5f, 0x33, 0x30, 0x39, 0x2e, 0x7a, 0x2c, 0x20, 0x2d, 0x30, 0x2e, -0x35, 0x2c, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, -0x5f, 0x32, 0x38, 0x35, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, -0x2e, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x6c, 0x69, 0x70, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, -0x20, 0x2a, 0x20, 0x5f, 0x33, 0x35, 0x31, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, -0x32, 0x38, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x35, 0x2e, 0x77, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x33, 0x36, 0x39, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, -0x62, 0x73, 0x28, 0x5f, 0x32, 0x38, 0x37, 0x29, 0x20, 0x3c, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, -0x65, 0x2d, 0x31, 0x39, 0x29, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, -0x20, 0x5f, 0x33, 0x35, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x35, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, -0x20, 0x20, 0x5f, 0x33, 0x35, 0x35, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x32, 0x38, 0x37, 0x20, 0x3c, 0x20, 0x30, -0x2e, 0x30, 0x29, 0x20, 0x3f, 0x20, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, -0x39, 0x29, 0x20, 0x3a, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x36, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x35, 0x35, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x36, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x35, -0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x33, 0x30, 0x31, 0x20, 0x3d, 0x20, -0x5f, 0x33, 0x36, 0x39, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2f, 0x20, 0x5f, 0x33, 0x36, 0x39, 0x2e, 0x77, -0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x5f, 0x33, 0x31, 0x36, 0x20, 0x3d, -0x20, 0x28, 0x5f, 0x33, 0x30, 0x39, 0x2e, 0x78, 0x79, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x34, 0x20, 0x5f, 0x33, 0x35, 0x38, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x30, 0x2e, 0x30, -0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x35, 0x38, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x31, 0x36, -0x2e, 0x78, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x33, 0x35, 0x38, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x31, -0x36, 0x2e, 0x79, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, -0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x35, 0x38, 0x3b, 0x00, 0x20, 0x20, -0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, -0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x30, 0x31, 0x2e, 0x78, 0x3b, 0x00, 0x20, -0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, -0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x30, 0x31, 0x2e, 0x79, 0x3b, 0x00, -0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, -0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x30, 0x31, 0x2e, 0x7a, 0x3b, -0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, -0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x35, 0x31, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x5f, 0x32, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x66, 0x6d, 0x61, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x28, -0x6f, 0x75, 0x74, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x25, -0x20, 0x32, 0x29, 0x2c, 0x20, 0x32, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x32, 0x31, 0x20, 0x3d, 0x20, 0x66, 0x6d, 0x61, 0x28, 0x5f, 0x33, -0x30, 0x39, 0x2e, 0x78, 0x2c, 0x20, 0x30, 0x2e, 0x35, 0x2c, 0x20, 0x28, 0x5f, 0x33, 0x30, 0x39, 0x2e, 0x77, 0x20, 0x2a, -0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2a, 0x20, 0x5f, 0x32, 0x31, 0x32, 0x29, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x5f, -0x33, 0x35, 0x31, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x32, 0x31, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, -0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x43, 0x6c, 0x69, 0x70, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5b, 0x30, 0x5d, -0x20, 0x3d, 0x20, 0x5f, 0x32, 0x32, 0x31, 0x20, 0x2a, 0x20, 0x5f, 0x32, 0x31, 0x32, 0x3b, 0x00, 0x20, 0x20, 0x20, 0x20, -0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x33, -0x35, 0x31, 0x3b, 0x00, 0x4c, 0x53, 0x4c, 0x47, 0x5f, 0x54, 0x41, 0x4d, 0xfa, 0x0b, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x9a, 0x01, 0x00, 0x00, 0x01, 0x10, -0x00, 0x86, 0x00, 0x00, 0x00, 0x01, 0x10, 0x01, 0xf2, 0x02, 0x00, 0x00, 0x01, 0x20, 0x01, 0x06, 0x03, 0x00, 0x00, 0x01, -0x30, 0x01, 0xd4, 0x04, 0x00, 0x00, 0x01, 0x44, 0x01, 0x16, 0x05, 0x00, 0x00, 0x01, 0x80, 0x00, 0x2e, 0x05, 0x00, 0x00, -0x01, 0x90, 0x00, 0x2e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x4c, 0x06, 0x00, 0x00, 0x02, 0x00, 0x01, 0x62, 0x07, 0x00, -0x00, 0x02, 0x10, 0x00, 0x4c, 0x06, 0x00, 0x00, 0x02, 0x10, 0x01, 0xb8, 0x08, 0x00, 0x00, 0x02, 0x20, 0x01, 0xca, 0x08, -0x00, 0x00, 0x02, 0x30, 0x01, 0x86, 0x0a, 0x00, 0x00, 0x02, 0x44, 0x01, 0xc6, 0x0a, 0x00, 0x00, 0x02, 0x80, 0x00, 0xdc, -0x0a, 0x00, 0x00, 0x02, 0x90, 0x00, 0xdc, 0x0a, 0x00, 0x00, 0xba, 0x09, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, 0x00, -0x02, 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, -0x14, 0x00, 0x15, 0x00, 0x16, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1d, 0x00, -0x1e, 0x00, 0x1f, 0x00, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, 0x24, 0x00, 0x25, 0x00, 0x26, 0x00, 0x27, 0x00, -0x28, 0x00, 0x29, 0x00, 0x2a, 0x00, 0x2b, 0x00, 0x2c, 0x00, 0x2d, 0x00, 0x2e, 0x00, 0x2f, 0x00, 0x30, 0x00, 0x31, 0x00, -0x32, 0x00, 0x33, 0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3b, 0x00, -0x3c, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x40, 0x00, 0x41, 0x00, 0x42, 0x00, 0x43, 0x00, 0x44, 0x00, 0x45, 0x00, -0x46, 0x00, 0x47, 0x00, 0x48, 0x00, 0x49, 0x00, 0x4a, 0x00, 0x4b, 0x00, 0x4c, 0x00, 0x4d, 0x00, 0x4e, 0x00, 0x4f, 0x00, -0x50, 0x00, 0x51, 0x00, 0x52, 0x00, 0x53, 0x00, 0x54, 0x00, 0x55, 0x00, 0x56, 0x00, 0x57, 0x00, 0x58, 0x00, 0x59, 0x00, -0x5a, 0x00, 0x5b, 0x00, 0x5c, 0x00, 0x02, 0x00, 0x5d, 0x00, 0x02, 0x00, 0x5e, 0x00, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, -0x61, 0x00, 0x5f, 0x00, 0x62, 0x00, 0x63, 0x00, 0x64, 0x00, 0x65, 0x00, 0x66, 0x00, 0x67, 0x00, 0x68, 0x00, 0x02, 0x00, -0x69, 0x00, 0x6a, 0x00, 0x6b, 0x00, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x6c, 0x00, 0x5f, 0x00, 0x6d, 0x00, 0x6e, 0x00, -0x6f, 0x00, 0x70, 0x00, 0x71, 0x00, 0x72, 0x00, 0x73, 0x00, 0x74, 0x00, 0x75, 0x00, 0x76, 0x00, 0x77, 0x00, 0x78, 0x00, -0x79, 0x00, 0x7a, 0x00, 0x5f, 0x00, 0xa4, 0x09, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7b, 0x00, 0x7c, 0x00, -0x7d, 0x00, 0x02, 0x00, 0x7e, 0x00, 0x7f, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, 0x00, 0x05, 0x00, 0x84, 0x00, -0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x89, 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, -0x8d, 0x00, 0x8e, 0x00, 0x8f, 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, 0x00, 0x96, 0x00, -0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x00, -0xa1, 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, -0xab, 0x00, 0xac, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3, 0x00, 0xb4, 0x00, -0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, -0xbf, 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5, 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, -0xc9, 0x00, 0xca, 0x00, 0xcb, 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xd2, 0x00, -0xd3, 0x00, 0x56, 0x00, 0xd4, 0x00, 0x02, 0x00, 0x89, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd9, 0x00, -0xda, 0x00, 0x5c, 0x00, 0x02, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0xde, 0x00, 0xdf, 0x00, 0x02, 0x00, 0xe0, 0x00, -0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0xe1, 0x00, 0x5f, 0x00, 0xe2, 0x00, 0xe3, 0x00, 0x02, 0x00, 0xe4, 0x00, 0x5f, 0x00, -0x60, 0x00, 0x02, 0x00, 0xe5, 0x00, 0x5f, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0x02, 0x00, 0xe8, 0x00, 0x5f, 0x00, 0x60, 0x00, -0x02, 0x00, 0xe9, 0x00, 0x5f, 0x00, 0xea, 0x00, 0xeb, 0x00, 0x02, 0x00, 0xec, 0x00, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, -0xed, 0x00, 0x5f, 0x00, 0xee, 0x00, 0xef, 0x00, 0x02, 0x00, 0xf0, 0x00, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0xf1, 0x00, -0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5, 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb, 0x00, -0xfc, 0x00, 0xfd, 0x00, 0x5f, 0x00, 0xfe, 0x00, 0x5f, 0x00, 0x51, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, -0x7b, 0x00, 0x7c, 0x00, 0x5c, 0x00, 0x02, 0x00, 0x5f, 0x00, 0x67, 0x10, 0x00, 0x00, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, -0x7b, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x02, 0x00, 0x7e, 0x00, 0x7f, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, 0x00, -0x05, 0x00, 0xff, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x01, 0x03, 0x01, 0x0a, 0x00, 0x02, 0x00, 0x89, 0x00, 0x8a, 0x00, -0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, -0x95, 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, -0x9f, 0x00, 0xa0, 0x00, 0xa1, 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, 0x00, 0xa8, 0x00, -0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, -0xb3, 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, -0xbd, 0x00, 0xbe, 0x00, 0xbf, 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5, 0x00, 0xc6, 0x00, -0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb, 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x00, -0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00, 0x56, 0x00, 0xd4, 0x00, 0x02, 0x00, 0x89, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, 0x00, -0x04, 0x01, 0xd8, 0x00, 0x05, 0x01, 0xd9, 0x00, 0xda, 0x00, 0x06, 0x01, 0x02, 0x00, 0x07, 0x01, 0x08, 0x01, 0x02, 0x00, -0x09, 0x01, 0x5f, 0x00, 0x0a, 0x01, 0x0b, 0x01, 0x0c, 0x01, 0x02, 0x00, 0x0d, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, -0x0e, 0x01, 0x5f, 0x00, 0x0f, 0x01, 0x10, 0x01, 0x11, 0x01, 0x12, 0x01, 0x13, 0x01, 0x02, 0x00, 0x14, 0x01, 0x15, 0x01, -0x16, 0x01, 0x17, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x18, 0x01, 0x5f, 0x00, 0x19, 0x01, 0x1a, 0x01, 0x1b, 0x01, -0x02, 0x00, 0x1c, 0x01, 0x1d, 0x01, 0x1e, 0x01, 0x1f, 0x01, 0x20, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x21, 0x01, -0x5f, 0x00, 0x22, 0x01, 0x23, 0x01, 0x24, 0x01, 0x25, 0x01, 0x26, 0x01, 0x09, 0x01, 0x5f, 0x00, 0x5c, 0x00, 0x02, 0x00, -0x27, 0x01, 0x28, 0x01, 0x29, 0x01, 0x2a, 0x01, 0x2b, 0x01, 0x02, 0x00, 0x2c, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, -0x2d, 0x01, 0x5f, 0x00, 0x2e, 0x01, 0x2f, 0x01, 0x02, 0x00, 0x30, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x31, 0x01, -0x5f, 0x00, 0x32, 0x01, 0x33, 0x01, 0x02, 0x00, 0x34, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x35, 0x01, 0x5f, 0x00, -0x36, 0x01, 0x37, 0x01, 0x02, 0x00, 0x38, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x39, 0x01, 0x5f, 0x00, 0x3a, 0x01, -0x3b, 0x01, 0x02, 0x00, 0x3c, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x3d, 0x01, 0x3e, 0x01, 0x3f, 0x01, 0x40, 0x01, -0x41, 0x01, 0x42, 0x01, 0x43, 0x01, 0x44, 0x01, 0x45, 0x01, 0x46, 0x01, 0x47, 0x01, 0x48, 0x01, 0x49, 0x01, 0x5f, 0x00, -0x4a, 0x01, 0x4b, 0x01, 0x4c, 0x01, 0x4d, 0x01, 0x4e, 0x01, 0x5f, 0x00, 0xec, 0x02, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, -0x00, 0x00, 0x7b, 0x00, 0x7c, 0x00, 0x4f, 0x01, 0x02, 0x00, 0x50, 0x01, 0x51, 0x01, 0x52, 0x01, 0x53, 0x01, 0x54, 0x01, -0x55, 0x01, 0x56, 0x01, 0x05, 0x00, 0x57, 0x01, 0x58, 0x01, 0x08, 0x00, 0x59, 0x01, 0x5a, 0x01, 0x5b, 0x01, 0x02, 0x00, -0x5c, 0x01, 0x5d, 0x01, 0x5e, 0x01, 0x5f, 0x01, 0x5c, 0x00, 0x02, 0x00, 0x60, 0x01, 0x61, 0x01, 0x5f, 0x00, 0x91, 0x00, -0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7b, 0x00, 0x7c, 0x00, 0xda, 0x00, 0x5c, 0x00, 0x02, 0x00, 0x62, 0x01, -0x5f, 0x00, 0x73, 0x0a, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x01, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, -0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x0c, 0x00, -0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, 0x14, 0x00, 0x15, 0x00, 0x16, 0x00, -0x17, 0x00, 0x18, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x20, 0x00, -0x21, 0x00, 0x22, 0x00, 0x23, 0x00, 0x24, 0x00, 0x25, 0x00, 0x26, 0x00, 0x27, 0x00, 0x28, 0x00, 0x29, 0x00, 0x2a, 0x00, -0x2b, 0x00, 0x2c, 0x00, 0x2d, 0x00, 0x2e, 0x00, 0x2f, 0x00, 0x30, 0x00, 0x31, 0x00, 0x32, 0x00, 0x33, 0x00, 0x34, 0x00, -0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3e, 0x00, -0x3f, 0x00, 0x40, 0x00, 0x41, 0x00, 0x42, 0x00, 0x43, 0x00, 0x44, 0x00, 0x45, 0x00, 0x46, 0x00, 0x47, 0x00, 0x48, 0x00, -0x49, 0x00, 0x4a, 0x00, 0x4b, 0x00, 0x4c, 0x00, 0x4d, 0x00, 0x4e, 0x00, 0x4f, 0x00, 0x50, 0x00, 0x51, 0x00, 0x52, 0x00, -0x53, 0x00, 0x54, 0x00, 0x55, 0x00, 0x56, 0x00, 0x57, 0x00, 0x58, 0x00, 0x59, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x5c, 0x00, -0x02, 0x00, 0x5d, 0x00, 0x02, 0x00, 0x5e, 0x00, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x61, 0x00, 0x5f, 0x00, 0x64, 0x01, -0x65, 0x01, 0x66, 0x01, 0x67, 0x01, 0x68, 0x01, 0x69, 0x01, 0x6a, 0x01, 0x02, 0x00, 0x6b, 0x01, 0x6c, 0x01, 0x6d, 0x01, -0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x6e, 0x01, 0x5f, 0x00, 0x6f, 0x01, 0x70, 0x01, 0x71, 0x01, 0x72, 0x01, 0x73, 0x01, -0x74, 0x01, 0x75, 0x01, 0x76, 0x01, 0x77, 0x01, 0x78, 0x01, 0x79, 0x01, 0x7a, 0x01, 0x7b, 0x01, 0x7c, 0x01, 0x7d, 0x01, -0x7e, 0x01, 0x7f, 0x01, 0x80, 0x01, 0x5f, 0x00, 0xef, 0x08, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x81, 0x01, 0x82, 0x01, -0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, 0x00, -0x02, 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, -0x14, 0x00, 0x15, 0x00, 0x16, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, 0x98, 0x00, 0x99, 0x00, 0x1c, 0x00, 0x1d, 0x00, -0x1e, 0x00, 0x1f, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1, 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, -0xa6, 0x00, 0xa7, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0x2d, 0x00, 0xac, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, -0xb0, 0x00, 0xb1, 0x00, 0x34, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, 0x00, -0xba, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0xbd, 0x00, 0x40, 0x00, 0x41, 0x00, 0x42, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0x45, 0x00, -0xc4, 0x00, 0x47, 0x00, 0x48, 0x00, 0x49, 0x00, 0x4a, 0x00, 0x4b, 0x00, 0xca, 0x00, 0xcb, 0x00, 0xcc, 0x00, 0xcd, 0x00, -0x50, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00, 0x56, 0x00, 0x57, 0x00, 0x83, 0x01, 0x84, 0x01, -0x85, 0x01, 0x86, 0x01, 0x5c, 0x00, 0x02, 0x00, 0x5d, 0x00, 0x02, 0x00, 0x5e, 0x00, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, -0x61, 0x00, 0x5f, 0x00, 0x87, 0x01, 0x88, 0x01, 0x89, 0x01, 0x8a, 0x01, 0x8b, 0x01, 0x8c, 0x01, 0x8d, 0x01, 0x02, 0x00, -0x8e, 0x01, 0x8f, 0x01, 0x90, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x91, 0x01, 0x5f, 0x00, 0x92, 0x01, 0x93, 0x01, -0x94, 0x01, 0x95, 0x01, 0x96, 0x01, 0x97, 0x01, 0x98, 0x01, 0x99, 0x01, 0x75, 0x00, 0x76, 0x00, 0x77, 0x00, 0x9a, 0x01, -0x9b, 0x01, 0x9c, 0x01, 0x5f, 0x00, 0xda, 0x08, 0x00, 0x00, 0xa7, 0x00, 0x00, 0x00, 0x81, 0x01, 0x82, 0x01, 0x7d, 0x00, -0x02, 0x00, 0x7e, 0x00, 0x7f, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, 0x00, 0x05, 0x00, 0x84, 0x00, 0x85, 0x00, -0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, -0x10, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, 0x14, 0x00, 0x15, 0x00, 0x16, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, -0x98, 0x00, 0x99, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1, 0x00, -0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0x2d, 0x00, -0xac, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0x34, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0xb5, 0x00, -0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xba, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0xbd, 0x00, 0x40, 0x00, 0x41, 0x00, -0x42, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0x45, 0x00, 0xc4, 0x00, 0x47, 0x00, 0x48, 0x00, 0x49, 0x00, 0x4a, 0x00, 0x4b, 0x00, -0xca, 0x00, 0xcb, 0x00, 0xcc, 0x00, 0xcd, 0x00, 0x50, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00, -0x56, 0x00, 0xd4, 0x00, 0x02, 0x00, 0x0b, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0x9d, 0x01, 0x9e, 0x01, 0xda, 0x00, -0x5c, 0x00, 0x02, 0x00, 0x9f, 0x01, 0xdb, 0x00, 0xa0, 0x01, 0xdd, 0x00, 0xde, 0x00, 0xdf, 0x00, 0x02, 0x00, 0xe0, 0x00, -0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0xe1, 0x00, 0x5f, 0x00, 0xe2, 0x00, 0xe3, 0x00, 0x02, 0x00, 0xe4, 0x00, 0x5f, 0x00, -0x60, 0x00, 0x02, 0x00, 0xe5, 0x00, 0x5f, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0x02, 0x00, 0xe8, 0x00, 0x5f, 0x00, 0x60, 0x00, -0x02, 0x00, 0xe9, 0x00, 0x5f, 0x00, 0xea, 0x00, 0xeb, 0x00, 0x02, 0x00, 0xec, 0x00, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, -0xed, 0x00, 0x5f, 0x00, 0xee, 0x00, 0xef, 0x00, 0x02, 0x00, 0xf0, 0x00, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0xf1, 0x00, -0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5, 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xa1, 0x01, 0xa2, 0x01, 0xa3, 0x01, -0xa4, 0x01, 0x5f, 0x00, 0xfe, 0x00, 0x5f, 0x00, 0x52, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x81, 0x01, 0x82, 0x01, -0x5c, 0x00, 0x02, 0x00, 0x5f, 0x00, 0x98, 0x0e, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, 0x81, 0x01, 0x82, 0x01, 0x7d, 0x00, -0x02, 0x00, 0x7e, 0x00, 0x7f, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, 0x00, 0x05, 0x00, 0xff, 0x00, 0x00, 0x01, -0x01, 0x01, 0x02, 0x01, 0x03, 0x01, 0x0a, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, -0x10, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, 0x14, 0x00, 0x15, 0x00, 0x16, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, -0x98, 0x00, 0x99, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1, 0x00, -0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0x2d, 0x00, -0xac, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0x34, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0xb5, 0x00, -0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xba, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0xbd, 0x00, 0x40, 0x00, 0x41, 0x00, -0x42, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0x45, 0x00, 0xc4, 0x00, 0x47, 0x00, 0x48, 0x00, 0x49, 0x00, 0x4a, 0x00, 0x4b, 0x00, -0xca, 0x00, 0xcb, 0x00, 0xcc, 0x00, 0xcd, 0x00, 0x50, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00, -0x56, 0x00, 0xd4, 0x00, 0x02, 0x00, 0x0b, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xa5, 0x01, 0x9d, 0x01, 0xa6, 0x01, -0x9e, 0x01, 0xda, 0x00, 0xa7, 0x01, 0x02, 0x00, 0xa8, 0x01, 0x08, 0x01, 0x02, 0x00, 0x09, 0x01, 0x5f, 0x00, 0xa9, 0x01, -0xaa, 0x01, 0x0c, 0x01, 0x02, 0x00, 0x0d, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x0e, 0x01, 0x5f, 0x00, 0xab, 0x01, -0x12, 0x01, 0x13, 0x01, 0x02, 0x00, 0xac, 0x01, 0xad, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x18, 0x01, 0x5f, 0x00, -0x19, 0x01, 0x1a, 0x01, 0x1b, 0x01, 0x02, 0x00, 0xae, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x21, 0x01, 0x5f, 0x00, -0x22, 0x01, 0x23, 0x01, 0x24, 0x01, 0x25, 0x01, 0x26, 0x01, 0x09, 0x01, 0x5f, 0x00, 0x5c, 0x00, 0x02, 0x00, 0xaf, 0x01, -0x27, 0x01, 0xb0, 0x01, 0x29, 0x01, 0x2a, 0x01, 0x2b, 0x01, 0x02, 0x00, 0x2c, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, -0x2d, 0x01, 0x5f, 0x00, 0x2e, 0x01, 0x2f, 0x01, 0x02, 0x00, 0x30, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x31, 0x01, -0x5f, 0x00, 0x32, 0x01, 0x33, 0x01, 0x02, 0x00, 0x34, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x35, 0x01, 0x5f, 0x00, -0x36, 0x01, 0x37, 0x01, 0x02, 0x00, 0x38, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x39, 0x01, 0x5f, 0x00, 0x3a, 0x01, -0x3b, 0x01, 0x02, 0x00, 0x3c, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x3d, 0x01, 0x3e, 0x01, 0x3f, 0x01, 0x40, 0x01, -0x41, 0x01, 0x42, 0x01, 0x43, 0x01, 0x44, 0x01, 0xb1, 0x01, 0xb2, 0x01, 0xb3, 0x01, 0xb4, 0x01, 0x5f, 0x00, 0x4a, 0x01, -0x4b, 0x01, 0xb5, 0x01, 0x4d, 0x01, 0x4e, 0x01, 0x5f, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x81, 0x01, -0x82, 0x01, 0x4f, 0x01, 0x02, 0x00, 0xb6, 0x01, 0xb7, 0x01, 0xb8, 0x01, 0xb9, 0x01, 0xba, 0x01, 0xbb, 0x01, 0xbc, 0x01, -0x05, 0x00, 0x57, 0x01, 0x58, 0x01, 0x08, 0x00, 0x59, 0x01, 0x5a, 0x01, 0x5b, 0x01, 0x02, 0x00, 0x5c, 0x01, 0x5d, 0x01, -0xbd, 0x01, 0xbe, 0x01, 0x5c, 0x00, 0x02, 0x00, 0x60, 0x01, 0x61, 0x01, 0x5f, 0x00, 0x92, 0x00, 0x00, 0x00, 0x07, 0x00, -0x00, 0x00, 0x81, 0x01, 0x82, 0x01, 0xda, 0x00, 0x5c, 0x00, 0x02, 0x00, 0x62, 0x01, 0x5f, 0x00, 0xa2, 0x09, 0x00, 0x00, -0x8b, 0x00, 0x00, 0x00, 0x81, 0x01, 0x82, 0x01, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, -0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, -0x10, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, 0x14, 0x00, 0x15, 0x00, 0x16, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, -0x98, 0x00, 0x99, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1, 0x00, -0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0x2d, 0x00, -0xac, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0x34, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0xb5, 0x00, -0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xba, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0xbd, 0x00, 0x40, 0x00, 0x41, 0x00, -0x42, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0x45, 0x00, 0xc4, 0x00, 0x47, 0x00, 0x48, 0x00, 0x49, 0x00, 0x4a, 0x00, 0x4b, 0x00, -0xca, 0x00, 0xcb, 0x00, 0xcc, 0x00, 0xcd, 0x00, 0x50, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00, -0x56, 0x00, 0x57, 0x00, 0x83, 0x01, 0x84, 0x01, 0x85, 0x01, 0x86, 0x01, 0x5c, 0x00, 0x02, 0x00, 0x5d, 0x00, 0x02, 0x00, -0x5e, 0x00, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, 0x61, 0x00, 0x5f, 0x00, 0xbf, 0x01, 0xc0, 0x01, 0xc1, 0x01, 0xc2, 0x01, -0xc3, 0x01, 0xc4, 0x01, 0xc5, 0x01, 0x02, 0x00, 0xc6, 0x01, 0xc7, 0x01, 0xc8, 0x01, 0x5f, 0x00, 0x60, 0x00, 0x02, 0x00, -0xc9, 0x01, 0x5f, 0x00, 0xca, 0x01, 0xcb, 0x01, 0xcc, 0x01, 0xcd, 0x01, 0xce, 0x01, 0xcf, 0x01, 0xd0, 0x01, 0xd1, 0x01, -0xd2, 0x01, 0xd3, 0x01, 0xd4, 0x01, 0xd5, 0x01, 0xd6, 0x01, 0xd7, 0x01, 0xd8, 0x01, 0xd9, 0x01, 0xda, 0x01, 0x80, 0x01, -0x5f, 0x00, 0x4c, 0x54, 0x45, 0x4d, 0x5f, 0x54, 0x41, 0x4d, 0x54, 0x0c, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x01, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x96, 0x01, 0x00, 0x00, 0x01, 0x10, 0x00, 0x86, -0x00, 0x00, 0x00, 0x01, 0x10, 0x01, 0x02, 0x03, 0x00, 0x00, 0x01, 0x20, 0x01, 0x1c, 0x03, 0x00, 0x00, 0x01, 0x30, 0x01, -0x16, 0x05, 0x00, 0x00, 0x01, 0x44, 0x01, 0x7a, 0x05, 0x00, 0x00, 0x01, 0x80, 0x00, 0xa4, 0x05, 0x00, 0x00, 0x01, 0x90, -0x00, 0xa4, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0xc4, 0x06, 0x00, 0x00, 0x02, 0x00, 0x01, 0xd4, 0x07, 0x00, 0x00, 0x02, -0x10, 0x00, 0xc4, 0x06, 0x00, 0x00, 0x02, 0x10, 0x01, 0x02, 0x03, 0x00, 0x00, 0x02, 0x20, 0x01, 0x3e, 0x09, 0x00, 0x00, -0x02, 0x30, 0x01, 0x16, 0x05, 0x00, 0x00, 0x02, 0x44, 0x01, 0x7a, 0x05, 0x00, 0x00, 0x02, 0x80, 0x00, 0x34, 0x0b, 0x00, -0x00, 0x02, 0x90, 0x00, 0x34, 0x0b, 0x00, 0x00, 0x7a, 0x0d, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xdb, 0x01, 0xdc, 0x01, -0xdd, 0x01, 0xde, 0x01, 0xdd, 0x01, 0xdf, 0x01, 0x02, 0x00, 0xe0, 0x01, 0xe1, 0x01, 0xe2, 0x01, 0xe3, 0x01, 0xe4, 0x01, -0xe5, 0x01, 0xe6, 0x01, 0xe7, 0x01, 0xe8, 0x01, 0xe9, 0x01, 0xea, 0x01, 0xeb, 0x01, 0xec, 0x01, 0xed, 0x01, 0xee, 0x01, -0xef, 0x01, 0xf0, 0x01, 0xf1, 0x01, 0xf2, 0x01, 0xf3, 0x01, 0xf4, 0x01, 0xf5, 0x01, 0xf6, 0x01, 0xf7, 0x01, 0xf8, 0x01, -0xf9, 0x01, 0xfa, 0x01, 0xfb, 0x01, 0xfc, 0x01, 0xfd, 0x01, 0xfe, 0x01, 0xff, 0x01, 0x00, 0x02, 0x01, 0x02, 0x02, 0x02, -0x03, 0x02, 0x04, 0x02, 0x05, 0x02, 0x06, 0x02, 0x07, 0x02, 0x08, 0x02, 0x09, 0x02, 0x0a, 0x02, 0x0b, 0x02, 0x0c, 0x02, -0x0d, 0x02, 0x0e, 0x02, 0x0f, 0x02, 0x10, 0x02, 0x11, 0x02, 0x12, 0x02, 0x13, 0x02, 0x14, 0x02, 0x15, 0x02, 0x16, 0x02, -0x17, 0x02, 0x18, 0x02, 0x19, 0x02, 0x1a, 0x02, 0x1b, 0x02, 0x1c, 0x02, 0x1d, 0x02, 0x1e, 0x02, 0x1f, 0x02, 0x20, 0x02, -0x21, 0x02, 0x22, 0x02, 0x23, 0x02, 0x24, 0x02, 0x25, 0x02, 0x26, 0x02, 0x27, 0x02, 0x28, 0x02, 0x29, 0x02, 0x2a, 0x02, -0x05, 0x00, 0xdd, 0x01, 0x2b, 0x02, 0x02, 0x00, 0x2c, 0x02, 0x2d, 0x02, 0x2e, 0x02, 0x2f, 0x02, 0x30, 0x02, 0x05, 0x00, -0xdd, 0x01, 0x31, 0x02, 0x02, 0x00, 0x32, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x33, 0x02, 0x02, 0x00, 0x34, 0x02, 0x35, 0x02, -0x36, 0x02, 0x37, 0x02, 0x38, 0x02, 0x39, 0x02, 0x3a, 0x02, 0x3b, 0x02, 0x3c, 0x02, 0x3d, 0x02, 0x3e, 0x02, 0x3f, 0x02, -0x40, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x43, 0x02, 0x41, 0x02, 0x44, 0x02, 0x45, 0x02, 0x46, 0x02, 0x47, 0x02, -0x48, 0x02, 0x49, 0x02, 0x4a, 0x02, 0x4b, 0x02, 0x4c, 0x02, 0x4d, 0x02, 0x4e, 0x02, 0x4f, 0x02, 0x5f, 0x00, 0xdd, 0x01, -0xa0, 0x10, 0x00, 0x00, 0xb2, 0x00, 0x00, 0x00, 0xdb, 0x01, 0xdc, 0x01, 0xdd, 0x01, 0xde, 0x01, 0xdd, 0x01, 0xdf, 0x01, -0x02, 0x00, 0xe0, 0x01, 0xe1, 0x01, 0xe2, 0x01, 0xe3, 0x01, 0xe4, 0x01, 0xe5, 0x01, 0xe6, 0x01, 0xe7, 0x01, 0xe8, 0x01, -0xe9, 0x01, 0xea, 0x01, 0xeb, 0x01, 0xec, 0x01, 0xed, 0x01, 0xee, 0x01, 0xef, 0x01, 0xf0, 0x01, 0xf1, 0x01, 0xf2, 0x01, -0xf3, 0x01, 0xf4, 0x01, 0xf5, 0x01, 0xf6, 0x01, 0xf7, 0x01, 0xf8, 0x01, 0xf9, 0x01, 0xfa, 0x01, 0xfb, 0x01, 0xfc, 0x01, -0xfd, 0x01, 0xfe, 0x01, 0xff, 0x01, 0x00, 0x02, 0x01, 0x02, 0x02, 0x02, 0x03, 0x02, 0x04, 0x02, 0x05, 0x02, 0x06, 0x02, -0x07, 0x02, 0x08, 0x02, 0x09, 0x02, 0x0a, 0x02, 0x0b, 0x02, 0x0c, 0x02, 0x0d, 0x02, 0x0e, 0x02, 0x0f, 0x02, 0x10, 0x02, -0x11, 0x02, 0x12, 0x02, 0x13, 0x02, 0x14, 0x02, 0x15, 0x02, 0x16, 0x02, 0x17, 0x02, 0x18, 0x02, 0x19, 0x02, 0x1a, 0x02, -0x1b, 0x02, 0x1c, 0x02, 0x1d, 0x02, 0x1e, 0x02, 0x1f, 0x02, 0x20, 0x02, 0x21, 0x02, 0x22, 0x02, 0x23, 0x02, 0x24, 0x02, -0x25, 0x02, 0x26, 0x02, 0x27, 0x02, 0x28, 0x02, 0x29, 0x02, 0x2a, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x50, 0x02, 0x02, 0x00, -0x51, 0x02, 0x52, 0x02, 0x53, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x54, 0x02, 0xdd, 0x01, 0x55, 0x02, 0x56, 0x02, 0x57, 0x02, -0x05, 0x00, 0xdd, 0x01, 0x2b, 0x02, 0x02, 0x00, 0x58, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x31, 0x02, 0x02, 0x00, 0x2c, 0x02, -0x05, 0x00, 0xdd, 0x01, 0x59, 0x02, 0x02, 0x00, 0x34, 0x02, 0x5a, 0x02, 0x5b, 0x02, 0x5c, 0x02, 0x5d, 0x02, 0x5e, 0x02, -0x5f, 0x02, 0x60, 0x02, 0x3d, 0x02, 0x61, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x62, 0x02, 0x41, 0x02, 0x63, 0x02, -0x64, 0x02, 0x3d, 0x02, 0x65, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x66, 0x02, 0x41, 0x02, 0x67, 0x02, 0x68, 0x02, -0x3d, 0x02, 0x69, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x6a, 0x02, 0x41, 0x02, 0x6b, 0x02, 0x6c, 0x02, 0x3d, 0x02, -0x6d, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x6e, 0x02, 0x41, 0x02, 0x6f, 0x02, 0x70, 0x02, 0x3d, 0x02, 0x71, 0x02, -0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x72, 0x02, 0x73, 0x02, 0x74, 0x02, 0x75, 0x02, 0x76, 0x02, 0x77, 0x02, 0x78, 0x02, -0x79, 0x02, 0x7a, 0x02, 0x7b, 0x02, 0x7c, 0x02, 0x7d, 0x02, 0x7e, 0x02, 0x7f, 0x02, 0x41, 0x02, 0x80, 0x02, 0x4f, 0x02, -0x5f, 0x00, 0xdd, 0x01, 0x64, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xdb, 0x01, 0xdc, 0x01, 0xdd, 0x01, 0xde, 0x01, -0xdd, 0x01, 0x81, 0x02, 0x02, 0x00, 0x5f, 0x00, 0xdd, 0x01, 0x16, 0x1d, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xdb, 0x01, -0xdc, 0x01, 0xdd, 0x01, 0xde, 0x01, 0xdd, 0x01, 0xdf, 0x01, 0x02, 0x00, 0xe0, 0x01, 0xe1, 0x01, 0xe2, 0x01, 0xe3, 0x01, -0xe4, 0x01, 0xe5, 0x01, 0xe6, 0x01, 0xe7, 0x01, 0xe8, 0x01, 0xe9, 0x01, 0xea, 0x01, 0xeb, 0x01, 0xec, 0x01, 0xed, 0x01, -0xee, 0x01, 0xef, 0x01, 0xf0, 0x01, 0xf1, 0x01, 0xf2, 0x01, 0xf3, 0x01, 0xf4, 0x01, 0xf5, 0x01, 0xf6, 0x01, 0xf7, 0x01, -0xf8, 0x01, 0xf9, 0x01, 0xfa, 0x01, 0xfb, 0x01, 0xfc, 0x01, 0xfd, 0x01, 0xfe, 0x01, 0xff, 0x01, 0x00, 0x02, 0x01, 0x02, -0x02, 0x02, 0x03, 0x02, 0x04, 0x02, 0x05, 0x02, 0x06, 0x02, 0x07, 0x02, 0x08, 0x02, 0x09, 0x02, 0x0a, 0x02, 0x0b, 0x02, -0x0c, 0x02, 0x0d, 0x02, 0x0e, 0x02, 0x0f, 0x02, 0x10, 0x02, 0x11, 0x02, 0x12, 0x02, 0x13, 0x02, 0x14, 0x02, 0x15, 0x02, -0x16, 0x02, 0x17, 0x02, 0x18, 0x02, 0x19, 0x02, 0x1a, 0x02, 0x1b, 0x02, 0x1c, 0x02, 0x1d, 0x02, 0x1e, 0x02, 0x1f, 0x02, -0x20, 0x02, 0x21, 0x02, 0x22, 0x02, 0x23, 0x02, 0x24, 0x02, 0x25, 0x02, 0x26, 0x02, 0x27, 0x02, 0x28, 0x02, 0x29, 0x02, -0x2a, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x50, 0x02, 0x02, 0x00, 0x51, 0x02, 0x52, 0x02, 0x53, 0x02, 0x05, 0x00, 0xdd, 0x01, -0x82, 0x02, 0xdd, 0x01, 0x83, 0x02, 0x84, 0x02, 0x85, 0x02, 0x86, 0x02, 0x87, 0x02, 0x88, 0x02, 0x89, 0x02, 0x8a, 0x02, -0x8b, 0x02, 0x8c, 0x02, 0x8d, 0x02, 0x8e, 0x02, 0x8f, 0x02, 0x90, 0x02, 0x91, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x55, 0x02, -0x56, 0x02, 0x57, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x2b, 0x02, 0x02, 0x00, 0x58, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x31, 0x02, -0x02, 0x00, 0x2c, 0x02, 0x2d, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x92, 0x02, 0x02, 0x00, 0x34, 0x02, 0x93, 0x02, 0x94, 0x02, -0x95, 0x02, 0x96, 0x02, 0x97, 0x02, 0x98, 0x02, 0x99, 0x02, 0x3d, 0x02, 0x9a, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, -0x9b, 0x02, 0x41, 0x02, 0x9c, 0x02, 0x9d, 0x02, 0x3d, 0x02, 0x9e, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x9f, 0x02, -0x41, 0x02, 0xa0, 0x02, 0xa1, 0x02, 0x3d, 0x02, 0xa2, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0xa3, 0x02, 0x41, 0x02, -0xa4, 0x02, 0xa5, 0x02, 0x3d, 0x02, 0xa6, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0xa7, 0x02, 0x41, 0x02, 0xa8, 0x02, -0xa9, 0x02, 0x3d, 0x02, 0xaa, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0xab, 0x02, 0xac, 0x02, 0xad, 0x02, 0xae, 0x02, -0xaf, 0x02, 0xb0, 0x02, 0xb1, 0x02, 0xb2, 0x02, 0xb3, 0x02, 0xb4, 0x02, 0xb5, 0x02, 0xb6, 0x02, 0xb7, 0x02, 0xb8, 0x02, -0x41, 0x02, 0xb9, 0x02, 0xba, 0x02, 0xbb, 0x02, 0xbc, 0x02, 0x3d, 0x02, 0xbd, 0x02, 0xbe, 0x02, 0xbf, 0x02, 0xc0, 0x02, -0xc1, 0x02, 0xc2, 0x02, 0xc3, 0x02, 0xc4, 0x02, 0xc5, 0x02, 0xc6, 0x02, 0xbf, 0x02, 0xc7, 0x02, 0xc2, 0x02, 0xc8, 0x02, -0xbf, 0x02, 0xc9, 0x02, 0xc2, 0x02, 0xca, 0x02, 0xcb, 0x02, 0xcc, 0x02, 0xcd, 0x02, 0xbf, 0x02, 0xce, 0x02, 0xcf, 0x02, -0xc2, 0x02, 0xc8, 0x02, 0xbf, 0x02, 0xd0, 0x02, 0xc2, 0x02, 0xd1, 0x02, 0xd2, 0x02, 0xd3, 0x02, 0xbf, 0x02, 0xd4, 0x02, -0xc2, 0x02, 0xc8, 0x02, 0xbf, 0x02, 0xd5, 0x02, 0xc2, 0x02, 0xd6, 0x02, 0xd7, 0x02, 0xd8, 0x02, 0xd9, 0x02, 0xda, 0x02, -0xdb, 0x02, 0xdc, 0x02, 0xdd, 0x02, 0xde, 0x02, 0xdf, 0x02, 0x4f, 0x02, 0x5f, 0x00, 0xdd, 0x01, 0xbc, 0x03, 0x00, 0x00, -0x2e, 0x00, 0x00, 0x00, 0xdb, 0x01, 0xdc, 0x01, 0xdd, 0x01, 0xde, 0x01, 0xdd, 0x01, 0x4f, 0x01, 0x02, 0x00, 0xe0, 0x02, -0xe1, 0x02, 0xe2, 0x02, 0xe3, 0x02, 0xe4, 0x02, 0xe5, 0x02, 0xe6, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x57, 0x01, 0x58, 0x01, -0x08, 0x00, 0xe7, 0x02, 0xdd, 0x01, 0xe8, 0x02, 0x02, 0x00, 0xe9, 0x02, 0x05, 0x00, 0xdd, 0x01, 0xea, 0x02, 0xdd, 0x01, -0x2b, 0x02, 0x02, 0x00, 0xeb, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x31, 0x02, 0x02, 0x00, 0x2e, 0x02, 0x05, 0x00, 0xdd, 0x01, -0xec, 0x02, 0x02, 0x00, 0x34, 0x02, 0xed, 0x02, 0xee, 0x02, 0x4f, 0x02, 0x5f, 0x00, 0xdd, 0x01, 0xec, 0x00, 0x00, 0x00, -0x11, 0x00, 0x00, 0x00, 0xdb, 0x01, 0xdc, 0x01, 0xdd, 0x01, 0xde, 0x01, 0xdd, 0x01, 0x2b, 0x02, 0x02, 0x00, 0x58, 0x02, -0x05, 0x00, 0xdd, 0x01, 0xef, 0x02, 0x02, 0x00, 0x34, 0x02, 0xf0, 0x02, 0x4f, 0x02, 0x5f, 0x00, 0xdd, 0x01, 0xcc, 0x0e, -0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0xdb, 0x01, 0xdc, 0x01, 0xdd, 0x01, 0xde, 0x01, 0xdd, 0x01, 0xdf, 0x01, 0x02, 0x00, -0xe0, 0x01, 0xe1, 0x01, 0xe2, 0x01, 0xe3, 0x01, 0xe4, 0x01, 0xe5, 0x01, 0xe6, 0x01, 0xe7, 0x01, 0xe8, 0x01, 0xe9, 0x01, -0xea, 0x01, 0xeb, 0x01, 0xec, 0x01, 0xed, 0x01, 0xee, 0x01, 0xef, 0x01, 0xf0, 0x01, 0xf1, 0x01, 0xf2, 0x01, 0xf3, 0x01, -0xf4, 0x01, 0xf5, 0x01, 0xf6, 0x01, 0xf7, 0x01, 0xf8, 0x01, 0xf9, 0x01, 0xfa, 0x01, 0xfb, 0x01, 0xfc, 0x01, 0xfd, 0x01, -0xfe, 0x01, 0xff, 0x01, 0x00, 0x02, 0x01, 0x02, 0x02, 0x02, 0x03, 0x02, 0x04, 0x02, 0x05, 0x02, 0x06, 0x02, 0x07, 0x02, -0x08, 0x02, 0x09, 0x02, 0x0a, 0x02, 0x0b, 0x02, 0x0c, 0x02, 0x0d, 0x02, 0x0e, 0x02, 0x0f, 0x02, 0x10, 0x02, 0x11, 0x02, -0x12, 0x02, 0x13, 0x02, 0x14, 0x02, 0x15, 0x02, 0x16, 0x02, 0x17, 0x02, 0x18, 0x02, 0x19, 0x02, 0x1a, 0x02, 0x1b, 0x02, -0x1c, 0x02, 0x1d, 0x02, 0x1e, 0x02, 0x1f, 0x02, 0x20, 0x02, 0x21, 0x02, 0x22, 0x02, 0x23, 0x02, 0x24, 0x02, 0x25, 0x02, -0x26, 0x02, 0x27, 0x02, 0x28, 0x02, 0x29, 0x02, 0x2a, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x2b, 0x02, 0x02, 0x00, 0x2c, 0x02, -0x2d, 0x02, 0x2e, 0x02, 0x2f, 0x02, 0x30, 0x02, 0xf1, 0x02, 0xf2, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x31, 0x02, 0x02, 0x00, -0x32, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x33, 0x02, 0x02, 0x00, 0x34, 0x02, 0x35, 0x02, 0xf3, 0x02, 0xf4, 0x02, 0xf5, 0x02, -0xf6, 0x02, 0xf7, 0x02, 0xf8, 0x02, 0xf9, 0x02, 0x3d, 0x02, 0xfa, 0x02, 0xfb, 0x02, 0xfc, 0x02, 0x41, 0x02, 0x42, 0x02, -0x3d, 0x02, 0xfd, 0x02, 0x41, 0x02, 0xfe, 0x02, 0xff, 0x02, 0x00, 0x03, 0x01, 0x03, 0x02, 0x03, 0x03, 0x03, 0x04, 0x03, -0x05, 0x03, 0x06, 0x03, 0x07, 0x03, 0x08, 0x03, 0x09, 0x03, 0x0a, 0x03, 0x0b, 0x03, 0x0c, 0x03, 0x0d, 0x03, 0x0e, 0x03, -0x4f, 0x02, 0x5f, 0x00, 0xdd, 0x01, 0x7a, 0x0d, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xdb, 0x01, 0xdc, 0x01, 0xdd, 0x01, -0xde, 0x01, 0xdd, 0x01, 0xdf, 0x01, 0x02, 0x00, 0xe0, 0x01, 0xe1, 0x01, 0xe2, 0x01, 0xe3, 0x01, 0xe4, 0x01, 0xe5, 0x01, -0xe6, 0x01, 0xe7, 0x01, 0xe8, 0x01, 0xe9, 0x01, 0xea, 0x01, 0xeb, 0x01, 0xec, 0x01, 0xed, 0x01, 0xee, 0x01, 0xef, 0x01, -0xf0, 0x01, 0xf1, 0x01, 0xf2, 0x01, 0xf3, 0x01, 0xf4, 0x01, 0xf5, 0x01, 0xf6, 0x01, 0xf7, 0x01, 0xf8, 0x01, 0xf9, 0x01, -0xfa, 0x01, 0xfb, 0x01, 0xfc, 0x01, 0xfd, 0x01, 0xfe, 0x01, 0xff, 0x01, 0x00, 0x02, 0x01, 0x02, 0x02, 0x02, 0x03, 0x02, -0x04, 0x02, 0x05, 0x02, 0x06, 0x02, 0x07, 0x02, 0x08, 0x02, 0x09, 0x02, 0x0a, 0x02, 0x0b, 0x02, 0x0c, 0x02, 0x0d, 0x02, -0x0e, 0x02, 0x0f, 0x02, 0x10, 0x02, 0x11, 0x02, 0x12, 0x02, 0x13, 0x02, 0x14, 0x02, 0x15, 0x02, 0x16, 0x02, 0x17, 0x02, -0x18, 0x02, 0x19, 0x02, 0x1a, 0x02, 0x1b, 0x02, 0x1c, 0x02, 0x1d, 0x02, 0x1e, 0x02, 0x1f, 0x02, 0x20, 0x02, 0x21, 0x02, -0x22, 0x02, 0x23, 0x02, 0x24, 0x02, 0x25, 0x02, 0x26, 0x02, 0x27, 0x02, 0x28, 0x02, 0x29, 0x02, 0x2a, 0x02, 0x05, 0x00, -0xdd, 0x01, 0x2b, 0x02, 0x02, 0x00, 0x2c, 0x02, 0x2d, 0x02, 0x2e, 0x02, 0x2f, 0x02, 0x30, 0x02, 0x05, 0x00, 0xdd, 0x01, -0x31, 0x02, 0x02, 0x00, 0x32, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x33, 0x02, 0x02, 0x00, 0x34, 0x02, 0x35, 0x02, 0x0f, 0x03, -0x10, 0x03, 0x11, 0x03, 0x12, 0x03, 0x13, 0x03, 0x14, 0x03, 0x15, 0x03, 0x3d, 0x02, 0x16, 0x03, 0x17, 0x03, 0x18, 0x03, -0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x19, 0x03, 0x41, 0x02, 0x1a, 0x03, 0x1b, 0x03, 0x1c, 0x03, 0x1d, 0x03, 0x1e, 0x03, -0x1f, 0x03, 0x20, 0x03, 0x21, 0x03, 0x22, 0x03, 0x23, 0x03, 0x24, 0x03, 0x4f, 0x02, 0x5f, 0x00, 0xdd, 0x01, 0x9c, 0x10, -0x00, 0x00, 0xb1, 0x00, 0x00, 0x00, 0xdb, 0x01, 0xdc, 0x01, 0xdd, 0x01, 0xde, 0x01, 0xdd, 0x01, 0xdf, 0x01, 0x02, 0x00, -0xe0, 0x01, 0xe1, 0x01, 0xe2, 0x01, 0xe3, 0x01, 0xe4, 0x01, 0xe5, 0x01, 0xe6, 0x01, 0xe7, 0x01, 0xe8, 0x01, 0xe9, 0x01, -0xea, 0x01, 0xeb, 0x01, 0xec, 0x01, 0xed, 0x01, 0xee, 0x01, 0xef, 0x01, 0xf0, 0x01, 0xf1, 0x01, 0xf2, 0x01, 0xf3, 0x01, -0xf4, 0x01, 0xf5, 0x01, 0xf6, 0x01, 0xf7, 0x01, 0xf8, 0x01, 0xf9, 0x01, 0xfa, 0x01, 0xfb, 0x01, 0xfc, 0x01, 0xfd, 0x01, -0xfe, 0x01, 0xff, 0x01, 0x00, 0x02, 0x01, 0x02, 0x02, 0x02, 0x03, 0x02, 0x04, 0x02, 0x05, 0x02, 0x06, 0x02, 0x07, 0x02, -0x08, 0x02, 0x09, 0x02, 0x0a, 0x02, 0x0b, 0x02, 0x0c, 0x02, 0x0d, 0x02, 0x0e, 0x02, 0x0f, 0x02, 0x10, 0x02, 0x11, 0x02, -0x12, 0x02, 0x13, 0x02, 0x14, 0x02, 0x15, 0x02, 0x16, 0x02, 0x17, 0x02, 0x18, 0x02, 0x19, 0x02, 0x1a, 0x02, 0x1b, 0x02, -0x1c, 0x02, 0x1d, 0x02, 0x1e, 0x02, 0x1f, 0x02, 0x20, 0x02, 0x21, 0x02, 0x22, 0x02, 0x23, 0x02, 0x24, 0x02, 0x25, 0x02, -0x26, 0x02, 0x27, 0x02, 0x28, 0x02, 0x29, 0x02, 0x2a, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x50, 0x02, 0x02, 0x00, 0x51, 0x02, -0x52, 0x02, 0x53, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x25, 0x03, 0xdd, 0x01, 0x55, 0x02, 0x56, 0x02, 0x57, 0x02, 0x05, 0x00, -0xdd, 0x01, 0x2b, 0x02, 0x02, 0x00, 0x58, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x31, 0x02, 0x02, 0x00, 0x2c, 0x02, 0x05, 0x00, -0xdd, 0x01, 0x59, 0x02, 0x02, 0x00, 0x34, 0x02, 0x26, 0x03, 0x5c, 0x02, 0x27, 0x03, 0x5e, 0x02, 0x5f, 0x02, 0x60, 0x02, -0x3d, 0x02, 0x61, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x62, 0x02, 0x41, 0x02, 0x63, 0x02, 0x64, 0x02, 0x3d, 0x02, -0x65, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x66, 0x02, 0x41, 0x02, 0x67, 0x02, 0x68, 0x02, 0x3d, 0x02, 0x69, 0x02, -0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x6a, 0x02, 0x41, 0x02, 0x6b, 0x02, 0x6c, 0x02, 0x3d, 0x02, 0x6d, 0x02, 0x41, 0x02, -0x42, 0x02, 0x3d, 0x02, 0x6e, 0x02, 0x41, 0x02, 0x28, 0x03, 0x70, 0x02, 0x3d, 0x02, 0x71, 0x02, 0x41, 0x02, 0x42, 0x02, -0x3d, 0x02, 0x29, 0x03, 0x2a, 0x03, 0x2b, 0x03, 0x2c, 0x03, 0x2d, 0x03, 0x77, 0x02, 0x78, 0x02, 0x79, 0x02, 0x2e, 0x03, -0x2f, 0x03, 0x30, 0x03, 0x31, 0x03, 0x32, 0x03, 0x33, 0x03, 0x41, 0x02, 0x34, 0x03, 0x4f, 0x02, 0x5f, 0x00, 0xdd, 0x01, -0xc1, 0x1c, 0x00, 0x00, 0xf7, 0x00, 0x00, 0x00, 0xdb, 0x01, 0xdc, 0x01, 0xdd, 0x01, 0xde, 0x01, 0xdd, 0x01, 0xdf, 0x01, -0x02, 0x00, 0xe0, 0x01, 0xe1, 0x01, 0xe2, 0x01, 0xe3, 0x01, 0xe4, 0x01, 0xe5, 0x01, 0xe6, 0x01, 0xe7, 0x01, 0xe8, 0x01, -0xe9, 0x01, 0xea, 0x01, 0xeb, 0x01, 0xec, 0x01, 0xed, 0x01, 0xee, 0x01, 0xef, 0x01, 0xf0, 0x01, 0xf1, 0x01, 0xf2, 0x01, -0xf3, 0x01, 0xf4, 0x01, 0xf5, 0x01, 0xf6, 0x01, 0xf7, 0x01, 0xf8, 0x01, 0xf9, 0x01, 0xfa, 0x01, 0xfb, 0x01, 0xfc, 0x01, -0xfd, 0x01, 0xfe, 0x01, 0xff, 0x01, 0x00, 0x02, 0x01, 0x02, 0x02, 0x02, 0x03, 0x02, 0x04, 0x02, 0x05, 0x02, 0x06, 0x02, -0x07, 0x02, 0x08, 0x02, 0x09, 0x02, 0x0a, 0x02, 0x0b, 0x02, 0x0c, 0x02, 0x0d, 0x02, 0x0e, 0x02, 0x0f, 0x02, 0x10, 0x02, -0x11, 0x02, 0x12, 0x02, 0x13, 0x02, 0x14, 0x02, 0x15, 0x02, 0x16, 0x02, 0x17, 0x02, 0x18, 0x02, 0x19, 0x02, 0x1a, 0x02, -0x1b, 0x02, 0x1c, 0x02, 0x1d, 0x02, 0x1e, 0x02, 0x1f, 0x02, 0x20, 0x02, 0x21, 0x02, 0x22, 0x02, 0x23, 0x02, 0x24, 0x02, -0x25, 0x02, 0x26, 0x02, 0x27, 0x02, 0x28, 0x02, 0x29, 0x02, 0x2a, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x50, 0x02, 0x02, 0x00, -0x51, 0x02, 0x52, 0x02, 0x53, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x35, 0x03, 0xdd, 0x01, 0x83, 0x02, 0x84, 0x02, 0x85, 0x02, -0x86, 0x02, 0x87, 0x02, 0x88, 0x02, 0x89, 0x02, 0x8a, 0x02, 0x8b, 0x02, 0x8c, 0x02, 0x8d, 0x02, 0x8e, 0x02, 0x8f, 0x02, -0x90, 0x02, 0x91, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x55, 0x02, 0x56, 0x02, 0x57, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x2b, 0x02, -0x02, 0x00, 0x58, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x31, 0x02, 0x02, 0x00, 0x2c, 0x02, 0x2d, 0x02, 0x05, 0x00, 0xdd, 0x01, -0x92, 0x02, 0x02, 0x00, 0x34, 0x02, 0x36, 0x03, 0x95, 0x02, 0x37, 0x03, 0x97, 0x02, 0x98, 0x02, 0x99, 0x02, 0x3d, 0x02, -0x9a, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x9b, 0x02, 0x41, 0x02, 0x9c, 0x02, 0x9d, 0x02, 0x3d, 0x02, 0x9e, 0x02, -0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x9f, 0x02, 0x41, 0x02, 0xa0, 0x02, 0xa1, 0x02, 0x3d, 0x02, 0xa2, 0x02, 0x41, 0x02, -0x42, 0x02, 0x3d, 0x02, 0xa3, 0x02, 0x41, 0x02, 0xa4, 0x02, 0xa5, 0x02, 0x3d, 0x02, 0xa6, 0x02, 0x41, 0x02, 0x42, 0x02, -0x3d, 0x02, 0xa7, 0x02, 0x41, 0x02, 0x38, 0x03, 0xa9, 0x02, 0x3d, 0x02, 0xaa, 0x02, 0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, -0x39, 0x03, 0x3a, 0x03, 0x3b, 0x03, 0x3c, 0x03, 0x3d, 0x03, 0xb0, 0x02, 0xb1, 0x02, 0xb2, 0x02, 0x3e, 0x03, 0x3f, 0x03, -0x40, 0x03, 0x41, 0x03, 0x42, 0x03, 0x43, 0x03, 0x41, 0x02, 0x44, 0x03, 0xba, 0x02, 0x45, 0x03, 0x46, 0x03, 0xbc, 0x02, -0x3d, 0x02, 0xbd, 0x02, 0xbe, 0x02, 0xbf, 0x02, 0x47, 0x03, 0xc1, 0x02, 0xc2, 0x02, 0xc3, 0x02, 0xc4, 0x02, 0xc5, 0x02, -0xc6, 0x02, 0xbf, 0x02, 0xc7, 0x02, 0xc2, 0x02, 0xc8, 0x02, 0xbf, 0x02, 0xc9, 0x02, 0xc2, 0x02, 0x48, 0x03, 0x49, 0x03, -0xcd, 0x02, 0xbf, 0x02, 0x4a, 0x03, 0x4b, 0x03, 0xc2, 0x02, 0xc8, 0x02, 0xbf, 0x02, 0x4c, 0x03, 0xc2, 0x02, 0x4d, 0x03, -0x4e, 0x03, 0xd3, 0x02, 0xbf, 0x02, 0x4f, 0x03, 0xc2, 0x02, 0xc8, 0x02, 0xbf, 0x02, 0xd5, 0x02, 0xc2, 0x02, 0x50, 0x03, -0x51, 0x03, 0xd9, 0x02, 0xda, 0x02, 0xdb, 0x02, 0xdc, 0x02, 0xdd, 0x02, 0xde, 0x02, 0x52, 0x03, 0x4f, 0x02, 0x5f, 0x00, -0xdd, 0x01, 0xf5, 0x0e, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0xdb, 0x01, 0xdc, 0x01, 0xdd, 0x01, 0xde, 0x01, 0xdd, 0x01, -0xdf, 0x01, 0x02, 0x00, 0xe0, 0x01, 0xe1, 0x01, 0xe2, 0x01, 0xe3, 0x01, 0xe4, 0x01, 0xe5, 0x01, 0xe6, 0x01, 0xe7, 0x01, -0xe8, 0x01, 0xe9, 0x01, 0xea, 0x01, 0xeb, 0x01, 0xec, 0x01, 0xed, 0x01, 0xee, 0x01, 0xef, 0x01, 0xf0, 0x01, 0xf1, 0x01, -0xf2, 0x01, 0xf3, 0x01, 0xf4, 0x01, 0xf5, 0x01, 0xf6, 0x01, 0xf7, 0x01, 0xf8, 0x01, 0xf9, 0x01, 0xfa, 0x01, 0xfb, 0x01, -0xfc, 0x01, 0xfd, 0x01, 0xfe, 0x01, 0xff, 0x01, 0x00, 0x02, 0x01, 0x02, 0x02, 0x02, 0x03, 0x02, 0x04, 0x02, 0x05, 0x02, -0x06, 0x02, 0x07, 0x02, 0x08, 0x02, 0x09, 0x02, 0x0a, 0x02, 0x0b, 0x02, 0x0c, 0x02, 0x0d, 0x02, 0x0e, 0x02, 0x0f, 0x02, -0x10, 0x02, 0x11, 0x02, 0x12, 0x02, 0x13, 0x02, 0x14, 0x02, 0x15, 0x02, 0x16, 0x02, 0x17, 0x02, 0x18, 0x02, 0x19, 0x02, -0x1a, 0x02, 0x1b, 0x02, 0x1c, 0x02, 0x1d, 0x02, 0x1e, 0x02, 0x1f, 0x02, 0x20, 0x02, 0x21, 0x02, 0x22, 0x02, 0x23, 0x02, -0x24, 0x02, 0x25, 0x02, 0x26, 0x02, 0x27, 0x02, 0x28, 0x02, 0x29, 0x02, 0x2a, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x2b, 0x02, -0x02, 0x00, 0x2c, 0x02, 0x2d, 0x02, 0x2e, 0x02, 0x2f, 0x02, 0x30, 0x02, 0xf1, 0x02, 0xf2, 0x02, 0x05, 0x00, 0xdd, 0x01, -0x31, 0x02, 0x02, 0x00, 0x32, 0x02, 0x05, 0x00, 0xdd, 0x01, 0x33, 0x02, 0x02, 0x00, 0x34, 0x02, 0x35, 0x02, 0x53, 0x03, -0x54, 0x03, 0x55, 0x03, 0x56, 0x03, 0x57, 0x03, 0x58, 0x03, 0x59, 0x03, 0x3d, 0x02, 0x5a, 0x03, 0x5b, 0x03, 0x5c, 0x03, -0x41, 0x02, 0x42, 0x02, 0x3d, 0x02, 0x5d, 0x03, 0x41, 0x02, 0x5e, 0x03, 0x5f, 0x03, 0x60, 0x03, 0x61, 0x03, 0x62, 0x03, -0x63, 0x03, 0x64, 0x03, 0x65, 0x03, 0x66, 0x03, 0x67, 0x03, 0x68, 0x03, 0x69, 0x03, 0x6a, 0x03, 0x6b, 0x03, 0x6c, 0x03, -0x0d, 0x03, 0x0e, 0x03, 0x4f, 0x02, 0x5f, 0x00, 0xdd, 0x01, - -}; - -int IMAGE_IMAGE_OFFSET = 0; -int IMAGE_IMAGE_SIZE = 36070; diff --git a/ios/lib/libbackend.a b/ios/lib/libbackend.a deleted file mode 100644 index ec4b2945..00000000 --- a/ios/lib/libbackend.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:47ca0627f9dcc3c6336584c465e88065f7f07c5605bcb7402c0108c37e099ac5 -size 30032312 diff --git a/ios/lib/libbasis_transcoder.a b/ios/lib/libbasis_transcoder.a deleted file mode 100644 index 6c0da706..00000000 --- a/ios/lib/libbasis_transcoder.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e2f525755974f4eac7c7f0d1a0a193b3500906e6a079c3c249f43fc93050f2e3 -size 958048 diff --git a/ios/lib/libcamutils.a b/ios/lib/libcamutils.a deleted file mode 100644 index 926bf34c..00000000 --- a/ios/lib/libcamutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:45c1a36d9e1aac908e02d7b2b012e091409bdd28e93bfe423215426680e07a57 -size 211392 diff --git a/ios/lib/libcivetweb.a b/ios/lib/libcivetweb.a deleted file mode 100644 index 9004b1a6..00000000 --- a/ios/lib/libcivetweb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c6b2eba6dc2d06ea00d005cf236d6d642d432d2c6e068538da1d4c3f162f07e -size 976448 diff --git a/ios/lib/libdracodec.a b/ios/lib/libdracodec.a deleted file mode 100644 index 599fb153..00000000 --- a/ios/lib/libdracodec.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2cb772adfb95a6d891674b374da4a4f465c115e669457a3267d7f4ff6303fb13 -size 49949568 diff --git a/ios/lib/libfilabridge.a b/ios/lib/libfilabridge.a deleted file mode 100644 index a098dc18..00000000 --- a/ios/lib/libfilabridge.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e52a7129c3c1b33f5727927326d6742b71ae4bba1421e8c7de7130d8e529b2f5 -size 1117832 diff --git a/ios/lib/libfilaflat.a b/ios/lib/libfilaflat.a deleted file mode 100644 index 740bacfe..00000000 --- a/ios/lib/libfilaflat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67affd79ca6335cf31f23236cad1e0c95cde0ee05f6822bc8a6e68a0915f1e48 -size 1181920 diff --git a/ios/lib/libfilamat.a b/ios/lib/libfilamat.a deleted file mode 100644 index a72c0766..00000000 --- a/ios/lib/libfilamat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb9a5b308a64c0aab4d270c454541d4dd573a393fcf61819235343db8125acb7 -size 891429256 diff --git a/ios/lib/libfilamat_lite.a b/ios/lib/libfilamat_lite.a deleted file mode 100644 index 5b01c0f2..00000000 --- a/ios/lib/libfilamat_lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:356aae22b114291555cb977c43d0147c7accb6293425511f5bde48f56b43abe9 -size 11035352 diff --git a/ios/lib/libfilament-iblprefilter.a b/ios/lib/libfilament-iblprefilter.a deleted file mode 100644 index 34f1659b..00000000 --- a/ios/lib/libfilament-iblprefilter.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7e63578803ba4085269a24c376c23d5fe571c51d99fbf510a8dd26b151718e55 -size 315008 diff --git a/ios/lib/libfilament.a b/ios/lib/libfilament.a deleted file mode 100644 index ad3eb945..00000000 --- a/ios/lib/libfilament.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8a761805210c6903c4fdc16eaf3e49ad20f83cfbe7d6c14f75cf459842793d6b -size 102947208 diff --git a/ios/lib/libfilameshio.a b/ios/lib/libfilameshio.a deleted file mode 100644 index 87992191..00000000 --- a/ios/lib/libfilameshio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:586ae8e417c0b1c2ce93c834775442fac8837d7d39efb0b91231891571607d2f -size 505736 diff --git a/ios/lib/libgeometry.a b/ios/lib/libgeometry.a deleted file mode 100644 index 81bbdee4..00000000 --- a/ios/lib/libgeometry.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8a3a618c728d47310c50be78a121dca7e70e2df1f4c788b686c6c8d26feeb715 -size 1647744 diff --git a/ios/lib/libgltfio_core.a b/ios/lib/libgltfio_core.a deleted file mode 100644 index abc194a6..00000000 --- a/ios/lib/libgltfio_core.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c97b05468737b2441a8741207d02c9d532080828219404389cb5d7bbb4365a40 -size 26413664 diff --git a/ios/lib/libibl-lite.a b/ios/lib/libibl-lite.a deleted file mode 100644 index 21a29791..00000000 --- a/ios/lib/libibl-lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2becc58481112c094b477b6f7e88c19aa9c374d4caacd4410de70e677ad0416c -size 4955704 diff --git a/ios/lib/libibl.a b/ios/lib/libibl.a deleted file mode 100644 index ed0ad117..00000000 --- a/ios/lib/libibl.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ea08dfb86d8433684021f4365981abee4cf4ae3d362467fe489f1459a91e638f -size 5956320 diff --git a/ios/lib/libimage.a b/ios/lib/libimage.a deleted file mode 100644 index 812e0bf7..00000000 --- a/ios/lib/libimage.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:da39ee96a92da4848e851611d5f951c32c5edf7277f464c2b3cb42d27f04b72c -size 1292848 diff --git a/ios/lib/libimageio.a b/ios/lib/libimageio.a deleted file mode 100644 index 8c0d5e62..00000000 --- a/ios/lib/libimageio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad2e5aa84406de17330971fa2272a954cfde32faa5962c4cbdbad0cdcfade6b7 -size 378456 diff --git a/ios/lib/libktxreader.a b/ios/lib/libktxreader.a deleted file mode 100644 index 029a2a11..00000000 --- a/ios/lib/libktxreader.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e7b141017975e69e951af0d0581ea642aea32061eb7b689aafc4945474ea666 -size 502768 diff --git a/ios/lib/libmeshoptimizer.a b/ios/lib/libmeshoptimizer.a deleted file mode 100644 index 1634da36..00000000 --- a/ios/lib/libmeshoptimizer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:747216737d6c6d29774c95bd891bbd9ed7d3c260a113e7c6cf4ea130276761fe -size 494944 diff --git a/ios/lib/libmikktspace.a b/ios/lib/libmikktspace.a deleted file mode 100644 index 1e572418..00000000 --- a/ios/lib/libmikktspace.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:54b2afd3fa1c0d688ed7812327c3e439f5409f0cdaf7f1a369f2f50a74637b9e -size 82112 diff --git a/ios/lib/libpng.a b/ios/lib/libpng.a deleted file mode 100644 index f6ea7819..00000000 --- a/ios/lib/libpng.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f40a337ca4ae110bbfee332e03ee496b0f3706b6b9d264a44f3c248733f4f23 -size 376488 diff --git a/ios/lib/libpng16.a b/ios/lib/libpng16.a deleted file mode 100644 index f6ea7819..00000000 --- a/ios/lib/libpng16.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f40a337ca4ae110bbfee332e03ee496b0f3706b6b9d264a44f3c248733f4f23 -size 376488 diff --git a/ios/lib/libshaders.a b/ios/lib/libshaders.a deleted file mode 100644 index 57116f18..00000000 --- a/ios/lib/libshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9e8a60dc96ccccf93e651a817be157d338441e78bfd0e72e9952305bd58584c1 -size 205224 diff --git a/ios/lib/libsmol-v.a b/ios/lib/libsmol-v.a deleted file mode 100644 index 15e662d4..00000000 --- a/ios/lib/libsmol-v.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:42c636fbac78342bc4d217cdee180e5479e947dd4b9552105dc4d6d448c74d78 -size 216560 diff --git a/ios/lib/libstb.a b/ios/lib/libstb.a deleted file mode 100644 index 59bdcfea..00000000 --- a/ios/lib/libstb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b63fa0f7cd85df3b29eeeb22e67a6416112b1769540ff7fe1de85abe1cdc8845 -size 200616 diff --git a/ios/lib/libtinyexr.a b/ios/lib/libtinyexr.a deleted file mode 100644 index fe206bf5..00000000 --- a/ios/lib/libtinyexr.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:60e5e22f31b84e116475a8232310b3a452134587e81a2d0f9bf5c1a0af834f06 -size 511480 diff --git a/ios/lib/libuberarchive.a b/ios/lib/libuberarchive.a deleted file mode 100644 index 74390e2f..00000000 --- a/ios/lib/libuberarchive.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e1e8efe4a63bad8bba499824ea7e2fd2452c4380e67461f1ccdd7cef8c357de8 -size 10156792 diff --git a/ios/lib/libuberzlib.a b/ios/lib/libuberzlib.a deleted file mode 100644 index c802fa18..00000000 --- a/ios/lib/libuberzlib.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c2a04aa4b79d4c0e6788a798943b10e95b1de591e95e43abf3dd30f39b52ec79 -size 584912 diff --git a/ios/lib/libutils.a b/ios/lib/libutils.a deleted file mode 100644 index d6aa8f88..00000000 --- a/ios/lib/libutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:35e2ba6ea1f77ac40dfae4319f92a0e50959a46d99092065b798d1f084e7cff8 -size 3428720 diff --git a/ios/lib/libviewer.a b/ios/lib/libviewer.a deleted file mode 100644 index 968ed391..00000000 --- a/ios/lib/libviewer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:94b2aac17fc7366a342260d34564a9c209d57b6cb8abe58e767fde005a14a50a -size 3491608 diff --git a/ios/lib/libvkshaders.a b/ios/lib/libvkshaders.a deleted file mode 100644 index f5d3c017..00000000 --- a/ios/lib/libvkshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a3db588e12ecfeef6d0f70ce362525b0af1dc1be2d1fdf2fc3f89e3f4508ea1d -size 6448 diff --git a/ios/lib/libzstd.a b/ios/lib/libzstd.a deleted file mode 100644 index 121f280b..00000000 --- a/ios/lib/libzstd.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0f30a416745128b636c97a0d02658582a5c08a7368427d8d87b7c0bb0fe9b5e3 -size 2367640 diff --git a/ios/src/AssetManager.cpp b/ios/src/AssetManager.cpp deleted file mode 100644 index 1a70f45d..00000000 --- a/ios/src/AssetManager.cpp +++ /dev/null @@ -1,1007 +0,0 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include "StreamBufferAdapter.hpp" -#include "SceneAsset.hpp" -#include "Log.hpp" -#include "AssetManager.hpp" - -#include "material/FileMaterialProvider.hpp" -#include "gltfio/materials/uberarchive.h" - -extern "C" { -#include "material/image.h" -} - -namespace polyvox { - -using namespace std; -using namespace std::chrono; -using namespace image; -using namespace utils; -using namespace filament; -using namespace filament::gltfio; - -AssetManager::AssetManager(const ResourceLoaderWrapper* const resourceLoaderWrapper, - NameComponentManager* ncm, - Engine* engine, - Scene* scene, - const char* uberArchivePath) -: _resourceLoaderWrapper(resourceLoaderWrapper), -_ncm(ncm), -_engine(engine), -_scene(scene) { - - _stbDecoder = createStbProvider(_engine); - _ktxDecoder = createKtx2Provider(_engine); - - _gltfResourceLoader = new ResourceLoader({.engine = _engine, - .normalizeSkinningWeights = true }); - - if(uberArchivePath) { - auto uberdata = resourceLoaderWrapper->load(uberArchivePath); - if (!uberdata.data) { - Log("Failed to load ubershader material. This is fatal."); - } - _ubershaderProvider = gltfio::createUbershaderProvider(_engine, uberdata.data, uberdata.size); - resourceLoaderWrapper->free(uberdata); - } else { - _ubershaderProvider = gltfio::createUbershaderProvider( - _engine, UBERARCHIVE_DEFAULT_DATA, UBERARCHIVE_DEFAULT_SIZE); - } - Log("Created ubershader provider."); - - EntityManager &em = EntityManager::get(); - - _assetLoader = AssetLoader::create({_engine, _ubershaderProvider, _ncm, &em }); - _gltfResourceLoader->addTextureProvider("image/ktx2", _ktxDecoder); - _gltfResourceLoader->addTextureProvider("image/png", _stbDecoder); - _gltfResourceLoader->addTextureProvider("image/jpeg", _stbDecoder); -} - -AssetManager::~AssetManager() { - _gltfResourceLoader->asyncCancelLoad(); - _ubershaderProvider->destroyMaterials(); - destroyAll(); - AssetLoader::destroy(&_assetLoader); - -} - -EntityId AssetManager::loadGltf(const char *uri, - const char *relativeResourcePath) { - ResourceBuffer rbuf = _resourceLoaderWrapper->load(uri); - - // Parse the glTF file and create Filament entities. - FilamentAsset *asset = _assetLoader->createAsset((uint8_t *)rbuf.data, rbuf.size); - - if (!asset) { - Log("Unable to parse asset"); - return 0; - } - - const char *const *const resourceUris = asset->getResourceUris(); - const size_t resourceUriCount = asset->getResourceUriCount(); - - std::vector resourceBuffers; - - for (size_t i = 0; i < resourceUriCount; i++) { - string uri = string(relativeResourcePath) + string("/") + string(resourceUris[i]); - Log("Loading resource URI from relative path %s", resourceUris[i], uri.c_str()); - ResourceBuffer buf = _resourceLoaderWrapper->load(uri.c_str()); - - resourceBuffers.push_back(buf); - - ResourceLoader::BufferDescriptor b(buf.data, buf.size); - _gltfResourceLoader->addResourceData(resourceUris[i], std::move(b)); - } - - // load resources synchronously - if (!_gltfResourceLoader->loadResources(asset)) { - Log("Unknown error loading glTF asset"); - _resourceLoaderWrapper->free(rbuf); - for(auto& rb : resourceBuffers) { - _resourceLoaderWrapper->free(rb); - } - return 0; - } - const utils::Entity *entities = asset->getEntities(); - - _scene->addEntities(asset->getEntities(), asset->getEntityCount()); - - FilamentInstance* inst = asset->getInstance(); - inst->getAnimator()->updateBoneMatrices(); - inst->recomputeBoundingBoxes(); - - asset->releaseSourceData(); - - SceneAsset sceneAsset(asset); - - utils::Entity e = EntityManager::get().create(); - - EntityId eid = Entity::smuggle(e); - - _entityIdLookup.emplace(eid, _assets.size()); - _assets.push_back(sceneAsset); - - for(auto& rb : resourceBuffers) { - _resourceLoaderWrapper->free(rb); - } - _resourceLoaderWrapper->free(rbuf); - - Log("Finished loading glTF from %s", uri); - - return eid; -} - -EntityId AssetManager::loadGlb(const char *uri, bool unlit) { - - ResourceBuffer rbuf = _resourceLoaderWrapper->load(uri); - - Log("Loaded GLB of size %d at URI %s", rbuf.size, uri); - - FilamentAsset *asset = _assetLoader->createAsset( - (const uint8_t *)rbuf.data, rbuf.size); - - if (!asset) { - Log("Unknown error loading GLB asset."); - return 0; - } - - int entityCount = asset->getEntityCount(); - - _scene->addEntities(asset->getEntities(), entityCount); - - if (!_gltfResourceLoader->loadResources(asset)) { - Log("Unknown error loading glb asset"); - _resourceLoaderWrapper->free(rbuf); - return 0; - } - - const Entity *entities = asset->getEntities(); - - auto lights = asset->getLightEntities(); - _scene->addEntities(lights, asset->getLightEntityCount()); - - FilamentInstance* inst = asset->getInstance(); - - inst->getAnimator()->updateBoneMatrices(); - - inst->recomputeBoundingBoxes(); - - asset->releaseSourceData(); - - _resourceLoaderWrapper->free(rbuf); - - SceneAsset sceneAsset(asset); - - utils::Entity e = EntityManager::get().create(); - EntityId eid = Entity::smuggle(e); - - _entityIdLookup.emplace(eid, _assets.size()); - _assets.push_back(sceneAsset); - - return eid; -} - -bool AssetManager::hide(EntityId entityId, const char* meshName) { - - auto asset = getAssetByEntityId(entityId); - if(!asset) { - return false; - } - - auto entity = findEntityByName(asset, meshName); - - if(entity.isNull()) { - Log("Mesh %s could not be found", meshName); - return false; - } - _scene->remove(entity); - return true; -} - -bool AssetManager::reveal(EntityId entityId, const char* meshName) { - auto asset = getAssetByEntityId(entityId); - if(!asset) { - Log("No asset found under entity ID"); - return false; - } - - auto entity = findEntityByName(asset, meshName); - - RenderableManager &rm = _engine->getRenderableManager(); - - if(entity.isNull()) { - Log("Mesh %s could not be found", meshName); - return false; - } - _scene->addEntity(entity); - return true; -} - -void AssetManager::destroyAll() { - for (auto& asset : _assets) { - _scene->removeEntities(asset.mAsset->getEntities(), - asset.mAsset->getEntityCount()); - _scene->removeEntities(asset.mAsset->getLightEntities(), - asset.mAsset->getLightEntityCount()); - _assetLoader->destroyAsset(asset.mAsset); - } - _assets.clear(); -} - -FilamentAsset* AssetManager::getAssetByEntityId(EntityId entityId) { - const auto& pos = _entityIdLookup.find(entityId); - if(pos == _entityIdLookup.end()) { - return nullptr; - } - return _assets[pos->second].mAsset; -} - - -void AssetManager::updateAnimations() { - - std::lock_guard lock(_animationMutex); - RenderableManager &rm = _engine->getRenderableManager(); - - for (auto& asset : _assets) { - - - std::vector completed; - int index = 0; - for(auto& anim : asset.mAnimations) { - - auto now = high_resolution_clock::now(); - - auto elapsed = float(std::chrono::duration_cast(now - anim.mStart).count()) / 1000.0f; - - if(anim.mLoop || elapsed < anim.mDuration) { - - switch(anim.type) { - case AnimationType::GLTF: { - asset.mAnimator->applyAnimation(anim.gltfIndex, elapsed); - if(asset.fadeGltfAnimationIndex != -1 && elapsed < asset.fadeDuration) { - // cross-fade - auto fadeFromTime = asset.fadeOutAnimationStart + elapsed; - auto alpha = elapsed / asset.fadeDuration; - asset.mAnimator->applyCrossFade(asset.fadeGltfAnimationIndex, fadeFromTime, alpha); - } - break; - } - case AnimationType::MORPH: { - int lengthInFrames = static_cast( - anim.mDuration * 1000.0f / - asset.mMorphAnimationBuffer.mFrameLengthInMs - ); - int frameNumber = static_cast(elapsed * 1000.0f / asset.mMorphAnimationBuffer.mFrameLengthInMs) % lengthInFrames; - // offset from the end if reverse - if(anim.mReverse) { - frameNumber = lengthInFrames - frameNumber; - } - auto baseOffset = frameNumber * asset.mMorphAnimationBuffer.mMorphIndices.size(); - for(int i = 0; i < asset.mMorphAnimationBuffer.mMorphIndices.size(); i++) { - auto morphIndex = asset.mMorphAnimationBuffer.mMorphIndices[i]; - // set the weights appropriately - rm.setMorphWeights( - rm.getInstance(asset.mMorphAnimationBuffer.mMeshTarget), - asset.mMorphAnimationBuffer.mFrameData.data() + baseOffset + i, - 1, - morphIndex - ); - } - break; - } - case AnimationType::BONE: { - int lengthInFrames = static_cast( - anim.mDuration * 1000.0f / - asset.mBoneAnimationBuffer.mFrameLengthInMs - ); - int frameNumber = static_cast(elapsed * 1000.0f / asset.mBoneAnimationBuffer.mFrameLengthInMs) % lengthInFrames; - - // offset from the end if reverse - if(anim.mReverse) { - frameNumber = lengthInFrames - frameNumber; - } - setBoneTransform( - asset, - frameNumber - ); - break; - } - } - if(anim.mLoop && elapsed >= anim.mDuration) { - anim.mStart = now; - } - // animation has completed - } else { - completed.push_back(index); - asset.fadeGltfAnimationIndex = -1; - } - asset.mAnimator->updateBoneMatrices(); - index++; - } - - for(int i = completed.size() - 1; i >= 0; i--) { - asset.mAnimations.erase(asset.mAnimations.begin() + i); - } - } -} - -void AssetManager::setBoneTransform(SceneAsset& asset, int frameNumber) { - - RenderableManager& rm = _engine->getRenderableManager(); - - const auto& filamentInstance = asset.mAsset->getInstance(); - - TransformManager &transformManager = _engine->getTransformManager(); - - int skinIndex = 0; - - for(int i = 0; i < asset.mBoneAnimationBuffer.mBones.size(); i++) { - auto mBoneIndex = asset.mBoneAnimationBuffer.mBones[i]; - auto frameDataOffset = (frameNumber * asset.mBoneAnimationBuffer.mBones.size() * 7) + (i * 7); - - utils::Entity joint = filamentInstance->getJointsAt(skinIndex)[mBoneIndex]; - if(joint.isNull()) { - Log("ERROR : joint not found"); - continue; - } - - vector& fd = asset.mBoneAnimationBuffer.mFrameData; - - math::mat4f localTransform(math::quatf { - fd[frameDataOffset+3], - fd[frameDataOffset+4], - fd[frameDataOffset+5], - fd[frameDataOffset+6], - }); - - auto jointInstance = transformManager.getInstance(joint); - - auto xform = asset.mBoneAnimationBuffer.mBaseTransforms[i]; - - transformManager.setTransform(jointInstance, xform * localTransform); - - } -} - -void AssetManager::remove(EntityId entityId) { - const auto& pos = _entityIdLookup.find(entityId); - if(pos == _entityIdLookup.end()) { - Log("Couldn't find asset under specified entity id."); - return; - } - SceneAsset& sceneAsset = _assets[pos->second]; - - _assets.erase(std::remove_if(_assets.begin(), _assets.end(), - [=](SceneAsset& asset) { return asset.mAsset == sceneAsset.mAsset; }), - _assets.end()); - - _scene->removeEntities(sceneAsset.mAsset->getEntities(), - sceneAsset.mAsset->getEntityCount()); - - _scene->removeEntities(sceneAsset.mAsset->getLightEntities(), - sceneAsset.mAsset->getLightEntityCount()); - - _assetLoader->destroyAsset(sceneAsset.mAsset); - - if(sceneAsset.mTexture) { - _engine->destroy(sceneAsset.mTexture); - } - EntityManager& em = EntityManager::get(); - em.destroy(Entity::import(entityId)); - - -} - -void AssetManager::setMorphTargetWeights(EntityId entityId, const char* const entityName, const float* const weights, const int count) { - const auto& pos = _entityIdLookup.find(entityId); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return; - } - auto& asset = _assets[pos->second]; - - auto entity = findEntityByName(asset, entityName); - if(!entity) { - Log("Warning: failed to find entity %s", entityName); - return; - } - - RenderableManager &rm = _engine->getRenderableManager(); - - auto renderableInstance = rm.getInstance(entity); - - if(!renderableInstance.isValid()) { - Log("Warning: failed to find renderable instance for entity %s", entityName); - return; - } - - rm.setMorphWeights( - renderableInstance, - weights, - count - ); -} - -utils::Entity AssetManager::findEntityByName(SceneAsset asset, const char* entityName) { - utils::Entity entity; - for (size_t i = 0, c = asset.mAsset->getEntityCount(); i != c; ++i) { - auto entity = asset.mAsset->getEntities()[i]; - auto nameInstance = _ncm->getInstance(entity); - if(!nameInstance.isValid()) { - continue; - } - auto name = _ncm->getName(nameInstance); - if(!name) { - continue; - } - if(strcmp(entityName,name)==0) { - return entity; - } - } - return entity; -} - -bool AssetManager::setMorphAnimationBuffer( - EntityId entityId, - const char* entityName, - const float* const morphData, - const int* const morphIndices, - int numMorphTargets, - int numFrames, - float frameLengthInMs) { - std::lock_guard lock(_animationMutex); - - const auto& pos = _entityIdLookup.find(entityId); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return false; - } - auto& asset = _assets[pos->second]; - - auto entity = findEntityByName(asset, entityName); - if(!entity) { - Log("Warning: failed to find entity %s", entityName); - return false; - } - - asset.mMorphAnimationBuffer.mMeshTarget = entity; - asset.mMorphAnimationBuffer.mFrameData.clear(); - asset.mMorphAnimationBuffer.mFrameData.insert( - asset.mMorphAnimationBuffer.mFrameData.begin(), - morphData, - morphData + (numFrames * numMorphTargets) - ); - asset.mMorphAnimationBuffer.mFrameLengthInMs = frameLengthInMs; - asset.mMorphAnimationBuffer.mMorphIndices.resize(numMorphTargets); - for(int i =0; i< numMorphTargets; i++) { - asset.mMorphAnimationBuffer.mMorphIndices[i] = morphIndices[i]; - } - - AnimationStatus animation; - animation.mDuration = (frameLengthInMs * numFrames) / 1000.0f; - animation.mStart = high_resolution_clock::now(); - animation.type = AnimationType::MORPH; - asset.mAnimations.push_back(animation); - return true; -} - -bool AssetManager::setMaterialColor(EntityId entityId, const char* meshName, int materialIndex, const float r, const float g, const float b, const float a) { - - const auto& pos = _entityIdLookup.find(entityId); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return false; - } - auto& asset = _assets[pos->second]; - auto entity = findEntityByName(asset, meshName); - - RenderableManager& rm = _engine->getRenderableManager(); - - auto renderable = rm.getInstance(entity); - - if(!renderable.isValid()) { - Log("Renderable not valid, was the entity id correct?"); - - return false; - } - - MaterialInstance* mi = rm.getMaterialInstanceAt(renderable, materialIndex); - - if(!mi) { - Log("ERROR: material index must be less than number of material instances"); - return false; - } - mi->setParameter("baseColorFactor", RgbaType::sRGB, math::float4(r, g, b, a)); - Log("Set baseColorFactor for entity %d to %f %f %f %f",entityId, r,g,b,a); - return true; -} - - -bool AssetManager::setBoneAnimationBuffer( - EntityId entityId, - const float* const frameData, - int numFrames, - int numBones, - const char** const boneNames, - const char** const meshNames, - int numMeshTargets, - float frameLengthInMs) { - std::lock_guard lock(_animationMutex); - - const auto& pos = _entityIdLookup.find(entityId); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return false; - } - auto& asset = _assets[pos->second]; - auto filamentInstance = asset.mAsset->getInstance(); - - size_t skinCount = filamentInstance->getSkinCount(); - - if(skinCount > 1) { - Log("WARNING - skin count > 1 not currently implemented. This will probably not work"); - } - - TransformManager &transformManager = _engine->getTransformManager(); - - int skinIndex = 0; - const utils::Entity* joints = filamentInstance->getJointsAt(skinIndex); - size_t numJoints = filamentInstance->getJointCountAt(skinIndex); - - BoneAnimationBuffer& animationBuffer = asset.mBoneAnimationBuffer; - - // if an animation has already been set, reset the transform for the respective bones - for(int i = 0; i < animationBuffer.mBones.size(); i++) { - auto boneIndex = animationBuffer.mBones[i]; - auto jointInstance = transformManager.getInstance(joints[boneIndex]); - transformManager.setTransform(jointInstance, animationBuffer.mBaseTransforms[i]); - } - - asset.mAnimator->resetBoneMatrices(); - - animationBuffer.mBones.resize(numBones); - animationBuffer.mBaseTransforms.resize(numBones); - - for(int i = 0; i < numBones; i++) { - for(int j = 0; j < numJoints; j++) { - const char* jointName = _ncm->getName(_ncm->getInstance(joints[j])); - if(strcmp(jointName, boneNames[i]) == 0) { - auto jointInstance = transformManager.getInstance(joints[j]); - // auto currentXform = ; - auto baseTransform = transformManager.getTransform(jointInstance); // inverse(filamentInstance->getInverseBindMatricesAt(skinIndex)[j]); - animationBuffer.mBaseTransforms[i] = baseTransform; - animationBuffer.mBones[i] = j; - break; - } - } - } - - if(animationBuffer.mBones.size() != numBones) { - Log("Failed to find one or more bone indices"); - return false; - } - - animationBuffer.mFrameData.clear(); - // 7 == locX, locY, locZ, rotW, rotX, rotY, rotZ - animationBuffer.mFrameData.resize(numFrames * numBones * 7); - animationBuffer.mFrameData.insert( - animationBuffer.mFrameData.begin(), - frameData, - frameData + numFrames * numBones * 7 - ); - - animationBuffer.mFrameLengthInMs = frameLengthInMs; - animationBuffer.mNumFrames = numFrames; - - animationBuffer.mMeshTargets.clear(); - for(int i = 0; i < numMeshTargets; i++) { - auto entity = findEntityByName(asset, meshNames[i]); - if(!entity) { - Log("Mesh target %s for bone animation could not be found", meshNames[i]); - return false; - } - Log("Added mesh target %s", meshNames[i]); - animationBuffer.mMeshTargets.push_back(entity); - } - - AnimationStatus animation; - animation.mStart = std::chrono::high_resolution_clock::now(); - animation.mReverse = false; - animation.mDuration = (frameLengthInMs * numFrames) / 1000.0f; - animation.type = AnimationType::BONE; - asset.mAnimations.push_back(animation); - - return true; -} - - -void AssetManager::playAnimation(EntityId e, int index, bool loop, bool reverse, bool replaceActive, float crossfade) { - std::lock_guard lock(_animationMutex); - - if(index < 0) { - Log("ERROR: glTF animation index must be greater than zero."); - return; - } - const auto& pos = _entityIdLookup.find(e); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return; - } - auto& asset = _assets[pos->second]; - - if(replaceActive) { - vector active; - for(int i = 0; i < asset.mAnimations.size(); i++) { - if(asset.mAnimations[i].type == AnimationType::GLTF) { - active.push_back(i); - } - } - if(active.size() > 0) { - auto& last = asset.mAnimations[active.back()]; - asset.fadeGltfAnimationIndex = last.gltfIndex; - asset.fadeDuration = crossfade; - auto now = high_resolution_clock::now(); - auto elapsed = float(std::chrono::duration_cast(now - last.mStart).count()) / 1000.0f; - asset.fadeOutAnimationStart = elapsed; - for(int j = active.size() - 1; j >= 0; j--) { - asset.mAnimations.erase(asset.mAnimations.begin() + active[j]); - } - } else { - asset.fadeGltfAnimationIndex = -1; - asset.fadeDuration = 0.0f; - } - } else if(crossfade > 0) { - Log("ERROR: crossfade only supported when replaceActive is true."); - return; - } else { - asset.fadeGltfAnimationIndex = -1; - asset.fadeDuration = 0.0f; - } - - AnimationStatus animation; - animation.gltfIndex = index; - animation.mStart = std::chrono::high_resolution_clock::now(); - animation.mLoop = loop; - animation.mReverse = reverse; - animation.type = AnimationType::GLTF; - animation.mDuration = asset.mAnimator->getAnimationDuration(index); - - asset.mAnimations.push_back(animation); - - Log("Current animation count %d ", asset.mAnimations.size()); -} - -void AssetManager::stopAnimation(EntityId entityId, int index) { - std::lock_guard lock(_animationMutex); - - const auto& pos = _entityIdLookup.find(entityId); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return; - } - auto& asset = _assets[pos->second]; - - asset.mAnimations.erase(std::remove_if(asset.mAnimations.begin(), - asset.mAnimations.end(), - [=](AnimationStatus& anim) { return anim.gltfIndex == index; }), - asset.mAnimations.end()); - -} - -void AssetManager::loadTexture(EntityId entity, const char* resourcePath, int renderableIndex) { - - const auto& pos = _entityIdLookup.find(entity); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return; - } - auto& asset = _assets[pos->second]; - - Log("Loading texture at %s for renderableIndex %d", resourcePath, renderableIndex); - - string rp(resourcePath); - - if(asset.mTexture) { - _engine->destroy(asset.mTexture); - asset.mTexture = nullptr; - } - - ResourceBuffer imageResource = _resourceLoaderWrapper->load(rp.c_str()); - - StreamBufferAdapter sb((char *)imageResource.data, (char *)imageResource.data + imageResource.size); - - istream *inputStream = new std::istream(&sb); - - LinearImage *image = new LinearImage(ImageDecoder::decode( - *inputStream, rp.c_str(), ImageDecoder::ColorSpace::SRGB)); - - if (!image->isValid()) { - Log("Invalid image : %s", rp.c_str()); - delete inputStream; - _resourceLoaderWrapper->free(imageResource); - return; - } - - uint32_t channels = image->getChannels(); - uint32_t w = image->getWidth(); - uint32_t h = image->getHeight(); - asset.mTexture = Texture::Builder() - .width(w) - .height(h) - .levels(0xff) - .format(channels == 3 ? Texture::InternalFormat::RGB16F - : Texture::InternalFormat::RGBA16F) - .sampler(Texture::Sampler::SAMPLER_2D) - .build(*_engine); - - Texture::PixelBufferDescriptor::Callback freeCallback = [](void *buf, size_t, - void *data) { - delete reinterpret_cast(data); - }; - - Texture::PixelBufferDescriptor buffer( - image->getPixelRef(), size_t(w * h * channels * sizeof(float)), - channels == 3 ? Texture::Format::RGB : Texture::Format::RGBA, - Texture::Type::FLOAT, freeCallback); - - asset.mTexture->setImage(*_engine, 0, std::move(buffer)); - MaterialInstance* const* inst = asset.mAsset->getInstance()->getMaterialInstances(); - size_t mic = asset.mAsset->getInstance()->getMaterialInstanceCount(); - Log("Material instance count : %d", mic); - - auto sampler = TextureSampler(); - inst[0]->setParameter("baseColorIndex",0); - inst[0]->setParameter("baseColorMap",asset.mTexture,sampler); - delete inputStream; - - _resourceLoaderWrapper->free(imageResource); - -} - - -void AssetManager::setAnimationFrame(EntityId entity, int animationIndex, int animationFrame) { - const auto& pos = _entityIdLookup.find(entity); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return; - } - auto& asset = _assets[pos->second]; - auto offset = 60 * animationFrame * 1000; // TODO - don't hardcore 60fps framerate - asset.mAnimator->applyAnimation(animationIndex, offset); - asset.mAnimator->updateBoneMatrices(); -} - -float AssetManager::getAnimationDuration(EntityId entity, int animationIndex) { - const auto& pos = _entityIdLookup.find(entity); - - unique_ptr> names = make_unique>(); - - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity id."); - return -1.0f; - } - - auto& asset = _assets[pos->second]; - return asset.mAnimator->getAnimationDuration(animationIndex); -} - -unique_ptr> AssetManager::getAnimationNames(EntityId entity) { - - const auto& pos = _entityIdLookup.find(entity); - - unique_ptr> names = make_unique>(); - - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity id."); - return names; - } - auto& asset = _assets[pos->second]; - - size_t count = asset.mAnimator->getAnimationCount(); - - - for (size_t i = 0; i < count; i++) { - names->push_back(asset.mAnimator->getAnimationName(i)); - } - - return names; -} - -unique_ptr> AssetManager::getMorphTargetNames(EntityId entity, const char *meshName) { - - unique_ptr> names = make_unique>(); - - const auto& pos = _entityIdLookup.find(entity); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return names; - } - auto& asset = _assets[pos->second]; - - const utils::Entity *entities = asset.mAsset->getEntities(); - - for (int i = 0; i < asset.mAsset->getEntityCount(); i++) { - utils::Entity e = entities[i]; - auto inst = _ncm->getInstance(e); - const char *name = _ncm->getName(inst); - - if (name && strcmp(name, meshName) == 0) { - size_t count = asset.mAsset->getMorphTargetCountAt(e); - for (int j = 0; j < count; j++) { - const char *morphName = asset.mAsset->getMorphTargetNameAt(e, j); - names->push_back(morphName); - } - break; - } - } - return names; -} - -void AssetManager::transformToUnitCube(EntityId entity) { - const auto& pos = _entityIdLookup.find(entity); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return; - } - auto& asset = _assets[pos->second]; - - Log("Transforming asset to unit cube."); - auto &tm = _engine->getTransformManager(); - FilamentInstance* inst = asset.mAsset->getInstance(); - auto aabb = inst->getBoundingBox(); - auto center = aabb.center(); - auto halfExtent = aabb.extent(); - auto maxExtent = max(halfExtent) * 2; - auto scaleFactor = 2.0f / maxExtent; - auto transform = - math::mat4f::scaling(scaleFactor) * math::mat4f::translation(-center); - tm.setTransform(tm.getInstance(inst->getRoot()), transform); -} - -void AssetManager::updateTransform(SceneAsset& asset) { - auto &tm = _engine->getTransformManager(); - auto transform = - asset.mPosition * asset.mRotation * math::mat4f::scaling(asset.mScale); - tm.setTransform(tm.getInstance(asset.mAsset->getRoot()), transform); -} - -void AssetManager::setScale(EntityId entity, float scale) { - const auto& pos = _entityIdLookup.find(entity); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return; - } - auto& asset = _assets[pos->second]; - asset.mScale = scale; - updateTransform(asset); -} - -void AssetManager::setPosition(EntityId entity, float x, float y, float z) { - const auto& pos = _entityIdLookup.find(entity); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return; - } - auto& asset = _assets[pos->second]; - asset.mPosition = math::mat4f::translation(math::float3(x,y,z)); - updateTransform(asset); -} - -void AssetManager::setRotation(EntityId entity, float rads, float x, float y, float z) { - const auto& pos = _entityIdLookup.find(entity); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return; - } - auto& asset = _assets[pos->second]; - asset.mRotation = math::mat4f::rotation(rads, math::float3(x,y,z)); - updateTransform(asset); -} - -const utils::Entity *AssetManager::getCameraEntities(EntityId entity) { - const auto& pos = _entityIdLookup.find(entity); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return nullptr; - } - auto& asset = _assets[pos->second]; - return asset.mAsset->getCameraEntities(); -} - -size_t AssetManager::getCameraEntityCount(EntityId entity) { - const auto& pos = _entityIdLookup.find(entity); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return 0; - } - auto& asset = _assets[pos->second]; - return asset.mAsset->getCameraEntityCount(); -} - -const utils::Entity* AssetManager::getLightEntities(EntityId entity) const noexcept { - const auto& pos = _entityIdLookup.find(entity); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return nullptr; - } - auto& asset = _assets[pos->second]; - return asset.mAsset->getLightEntities(); -} - -size_t AssetManager::getLightEntityCount(EntityId entity) const noexcept { - const auto& pos = _entityIdLookup.find(entity); - if(pos == _entityIdLookup.end()) { - Log("ERROR: asset not found for entity."); - return 0; - } - auto& asset = _assets[pos->second]; - return asset.mAsset->getLightEntityCount(); -} - -const char* AssetManager::getNameForEntity(EntityId entityId) { - const auto& entity = Entity::import(entityId); - auto nameInstance = _ncm->getInstance(entity); - if(!nameInstance.isValid()) { - Log("Failed to find name instance for entity ID %d", entityId); - return nullptr; - } - return _ncm->getName(nameInstance); -} - - -} // namespace polyvox - - -// auto& inverseBindMatrix = filamentInstance->getInverseBindMatricesAt(skinIndex)[mBoneIndex]; - -// auto globalJointTransform = transformManager.getWorldTransform(jointInstance); - -// for(auto& target : asset.mBoneAnimationBuffer.mMeshTargets) { - -// auto inverseGlobalTransform = inverse( -// transformManager.getWorldTransform( -// transformManager.getInstance(target) -// ) -// ); - -// auto boneTransform = inverseGlobalTransform * globalJointTransform * localTransform * inverseBindMatrix; -// auto renderable = rm.getInstance(target); -// rm.setBones( -// renderable, -// &boneTransform, -// 1, -// mBoneIndex -// ); -// } - - - -// 1.0f, 0.0f, 0.0f, 0.0f, -// 0.0f, 0.0f, 1.0f, 0.0f, -// 0.0f, -1.0f, 0.0f, 0.0f, -// 0.0f, 0.0f, 0.0f, 1.0f -// }; -// Log("TRANSFORM"); -// Log("%f %f %f %f", localTransform[0][0], localTransform[1][0], localTransform[2][0], localTransform[3][0] ) ; -// Log("%f %f %f %f", localTransform[0][1], localTransform[1][1], localTransform[2][1], localTransform[3][1] ) ; -// Log("%f %f %f %f", localTransform[0][2], localTransform[1][2], localTransform[2][2], localTransform[3][2] ) ; -// Log("%f %f %f %f", localTransform[0][3], localTransform[1][3], localTransform[2][3], localTransform[3][3] ) ; -// transformManager.getTransform(jointInstance); diff --git a/ios/src/FlutterFilamentApi.cpp b/ios/src/FlutterFilamentApi.cpp deleted file mode 100644 index 3d9f3cbf..00000000 --- a/ios/src/FlutterFilamentApi.cpp +++ /dev/null @@ -1,498 +0,0 @@ -#include "ResourceBuffer.hpp" - -#include "FilamentViewer.hpp" -#include "filament/LightManager.h" -#include "Log.hpp" -#include "ThreadPool.hpp" - -#include -#include - -using namespace polyvox; - -extern "C" -{ - -#include "FlutterFilamentApi.h" - - FLUTTER_PLUGIN_EXPORT const void *create_filament_viewer(const void *context, const ResourceLoaderWrapper *const loader, void *const platform, const char *uberArchivePath) - { - return (const void *)new FilamentViewer(context, loader, platform, uberArchivePath); - } - - FLUTTER_PLUGIN_EXPORT ResourceLoaderWrapper *make_resource_loader(LoadFilamentResourceFromOwner loadFn, FreeFilamentResourceFromOwner freeFn, void *const owner) - { - return new ResourceLoaderWrapper(loadFn, freeFn, owner); - } - - FLUTTER_PLUGIN_EXPORT void create_render_target(const void *const viewer, intptr_t texture, uint32_t width, uint32_t height) - { - ((FilamentViewer *)viewer)->createRenderTarget(texture, width, height); - } - - FLUTTER_PLUGIN_EXPORT void destroy_filament_viewer(const void *const viewer) - { - delete ((FilamentViewer *)viewer); - } - - FLUTTER_PLUGIN_EXPORT void set_background_color(const void *const viewer, const float r, const float g, const float b, const float a) - { - ((FilamentViewer *)viewer)->setBackgroundColor(r, g, b, a); - } - - FLUTTER_PLUGIN_EXPORT void clear_background_image(const void *const viewer) - { - ((FilamentViewer *)viewer)->clearBackgroundImage(); - } - - FLUTTER_PLUGIN_EXPORT void set_background_image(const void *const viewer, const char *path, bool fillHeight) - { - ((FilamentViewer *)viewer)->setBackgroundImage(path, fillHeight); - } - - FLUTTER_PLUGIN_EXPORT void set_background_image_position(const void *const viewer, float x, float y, bool clamp) - { - ((FilamentViewer *)viewer)->setBackgroundImagePosition(x, y, clamp); - } - - FLUTTER_PLUGIN_EXPORT void set_tone_mapping(const void *const viewer, int toneMapping) - { - ((FilamentViewer *)viewer)->setToneMapping((ToneMapping)toneMapping); - } - - FLUTTER_PLUGIN_EXPORT void set_bloom(const void *const viewer, float strength) - { - Log("Setting bloom to %f", strength); - ((FilamentViewer *)viewer)->setBloom(strength); - } - - FLUTTER_PLUGIN_EXPORT void load_skybox(const void *const viewer, const char *skyboxPath) - { - ((FilamentViewer *)viewer)->loadSkybox(skyboxPath); - } - - FLUTTER_PLUGIN_EXPORT void load_ibl(const void *const viewer, const char *iblPath, float intensity) - { - ((FilamentViewer *)viewer)->loadIbl(iblPath, intensity); - } - - FLUTTER_PLUGIN_EXPORT void remove_skybox(const void *const viewer) - { - ((FilamentViewer *)viewer)->removeSkybox(); - } - - FLUTTER_PLUGIN_EXPORT void remove_ibl(const void *const viewer) - { - ((FilamentViewer *)viewer)->removeIbl(); - } - - EntityId add_light(const void *const viewer, uint8_t type, float colour, float intensity, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, bool shadows) - { - return ((FilamentViewer *)viewer)->addLight((LightManager::Type)type, colour, intensity, posX, posY, posZ, dirX, dirY, dirZ, shadows); - } - - FLUTTER_PLUGIN_EXPORT void remove_light(const void *const viewer, int32_t entityId) - { - ((FilamentViewer *)viewer)->removeLight(entityId); - } - - FLUTTER_PLUGIN_EXPORT void clear_lights(const void *const viewer) - { - ((FilamentViewer *)viewer)->clearLights(); - } - - FLUTTER_PLUGIN_EXPORT EntityId load_glb(void *assetManager, const char *assetPath, bool unlit) - { - return ((AssetManager *)assetManager)->loadGlb(assetPath, unlit); - } - - FLUTTER_PLUGIN_EXPORT EntityId load_gltf(void *assetManager, const char *assetPath, const char *relativePath) - { - return ((AssetManager *)assetManager)->loadGltf(assetPath, relativePath); - } - - FLUTTER_PLUGIN_EXPORT bool set_camera(const void *const viewer, EntityId asset, const char *nodeName) - { - return ((FilamentViewer *)viewer)->setCamera(asset, nodeName); - } - - const double *const get_camera_model_matrix(const void *const viewer) - { - const auto &modelMatrix = ((FilamentViewer *)viewer)->getCameraModelMatrix(); - double *array = (double *)calloc(16, sizeof(double)); - memcpy(array, modelMatrix.asArray(), 16 * sizeof(double)); - return array; - } - - const double *const get_camera_view_matrix(const void *const viewer) - { - const auto &matrix = ((FilamentViewer *)viewer)->getCameraViewMatrix(); - double *array = (double *)calloc(16, sizeof(double)); - memcpy(array, matrix.asArray(), 16 * sizeof(double)); - return array; - } - - const double *const get_camera_projection_matrix(const void *const viewer) - { - const auto &matrix = ((FilamentViewer *)viewer)->getCameraProjectionMatrix(); - double *array = (double *)calloc(16, sizeof(double)); - memcpy(array, matrix.asArray(), 16 * sizeof(double)); - return array; - } - - const double *const get_camera_culling_projection_matrix(const void *const viewer) - { - const auto &matrix = ((FilamentViewer *)viewer)->getCameraCullingProjectionMatrix(); - double *array = (double *)calloc(16, sizeof(double)); - memcpy(array, matrix.asArray(), 16 * sizeof(double)); - return array; - } - - void set_camera_projection_matrix(const void *const viewer, const double* const matrix, double near, double far) - { - ((FilamentViewer *)viewer)->setCameraProjectionMatrix(matrix, near, far); - } - - void set_camera_culling(const void *const viewer, double near, double far) - { - ((FilamentViewer *)viewer)->setCameraCulling(near, far); - } - - const double *const get_camera_frustum(const void *const viewer) - { - const auto frustum = ((FilamentViewer *)viewer)->getCameraFrustum(); - const math::float4* planes = frustum.getNormalizedPlanes(); - double *array = (double *)calloc(24, sizeof(double)); - for(int i =0; i < 6; i++) { - array[i*4] = planes[i].x; - array[i*4+1] = planes[i].y; - array[i*4+2] = planes[i].z; - array[i*4+3] = planes[i].w; - } - - return array; - } - - FLUTTER_PLUGIN_EXPORT void set_camera_manipulator_options(const void *const viewer, _ManipulatorMode mode, double orbitSpeedX, double orbitSpeedY, double zoomSpeed) - { - ((FilamentViewer *)viewer)->setCameraManipulatorOptions((filament::camutils::Mode)mode, orbitSpeedX, orbitSpeedY, zoomSpeed); - } - - FLUTTER_PLUGIN_EXPORT void set_view_frustum_culling(const void *const viewer, bool enabled) - { - ((FilamentViewer *)viewer)->setViewFrustumCulling(enabled); - } - - FLUTTER_PLUGIN_EXPORT void move_camera_to_asset(const void *const viewer, EntityId asset) - { - ((FilamentViewer *)viewer)->moveCameraToAsset(asset); - } - - FLUTTER_PLUGIN_EXPORT void set_camera_focus_distance(const void *const viewer, float distance) - { - ((FilamentViewer *)viewer)->setCameraFocusDistance(distance); - } - - FLUTTER_PLUGIN_EXPORT void set_camera_exposure(const void *const viewer, float aperture, float shutterSpeed, float sensitivity) - { - ((FilamentViewer *)viewer)->setCameraExposure(aperture, shutterSpeed, sensitivity); - } - - FLUTTER_PLUGIN_EXPORT void set_camera_position(const void *const viewer, float x, float y, float z) - { - ((FilamentViewer *)viewer)->setCameraPosition(x, y, z); - } - - FLUTTER_PLUGIN_EXPORT void set_camera_rotation(const void *const viewer, float rads, float x, float y, float z) - { - ((FilamentViewer *)viewer)->setCameraRotation(rads, x, y, z); - } - - FLUTTER_PLUGIN_EXPORT void set_camera_model_matrix(const void *const viewer, const float *const matrix) - { - ((FilamentViewer *)viewer)->setCameraModelMatrix(matrix); - } - - FLUTTER_PLUGIN_EXPORT void set_camera_focal_length(const void *const viewer, float focalLength) - { - ((FilamentViewer *)viewer)->setCameraFocalLength(focalLength); - } - - FLUTTER_PLUGIN_EXPORT void render( - const void *const viewer, - uint64_t frameTimeInNanos, - void *pixelBuffer, - void (*callback)(void *buf, size_t size, void *data), - void *data) - { - ((FilamentViewer *)viewer)->render(frameTimeInNanos, pixelBuffer, callback, data); - } - - FLUTTER_PLUGIN_EXPORT void set_frame_interval( - const void *const viewer, - float frameInterval) - { - ((FilamentViewer *)viewer)->setFrameInterval(frameInterval); - } - - FLUTTER_PLUGIN_EXPORT void destroy_swap_chain(const void *const viewer) - { - ((FilamentViewer *)viewer)->destroySwapChain(); - } - - FLUTTER_PLUGIN_EXPORT void create_swap_chain(const void *const viewer, const void *const window, uint32_t width, uint32_t height) - { - ((FilamentViewer *)viewer)->createSwapChain(window, width, height); - } - - FLUTTER_PLUGIN_EXPORT void update_viewport_and_camera_projection(const void *const viewer, uint32_t width, uint32_t height, float scaleFactor) - { - return ((FilamentViewer *)viewer)->updateViewportAndCameraProjection(width, height, scaleFactor); - } - - FLUTTER_PLUGIN_EXPORT void scroll_update(const void *const viewer, float x, float y, float delta) - { - ((FilamentViewer *)viewer)->scrollUpdate(x, y, delta); - } - - FLUTTER_PLUGIN_EXPORT void scroll_begin(const void *const viewer) - { - ((FilamentViewer *)viewer)->scrollBegin(); - } - - FLUTTER_PLUGIN_EXPORT void scroll_end(const void *const viewer) - { - ((FilamentViewer *)viewer)->scrollEnd(); - } - - FLUTTER_PLUGIN_EXPORT void grab_begin(const void *const viewer, float x, float y, bool pan) - { - ((FilamentViewer *)viewer)->grabBegin(x, y, pan); - } - - FLUTTER_PLUGIN_EXPORT void grab_update(const void *const viewer, float x, float y) - { - ((FilamentViewer *)viewer)->grabUpdate(x, y); - } - - FLUTTER_PLUGIN_EXPORT void grab_end(const void *const viewer) - { - ((FilamentViewer *)viewer)->grabEnd(); - } - - FLUTTER_PLUGIN_EXPORT void *get_asset_manager(const void *const viewer) - { - return (void *)((FilamentViewer *)viewer)->getAssetManager(); - } - - FLUTTER_PLUGIN_EXPORT void apply_weights( - void *assetManager, - EntityId asset, - const char *const entityName, - float *const weights, - int count) - { - // ((AssetManager*)assetManager)->setMorphTargetWeights(asset, entityName, weights, count); - } - - FLUTTER_PLUGIN_EXPORT void set_morph_target_weights( - void *assetManager, - EntityId asset, - const char *const entityName, - const float *const weights, - const int numWeights) - { - - return ((AssetManager *)assetManager)->setMorphTargetWeights(asset, entityName, weights, numWeights); - } - - bool set_morph_animation( - void *assetManager, - EntityId asset, - const char *const entityName, - const float *const morphData, - const int *const morphIndices, - int numMorphTargets, - int numFrames, - float frameLengthInMs) - { - - return ((AssetManager *)assetManager)->setMorphAnimationBuffer(asset, entityName, morphData, morphIndices, numMorphTargets, numFrames, frameLengthInMs); - } - - FLUTTER_PLUGIN_EXPORT void set_bone_animation( - void *assetManager, - EntityId asset, - const float *const frameData, - int numFrames, - int numBones, - const char **const boneNames, - const char **const meshNames, - int numMeshTargets, - float frameLengthInMs) - { - ((AssetManager *)assetManager)->setBoneAnimationBuffer(asset, frameData, numFrames, numBones, boneNames, meshNames, numMeshTargets, frameLengthInMs); - } - - FLUTTER_PLUGIN_EXPORT void set_post_processing(void *const viewer, bool enabled) - { - ((FilamentViewer *)viewer)->setPostProcessing(enabled); - } - - // void set_bone_transform( - // EntityId asset, - // const char* boneName, - // const char* entityName, - // float transX, - // float transY, - // float transZ, - // float quatX, - // float quatY, - // float quatZ, - // float quatW - // ) { - // ((AssetManager*)assetManager)->setBoneTransform( - // boneName, - // entityName, - // transX, - // transY, - // transZ, - // quatX, - // quatY, - // quatZ, - // quatW, - // false - // ); - - // } - - FLUTTER_PLUGIN_EXPORT void play_animation( - void *assetManager, - EntityId asset, - int index, - bool loop, - bool reverse, - bool replaceActive, - float crossfade) - { - ((AssetManager *)assetManager)->playAnimation(asset, index, loop, reverse, replaceActive, crossfade); - } - - FLUTTER_PLUGIN_EXPORT void set_animation_frame( - void *assetManager, - EntityId asset, - int animationIndex, - int animationFrame) - { - // ((AssetManager*)assetManager)->setAnimationFrame(asset, animationIndex, animationFrame); - } - - float get_animation_duration(void *assetManager, EntityId asset, int animationIndex) - { - return ((AssetManager *)assetManager)->getAnimationDuration(asset, animationIndex); - } - - int get_animation_count( - void *assetManager, - EntityId asset) - { - auto names = ((AssetManager *)assetManager)->getAnimationNames(asset); - return (int)names->size(); - } - - FLUTTER_PLUGIN_EXPORT void get_animation_name( - void *assetManager, - EntityId asset, - char *const outPtr, - int index) - { - auto names = ((AssetManager *)assetManager)->getAnimationNames(asset); - string name = names->at(index); - strcpy(outPtr, name.c_str()); - } - - FLUTTER_PLUGIN_EXPORT int get_morph_target_name_count(void *assetManager, EntityId asset, const char *meshName) - { - unique_ptr> names = ((AssetManager *)assetManager)->getMorphTargetNames(asset, meshName); - return (int)names->size(); - } - - FLUTTER_PLUGIN_EXPORT void get_morph_target_name(void *assetManager, EntityId asset, const char *meshName, char *const outPtr, int index) - { - unique_ptr> names = ((AssetManager *)assetManager)->getMorphTargetNames(asset, meshName); - string name = names->at(index); - strcpy(outPtr, name.c_str()); - } - - FLUTTER_PLUGIN_EXPORT void remove_asset(const void *const viewer, EntityId asset) - { - ((FilamentViewer *)viewer)->removeAsset(asset); - } - - FLUTTER_PLUGIN_EXPORT void clear_assets(const void *const viewer) - { - ((FilamentViewer *)viewer)->clearAssets(); - } - - bool set_material_color(void *assetManager, EntityId asset, const char *meshName, int materialIndex, const float r, const float g, const float b, const float a) - { - return ((AssetManager *)assetManager)->setMaterialColor(asset, meshName, materialIndex, r, g, b, a); - } - - FLUTTER_PLUGIN_EXPORT void transform_to_unit_cube(void *assetManager, EntityId asset) - { - ((AssetManager *)assetManager)->transformToUnitCube(asset); - } - - FLUTTER_PLUGIN_EXPORT void set_position(void *assetManager, EntityId asset, float x, float y, float z) - { - ((AssetManager *)assetManager)->setPosition(asset, x, y, z); - } - - FLUTTER_PLUGIN_EXPORT void set_rotation(void *assetManager, EntityId asset, float rads, float x, float y, float z) - { - ((AssetManager *)assetManager)->setRotation(asset, rads, x, y, z); - } - - FLUTTER_PLUGIN_EXPORT void set_scale(void *assetManager, EntityId asset, float scale) - { - ((AssetManager *)assetManager)->setScale(asset, scale); - } - - FLUTTER_PLUGIN_EXPORT void stop_animation(void *assetManager, EntityId asset, int index) - { - ((AssetManager *)assetManager)->stopAnimation(asset, index); - } - - FLUTTER_PLUGIN_EXPORT int hide_mesh(void *assetManager, EntityId asset, const char *meshName) - { - return ((AssetManager *)assetManager)->hide(asset, meshName); - } - - FLUTTER_PLUGIN_EXPORT int reveal_mesh(void *assetManager, EntityId asset, const char *meshName) - { - return ((AssetManager *)assetManager)->reveal(asset, meshName); - } - - FLUTTER_PLUGIN_EXPORT void pick(void *const viewer, int x, int y, EntityId *entityId) - { - ((FilamentViewer *)viewer)->pick(static_cast(x), static_cast(y), static_cast(entityId)); - } - - FLUTTER_PLUGIN_EXPORT const char *get_name_for_entity(void *const assetManager, const EntityId entityId) - { - return ((AssetManager *)assetManager)->getNameForEntity(entityId); - } - - FLUTTER_PLUGIN_EXPORT void ios_dummy() - { - Log("Dummy called"); - } - - FLUTTER_PLUGIN_EXPORT void flutter_filament_free(void* ptr) - { - free(ptr); - } - - -} diff --git a/ios/src/FlutterFilamentFFIApi.cpp b/ios/src/FlutterFilamentFFIApi.cpp deleted file mode 100644 index 1795d9ba..00000000 --- a/ios/src/FlutterFilamentFFIApi.cpp +++ /dev/null @@ -1,449 +0,0 @@ - -#include "FlutterFilamentFFIApi.h" - -#include "FilamentViewer.hpp" -#include "Log.hpp" -#include "ThreadPool.hpp" -#include "filament/LightManager.h" - -#include -#include -#include - -using namespace polyvox; - -class RenderLoop { -public: - explicit RenderLoop() { - _t = new std::thread([this]() { - while (!_stop) { - { - if (_rendering) { - doRender(); - } - } - std::function task; - { - std::unique_lock lock(_access); - if (_tasks.empty()) { - _cond.wait_for(lock, std::chrono::duration( - _frameIntervalInMilliseconds)); - continue; - } - task = std::move(_tasks.front()); - _tasks.pop_front(); - } - task(); - } - }); - } - ~RenderLoop() { - _stop = true; - _t->join(); - } - - void *const createViewer(void *const context, void *const platform, - const char *uberArchivePath, - const ResourceLoaderWrapper *const loader, - void (*renderCallback)(void *), void *const owner) { - _renderCallback = renderCallback; - _renderCallbackOwner = owner; - std::packaged_task lambda([&]() mutable { - std::thread::id this_id = std::this_thread::get_id(); - return new FilamentViewer(context, loader, platform, uberArchivePath); - }); - auto fut = add_task(lambda); - fut.wait(); - _viewer = fut.get(); - return (void *const)_viewer; - } - - void destroyViewer() { - std::packaged_task lambda([&]() mutable { - _rendering = false; - destroy_filament_viewer(_viewer); - _viewer = nullptr; - }); - auto fut = add_task(lambda); - fut.wait(); - } - - void setRendering(bool rendering) { - std::packaged_task lambda( - [&]() mutable { this->_rendering = rendering; }); - auto fut = add_task(lambda); - fut.wait(); - } - - void doRender() { - render(_viewer, 0, nullptr, nullptr, nullptr); - if(_renderCallback) { - _renderCallback(_renderCallbackOwner); - } - } - - void setFrameIntervalInMilliseconds(float frameIntervalInMilliseconds) { - _frameIntervalInMilliseconds = frameIntervalInMilliseconds; - } - - template - auto add_task(std::packaged_task &pt) -> std::future { - std::unique_lock lock(_access); - auto ret = pt.get_future(); - _tasks.push_back([pt = std::make_shared>( - std::move(pt))] { (*pt)(); }); - _cond.notify_one(); - return ret; - } - -private: - bool _stop = false; - bool _rendering = false; - float _frameIntervalInMilliseconds = 1000.0 / 60.0; - std::mutex _access; - FilamentViewer *_viewer = nullptr; - void (*_renderCallback)(void *const) = nullptr; - void *_renderCallbackOwner = nullptr; - std::thread *_t = nullptr; - std::condition_variable _cond; - std::deque> _tasks; -}; - -extern "C" { - -static RenderLoop *_rl; - -FLUTTER_PLUGIN_EXPORT void *const create_filament_viewer_ffi( - void *const context, void *const platform, const char *uberArchivePath, - const ResourceLoaderWrapper *const loader, - void (*renderCallback)(void *const renderCallbackOwner), - void *const renderCallbackOwner) { - if (!_rl) { - _rl = new RenderLoop(); - } - return _rl->createViewer(context, platform, uberArchivePath, loader, - renderCallback, renderCallbackOwner); -} - -FLUTTER_PLUGIN_EXPORT void destroy_filament_viewer_ffi(void *const viewer) { - _rl->destroyViewer(); -} - -FLUTTER_PLUGIN_EXPORT void create_swap_chain_ffi(void *const viewer, - void *const surface, - uint32_t width, - uint32_t height) { - Log("Creating swapchain %dx%d", width, height); - std::packaged_task lambda( - [&]() mutable { create_swap_chain(viewer, surface, width, height); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void destroy_swap_chain_ffi(void *const viewer) { - Log("Destroying swapchain"); - std::packaged_task lambda( - [&]() mutable { - destroy_swap_chain(viewer); - }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void create_render_target_ffi(void *const viewer, - intptr_t nativeTextureId, - uint32_t width, - uint32_t height) { - std::packaged_task lambda([&]() mutable { - create_render_target(viewer, nativeTextureId, width, height); - }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void update_viewport_and_camera_projection_ffi( - void *const viewer, const uint32_t width, const uint32_t height, - const float scaleFactor) { - Log("Update viewport %dx%d", width, height); - std::packaged_task lambda([&]() mutable { - update_viewport_and_camera_projection(viewer, width, height, scaleFactor); - }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void set_rendering_ffi(void *const viewer, - bool rendering) { - if (!_rl) { - Log("No render loop!"); // PANIC? - } else { - if (rendering) { - Log("Set rendering to true"); - } else { - Log("Set rendering to false"); - } - _rl->setRendering(rendering); - } -} - -FLUTTER_PLUGIN_EXPORT void -set_frame_interval_ffi(float frameIntervalInMilliseconds) { - _rl->setFrameIntervalInMilliseconds(frameIntervalInMilliseconds); -} - -FLUTTER_PLUGIN_EXPORT void render_ffi(void *const viewer) { - std::packaged_task lambda([&]() mutable { _rl->doRender(); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void -set_background_color_ffi(void *const viewer, const float r, const float g, - const float b, const float a) { - std::packaged_task lambda( - [&]() mutable { set_background_color(viewer, r, g, b, a); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT EntityId load_gltf_ffi(void *const assetManager, - const char *path, - const char *relativeResourcePath) { - std::packaged_task lambda([&]() mutable { - return load_gltf(assetManager, path, relativeResourcePath); - }); - auto fut = _rl->add_task(lambda); - fut.wait(); - return fut.get(); -} - -FLUTTER_PLUGIN_EXPORT EntityId load_glb_ffi(void *const assetManager, - const char *path, bool unlit) { - std::packaged_task lambda( - [&]() mutable { return load_glb(assetManager, path, unlit); }); - auto fut = _rl->add_task(lambda); - fut.wait(); - return fut.get(); -} - -FLUTTER_PLUGIN_EXPORT void clear_background_image_ffi(void *const viewer) { - std::packaged_task lambda([&] { clear_background_image(viewer); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void set_background_image_ffi(void *const viewer, - const char *path, - bool fillHeight) { - std::packaged_task lambda( - [&] { set_background_image(viewer, path, fillHeight); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} -FLUTTER_PLUGIN_EXPORT void set_background_image_position_ffi(void *const viewer, - float x, float y, - bool clamp) { - std::packaged_task lambda( - [&] { set_background_image_position(viewer, x, y, clamp); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} -FLUTTER_PLUGIN_EXPORT void set_tone_mapping_ffi(void *const viewer, - int toneMapping) { - std::packaged_task lambda( - [&] { set_tone_mapping(viewer, toneMapping); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} -FLUTTER_PLUGIN_EXPORT void set_bloom_ffi(void *const viewer, float strength) { - std::packaged_task lambda([&] { set_bloom(viewer, strength); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} -FLUTTER_PLUGIN_EXPORT void load_skybox_ffi(void *const viewer, - const char *skyboxPath) { - std::packaged_task lambda([&] { load_skybox(viewer, skyboxPath); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} -FLUTTER_PLUGIN_EXPORT void load_ibl_ffi(void *const viewer, const char *iblPath, - float intensity) { - std::packaged_task lambda( - [&] { load_ibl(viewer, iblPath, intensity); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} -FLUTTER_PLUGIN_EXPORT void remove_skybox_ffi(void *const viewer) { - std::packaged_task lambda([&] { remove_skybox(viewer); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void remove_ibl_ffi(void *const viewer) { - std::packaged_task lambda([&] { remove_ibl(viewer); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -EntityId add_light_ffi(void *const viewer, uint8_t type, float colour, - float intensity, float posX, float posY, float posZ, - float dirX, float dirY, float dirZ, bool shadows) { - std::packaged_task lambda([&] { - return add_light(viewer, type, colour, intensity, posX, posY, posZ, dirX, - dirY, dirZ, shadows); - }); - auto fut = _rl->add_task(lambda); - fut.wait(); - return fut.get(); -} - -FLUTTER_PLUGIN_EXPORT void remove_light_ffi(void *const viewer, - EntityId entityId) { - std::packaged_task lambda([&] { remove_light(viewer, entityId); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void clear_lights_ffi(void *const viewer) { - std::packaged_task lambda([&] { clear_lights(viewer); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void remove_asset_ffi(void *const viewer, - EntityId asset) { - std::packaged_task lambda([&] { remove_asset(viewer, asset); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} -FLUTTER_PLUGIN_EXPORT void clear_assets_ffi(void *const viewer) { - std::packaged_task lambda([&] { clear_assets(viewer); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT bool set_camera_ffi(void *const viewer, EntityId asset, - const char *nodeName) { - std::packaged_task lambda( - [&] { return set_camera(viewer, asset, nodeName); }); - auto fut = _rl->add_task(lambda); - fut.wait(); - return fut.get(); -} - -FLUTTER_PLUGIN_EXPORT void set_bone_animation_ffi( - void *assetManager, EntityId asset, const float *const frameData, - int numFrames, int numBones, const char **const boneNames, - const char **const meshName, int numMeshTargets, float frameLengthInMs) { - std::packaged_task lambda([&] { - set_bone_animation(assetManager, asset, frameData, numFrames, numBones, - boneNames, meshName, numMeshTargets, frameLengthInMs); - }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void -get_morph_target_name_ffi(void *assetManager, EntityId asset, - const char *meshName, char *const outPtr, int index) { - std::packaged_task lambda([&] { - get_morph_target_name(assetManager, asset, meshName, outPtr, index); - }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT int -get_morph_target_name_count_ffi(void *assetManager, EntityId asset, - const char *meshName) { - std::packaged_task lambda([&] { - return get_morph_target_name_count(assetManager, asset, meshName); - }); - auto fut = _rl->add_task(lambda); - fut.wait(); - return fut.get(); -} - -void set_morph_target_weights_ffi(void *const assetManager, EntityId asset, - const char *const entityName, - const float *const morphData, - int numWeights) { - // TODO -} - -FLUTTER_PLUGIN_EXPORT void play_animation_ffi(void *const assetManager, - EntityId asset, int index, - bool loop, bool reverse, - bool replaceActive, - float crossfade) { - std::packaged_task lambda([&] { - play_animation(assetManager, asset, index, loop, reverse, replaceActive, - crossfade); - }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void set_animation_frame_ffi(void *const assetManager, - EntityId asset, - int animationIndex, - int animationFrame) { - std::packaged_task lambda([&] { - set_animation_frame(assetManager, asset, animationIndex, animationFrame); - }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void stop_animation_ffi(void *const assetManager, - EntityId asset, int index) { - std::packaged_task lambda( - [&] { stop_animation(assetManager, asset, index); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT int get_animation_count_ffi(void *const assetManager, - EntityId asset) { - std::packaged_task lambda( - [&] { return get_animation_count(assetManager, asset); }); - auto fut = _rl->add_task(lambda); - fut.wait(); - return fut.get(); -} -FLUTTER_PLUGIN_EXPORT void get_animation_name_ffi(void *const assetManager, - EntityId asset, - char *const outPtr, - int index) { - std::packaged_task lambda( - [&] { get_animation_name(assetManager, asset, outPtr, index); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void set_post_processing_ffi(void *const viewer, - bool enabled) { - std::packaged_task lambda( - [&] { set_post_processing(viewer, enabled); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT void pick_ffi(void *const viewer, int x, int y, - EntityId *entityId) { - std::packaged_task lambda([&] { pick(viewer, x, y, entityId); }); - auto fut = _rl->add_task(lambda); - fut.wait(); -} - -FLUTTER_PLUGIN_EXPORT const char * -get_name_for_entity_ffi(void *const assetManager, const EntityId entityId) { - std::packaged_task lambda( - [&] { return get_name_for_entity(assetManager, entityId); }); - auto fut = _rl->add_task(lambda); - fut.wait(); - return fut.get(); -} - -FLUTTER_PLUGIN_EXPORT void ios_dummy_ffi() { Log("Dummy called"); } -} diff --git a/ios/src/camutils/Manipulator.cpp b/ios/src/camutils/Manipulator.cpp deleted file mode 100644 index 0c748b8e..00000000 --- a/ios/src/camutils/Manipulator.cpp +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -#include - -#include - -#include "FreeFlightManipulator.h" -#include "MapManipulator.h" -#include "OrbitManipulator.h" - -using namespace filament::math; - -namespace filament { -namespace camutils { - -template typename -Manipulator::Builder& Manipulator::Builder::viewport(int width, int height) { - details.viewport[0] = width; - details.viewport[1] = height; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::targetPosition(FLOAT x, FLOAT y, FLOAT z) { - details.targetPosition = {x, y, z}; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::upVector(FLOAT x, FLOAT y, FLOAT z) { - details.upVector = {x, y, z}; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::zoomSpeed(FLOAT val) { - details.zoomSpeed = val; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::orbitHomePosition(FLOAT x, FLOAT y, FLOAT z) { - details.orbitHomePosition = {x, y, z}; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::orbitSpeed(FLOAT x, FLOAT y) { - details.orbitSpeed = {x, y}; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::fovDirection(Fov fov) { - details.fovDirection = fov; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::fovDegrees(FLOAT degrees) { - details.fovDegrees = degrees; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::farPlane(FLOAT distance) { - details.farPlane = distance; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::mapExtent(FLOAT worldWidth, FLOAT worldHeight) { - details.mapExtent = {worldWidth, worldHeight}; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::mapMinDistance(FLOAT mindist) { - details.mapMinDistance = mindist; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::flightStartPosition(FLOAT x, FLOAT y, FLOAT z) { - details.flightStartPosition = {x, y, z}; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::flightStartOrientation(FLOAT pitch, FLOAT yaw) { - details.flightStartPitch = pitch; - details.flightStartYaw = yaw; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::flightMaxMoveSpeed(FLOAT maxSpeed) { - details.flightMaxSpeed = maxSpeed; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::flightSpeedSteps(int steps) { - details.flightSpeedSteps = steps; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::flightPanSpeed(FLOAT x, FLOAT y) { - details.flightPanSpeed = {x, y}; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::flightMoveDamping(FLOAT damping) { - details.flightMoveDamping = damping; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::groundPlane(FLOAT a, FLOAT b, FLOAT c, FLOAT d) { - details.groundPlane = {a, b, c, d}; - return *this; -} - -template typename -Manipulator::Builder& Manipulator::Builder::raycastCallback(RayCallback cb, void* userdata) { - details.raycastCallback = cb; - details.raycastUserdata = userdata; - return *this; -} - -template -Manipulator* Manipulator::Builder::build(Mode mode) { - switch (mode) { - case Mode::FREE_FLIGHT: - return new FreeFlightManipulator(mode, details); - case Mode::MAP: - return new MapManipulator(mode, details); - case Mode::ORBIT: - return new OrbitManipulator(mode, details); - } -} - -template -Manipulator::Manipulator(Mode mode, const Config& props) : mMode(mode) { - setProperties(props); -} - -template -void Manipulator::setProperties(const Config& props) { - mProps = props; - - if (mProps.zoomSpeed == FLOAT(0)) { - mProps.zoomSpeed = 0.01; - } - - if (mProps.upVector == vec3(0)) { - mProps.upVector = vec3(0, 1, 0); - } - - if (mProps.fovDegrees == FLOAT(0)) { - mProps.fovDegrees = 33; - } - - if (mProps.farPlane == FLOAT(0)) { - mProps.farPlane = 5000; - } - - if (mProps.mapExtent == vec2(0)) { - mProps.mapExtent = vec2(512); - } -} - -template -void Manipulator::setViewport(int width, int height) { - Config props = mProps; - props.viewport[0] = width; - props.viewport[1] = height; - setProperties(props); -} - -template -void Manipulator::getLookAt(vec3* eyePosition, vec3* targetPosition, vec3* upward) const { - *targetPosition = mTarget; - *eyePosition = mEye; - const vec3 gaze = normalize(mTarget - mEye); - const vec3 right = cross(gaze, mProps.upVector); - *upward = cross(right, gaze); -} - -template -static bool raycastPlane(const filament::math::vec3& origin, - const filament::math::vec3& dir, FLOAT* t, void* userdata) { - using vec3 = filament::math::vec3; - using vec4 = filament::math::vec4; - auto props = (const typename Manipulator::Config*) userdata; - const vec4 plane = props->groundPlane; - const vec3 n = vec3(plane[0], plane[1], plane[2]); - const vec3 p0 = n * plane[3]; - const FLOAT denom = -dot(n, dir); - if (denom > 1e-6) { - const vec3 p0l0 = p0 - origin; - *t = dot(p0l0, n) / -denom; - return *t >= 0; - } - return false; -} - -template -void Manipulator::getRay(int x, int y, vec3* porigin, vec3* pdir) const { - const vec3 gaze = normalize(mTarget - mEye); - const vec3 right = normalize(cross(gaze, mProps.upVector)); - const vec3 upward = cross(right, gaze); - const FLOAT width = mProps.viewport[0]; - const FLOAT height = mProps.viewport[1]; - const FLOAT fov = mProps.fovDegrees * F_PI / 180.0; - - // Remap the grid coordinate into [-1, +1] and shift it to the pixel center. - const FLOAT u = 2.0 * (0.5 + x) / width - 1.0; - const FLOAT v = 2.0 * (0.5 + y) / height - 1.0; - - // Compute the tangent of the field-of-view angle as well as the aspect ratio. - const FLOAT tangent = tan(fov / 2.0); - const FLOAT aspect = width / height; - - // Adjust the gaze so it goes through the pixel of interest rather than the grid center. - vec3 dir = gaze; - if (mProps.fovDirection == Fov::VERTICAL) { - dir += right * tangent * u * aspect; - dir += upward * tangent * v; - } else { - dir += right * tangent * u; - dir += upward * tangent * v / aspect; - } - dir = normalize(dir); - - *porigin = mEye; - *pdir = dir; -} - -template -bool Manipulator::raycast(int x, int y, vec3* result) const { - vec3 origin, dir; - getRay(x, y, &origin, &dir); - - // Choose either the user's callback function or the plane intersector. - auto callback = mProps.raycastCallback; - auto fallback = raycastPlane; - void* userdata = mProps.raycastUserdata; - if (!callback) { - callback = fallback; - userdata = (void*) &mProps; - } - - // If the ray misses, then try the fallback function. - FLOAT t; - if (!callback(mEye, dir, &t, userdata)) { - if (callback == fallback || !fallback(mEye, dir, &t, (void*) &mProps)) { - return false; - } - } - - *result = mEye + dir * t; - return true; -} - -template -filament::math::vec3 Manipulator::raycastFarPlane(int x, int y) const { - const filament::math::vec3 gaze = normalize(mTarget - mEye); - const vec3 right = cross(gaze, mProps.upVector); - const vec3 upward = cross(right, gaze); - const FLOAT width = mProps.viewport[0]; - const FLOAT height = mProps.viewport[1]; - const FLOAT fov = mProps.fovDegrees * math::F_PI / 180.0; - - // Remap the grid coordinate into [-1, +1] and shift it to the pixel center. - const FLOAT u = 2.0 * (0.5 + x) / width - 1.0; - const FLOAT v = 2.0 * (0.5 + y) / height - 1.0; - - // Compute the tangent of the field-of-view angle as well as the aspect ratio. - const FLOAT tangent = tan(fov / 2.0); - const FLOAT aspect = width / height; - - // Adjust the gaze so it goes through the pixel of interest rather than the grid center. - vec3 dir = gaze; - if (mProps.fovDirection == Fov::VERTICAL) { - dir += right * tangent * u * aspect; - dir += upward * tangent * v; - } else { - dir += right * tangent * u; - dir += upward * tangent * v / aspect; - } - return mEye + dir * mProps.farPlane; -} - -template -void Manipulator::keyDown(Manipulator::Key key) { } - -template -void Manipulator::keyUp(Manipulator::Key key) { } - -template -void Manipulator::update(FLOAT deltaTime) { } - -template class Manipulator; -template class Manipulator; - -} // namespace camutils -} // namespace filament diff --git a/ios/src/camutils/MapManipulator.h b/ios/src/camutils/MapManipulator.h deleted file mode 100644 index 6df5b4c5..00000000 --- a/ios/src/camutils/MapManipulator.h +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -#ifndef CAMUTILS_MAP_MANIPULATOR_H -#define CAMUTILS_MAP_MANIPULATOR_H - -#include - -#include - -namespace filament { -namespace camutils { - -template -class MapManipulator : public Manipulator { -public: - using vec2 = math::vec2; - using vec3 = math::vec3; - using vec4 = math::vec4; - using Bookmark = filament::camutils::Bookmark; - using Base = Manipulator; - using Config = typename Manipulator::Config; - - MapManipulator(Mode mode, const Config& props) : Manipulator(mode, props) { - const FLOAT width = Base::mProps.mapExtent.x; - const FLOAT height = Base::mProps.mapExtent.y; - const bool horiz = Base::mProps.fovDirection == Fov::HORIZONTAL; - const vec3 targetToEye = Base::mProps.groundPlane.xyz; - const FLOAT halfExtent = (horiz ? width : height) / 2.0; - const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0; - const FLOAT distance = halfExtent / tan(fov / 2.0); - Base::mTarget = Base::mProps.targetPosition; - Base::mEye = Base::mTarget + distance * targetToEye; - } - - void grabBegin(int x, int y, bool strafe) override { - if (strafe || !Base::raycast(x, y, &mGrabScene)) { - return; - } - mGrabFar = Base::raycastFarPlane(x, y); - mGrabEye = Base::mEye; - mGrabTarget = Base::mTarget; - mGrabbing = true; - } - - void grabUpdate(int x, int y) override { - if (mGrabbing) { - const FLOAT ulen = distance(mGrabScene, mGrabEye); - const FLOAT vlen = distance(mGrabFar, mGrabScene); - const vec3 translation = (mGrabFar - Base::raycastFarPlane(x, y)) * ulen / vlen; - const vec3 eyePosition = mGrabEye + translation; - const vec3 targetPosition = mGrabTarget + translation; - moveWithConstraints(eyePosition, targetPosition); - } - } - - void grabEnd() override { - mGrabbing = false; - } - - void scroll(int x, int y, FLOAT scrolldelta) override { - vec3 grabScene; - if (!Base::raycast(x, y, &grabScene)) { - return; - } - - // Find the direction of travel for the dolly. We do not normalize since it - // is desirable to move faster when further away from the targetPosition. - vec3 u = grabScene - Base::mEye; - - // Prevent getting stuck when zooming in. - if (scrolldelta < 0) { - const FLOAT distanceToSurface = length(u); - if (distanceToSurface < Base::mProps.zoomSpeed) { - return; - } - } - - u *= -scrolldelta * Base::mProps.zoomSpeed; - - const vec3 eyePosition = Base::mEye + u; - const vec3 targetPosition = Base::mTarget + u; - moveWithConstraints(eyePosition, targetPosition); - } - - Bookmark getCurrentBookmark() const override { - const vec3 dir = normalize(Base::mTarget - Base::mEye); - - FLOAT distance; - raycastPlane(Base::mEye, dir, &distance); - - const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0; - const FLOAT halfExtent = distance * tan(fov / 2.0); - - vec3 targetPosition = Base::mEye + dir * distance; - - const vec3 targetToEye = Base::mProps.groundPlane.xyz; - const vec3 uvec = cross(Base::mProps.upVector, targetToEye); - const vec3 vvec = cross(targetToEye, uvec); - const vec3 centerToTarget = targetPosition - Base::mProps.targetPosition; - - Bookmark bookmark; - bookmark.mode = Mode::MAP; - bookmark.map.extent = halfExtent * 2.0; - bookmark.map.center.x = dot(uvec, centerToTarget); - bookmark.map.center.y = dot(vvec, centerToTarget); - - bookmark.orbit.theta = 0; - bookmark.orbit.phi = 0; - bookmark.orbit.pivot = Base::mProps.targetPosition + - uvec * bookmark.map.center.x + - vvec * bookmark.map.center.y; - bookmark.orbit.distance = halfExtent / tan(fov / 2.0); - - return bookmark; - } - - Bookmark getHomeBookmark() const override { - const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0; - const FLOAT width = Base::mProps.mapExtent.x; - const FLOAT height = Base::mProps.mapExtent.y; - const bool horiz = Base::mProps.fovDirection == Fov::HORIZONTAL; - - Bookmark bookmark; - bookmark.mode = Mode::MAP; - bookmark.map.extent = horiz ? width : height; - bookmark.map.center.x = 0; - bookmark.map.center.y = 0; - - bookmark.orbit.theta = 0; - bookmark.orbit.phi = 0; - bookmark.orbit.pivot = Base::mTarget; - bookmark.orbit.distance = 0.5 * bookmark.map.extent / tan(fov / 2.0); - - // TODO: Add optional boundary constraints here. - - return bookmark; - } - - void jumpToBookmark(const Bookmark& bookmark) override { - const vec3 targetToEye = Base::mProps.groundPlane.xyz; - const FLOAT halfExtent = bookmark.map.extent / 2.0; - const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0; - const FLOAT distance = halfExtent / tan(fov / 2.0); - vec3 uvec = cross(Base::mProps.upVector, targetToEye); - vec3 vvec = cross(targetToEye, uvec); - uvec = normalize(uvec) * bookmark.map.center.x; - vvec = normalize(vvec) * bookmark.map.center.y; - Base::mTarget = Base::mProps.targetPosition + uvec + vvec; - Base::mEye = Base::mTarget + distance * targetToEye; - } - -private: - bool raycastPlane(const vec3& origin, const vec3& dir, FLOAT* t) const { - const vec4 plane = Base::mProps.groundPlane; - const vec3 n = vec3(plane[0], plane[1], plane[2]); - const vec3 p0 = n * plane[3]; - const FLOAT denom = -dot(n, dir); - if (denom > 1e-6) { - const vec3 p0l0 = p0 - origin; - *t = dot(p0l0, n) / -denom; - return *t >= 0; - } - return false; - } - - void moveWithConstraints(vec3 eye, vec3 targetPosition) { - Base::mEye = eye; - Base::mTarget = targetPosition; - // TODO: Add optional boundary constraints here. - } - -private: - bool mGrabbing = false; - vec3 mGrabScene; - vec3 mGrabFar; - vec3 mGrabEye; - vec3 mGrabTarget; -}; - -} // namespace camutils -} // namespace filament - -#endif /* CAMUTILS_MAP_MANIPULATOR_H */ diff --git a/lib/FlutterFilamentPluginWeb.dart b/lib/FlutterFilamentPluginWeb.dart deleted file mode 100644 index e68babd4..00000000 --- a/lib/FlutterFilamentPluginWeb.dart +++ /dev/null @@ -1,82 +0,0 @@ -// In order to *not* need this ignore, consider extracting the "web" version -// of your plugin as a separate package, instead of inlining it in the same -// package as the core of your plugin. -// ignore: avoid_web_libraries_in_flutter -import 'dart:html'; -import 'dart:ui'; -import 'dart:web_gl'; -import 'package:wasm_ffi/wasm_ffi.dart'; -import 'generated_bindings_web.dart'; - -import 'package:flutter/services.dart'; -import 'package:flutter_web_plugins/flutter_web_plugins.dart'; - -/// A web implementation of the FlutterFilamentPlatform of the FlutterFilament plugin. -class FlutterFilamentPluginWeb { - // late html.CanvasElement _canvas; - late RenderingContext _gl; - DynamicLibrary _nativeLib; - dynamic _texture; - - - FlutterFilamentPluginWeb() { - var canvas = document.querySelector('#drawHere') as CanvasElement; - - _gl = canvas.getContext("webgl") as RenderingContext; - _texture = _gl.createTexture(); - _gl.bindTexture(WebGL.TEXTURE_2D, _texture); - _gl.texParameteri(WebGL.TEXTURE_2D, WebGL.TEXTURE_MIN_FILTER, WebGL.LINEAR); - _gl.texParameteri(WebGL.TEXTURE_2D, WebGL.TEXTURE_MAG_FILTER, WebGL.LINEAR); - _gl.texParameteri(WebGL.TEXTURE_2D, WebGL.TEXTURE_MAG_FILTER, WebGL.LINEAR); - _gl.texParameteri(WebGL.TEXTURE_2D, WebGL.TEXTURE_WRAP_S, WebGL.CLAMP_TO_EDGE); - _gl.texParameteri(WebGL.TEXTURE_2D, WebGL.TEXTURE_WRAP_T, WebGL.CLAMP_TO_EDGE); - - _gl.clearColor(.1, .2, .3, 1.0); - _gl.clear(WebGL.COLOR_BUFFER_BIT); - - _nativeLib = DynamicLibrary.open('libopus.so'); - - // _gl.texImage2D( - // WebGL.TEXTURE_2D, - // 0, - // WebGL.RGBA8, - // canvas.width ?? 100, - // canvas.height ?? 100, - // 0, - // WebGL.RGBA, - // WebGL.UNSIGNED_BYTE, - // Uint8List.fromList([255, 0, 0, 255])); - } - static void registerWith(Registrar registrar) { - final MethodChannel channel = MethodChannel("app.polyvox.filament/event", - const StandardMethodCodec(), registrar.messenger); - final FlutterFilamentPluginWeb instance = FlutterFilamentPluginWeb(); - channel.setMethodCallHandler(instance.handleMethodCall); - } - - Future handleMethodCall(MethodCall call) async { - switch (call.method) { - case "createTexture": - return 0; - case "destroyTexture": - return true; - case "createFilamentViewer": -// if(viewer != nil) { -// destroy_swap_chain(viewer) -// destroy_filament_viewer(viewer) -// viewer = nil -// } -// let callback = make_resource_loader(loadResource, freeResource, Unmanaged.passUnretained(self).toOpaque()) -// let args = call.arguments as! [Any] -// let width = args[0] as! Int64 -// let height = args[1] as! Int64 - -// viewer = create_filament_viewer(nil, callback) -// var pixelBufferTextureId = unsafeBitCast(pixelBuffer!, to: UnsafeRawPointer.self) -// create_swap_chain(viewer, pixelBufferTextureId, UInt32(width), UInt32(height)) -// // create_render_target(viewer, CVOpenGLESTextureGetName(glTexture!), UInt32(width),UInt32(height)); // OpenGL - -// update_viewport_and_camera_projection(viewer, UInt32(args[0] as! Int64), UInt32(args[1] as! Int64), 1.0) -// set_frame_interval(viewer, Float(frameInterval)) -// result(unsafeBitCast(viewer, to:Int64.self)) } - } diff --git a/lib/animations/animation_builder.dart b/lib/animations/animation_builder.dart deleted file mode 100644 index d87712a1..00000000 --- a/lib/animations/animation_builder.dart +++ /dev/null @@ -1,155 +0,0 @@ -import 'package:flutter_filament/animations/animation_data.dart'; -import 'package:vector_math/vector_math.dart'; - -class AnimationBuilder { - // BoneAnimationData? BoneAnimationData; - double _frameLengthInMs = 0; - double _duration = 0; - - double? _interpMorphStart; - double? _interpMorphEnd; - double? _interpMorphStartValue; - double? _interpMorphEndValue; - - // List? _BoneAnimationDatas = null; - - String meshName; - late List availableMorphs; - late List _morphTargets; - - AnimationBuilder( - {required this.availableMorphs, - required this.meshName, - required int framerate}) { - _frameLengthInMs = 1000 / framerate; - } - - MorphAnimationData build() { - if (availableMorphs.isEmpty || _duration == 0 || _frameLengthInMs == 0) { - throw Exception(); - } - - int numFrames = _duration * 1000 ~/ _frameLengthInMs; - - final morphData = - List.filled((numFrames * _morphTargets.length).toInt(), 0.0); - - var frameStart = (_interpMorphStart! * 1000) ~/ _frameLengthInMs; - var frameEnd = (_interpMorphEnd! * 1000) ~/ _frameLengthInMs; - - for (int i = frameStart; i < frameEnd; i++) { - var linear = (i - frameStart) / frameEnd; - - var val = ((1 - linear) * _interpMorphStartValue!) + - (linear * _interpMorphEndValue!); - for (int j = 0; j < _morphTargets.length; j++) { - morphData[(i * _morphTargets.length) + j] = val; - } - } - return MorphAnimationData( - meshName, - morphData, - _morphTargets.map((i) => availableMorphs[i]).toList(), - _frameLengthInMs); - } - - AnimationBuilder setDuration(double secs) { - _duration = secs; - return this; - } - - AnimationBuilder setMorphTargets(List names) { - _morphTargets = names.map((name) => availableMorphs.indexOf(name)).toList(); - return this; - } - - AnimationBuilder interpolateMorphWeights( - double start, double end, double startValue, double endValue) { - _interpMorphStart = start; - _interpMorphEnd = end; - _interpMorphStartValue = startValue; - _interpMorphEndValue = endValue; - return this; - } - - AnimationBuilder interpolateBoneTransform( - String boneName, - String meshName, - double start, - double end, - Vector3 transStart, - Vector3 transEnd, - Quaternion quatStart, - Quaternion quatEnd) { - var translations = []; - var quats = []; - var frameStart = (start * 1000) ~/ _frameLengthInMs; - var frameEnd = (end * 1000) ~/ _frameLengthInMs; - int numFrames = _duration * 1000 ~/ _frameLengthInMs; - if (frameEnd > numFrames) { - throw Exception(); - } - - for (int i = 0; i < numFrames; i++) { - if (i >= frameStart && i < frameEnd) { - var linear = (i - frameStart) / (frameEnd - frameStart); - - translations.add(Vector3( - ((1 - linear) * transStart.x) + (linear * transEnd.x), - ((1 - linear) * transStart.y) + (linear * transEnd.y), - ((1 - linear) * transStart.z) + (linear * transEnd.z), - )); - - quats.add(Quaternion( - ((1 - linear) * quatStart.x) + (linear * quatEnd.x), - ((1 - linear) * quatStart.y) + (linear * quatEnd.y), - ((1 - linear) * quatStart.z) + (linear * quatEnd.z), - ((1 - linear) * quatStart.w) + (linear * quatEnd.w), - )); - } else { - translations.add(Vector3.zero()); - quats.add(Quaternion.identity()); - } - } - - throw Exception(); - - // var boneFrameData = BoneTransformFrameData(translations, quats); - - // _BoneAnimationDatas ??= []; - - // var frameData = List>.generate( - // numFrames, (index) => boneFrameData.getFrameData(index).toList()); - - // var animData = Float32List.fromList(frameData.expand((x) => x).toList()); - - // _BoneAnimationDatas!.add(DartBoneAnimationData([boneName], [meshName], animData)); - - // return this; - } -} - -class BoneTransformFrameData { - final List translations; - final List quaternions; - - /// - /// The length of [translations] and [quaternions] must be the same; - /// each entry represents the Vec3/Quaternion for the given frame. - /// - BoneTransformFrameData(this.translations, this.quaternions) { - if (translations.length != quaternions.length) { - throw Exception("Length of translation/quaternion frames must match"); - } - } - - Iterable getFrameData(int frame) sync* { - yield translations[frame].x; - yield translations[frame].y; - yield translations[frame].z; - yield quaternions[frame].x; - yield quaternions[frame].y; - yield quaternions[frame].z; - yield quaternions[frame].w; - } -} diff --git a/lib/animations/animation_data.dart b/lib/animations/animation_data.dart deleted file mode 100644 index b0e4f109..00000000 --- a/lib/animations/animation_data.dart +++ /dev/null @@ -1,47 +0,0 @@ -import 'dart:typed_data'; - -/// -/// Specifies frame data (i.e. weights) to animate the morph targets contained in [morphTargets] under a mesh named [mesh]. -/// [data] is laid out as numFrames x numMorphTargets. -/// Each frame is [numMorphTargets] in length, where the index of each weight corresponds to the respective index in [morphTargets]. -/// [morphTargets] must be some subset of the actual morph targets under [mesh] (though the order of these does not need to match). -/// -class MorphAnimationData { - final String meshName; - final List morphTargets; - - final List data; - - MorphAnimationData( - this.meshName, this.data, this.morphTargets, this.frameLengthInMs) { - assert(data.length == morphTargets.length * numFrames); - } - - int get numMorphTargets => morphTargets.length; - - int get numFrames => data.length ~/ numMorphTargets; - - final double frameLengthInMs; - - Iterable getData(String morphName) sync* { - int index = morphTargets.indexOf(morphName); - for (int i = 0; i < numFrames; i++) { - yield data[(i * numMorphTargets) + index]; - } - } -} - -/// -/// Model class for bone animation frame data. -/// To create dynamic/runtime bone animations (as distinct from animations embedded in a glTF asset), create an instance containing the relevant -/// data and pass to the [setBoneAnimation] method on a [FilamentController]. -/// [frameData] is laid out as [locX, locY, locZ, rotW, rotX, rotY, rotZ] -/// -class BoneAnimationData { - final String boneName; - final List meshNames; - final Float32List frameData; - double frameLengthInMs; - BoneAnimationData( - this.boneName, this.meshNames, this.frameData, this.frameLengthInMs); -} diff --git a/lib/filament_controller.dart b/lib/filament_controller.dart deleted file mode 100644 index 7f159eb8..00000000 --- a/lib/filament_controller.dart +++ /dev/null @@ -1,483 +0,0 @@ -// ignore_for_file: constant_identifier_names - -import 'dart:async'; -import 'dart:ui' as ui; -import 'package:flutter/widgets.dart'; - -import 'package:flutter_filament/animations/animation_data.dart'; -import 'package:vector_math/vector_math_64.dart'; - -// a handle that can be safely passed back to the rendering layer to manipulate an Entity -typedef FilamentEntity = int; - -enum ToneMapper { ACES, FILMIC, LINEAR } - -// see filament Manipulator.h for more details -enum ManipulatorMode { ORBIT, MAP, FREE_FLIGHT } - -class TextureDetails { - final int textureId; - - // both width and height are in physical, not logical pixels - final int width; - final int height; - - TextureDetails( - {required this.textureId, required this.width, required this.height}); -} - -abstract class FilamentController { - /// - /// A Stream containing every FilamentEntity added to the scene (i.e. via [loadGlb], [loadGltf] or [addLight]). - /// This is provided for convenience so you can set listeners in front-end widgets that can respond to entity loads without manually passing around the FilamentEntity returned from those methods. - /// - Stream get onLoad; - - /// - /// A Stream containing every FilamentEntity removed from the scene (i.e. via [removeAsset], [clearAssets], [removeLight] or [clearLights]). - - Stream get onUnload; - - /// - /// A [ValueNotifier] that holds the current dimensions (in physical pixels, after multiplying by pixel ratio) of the FilamentWidget. - /// If you need to perform work as early as possible, add a listener to this property before a [FilamentWidget] has been inserted into the widget hierarchy. - /// - ValueNotifier get rect; - - /// - /// A [ValueNotifier] to indicate whether a FilamentViewer is currently available. - /// (FilamentViewer is a C++ type, hence why it is not referenced) here. - /// Call [createViewer]/[destroyViewer] to create/destroy a FilamentViewer. - /// - ValueNotifier get hasViewer; - - /// - /// Whether a Flutter Texture widget should be inserted into the widget hierarchy. - /// This will be false on certain platforms where we use a transparent window underlay. - /// Used internally by [FilamentWidget]; you probably don't need to access this property directly. - /// - bool get requiresTextureWidget; - - /// - /// The Flutter texture ID and dimensions for current texture in use. - /// This is only used by [FilamentWidget]; you shouldn't need to access directly yourself. - /// - final textureDetails = ValueNotifier(null); - - /// - /// The result(s) of calling [pick] (see below). - /// This may be a broadcast stream, so you should ensure you have subscribed to this stream before calling [pick]. - /// If [pick] is called without an active subscription to this stream, the results will be silently discarded. - /// - Stream get pickResult; - - /// - /// Whether the controller is currently rendering at [framerate]. - /// - bool get rendering; - - /// - /// Set to true to continuously render the scene at the framerate specified by [setFrameRate] (60 fps by default). - /// - Future setRendering(bool render); - - /// - /// Render a single frame. - /// - Future render(); - - /// - /// Sets the framerate for continuous rendering when [setRendering] is enabled. - /// - Future setFrameRate(int framerate); - - /// - /// Destroys the viewer and all backing textures. You can leave the FilamentWidget in the hierarchy after this is called, but you will need to manually call [createViewer] to - /// - Future destroy(); - - /// - /// Destroys the viewer only, leaving the texture intact. You probably want to call [destroy] instead of this; [destroyViewer] is exposed mostly for lifecycle changes which are handled by FilamentWidget. - /// - Future destroyViewer(); - - /// - /// Destroys the specified backing texture. You probably want to call [destroy] instead of this; this is exposed mostly for lifecycle changes which are handled by FilamentWidget. - /// - Future destroyTexture(); - - /// - /// Create a FilamentViewer. Must be called at least one frame after a [FilamentWidget] has been inserted into the rendering hierarchy. - /// - /// Before a FilamentViewer is created, the FilamentWidget will only contain an empty Container (by default, with a solid red background). - /// FilamentWidget will then call [setDimensions] with dimensions/pixel ratio of the viewport - /// Calling [createViewer] will then dispatch a request to the native platform to create a hardware texture (Metal on iOS, OpenGL on Linux, GLES on Android and Windows) and a FilamentViewer (the main interface for manipulating the 3D scene) . - /// [FilamentWidget] will be notified that a texture is available and will replace the empty Container with a Texture widget - /// - Future createViewer(); - - /// - /// Sets the dimensions of the viewport and pixel ratio (obtained from [MediaQuery]) to be used the next time [resize] or [createViewer] is called. - /// This is called by FilamentWidget; you shouldn't need to invoke this manually. - /// - Future setDimensions(ui.Rect rect, double pixelRatio); - - /// - /// Resize the viewport & backing texture to the current dimensions (as last set by [setDimensions]). - /// This is called by FilamentWidget; you shouldn't need to invoke this manually. - /// - Future resize(); - - /// - /// Set the background image to [path] (which should have a file extension .png, .jpg, or .ktx). - /// This will be rendered at the maximum depth (i.e. behind all other objects including the skybox). - /// If [fillHeight] is false, the image will be rendered at its original size. Note this may cause issues with pixel density so be sure to specify the correct resolution - /// If [fillHeight] is true, the image will be stretched/compressed to fit the height of the viewport. - /// - Future setBackgroundImage(String path, {bool fillHeight = false}); - - /// - /// Moves the background image to the relative offset from the origin (bottom-left) specified by [x] and [y]. - /// If [clamp] is true, the image cannot be positioned outside the bounds of the viewport. - /// - Future setBackgroundImagePosition(double x, double y, {bool clamp = false}); - - /// - /// Removes the background image. - /// - Future clearBackgroundImage(); - - /// - /// Sets the color for the background plane (positioned at the maximum depth, i.e. behind all other objects including the skybox). - /// - Future setBackgroundColor(Color color); - - /// - /// Load a skybox from [skyboxPath] (which must be a .ktx file) - /// - Future loadSkybox(String skyboxPath); - - /// - /// Removes the skybox from the scene. - /// - Future removeSkybox(); - - /// - /// Loads an image-based light from the specified path at the given intensity. - /// Only one IBL can be active at any given time; if an IBL has already been loaded, it will be replaced. - /// - Future loadIbl(String lightingPath, {double intensity = 30000}); - - /// - /// Removes the image-based light from the scene. - /// - Future removeIbl(); - - /// - /// Adds a dynamic light to the scene. - /// copied from filament LightManager.h - /// enum class Type : uint8_t { - /// SUN, //!< Directional light that also draws a sun's disk in the sky. - /// DIRECTIONAL, //!< Directional light, emits light in a given direction. - /// POINT, //!< Point light, emits light from a position, in all directions. - /// FOCUSED_SPOT, //!< Physically correct spot light. - /// SPOT, //!< Spot light with coupling of outer cone and illumination disabled. - /// }; - Future addLight( - int type, - double colour, - double intensity, - double posX, - double posY, - double posZ, - double dirX, - double dirY, - double dirZ, - bool castShadows); - - Future removeLight(FilamentEntity light); - - /// - /// Remove all lights (excluding IBL) from the scene. - /// - Future clearLights(); - - /// - /// Load the .glb asset at the given path and insert into the scene. - /// - Future loadGlb(String path, {bool unlit = false}); - - /// - /// Load the .gltf asset at the given path and insert into the scene. - /// [relativeResourcePath] is the folder path where the glTF resources are stored; - /// this is usually the parent directory of the .gltf file itself. - /// - Future loadGltf(String path, String relativeResourcePath, - {bool force = false}); - - /// - /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. - /// - Future panStart(double x, double y); - - /// - /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. - /// - Future panUpdate(double x, double y); - - /// - /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. - /// - Future panEnd(); - - /// - /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. - /// - Future rotateStart(double x, double y); - - /// - /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. - /// - Future rotateUpdate(double x, double y); - - /// - /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. - /// - Future rotateEnd(); - - /// - /// Set the weights for all morph targets under node [meshName] in [entity] to [weights]. - /// - Future setMorphTargetWeights( - FilamentEntity entity, String meshName, List weights); - - Future> getMorphTargetNames( - FilamentEntity entity, String meshName); - - Future> getAnimationNames(FilamentEntity entity); - - /// - /// Returns the length (in seconds) of the animation at the given index. - /// - Future getAnimationDuration( - FilamentEntity entity, int animationIndex); - - /// - /// Animate the morph targets in [entity]. See [MorphTargetAnimation] for an explanation as to how to construct the animation frame data. - /// This method will check the morph target names specified in [animation] against the morph target names that actually exist exist under [meshName] in [entity], - /// throwing an exception if any cannot be found. - /// It is permissible for [animation] to omit any targets that do exist under [meshName]; these simply won't be animated. - /// - Future setMorphAnimationData( - FilamentEntity entity, MorphAnimationData animation); - - /// - /// Animates morph target weights/bone transforms (where each frame requires a duration of [frameLengthInMs]. - /// [morphWeights] is a list of doubles in frame-major format. - /// Each frame is [numWeights] in length, and each entry is the weight to be applied to the morph target located at that index in the mesh primitive at that frame. - /// for now we only allow animating a single bone (though multiple skinned targets are supported) - /// - Future setBoneAnimation(FilamentEntity entity, BoneAnimationData animation); - - /// - /// Removes/destroys the specified entity from the scene. - /// [entity] will no longer be a valid handle after this method is called; ensure you immediately discard all references once this method is complete. - /// - Future removeAsset(FilamentEntity entity); - - /// - /// Removes/destroys all renderable entities from the scene (including cameras). - /// All [FilamentEntity] handles will no longer be valid after this method is called; ensure you immediately discard all references to all entities once this method is complete. - /// - Future clearAssets(); - - /// - /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. - /// - Future zoomBegin(); - - /// - /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. - /// - Future zoomUpdate(double x, double y, double z); - - /// - /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. - /// - Future zoomEnd(); - - /// - /// Schedules the glTF animation at [index] in [entity] to start playing on the next frame. - /// - Future playAnimation(FilamentEntity entity, int index, - {bool loop = false, - bool reverse = false, - bool replaceActive = true, - double crossfade = 0.0}); - - Future setAnimationFrame( - FilamentEntity entity, int index, int animationFrame); - Future stopAnimation(FilamentEntity entity, int animationIndex); - - /// - /// Sets the current scene camera to the glTF camera under [name] in [entity]. - /// - Future setCamera(FilamentEntity entity, String? name); - - /// - /// Sets the tone mapping (requires postprocessing). - /// - Future setToneMapping(ToneMapper mapper); - - /// - /// Sets the strength of the bloom. - /// - Future setBloom(double bloom); - - /// - /// Sets the focal length of the camera. Default value is 28.0. - /// - Future setCameraFocalLength(double focalLength); - - /// - /// Sets the near/far culling planes for the active camera. Default values are 0.05/1000.0. See Camera.h for details. - /// - Future setCameraCulling(double near, double far); - - /// - /// Sets the focus distance for the camera. - /// - Future setCameraFocusDistance(double focusDistance); - - /// - /// Get the camera position in world space. - /// - Future getCameraPosition(); - - /// - /// Get the camera's model matrix. - /// - Future getCameraModelMatrix(); - - /// - /// Get the camera's view matrix. See Camera.h for more details. - /// - Future getCameraViewMatrix(); - - /// - /// Get the camera's projection matrix. See Camera.h for more details. - /// - Future getCameraProjectionMatrix(); - - /// - /// Get the camera's culling projection matrix. See Camera.h for more details. - /// - Future getCameraCullingProjectionMatrix(); - - /// - /// Get the camera's culling frustum in world space. Returns a (vector_math) [Frustum] instance where plane0-plane6 define the left, right, bottom, top, far and near planes respectively. - /// See Camera.h and (filament) Frustum.h for more details. - /// - Future getCameraFrustum(); - - /// - /// Set the camera position in world space. Note this is not persistent - any viewport navigation will reset the camera transform. - /// - Future setCameraPosition(double x, double y, double z); - - /// - /// Get the camera rotation matrix. - /// - Future getCameraRotation(); - - /// - /// Repositions the camera to the last vertex of the bounding box of [entity], looking at the penultimate vertex. - /// - Future moveCameraToAsset(FilamentEntity entity); - - /// - /// Enables/disables frustum culling. Currently we don't expose a method for manipulating the camera projection/culling matrices so this is your only option to deal with unwanted near/far clipping. - /// - Future setViewFrustumCulling(bool enabled); - - /// - /// Sets the camera exposure. - /// - Future setCameraExposure( - double aperture, double shutterSpeed, double sensitivity); - - /// - /// Rotate the camera by [rads] around the given axis. Note this is not persistent - any viewport navigation will reset the camera transform. - /// - Future setCameraRotation(double rads, double x, double y, double z); - - /// - /// Sets the camera model matrix. - /// - Future setCameraModelMatrix(List matrix); - - /// - /// Sets the `baseColorFactor` property for the material at index [materialIndex] in [entity] under node [meshName] to [color]. - /// - Future setMaterialColor( - FilamentEntity entity, String meshName, int materialIndex, Color color); - - /// - /// Scale [entity] to fit within the unit cube. - /// - Future transformToUnitCube(FilamentEntity entity); - - /// - /// Sets the world space position for [entity] to the given coordinates. - /// - Future setPosition(FilamentEntity entity, double x, double y, double z); - - /// - /// Enable/disable postprocessing. - /// - Future setPostProcessing(bool enabled); - - /// - /// Sets the scale for the given entity. - /// - Future setScale(FilamentEntity entity, double scale); - - /// - /// Sets the rotation for [entity] to [rads] around the axis {x,y,z}. - /// - Future setRotation( - FilamentEntity entity, double rads, double x, double y, double z); - - /// - /// Reveal the node [meshName] under [entity]. Only applicable if [hide] had previously been called; this is a no-op otherwise. - /// - Future reveal(FilamentEntity entity, String meshName); - - /// - /// Hide the node [meshName] under [entity]. The node is still loaded, but is no longer being rendered into the scene. Call [reveal] to re-commence rendering. - /// - Future hide(FilamentEntity entity, String meshName); - - /// - /// Used to select the entity in the scene at the given viewport coordinates. - /// Called by `FilamentGestureDetector` on a mouse/finger down event. You probably don't want to call this yourself. - /// This is asynchronous and will require 2-3 frames to complete - subscribe to the [pickResult] stream to receive the results of this method. - /// [x] and [y] must be in local logical coordinates (i.e. where 0,0 is at top-left of the FilamentWidget). - /// - void pick(int x, int y); - - /// - /// Retrieves the name assigned to the given FilamentEntity (usually corresponds to the glTF mesh name). - /// - String? getNameForEntity(FilamentEntity entity); - - /// - /// Sets the options for manipulating the camera via the viewport. - /// ManipulatorMode.FREE_FLIGHT and ManipulatorMode.MAP are currently unsupported and will throw an exception. - /// - Future setCameraManipulatorOptions( - {ManipulatorMode mode = ManipulatorMode.ORBIT, - double orbitSpeedX = 0.01, - double orbitSpeedY = 0.01, - double zoomSpeed = 0.01}); -} diff --git a/lib/filament_controller_ffi.dart b/lib/filament_controller_ffi.dart deleted file mode 100644 index 710dc470..00000000 --- a/lib/filament_controller_ffi.dart +++ /dev/null @@ -1,1158 +0,0 @@ -import 'dart:async'; -import 'dart:ffi'; -import 'dart:io'; -import 'dart:ui' as ui; -import 'dart:developer' as dev; -import 'package:flutter/services.dart'; -import 'package:ffi/ffi.dart'; -import 'package:flutter/widgets.dart'; - -import 'package:flutter_filament/filament_controller.dart'; - -import 'package:flutter_filament/animations/animation_data.dart'; -import 'package:flutter_filament/generated_bindings.dart'; -import 'package:flutter_filament/rendering_surface.dart'; -import 'package:vector_math/vector_math_64.dart'; - -// ignore: constant_identifier_names -const FilamentEntity _FILAMENT_ASSET_ERROR = 0; - -class FilamentControllerFFI extends FilamentController { - final _channel = const MethodChannel("app.polyvox.filament/event"); - - /// - /// This will be set on constructor invocation. - /// On Windows, this will be set to the value returned by the [usesBackingWindow] method call. - /// On Web, this will always be true; - /// On other platforms, this will always be false. - /// - bool _usesBackingWindow = false; - - @override - bool get requiresTextureWidget => !_usesBackingWindow; - - double _pixelRatio = 1.0; - - late Pointer? _assetManager; - - Pointer? _viewer; - - final String? uberArchivePath; - - Pointer _driver = nullptr.cast(); - - @override - final rect = ValueNotifier(null); - - @override - final hasViewer = ValueNotifier(false); - - @override - Stream get pickResult => _pickResultController.stream; - final _pickResultController = StreamController.broadcast(); - - int? _resizingWidth; - int? _resizingHeight; - - Timer? _resizeTimer; - - final _lights = {}; - final _entities = {}; - - final _onLoadController = StreamController.broadcast(); - Stream get onLoad => _onLoadController.stream; - - final _onUnloadController = StreamController.broadcast(); - Stream get onUnload => _onUnloadController.stream; - - /// - /// This controller uses platform channels to bridge Dart with the C/C++ code for the Filament API. - /// Setting up the context/texture (since this is platform-specific) and the render ticker are platform-specific; all other methods are passed through by the platform channel to the methods specified in FlutterFilamentApi.h. - /// - FilamentControllerFFI({this.uberArchivePath}) { - // on some platforms, we ignore the resize event raised by the Flutter RenderObserver - // in favour of a window-level event passed via the method channel. - // (this is because there is no apparent way to exactly synchronize resizing a Flutter widget and resizing a pixel buffer, so we need - // to handle the latter first and rebuild the swapchain appropriately). - _channel.setMethodCallHandler((call) async { - if (call.arguments[0] == _resizingWidth && - call.arguments[1] == _resizingHeight) { - return; - } - _resizeTimer?.cancel(); - _resizingWidth = call.arguments[0]; - _resizingHeight = call.arguments[1]; - _resizeTimer = Timer(const Duration(milliseconds: 500), () async { - rect.value = Offset.zero & - ui.Size(_resizingWidth!.toDouble(), _resizingHeight!.toDouble()); - await resize(); - }); - }); - late DynamicLibrary dl; - if (Platform.isIOS || Platform.isMacOS || Platform.isWindows) { - dl = DynamicLibrary.process(); - } else { - dl = DynamicLibrary.open("libflutter_filament_android.so"); - } - - if (Platform.isWindows) { - _channel.invokeMethod("usesBackingWindow").then((result) { - _usesBackingWindow = result; - }); - } - } - - bool _rendering = false; - @override - bool get rendering => _rendering; - - @override - Future setRendering(bool render) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - _rendering = render; - set_rendering_ffi(_viewer!, render); - } - - @override - Future render() async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - render_ffi(_viewer!); - } - - @override - Future setFrameRate(int framerate) async { - set_frame_interval_ffi(1.0 / framerate); - } - - @override - Future setDimensions(Rect rect, double pixelRatio) async { - this.rect.value = Rect.fromLTWH(rect.left, rect.top, - rect.width * _pixelRatio, rect.height * _pixelRatio); - _pixelRatio = pixelRatio; - } - - @override - Future destroy() async { - await destroyViewer(); - await destroyTexture(); - } - - @override - Future destroyViewer() async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - var viewer = _viewer; - - _viewer = null; - - _assetManager = null; - destroy_filament_viewer_ffi(viewer!); - hasViewer.value = false; - } - - @override - Future destroyTexture() async { - if (textureDetails.value != null) { - await _channel.invokeMethod( - "destroyTexture", textureDetails.value!.textureId); - } - dev.log("Texture destroyed"); - } - - /// - /// Called by `FilamentWidget`. You do not need to call this yourself. - /// - @override - Future createViewer() async { - if (rect.value == null) { - throw Exception( - "Dimensions have not yet been set by FilamentWidget. You need to wait for at least one frame after FilamentWidget has been inserted into the hierarchy"); - } - if (_viewer != null) { - throw Exception( - "Viewer already exists, make sure you call destroyViewer first"); - } - if (textureDetails.value != null) { - throw Exception( - "Texture already exists, make sure you call destroyTexture first"); - } - - var loader = Pointer.fromAddress( - await _channel.invokeMethod("getResourceLoaderWrapper")); - if (loader == nullptr) { - throw Exception("Failed to get resource loader"); - } - - if (Platform.isWindows && requiresTextureWidget) { - _driver = Pointer.fromAddress( - await _channel.invokeMethod("getDriverPlatform")); - } - - var renderCallbackResult = await _channel.invokeMethod("getRenderCallback"); - var renderCallback = - Pointer)>>.fromAddress( - renderCallbackResult[0]); - var renderCallbackOwner = - Pointer.fromAddress(renderCallbackResult[1]); - - var renderingSurface = await _createRenderingSurface(); - - dev.log("Got rendering surface"); - - _viewer = create_filament_viewer_ffi( - Pointer.fromAddress(renderingSurface.sharedContext), - _driver, - uberArchivePath?.toNativeUtf8().cast() ?? nullptr, - loader, - renderCallback, - renderCallbackOwner); - dev.log("Created viewer"); - if (_viewer!.address == 0) { - throw Exception("Failed to create viewer. Check logs for details"); - } - - _assetManager = get_asset_manager(_viewer!); - - create_swap_chain_ffi(_viewer!, renderingSurface.surface, - rect.value!.width.toInt(), rect.value!.height.toInt()); - dev.log("Created swap chain"); - if (renderingSurface.textureHandle != 0) { - dev.log( - "Creating render target from native texture ${renderingSurface.textureHandle}"); - create_render_target_ffi(_viewer!, renderingSurface.textureHandle, - rect.value!.width.toInt(), rect.value!.height.toInt()); - } - - textureDetails.value = TextureDetails( - textureId: renderingSurface.flutterTextureId, - width: rect.value!.width.toInt(), - height: rect.value!.height.toInt()); - dev.log("texture details ${textureDetails.value}"); - update_viewport_and_camera_projection_ffi( - _viewer!, rect.value!.width.toInt(), rect.value!.height.toInt(), 1.0); - hasViewer.value = true; - } - - Future _createRenderingSurface() async { - return RenderingSurface.from(await _channel.invokeMethod("createTexture", [ - rect.value!.width, - rect.value!.height, - rect.value!.left, - rect.value!.top - ])); - } - - /// - /// When a FilamentWidget is resized, it will call the [resize] method below, which will tear down/recreate the swapchain. - /// For "once-off" resizes, this is fine; however, this can be problematic for consecutive resizes - /// (e.g. dragging to expand/contract the parent window on desktop, or animating the size of the FilamentWidget itself). - /// It is too expensive to recreate the swapchain multiple times per second. - /// We therefore add a timer to FilamentWidget so that the call to [resize] is delayed (e.g. 500ms). - /// Any subsequent resizes before the delay window elapses will cancel the earlier call. - /// - /// The overall process looks like this: - /// 1) the window is resized - /// 2) (Windows only) the Flutter engine requests PixelBufferTexture to provide a new pixel buffer with a new size (we return an empty texture, blanking the Texture widget) - /// 3) After Xms, [resize] is invoked - /// 4) the viewer is instructed to stop rendering (synchronous) - /// 5) the existing Filament swapchain is destroyed (synchronous) - /// 6) (where a Texture widget is used), the Flutter texture is unregistered - /// a) this is asynchronous, but - /// b) *** SEE NOTE BELOW ON WINDOWS *** by passing the method channel result through to the callback, we make this synchronous from the Flutter side, - /// c) in this async callback, the glTexture is destroyed - /// 7) (where a backing window is used), the window is resized - /// 7) (where a Texture widget is used), a new Flutter/OpenGL texture is created (synchronous) - /// 8) a new swapchain is created (synchronous) - /// 9) if the viewer was rendering prior to the resize, the viewer is instructed to recommence rendering - /// 10) (where a Texture widget is used) the new texture ID is pushed to the FilamentWidget - /// 11) the FilamentWidget updates the Texture widget with the new texture. - /// - /// #### (Windows-only) ############################################################ - /// # As soon as the widget/window is resized, the PixelBufferTexture will be - /// # requested to provide a new pixel buffer for the new size. - /// # Even with zero delay to the call to [resize], this will be triggered *before* - /// # we have had a chance to anything else (like tear down the swapchain). - /// # On the backend, we deal with this by simply returning an empty texture as soon - /// # as the size changes, and will rely on the followup call to [resize] to actually - /// # destroy/recreate the pixel buffer and Flutter texture. - /// - /// NOTE RE ASYNC CALLBACK - /// # The bigger problem is a race condition when resize is called multiple times in quick succession (e.g dragging to resize on Windows). - /// # It looks like occasionally, the backend OpenGL texture is being destroyed while its corresponding swapchain is still active, causing a crash. - /// # I'm not exactly sure how/where this is occurring, but something clearly isn't synchronized between destroy_swap_chain_ffi and - /// # the asynchronous callback passed to FlutterTextureRegistrar::UnregisterTexture. - /// # Theoretically this could occur if resize_2 starts before resize_1 completes, i.e. - /// # 1) resize_1 destroys swapchain/texture and creates new texture - /// # 2) resize_2 destroys swapchain/texture - /// # 3) resize_1 creates new swapchain but texture isn't available, ergo crash - /// # - /// # I don't think this should happen if: - /// # 1) we add a flag on the Flutter side to ensure only one call to destroy/recreate the swapchain/texture is active at any given time, and - /// # 2) on the Flutter side, we are sure that calling destroyTexture only returns once the async callback on the native side has completed. - /// # For (1), checking if textureId is null at the entrypoint should be sufficient. - /// # For (2), we invoke flutter::MethodResult->Success in the UnregisterTexture callback. - /// # - /// # Maybe (2) doesn't actually make Flutter wait? - /// # - /// # The other possibility is that both (1) and (2) are fine and the issue is elsewhere. - /// # - /// # Either way, the current solution is to basically setup a double-buffer on resize. - /// # When destroyTexture is called, the active texture isn't destroyed yet, it's only marked as inactive. - /// # On subsequent calls to destroyTexture, the inactive texture is destroyed. - /// # This seems to work fine. - /// - /// # Another option is to only use a single large (e.g. 4k) texture and simply crop whenever a resize is requested. - /// # This might be preferable for other reasons (e.g. don't need to destroy/recreate the pixel buffer or swapchain). - /// # Given we don't do this on other platforms, I'm OK to stick with the existing solution for the time being. - /// ############################################################################ - /// - bool _resizing = false; - @override - Future resize() async { - if (_viewer == null) { - throw Exception("Cannot resize without active viewer"); - } - - if (_resizing) { - throw Exception("Resize currently underway, ignoring"); - } - - _resizing = true; - - set_rendering_ffi(_viewer!, false); - - if (!_usesBackingWindow) { - destroy_swap_chain_ffi(_viewer!); - } - - if (requiresTextureWidget) { - if (textureDetails.value != null) { - await _channel.invokeMethod( - "destroyTexture", textureDetails.value!.textureId); - } - } else if (Platform.isWindows) { - dev.log("Resizing window with rect $rect"); - await _channel.invokeMethod("resizeWindow", [ - rect.value!.width, - rect.value!.height, - rect.value!.left, - rect.value!.top - ]); - } - - var renderingSurface = await _createRenderingSurface(); - - if (_viewer!.address == 0) { - throw Exception("Failed to create viewer. Check logs for details"); - } - - _assetManager = get_asset_manager(_viewer!); - - if (!_usesBackingWindow) { - create_swap_chain_ffi(_viewer!, renderingSurface.surface, - rect.value!.width.toInt(), rect.value!.height.toInt()); - } - - if (renderingSurface.textureHandle != 0) { - dev.log( - "Creating render target from native texture ${renderingSurface.textureHandle}"); - create_render_target_ffi(_viewer!, renderingSurface.textureHandle, - rect.value!.width.toInt(), rect.value!.height.toInt()); - } - - textureDetails.value = TextureDetails( - textureId: renderingSurface.flutterTextureId, - width: rect.value!.width.toInt(), - height: rect.value!.height.toInt()); - - update_viewport_and_camera_projection_ffi( - _viewer!, rect.value!.width.toInt(), rect.value!.height.toInt(), 1.0); - - await setRendering(_rendering); - - _resizing = false; - } - - @override - Future clearBackgroundImage() async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - clear_background_image_ffi(_viewer!); - } - - @override - Future setBackgroundImage(String path, {bool fillHeight = false}) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_background_image_ffi( - _viewer!, path.toNativeUtf8().cast(), fillHeight); - } - - @override - Future setBackgroundColor(Color color) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_background_color_ffi( - _viewer!, - color.red.toDouble() / 255.0, - color.green.toDouble() / 255.0, - color.blue.toDouble() / 255.0, - color.alpha.toDouble() / 255.0); - } - - @override - Future setBackgroundImagePosition(double x, double y, - {bool clamp = false}) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_background_image_position_ffi(_viewer!, x, y, clamp); - } - - @override - Future loadSkybox(String skyboxPath) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - load_skybox_ffi(_viewer!, skyboxPath.toNativeUtf8().cast()); - } - - @override - Future loadIbl(String lightingPath, {double intensity = 30000}) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - load_ibl_ffi(_viewer!, lightingPath.toNativeUtf8().cast(), intensity); - } - - @override - Future removeSkybox() async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - remove_skybox_ffi(_viewer!); - } - - @override - Future removeIbl() async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - remove_ibl_ffi(_viewer!); - } - - @override - Future addLight( - int type, - double colour, - double intensity, - double posX, - double posY, - double posZ, - double dirX, - double dirY, - double dirZ, - bool castShadows) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - var entity = add_light_ffi(_viewer!, type, colour, intensity, posX, posY, - posZ, dirX, dirY, dirZ, castShadows); - _onLoadController.sink.add(entity); - _lights.add(entity); - return entity; - } - - @override - Future removeLight(FilamentEntity entity) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - _lights.remove(entity); - remove_light_ffi(_viewer!, entity); - _onUnloadController.add(entity); - } - - @override - Future clearLights() async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - clear_lights_ffi(_viewer!); - for (final entity in _lights) { - _onUnloadController.add(entity); - } - _lights.clear(); - } - - @override - Future loadGlb(String path, {bool unlit = false}) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - if (unlit) { - throw Exception("Not yet implemented"); - } - var entity = - load_glb_ffi(_assetManager!, path.toNativeUtf8().cast(), unlit); - if (entity == _FILAMENT_ASSET_ERROR) { - throw Exception("An error occurred loading the asset at $path"); - } - _entities.add(entity); - _onLoadController.sink.add(entity); - return entity; - } - - @override - Future loadGltf(String path, String relativeResourcePath, - {bool force = false}) async { - if (Platform.isWindows && !force) { - throw Exception( - "loadGltf has a race condition on Windows which is likely to crash your program. If you really want to try, pass force=true to loadGltf"); - } - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - var entity = load_gltf_ffi(_assetManager!, path.toNativeUtf8().cast(), - relativeResourcePath.toNativeUtf8().cast()); - if (entity == _FILAMENT_ASSET_ERROR) { - throw Exception("An error occurred loading the asset at $path"); - } - _entities.add(entity); - _onLoadController.sink.add(entity); - return entity; - } - - @override - Future panStart(double x, double y) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - grab_begin(_viewer!, x * _pixelRatio, y * _pixelRatio, true); - } - - @override - Future panUpdate(double x, double y) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - grab_update(_viewer!, x * _pixelRatio, y * _pixelRatio); - } - - @override - Future panEnd() async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - grab_end(_viewer!); - } - - @override - Future rotateStart(double x, double y) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - grab_begin(_viewer!, x * _pixelRatio, y * _pixelRatio, false); - } - - @override - Future rotateUpdate(double x, double y) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - grab_update(_viewer!, x * _pixelRatio, y * _pixelRatio); - } - - @override - Future rotateEnd() async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - grab_end(_viewer!); - } - - @override - Future setMorphTargetWeights( - FilamentEntity entity, String meshName, List weights) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - var weightsPtr = calloc(weights.length); - - for (int i = 0; i < weights.length; i++) { - weightsPtr.elementAt(i).value = weights[i]; - } - set_morph_target_weights_ffi(_assetManager!, entity, - meshName.toNativeUtf8().cast(), weightsPtr, weights.length); - calloc.free(weightsPtr); - } - - @override - Future> getMorphTargetNames( - FilamentEntity entity, String meshName) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - var names = []; - var count = get_morph_target_name_count_ffi( - _assetManager!, entity, meshName.toNativeUtf8().cast()); - var outPtr = calloc(255); - for (int i = 0; i < count; i++) { - get_morph_target_name(_assetManager!, entity, - meshName.toNativeUtf8().cast(), outPtr, i); - names.add(outPtr.cast().toDartString()); - } - calloc.free(outPtr); - return names.cast(); - } - - @override - Future> getAnimationNames(FilamentEntity entity) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - var animationCount = get_animation_count(_assetManager!, entity); - var names = []; - var outPtr = calloc(255); - for (int i = 0; i < animationCount; i++) { - get_animation_name_ffi(_assetManager!, entity, outPtr, i); - names.add(outPtr.cast().toDartString()); - } - - return names; - } - - @override - Future getAnimationDuration( - FilamentEntity entity, int animationIndex) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - var duration = - get_animation_duration(_assetManager!, entity, animationIndex); - - return duration; - } - - @override - Future setMorphAnimationData( - FilamentEntity entity, MorphAnimationData animation) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - - var dataPtr = calloc(animation.data.length); - for (int i = 0; i < animation.data.length; i++) { - dataPtr.elementAt(i).value = animation.data[i]; - } - - // the morph targets in [animation] might be a subset of those that actually exist in the mesh (and might not have the same order) - // we don't want to reorder the data (?? or do we? this is probably more efficient for the backend?) - // so let's get the actual list of morph targets from the mesh and pass the relevant indices to the native side. - var meshMorphTargets = - await getMorphTargetNames(entity, animation.meshName); - - Pointer idxPtr = calloc(animation.morphTargets.length); - for (int i = 0; i < animation.numMorphTargets; i++) { - var index = meshMorphTargets.indexOf(animation.morphTargets[i]); - if (index == -1) { - calloc.free(dataPtr); - calloc.free(idxPtr); - throw Exception( - "Morph target ${animation.morphTargets[i]} is specified in the animation but could not be found in the mesh ${animation.meshName} under entity $entity"); - } - idxPtr.elementAt(i).value = index; - } - - set_morph_animation( - _assetManager!, - entity, - animation.meshName.toNativeUtf8().cast(), - dataPtr, - idxPtr, - animation.numMorphTargets, - animation.numFrames, - (animation.frameLengthInMs)); - calloc.free(dataPtr); - calloc.free(idxPtr); - } - - @override - Future setBoneAnimation( - FilamentEntity entity, BoneAnimationData animation) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - // var data = calloc(animation.frameData.length); - // int offset = 0; - // var numFrames = animation.frameData.length ~/ 7; - // var boneNames = calloc>(1); - // boneNames.elementAt(0).value = - // animation.boneName.toNativeUtf8().cast(); - - // var meshNames = calloc>(animation.meshNames.length); - // for (int i = 0; i < animation.meshNames.length; i++) { - // meshNames.elementAt(i).value = - // animation.meshNames[i].toNativeUtf8().cast(); - // } - - // for (int i = 0; i < animation.frameData.length; i++) { - // data.elementAt(offset).value = animation.frameData[i]; - // offset += 1; - // } - - // await _channel.invokeMethod("setBoneAnimation", [ - // _assetManager!, - // asset, - // data, - // numFrames, - // 1, - // boneNames, - // meshNames, - // animation.meshNames.length, - // animation.frameLengthInMs - // ]); - // calloc.free(data); - } - - @override - Future removeAsset(FilamentEntity entity) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - _entities.remove(entity); - remove_asset_ffi(_viewer!, entity); - _onUnloadController.add(entity); - } - - @override - Future clearAssets() async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - clear_assets_ffi(_viewer!); - - for (final entity in _entities) { - _onUnloadController.add(entity); - } - _entities.clear(); - } - - @override - Future zoomBegin() async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - scroll_begin(_viewer!); - } - - @override - Future zoomUpdate(double x, double y, double z) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - scroll_update(_viewer!, x, y, z); - } - - @override - Future zoomEnd() async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - scroll_end(_viewer!); - } - - @override - Future playAnimation(FilamentEntity entity, int index, - {bool loop = false, - bool reverse = false, - bool replaceActive = true, - double crossfade = 0.0}) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - play_animation_ffi( - _assetManager!, entity, index, loop, reverse, replaceActive, crossfade); - } - - @override - Future setAnimationFrame( - FilamentEntity entity, int index, int animationFrame) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_animation_frame(_assetManager!, entity, index, animationFrame); - } - - @override - Future stopAnimation(FilamentEntity entity, int animationIndex) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - stop_animation(_assetManager!, entity, animationIndex); - } - - @override - Future setCamera(FilamentEntity entity, String? name) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - var result = set_camera( - _viewer!, entity, name?.toNativeUtf8().cast() ?? nullptr); - if (!result) { - throw Exception("Failed to set camera"); - } - } - - @override - Future setToneMapping(ToneMapper mapper) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - - set_tone_mapping_ffi(_viewer!, mapper.index); - } - - @override - Future setPostProcessing(bool enabled) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - - set_post_processing_ffi(_viewer!, enabled); - } - - @override - Future setBloom(double bloom) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_bloom_ffi(_viewer!, bloom); - } - - @override - Future setCameraFocalLength(double focalLength) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_camera_focal_length(_viewer!, focalLength); - } - - @override - Future setCameraCulling(double near, double far) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_camera_culling(_viewer!, near, far); - } - - @override - Future setCameraFocusDistance(double focusDistance) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_camera_focus_distance(_viewer!, focusDistance); - } - - @override - Future setCameraPosition(double x, double y, double z) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_camera_position(_viewer!, x, y, z); - } - - @override - Future moveCameraToAsset(FilamentEntity entity) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - move_camera_to_asset(_viewer!, entity); - } - - @override - Future setViewFrustumCulling(bool enabled) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_view_frustum_culling(_viewer!, enabled); - } - - @override - Future setCameraExposure( - double aperture, double shutterSpeed, double sensitivity) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_camera_exposure(_viewer!, aperture, shutterSpeed, sensitivity); - } - - @override - Future setCameraRotation(double rads, double x, double y, double z) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_camera_rotation(_viewer!, rads, x, y, z); - } - - @override - Future setCameraModelMatrix(List matrix) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - assert(matrix.length == 16); - var ptr = calloc(16); - for (int i = 0; i < 16; i++) { - ptr.elementAt(i).value = matrix[i]; - } - set_camera_model_matrix(_viewer!, ptr); - calloc.free(ptr); - } - - @override - Future setMaterialColor(FilamentEntity entity, String meshName, - int materialIndex, Color color) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - var result = set_material_color( - _assetManager!, - entity, - meshName.toNativeUtf8().cast(), - materialIndex, - color.red.toDouble() / 255.0, - color.green.toDouble() / 255.0, - color.blue.toDouble() / 255.0, - color.alpha.toDouble() / 255.0); - if (!result) { - throw Exception("Failed to set material color"); - } - } - - @override - Future transformToUnitCube(FilamentEntity entity) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - transform_to_unit_cube(_assetManager!, entity); - } - - @override - Future setPosition( - FilamentEntity entity, double x, double y, double z) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_position(_assetManager!, entity, x, y, z); - } - - @override - Future setScale(FilamentEntity entity, double scale) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_scale(_assetManager!, entity, scale); - } - - @override - Future setRotation( - FilamentEntity entity, double rads, double x, double y, double z) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - set_rotation(_assetManager!, entity, rads, x, y, z); - } - - @override - Future hide(FilamentEntity entity, String meshName) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - if (hide_mesh( - _assetManager!, entity, meshName.toNativeUtf8().cast()) != - 1) {} - } - - @override - Future reveal(FilamentEntity entity, String meshName) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - if (reveal_mesh( - _assetManager!, entity, meshName.toNativeUtf8().cast()) != - 1) { - throw Exception("Failed to reveal mesh $meshName"); - } - } - - @override - String? getNameForEntity(FilamentEntity entity) { - final result = get_name_for_entity(_assetManager!, entity); - if (result == nullptr) { - return null; - } - return result.cast().toDartString(); - } - - @override - void pick(int x, int y) async { - if (_viewer == null) { - throw Exception("No viewer available, ignoring"); - } - final outPtr = calloc(1); - outPtr.value = 0; - - pick_ffi(_viewer!, x, textureDetails.value!.height - y, outPtr); - int wait = 0; - while (outPtr.value == 0) { - await Future.delayed(const Duration(milliseconds: 32)); - wait++; - if (wait > 10) { - calloc.free(outPtr); - throw Exception("Failed to get picking result"); - } - } - var entityId = outPtr.value; - _pickResultController.add(entityId); - calloc.free(outPtr); - } - - @override - Future getCameraViewMatrix() async { - if (_viewer == null) { - throw Exception("No viewer available"); - } - var arrayPtr = get_camera_view_matrix(_viewer!); - var viewMatrix = Matrix4.fromList(arrayPtr.asTypedList(16)); - calloc.free(arrayPtr); - return viewMatrix; - } - - @override - Future getCameraModelMatrix() async { - if (_viewer == null) { - throw Exception("No viewer available"); - } - var arrayPtr = get_camera_model_matrix(_viewer!); - var modelMatrix = Matrix4.fromList(arrayPtr.asTypedList(16)); - calloc.free(arrayPtr); - return modelMatrix; - } - - @override - Future getCameraPosition() async { - if (_viewer == null) { - throw Exception("No viewer available"); - } - var arrayPtr = get_camera_model_matrix(_viewer!); - var doubleList = arrayPtr.asTypedList(16); - var modelMatrix = Matrix4.fromFloat64List(doubleList); - - var position = modelMatrix.getColumn(3).xyz; - - flutter_filament_free(arrayPtr.cast()); - return position; - } - - @override - Future getCameraRotation() async { - if (_viewer == null) { - throw Exception("No viewer available"); - } - var arrayPtr = get_camera_model_matrix(_viewer!); - var doubleList = arrayPtr.asTypedList(16); - var modelMatrix = Matrix4.fromFloat64List(doubleList); - var rotationMatrix = Matrix3.identity(); - modelMatrix.copyRotation(rotationMatrix); - flutter_filament_free(arrayPtr.cast()); - return rotationMatrix; - } - - @override - Future setCameraManipulatorOptions( - {ManipulatorMode mode = ManipulatorMode.ORBIT, - double orbitSpeedX = 0.01, - double orbitSpeedY = 0.01, - double zoomSpeed = 0.01}) async { - if (_viewer == null) { - throw Exception("No viewer available"); - } - if (mode != ManipulatorMode.ORBIT) { - throw Exception("Manipulator mode $mode not yet implemented"); - } - set_camera_manipulator_options( - _viewer!, mode.index, orbitSpeedX, orbitSpeedX, zoomSpeed); - } - - /// - /// I don't think these two methods are accurate - don't rely on them, use the Frustum values instead. - /// I think because we use [setLensProjection] and [setScaling] together, this projection matrix doesn't accurately reflect the field of view (because it's using an additional scaling matrix). - /// Also, the near/far planes never seem to get updated (which is what I would expect to see when calling [getCameraCullingProjectionMatrix]) - /// - @override - Future getCameraProjectionMatrix() async { - if (_viewer == null) { - throw Exception("No viewer available"); - } - - print( - "WARNING: getCameraProjectionMatrix and getCameraCullingProjectionMatrix are not reliable. Consider these broken"); - - var arrayPtr = get_camera_projection_matrix(_viewer!); - var doubleList = arrayPtr.asTypedList(16); - var projectionMatrix = Matrix4.fromList(doubleList); - flutter_filament_free(arrayPtr.cast()); - return projectionMatrix; - } - - @override - Future getCameraCullingProjectionMatrix() async { - if (_viewer == null) { - throw Exception("No viewer available"); - } - print( - "WARNING: getCameraProjectionMatrix and getCameraCullingProjectionMatrix are not reliable. Consider these broken"); - var arrayPtr = get_camera_culling_projection_matrix(_viewer!); - var doubleList = arrayPtr.asTypedList(16); - var projectionMatrix = Matrix4.fromList(doubleList); - flutter_filament_free(arrayPtr.cast()); - return projectionMatrix; - } - - @override - Future getCameraFrustum() async { - if (_viewer == null) { - throw Exception("No viewer available"); - } - var arrayPtr = get_camera_frustum(_viewer!); - var doubleList = arrayPtr.asTypedList(24); - var planeNormals = []; - for (int i = 0; i < 6; i++) { - planeNormals.add(Vector3.array(doubleList.sublist(i * 3, (i + 1) * 3))); - } - - var frustum = Frustum(); - frustum.plane0.setFromComponents( - doubleList[0], doubleList[1], doubleList[2], doubleList[3]); - frustum.plane1.setFromComponents( - doubleList[4], doubleList[5], doubleList[6], doubleList[7]); - frustum.plane2.setFromComponents( - doubleList[8], doubleList[9], doubleList[10], doubleList[11]); - frustum.plane3.setFromComponents( - doubleList[12], doubleList[13], doubleList[14], doubleList[15]); - frustum.plane4.setFromComponents( - doubleList[16], doubleList[17], doubleList[18], doubleList[19]); - frustum.plane5.setFromComponents( - doubleList[20], doubleList[21], doubleList[22], doubleList[23]); - - return frustum; - } -} diff --git a/lib/generated_bindings.dart b/lib/generated_bindings.dart deleted file mode 100644 index d961686d..00000000 --- a/lib/generated_bindings.dart +++ /dev/null @@ -1,1473 +0,0 @@ -// AUTO GENERATED FILE, DO NOT EDIT. -// -// Generated by `package:ffigen`. -// ignore_for_file: type=lint -import 'dart:ffi' as ffi; - -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - symbol: 'create_filament_viewer', assetId: 'flutter_filament_plugin') -external ffi.Pointer create_filament_viewer( - ffi.Pointer context, - ffi.Pointer loader, - ffi.Pointer platform, - ffi.Pointer uberArchivePath, -); - -@ffi.Native)>( - symbol: 'destroy_filament_viewer', assetId: 'flutter_filament_plugin') -external void destroy_filament_viewer( - ffi.Pointer viewer, -); - -@ffi.Native< - ffi.Pointer Function( - LoadFilamentResourceFromOwner, - FreeFilamentResourceFromOwner, - ffi.Pointer)>( - symbol: 'make_resource_loader', assetId: 'flutter_filament_plugin') -external ffi.Pointer make_resource_loader( - LoadFilamentResourceFromOwner loadFn, - FreeFilamentResourceFromOwner freeFn, - ffi.Pointer owner, -); - -@ffi.Native Function(ffi.Pointer)>( - symbol: 'get_asset_manager', assetId: 'flutter_filament_plugin') -external ffi.Pointer get_asset_manager( - ffi.Pointer viewer, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.IntPtr, ffi.Uint32, ffi.Uint32)>( - symbol: 'create_render_target', assetId: 'flutter_filament_plugin') -external void create_render_target( - ffi.Pointer viewer, - int texture, - int width, - int height, -); - -@ffi.Native)>( - symbol: 'clear_background_image', assetId: 'flutter_filament_plugin') -external void clear_background_image( - ffi.Pointer viewer, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.Bool)>( - symbol: 'set_background_image', assetId: 'flutter_filament_plugin') -external void set_background_image( - ffi.Pointer viewer, - ffi.Pointer path, - bool fillHeight, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.Float, ffi.Float, ffi.Bool)>( - symbol: 'set_background_image_position', assetId: 'flutter_filament_plugin') -external void set_background_image_position( - ffi.Pointer viewer, - double x, - double y, - bool clamp, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.Float, ffi.Float, ffi.Float, ffi.Float)>( - symbol: 'set_background_color', assetId: 'flutter_filament_plugin') -external void set_background_color( - ffi.Pointer viewer, - double r, - double g, - double b, - double a, -); - -@ffi.Native, ffi.Int)>( - symbol: 'set_tone_mapping', assetId: 'flutter_filament_plugin') -external void set_tone_mapping( - ffi.Pointer viewer, - int toneMapping, -); - -@ffi.Native, ffi.Float)>( - symbol: 'set_bloom', assetId: 'flutter_filament_plugin') -external void set_bloom( - ffi.Pointer viewer, - double strength, -); - -@ffi.Native, ffi.Pointer)>( - symbol: 'load_skybox', assetId: 'flutter_filament_plugin') -external void load_skybox( - ffi.Pointer viewer, - ffi.Pointer skyboxPath, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Float)>(symbol: 'load_ibl', assetId: 'flutter_filament_plugin') -external void load_ibl( - ffi.Pointer viewer, - ffi.Pointer iblPath, - double intensity, -); - -@ffi.Native)>( - symbol: 'remove_skybox', assetId: 'flutter_filament_plugin') -external void remove_skybox( - ffi.Pointer viewer, -); - -@ffi.Native)>( - symbol: 'remove_ibl', assetId: 'flutter_filament_plugin') -external void remove_ibl( - ffi.Pointer viewer, -); - -@ffi.Native< - EntityId Function( - ffi.Pointer, - ffi.Uint8, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Bool)>(symbol: 'add_light', assetId: 'flutter_filament_plugin') -external int add_light( - ffi.Pointer viewer, - int type, - double colour, - double intensity, - double posX, - double posY, - double posZ, - double dirX, - double dirY, - double dirZ, - bool shadows, -); - -@ffi.Native, EntityId)>( - symbol: 'remove_light', assetId: 'flutter_filament_plugin') -external void remove_light( - ffi.Pointer viewer, - int entityId, -); - -@ffi.Native)>( - symbol: 'clear_lights', assetId: 'flutter_filament_plugin') -external void clear_lights( - ffi.Pointer viewer, -); - -@ffi.Native< - EntityId Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>(symbol: 'load_glb', assetId: 'flutter_filament_plugin') -external int load_glb( - ffi.Pointer assetManager, - ffi.Pointer assetPath, - bool unlit, -); - -@ffi.Native< - EntityId Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( - symbol: 'load_gltf', assetId: 'flutter_filament_plugin') -external int load_gltf( - ffi.Pointer assetManager, - ffi.Pointer assetPath, - ffi.Pointer relativePath, -); - -@ffi.Native< - ffi.Bool Function( - ffi.Pointer, EntityId, ffi.Pointer)>( - symbol: 'set_camera', assetId: 'flutter_filament_plugin') -external bool set_camera( - ffi.Pointer viewer, - int asset, - ffi.Pointer nodeName, -); - -@ffi.Native, ffi.Bool)>( - symbol: 'set_view_frustum_culling', assetId: 'flutter_filament_plugin') -external void set_view_frustum_culling( - ffi.Pointer viewer, - bool enabled, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, - ffi.Uint64, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer buf, ffi.Size size, - ffi.Pointer data)>>, - ffi.Pointer)>( - symbol: 'render', assetId: 'flutter_filament_plugin') -external void render( - ffi.Pointer viewer, - int frameTimeInNanos, - ffi.Pointer pixelBuffer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer buf, ffi.Size size, - ffi.Pointer data)>> - callback, - ffi.Pointer data, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Uint32, ffi.Uint32)>( - symbol: 'create_swap_chain', assetId: 'flutter_filament_plugin') -external void create_swap_chain( - ffi.Pointer viewer, - ffi.Pointer window, - int width, - int height, -); - -@ffi.Native)>( - symbol: 'destroy_swap_chain', assetId: 'flutter_filament_plugin') -external void destroy_swap_chain( - ffi.Pointer viewer, -); - -@ffi.Native, ffi.Float)>( - symbol: 'set_frame_interval', assetId: 'flutter_filament_plugin') -external void set_frame_interval( - ffi.Pointer viewer, - double interval, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.Uint32, ffi.Uint32, ffi.Float)>( - symbol: 'update_viewport_and_camera_projection', - assetId: 'flutter_filament_plugin') -external void update_viewport_and_camera_projection( - ffi.Pointer viewer, - int width, - int height, - double scaleFactor, -); - -@ffi.Native)>( - symbol: 'scroll_begin', assetId: 'flutter_filament_plugin') -external void scroll_begin( - ffi.Pointer viewer, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, - ffi.Float)>(symbol: 'scroll_update', assetId: 'flutter_filament_plugin') -external void scroll_update( - ffi.Pointer viewer, - double x, - double y, - double z, -); - -@ffi.Native)>( - symbol: 'scroll_end', assetId: 'flutter_filament_plugin') -external void scroll_end( - ffi.Pointer viewer, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, - ffi.Bool)>(symbol: 'grab_begin', assetId: 'flutter_filament_plugin') -external void grab_begin( - ffi.Pointer viewer, - double x, - double y, - bool pan, -); - -@ffi.Native, ffi.Float, ffi.Float)>( - symbol: 'grab_update', assetId: 'flutter_filament_plugin') -external void grab_update( - ffi.Pointer viewer, - double x, - double y, -); - -@ffi.Native)>( - symbol: 'grab_end', assetId: 'flutter_filament_plugin') -external void grab_end( - ffi.Pointer viewer, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, - EntityId, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>(symbol: 'apply_weights', assetId: 'flutter_filament_plugin') -external void apply_weights( - ffi.Pointer assetManager, - int asset, - ffi.Pointer entityName, - ffi.Pointer weights, - int count, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, EntityId, - ffi.Pointer, ffi.Pointer, ffi.Int)>( - symbol: 'set_morph_target_weights', assetId: 'flutter_filament_plugin') -external void set_morph_target_weights( - ffi.Pointer assetManager, - int asset, - ffi.Pointer entityName, - ffi.Pointer morphData, - int numWeights, -); - -@ffi.Native< - ffi.Bool Function( - ffi.Pointer, - EntityId, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Float)>( - symbol: 'set_morph_animation', assetId: 'flutter_filament_plugin') -external bool set_morph_animation( - ffi.Pointer assetManager, - int asset, - ffi.Pointer entityName, - ffi.Pointer morphData, - ffi.Pointer morphIndices, - int numMorphTargets, - int numFrames, - double frameLengthInMs, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, - EntityId, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ffi.Int, - ffi.Float)>( - symbol: 'set_bone_animation', assetId: 'flutter_filament_plugin') -external void set_bone_animation( - ffi.Pointer assetManager, - int asset, - ffi.Pointer frameData, - int numFrames, - int numBones, - ffi.Pointer> boneNames, - ffi.Pointer> meshName, - int numMeshTargets, - double frameLengthInMs, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Bool, - ffi.Bool, ffi.Bool, ffi.Float)>( - symbol: 'play_animation', assetId: 'flutter_filament_plugin') -external void play_animation( - ffi.Pointer assetManager, - int asset, - int index, - bool loop, - bool reverse, - bool replaceActive, - double crossfade, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int)>( - symbol: 'set_animation_frame', assetId: 'flutter_filament_plugin') -external void set_animation_frame( - ffi.Pointer assetManager, - int asset, - int animationIndex, - int animationFrame, -); - -@ffi.Native, EntityId, ffi.Int)>( - symbol: 'stop_animation', assetId: 'flutter_filament_plugin') -external void stop_animation( - ffi.Pointer assetManager, - int asset, - int index, -); - -@ffi.Native, EntityId)>( - symbol: 'get_animation_count', assetId: 'flutter_filament_plugin') -external int get_animation_count( - ffi.Pointer assetManager, - int asset, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, EntityId, ffi.Pointer, ffi.Int)>( - symbol: 'get_animation_name', assetId: 'flutter_filament_plugin') -external void get_animation_name( - ffi.Pointer assetManager, - int asset, - ffi.Pointer outPtr, - int index, -); - -@ffi.Native, EntityId, ffi.Int)>( - symbol: 'get_animation_duration', assetId: 'flutter_filament_plugin') -external double get_animation_duration( - ffi.Pointer assetManager, - int asset, - int index, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, EntityId, - ffi.Pointer, ffi.Pointer, ffi.Int)>( - symbol: 'get_morph_target_name', assetId: 'flutter_filament_plugin') -external void get_morph_target_name( - ffi.Pointer assetManager, - int asset, - ffi.Pointer meshName, - ffi.Pointer outPtr, - int index, -); - -@ffi.Native< - ffi.Int Function( - ffi.Pointer, EntityId, ffi.Pointer)>( - symbol: 'get_morph_target_name_count', assetId: 'flutter_filament_plugin') -external int get_morph_target_name_count( - ffi.Pointer assetManager, - int asset, - ffi.Pointer meshName, -); - -@ffi.Native, EntityId)>( - symbol: 'remove_asset', assetId: 'flutter_filament_plugin') -external void remove_asset( - ffi.Pointer viewer, - int asset, -); - -@ffi.Native)>( - symbol: 'clear_assets', assetId: 'flutter_filament_plugin') -external void clear_assets( - ffi.Pointer viewer, -); - -@ffi.Native< - ffi.Bool Function( - ffi.Pointer, - EntityId, - ffi.Pointer, - ffi.Int, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float)>( - symbol: 'set_material_color', assetId: 'flutter_filament_plugin') -external bool set_material_color( - ffi.Pointer assetManager, - int asset, - ffi.Pointer meshName, - int materialIndex, - double r, - double g, - double b, - double a, -); - -@ffi.Native, EntityId)>( - symbol: 'transform_to_unit_cube', assetId: 'flutter_filament_plugin') -external void transform_to_unit_cube( - ffi.Pointer assetManager, - int asset, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, EntityId, ffi.Float, ffi.Float, - ffi.Float)>(symbol: 'set_position', assetId: 'flutter_filament_plugin') -external void set_position( - ffi.Pointer assetManager, - int asset, - double x, - double y, - double z, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, - EntityId, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float)>(symbol: 'set_rotation', assetId: 'flutter_filament_plugin') -external void set_rotation( - ffi.Pointer assetManager, - int asset, - double rads, - double x, - double y, - double z, -); - -@ffi.Native, EntityId, ffi.Float)>( - symbol: 'set_scale', assetId: 'flutter_filament_plugin') -external void set_scale( - ffi.Pointer assetManager, - int asset, - double scale, -); - -@ffi.Native, EntityId)>( - symbol: 'move_camera_to_asset', assetId: 'flutter_filament_plugin') -external void move_camera_to_asset( - ffi.Pointer viewer, - int asset, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.Float, ffi.Float, ffi.Float)>( - symbol: 'set_camera_exposure', assetId: 'flutter_filament_plugin') -external void set_camera_exposure( - ffi.Pointer viewer, - double aperture, - double shutterSpeed, - double sensitivity, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.Float, ffi.Float, ffi.Float)>( - symbol: 'set_camera_position', assetId: 'flutter_filament_plugin') -external void set_camera_position( - ffi.Pointer viewer, - double x, - double y, - double z, -); - -@ffi.Native)>( - symbol: 'get_camera_position', assetId: 'flutter_filament_plugin') -external void get_camera_position( - ffi.Pointer viewer, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.Float, ffi.Float, ffi.Float, ffi.Float)>( - symbol: 'set_camera_rotation', assetId: 'flutter_filament_plugin') -external void set_camera_rotation( - ffi.Pointer viewer, - double rads, - double x, - double y, - double z, -); - -@ffi.Native, ffi.Pointer)>( - symbol: 'set_camera_model_matrix', assetId: 'flutter_filament_plugin') -external void set_camera_model_matrix( - ffi.Pointer viewer, - ffi.Pointer matrix, -); - -@ffi.Native Function(ffi.Pointer)>( - symbol: 'get_camera_model_matrix', assetId: 'flutter_filament_plugin') -external ffi.Pointer get_camera_model_matrix( - ffi.Pointer viewer, -); - -@ffi.Native Function(ffi.Pointer)>( - symbol: 'get_camera_view_matrix', assetId: 'flutter_filament_plugin') -external ffi.Pointer get_camera_view_matrix( - ffi.Pointer viewer, -); - -@ffi.Native Function(ffi.Pointer)>( - symbol: 'get_camera_projection_matrix', assetId: 'flutter_filament_plugin') -external ffi.Pointer get_camera_projection_matrix( - ffi.Pointer viewer, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double, ffi.Double)>( - symbol: 'set_camera_projection_matrix', assetId: 'flutter_filament_plugin') -external void set_camera_projection_matrix( - ffi.Pointer viewer, - ffi.Pointer matrix, - double near, - double far, -); - -@ffi.Native, ffi.Double, ffi.Double)>( - symbol: 'set_camera_culling', assetId: 'flutter_filament_plugin') -external void set_camera_culling( - ffi.Pointer viewer, - double near, - double far, -); - -@ffi.Native Function(ffi.Pointer)>( - symbol: 'get_camera_culling_projection_matrix', - assetId: 'flutter_filament_plugin') -external ffi.Pointer get_camera_culling_projection_matrix( - ffi.Pointer viewer, -); - -@ffi.Native Function(ffi.Pointer)>( - symbol: 'get_camera_frustum', assetId: 'flutter_filament_plugin') -external ffi.Pointer get_camera_frustum( - ffi.Pointer viewer, -); - -@ffi.Native, ffi.Float)>( - symbol: 'set_camera_focal_length', assetId: 'flutter_filament_plugin') -external void set_camera_focal_length( - ffi.Pointer viewer, - double focalLength, -); - -@ffi.Native, ffi.Float)>( - symbol: 'set_camera_focus_distance', assetId: 'flutter_filament_plugin') -external void set_camera_focus_distance( - ffi.Pointer viewer, - double focusDistance, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, _ManipulatorMode, ffi.Double, - ffi.Double, ffi.Double)>( - symbol: 'set_camera_manipulator_options', - assetId: 'flutter_filament_plugin') -external void set_camera_manipulator_options( - ffi.Pointer viewer, - int mode, - double orbitSpeedX, - double orbitSpeedY, - double zoomSpeed, -); - -@ffi.Native< - ffi.Int Function( - ffi.Pointer, EntityId, ffi.Pointer)>( - symbol: 'hide_mesh', assetId: 'flutter_filament_plugin') -external int hide_mesh( - ffi.Pointer assetManager, - int asset, - ffi.Pointer meshName, -); - -@ffi.Native< - ffi.Int Function( - ffi.Pointer, EntityId, ffi.Pointer)>( - symbol: 'reveal_mesh', assetId: 'flutter_filament_plugin') -external int reveal_mesh( - ffi.Pointer assetManager, - int asset, - ffi.Pointer meshName, -); - -@ffi.Native, ffi.Bool)>( - symbol: 'set_post_processing', assetId: 'flutter_filament_plugin') -external void set_post_processing( - ffi.Pointer viewer, - bool enabled, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.Int, ffi.Int, ffi.Pointer)>( - symbol: 'pick', assetId: 'flutter_filament_plugin') -external void pick( - ffi.Pointer viewer, - int x, - int y, - ffi.Pointer entityId, -); - -@ffi.Native Function(ffi.Pointer, EntityId)>( - symbol: 'get_name_for_entity', assetId: 'flutter_filament_plugin') -external ffi.Pointer get_name_for_entity( - ffi.Pointer assetManager, - int entityId, -); - -@ffi.Native( - symbol: 'ios_dummy', assetId: 'flutter_filament_plugin') -external void ios_dummy(); - -@ffi.Native)>( - symbol: 'flutter_filament_free', assetId: 'flutter_filament_plugin') -external void flutter_filament_free( - ffi.Pointer ptr, -); - -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi - .Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer renderCallbackOwner)>>, - ffi.Pointer)>( - symbol: 'create_filament_viewer_ffi', assetId: 'flutter_filament_plugin') -external ffi.Pointer create_filament_viewer_ffi( - ffi.Pointer context, - ffi.Pointer platform, - ffi.Pointer uberArchivePath, - ffi.Pointer loader, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer renderCallbackOwner)>> - renderCallback, - ffi.Pointer renderCallbackOwner, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Uint32, ffi.Uint32)>( - symbol: 'create_swap_chain_ffi', assetId: 'flutter_filament_plugin') -external void create_swap_chain_ffi( - ffi.Pointer viewer, - ffi.Pointer surface, - int width, - int height, -); - -@ffi.Native)>( - symbol: 'destroy_swap_chain_ffi', assetId: 'flutter_filament_plugin') -external void destroy_swap_chain_ffi( - ffi.Pointer viewer, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.IntPtr, ffi.Uint32, ffi.Uint32)>( - symbol: 'create_render_target_ffi', assetId: 'flutter_filament_plugin') -external void create_render_target_ffi( - ffi.Pointer viewer, - int nativeTextureId, - int width, - int height, -); - -@ffi.Native)>( - symbol: 'destroy_filament_viewer_ffi', assetId: 'flutter_filament_plugin') -external void destroy_filament_viewer_ffi( - ffi.Pointer viewer, -); - -@ffi.Native)>( - symbol: 'render_ffi', assetId: 'flutter_filament_plugin') -external void render_ffi( - ffi.Pointer viewer, -); - -@ffi.Native( - symbol: 'make_render_callback_fn_pointer', - assetId: 'flutter_filament_plugin') -external FilamentRenderCallback make_render_callback_fn_pointer( - FilamentRenderCallback arg0, -); - -@ffi.Native, ffi.Bool)>( - symbol: 'set_rendering_ffi', assetId: 'flutter_filament_plugin') -external void set_rendering_ffi( - ffi.Pointer viewer, - bool rendering, -); - -@ffi.Native( - symbol: 'set_frame_interval_ffi', assetId: 'flutter_filament_plugin') -external void set_frame_interval_ffi( - double frameInterval, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.Uint32, ffi.Uint32, ffi.Float)>( - symbol: 'update_viewport_and_camera_projection_ffi', - assetId: 'flutter_filament_plugin') -external void update_viewport_and_camera_projection_ffi( - ffi.Pointer viewer, - int width, - int height, - double scaleFactor, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.Float, ffi.Float, ffi.Float, ffi.Float)>( - symbol: 'set_background_color_ffi', assetId: 'flutter_filament_plugin') -external void set_background_color_ffi( - ffi.Pointer viewer, - double r, - double g, - double b, - double a, -); - -@ffi.Native)>( - symbol: 'clear_background_image_ffi', assetId: 'flutter_filament_plugin') -external void clear_background_image_ffi( - ffi.Pointer viewer, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.Bool)>( - symbol: 'set_background_image_ffi', assetId: 'flutter_filament_plugin') -external void set_background_image_ffi( - ffi.Pointer viewer, - ffi.Pointer path, - bool fillHeight, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.Float, ffi.Float, ffi.Bool)>( - symbol: 'set_background_image_position_ffi', - assetId: 'flutter_filament_plugin') -external void set_background_image_position_ffi( - ffi.Pointer viewer, - double x, - double y, - bool clamp, -); - -@ffi.Native, ffi.Int)>( - symbol: 'set_tone_mapping_ffi', assetId: 'flutter_filament_plugin') -external void set_tone_mapping_ffi( - ffi.Pointer viewer, - int toneMapping, -); - -@ffi.Native, ffi.Float)>( - symbol: 'set_bloom_ffi', assetId: 'flutter_filament_plugin') -external void set_bloom_ffi( - ffi.Pointer viewer, - double strength, -); - -@ffi.Native, ffi.Pointer)>( - symbol: 'load_skybox_ffi', assetId: 'flutter_filament_plugin') -external void load_skybox_ffi( - ffi.Pointer viewer, - ffi.Pointer skyboxPath, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Float)>(symbol: 'load_ibl_ffi', assetId: 'flutter_filament_plugin') -external void load_ibl_ffi( - ffi.Pointer viewer, - ffi.Pointer iblPath, - double intensity, -); - -@ffi.Native)>( - symbol: 'remove_skybox_ffi', assetId: 'flutter_filament_plugin') -external void remove_skybox_ffi( - ffi.Pointer viewer, -); - -@ffi.Native)>( - symbol: 'remove_ibl_ffi', assetId: 'flutter_filament_plugin') -external void remove_ibl_ffi( - ffi.Pointer viewer, -); - -@ffi.Native< - EntityId Function( - ffi.Pointer, - ffi.Uint8, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Bool)>(symbol: 'add_light_ffi', assetId: 'flutter_filament_plugin') -external int add_light_ffi( - ffi.Pointer viewer, - int type, - double colour, - double intensity, - double posX, - double posY, - double posZ, - double dirX, - double dirY, - double dirZ, - bool shadows, -); - -@ffi.Native, EntityId)>( - symbol: 'remove_light_ffi', assetId: 'flutter_filament_plugin') -external void remove_light_ffi( - ffi.Pointer viewer, - int entityId, -); - -@ffi.Native)>( - symbol: 'clear_lights_ffi', assetId: 'flutter_filament_plugin') -external void clear_lights_ffi( - ffi.Pointer viewer, -); - -@ffi.Native< - EntityId Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>(symbol: 'load_glb_ffi', assetId: 'flutter_filament_plugin') -external int load_glb_ffi( - ffi.Pointer assetManager, - ffi.Pointer assetPath, - bool unlit, -); - -@ffi.Native< - EntityId Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( - symbol: 'load_gltf_ffi', assetId: 'flutter_filament_plugin') -external int load_gltf_ffi( - ffi.Pointer assetManager, - ffi.Pointer assetPath, - ffi.Pointer relativePath, -); - -@ffi.Native, EntityId)>( - symbol: 'remove_asset_ffi', assetId: 'flutter_filament_plugin') -external void remove_asset_ffi( - ffi.Pointer viewer, - int asset, -); - -@ffi.Native)>( - symbol: 'clear_assets_ffi', assetId: 'flutter_filament_plugin') -external void clear_assets_ffi( - ffi.Pointer viewer, -); - -@ffi.Native< - ffi.Bool Function( - ffi.Pointer, EntityId, ffi.Pointer)>( - symbol: 'set_camera_ffi', assetId: 'flutter_filament_plugin') -external bool set_camera_ffi( - ffi.Pointer viewer, - int asset, - ffi.Pointer nodeName, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, EntityId, - ffi.Pointer, ffi.Pointer, ffi.Int)>( - symbol: 'apply_weights_ffi', assetId: 'flutter_filament_plugin') -external void apply_weights_ffi( - ffi.Pointer assetManager, - int asset, - ffi.Pointer entityName, - ffi.Pointer weights, - int count, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, EntityId, - ffi.Pointer, ffi.Pointer, ffi.Int)>( - symbol: 'set_morph_target_weights_ffi', assetId: 'flutter_filament_plugin') -external void set_morph_target_weights_ffi( - ffi.Pointer assetManager, - int asset, - ffi.Pointer entityName, - ffi.Pointer morphData, - int numWeights, -); - -@ffi.Native< - ffi.Bool Function( - ffi.Pointer, - EntityId, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Float)>( - symbol: 'set_morph_animation_ffi', assetId: 'flutter_filament_plugin') -external bool set_morph_animation_ffi( - ffi.Pointer assetManager, - int asset, - ffi.Pointer entityName, - ffi.Pointer morphData, - ffi.Pointer morphIndices, - int numMorphTargets, - int numFrames, - double frameLengthInMs, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, - EntityId, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ffi.Int, - ffi.Float)>( - symbol: 'set_bone_animation_ffi', assetId: 'flutter_filament_plugin') -external void set_bone_animation_ffi( - ffi.Pointer assetManager, - int asset, - ffi.Pointer frameData, - int numFrames, - int numBones, - ffi.Pointer> boneNames, - ffi.Pointer> meshName, - int numMeshTargets, - double frameLengthInMs, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Bool, - ffi.Bool, ffi.Bool, ffi.Float)>( - symbol: 'play_animation_ffi', assetId: 'flutter_filament_plugin') -external void play_animation_ffi( - ffi.Pointer assetManager, - int asset, - int index, - bool loop, - bool reverse, - bool replaceActive, - double crossfade, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int)>( - symbol: 'set_animation_frame_ffi', assetId: 'flutter_filament_plugin') -external void set_animation_frame_ffi( - ffi.Pointer assetManager, - int asset, - int animationIndex, - int animationFrame, -); - -@ffi.Native, EntityId, ffi.Int)>( - symbol: 'stop_animation_ffi', assetId: 'flutter_filament_plugin') -external void stop_animation_ffi( - ffi.Pointer assetManager, - int asset, - int index, -); - -@ffi.Native, EntityId)>( - symbol: 'get_animation_count_ffi', assetId: 'flutter_filament_plugin') -external int get_animation_count_ffi( - ffi.Pointer assetManager, - int asset, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, EntityId, ffi.Pointer, ffi.Int)>( - symbol: 'get_animation_name_ffi', assetId: 'flutter_filament_plugin') -external void get_animation_name_ffi( - ffi.Pointer assetManager, - int asset, - ffi.Pointer outPtr, - int index, -); - -@ffi.Native< - ffi.Void Function(ffi.Pointer, EntityId, - ffi.Pointer, ffi.Pointer, ffi.Int)>( - symbol: 'get_morph_target_name_ffi', assetId: 'flutter_filament_plugin') -external void get_morph_target_name_ffi( - ffi.Pointer assetManager, - int asset, - ffi.Pointer meshName, - ffi.Pointer outPtr, - int index, -); - -@ffi.Native< - ffi.Int Function( - ffi.Pointer, EntityId, ffi.Pointer)>( - symbol: 'get_morph_target_name_count_ffi', - assetId: 'flutter_filament_plugin') -external int get_morph_target_name_count_ffi( - ffi.Pointer assetManager, - int asset, - ffi.Pointer meshName, -); - -@ffi.Native, ffi.Bool)>( - symbol: 'set_post_processing_ffi', assetId: 'flutter_filament_plugin') -external void set_post_processing_ffi( - ffi.Pointer viewer, - bool enabled, -); - -@ffi.Native< - ffi.Void Function( - ffi.Pointer, ffi.Int, ffi.Int, ffi.Pointer)>( - symbol: 'pick_ffi', assetId: 'flutter_filament_plugin') -external void pick_ffi( - ffi.Pointer viewer, - int x, - int y, - ffi.Pointer entityId, -); - -@ffi.Native( - symbol: 'ios_dummy_ffi', assetId: 'flutter_filament_plugin') -external void ios_dummy_ffi(); - -final class __mbstate_t extends ffi.Union { - @ffi.Array.multi([128]) - external ffi.Array __mbstate8; - - @ffi.LongLong() - external int _mbstateL; -} - -final class __darwin_pthread_handler_rec extends ffi.Struct { - external ffi - .Pointer)>> - __routine; - - external ffi.Pointer __arg; - - external ffi.Pointer<__darwin_pthread_handler_rec> __next; -} - -final class _opaque_pthread_attr_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([56]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_cond_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([40]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_condattr_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([8]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_mutex_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([56]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_mutexattr_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([8]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_once_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([8]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_rwlock_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([192]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_rwlockattr_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([16]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack; - - @ffi.Array.multi([8176]) - external ffi.Array __opaque; -} - -final class ResourceBuffer extends ffi.Struct { - external ffi.Pointer data; - - @ffi.Int32() - external int size; - - @ffi.Int32() - external int id; -} - -final class ResourceLoaderWrapper extends ffi.Struct { - external LoadFilamentResource mLoadFilamentResource; - - external FreeFilamentResource mFreeFilamentResource; - - external LoadFilamentResourceFromOwner mLoadFilamentResourceFromOwner; - - external FreeFilamentResourceFromOwner mFreeFilamentResourceFromOwner; - - external ffi.Pointer mOwner; -} - -typedef LoadFilamentResource = ffi.Pointer< - ffi.NativeFunction uri)>>; -typedef FreeFilamentResource - = ffi.Pointer>; -typedef LoadFilamentResourceFromOwner = ffi.Pointer< - ffi.NativeFunction< - ResourceBuffer Function(ffi.Pointer, ffi.Pointer)>>; -typedef FreeFilamentResourceFromOwner = ffi.Pointer< - ffi - .NativeFunction)>>; - -/// This header replicates most of the methods in FlutterFilamentApi.h, and is only intended to be used to generate client FFI bindings. -/// The intention is that calling one of these methods will call its respective method in FlutterFilamentApi.h, but wrapped in some kind of thread runner to ensure thread safety. -typedef EntityId = ffi.Int32; -typedef _ManipulatorMode = ffi.Int32; -typedef FilamentRenderCallback = ffi.Pointer< - ffi.NativeFunction owner)>>; - -const int __bool_true_false_are_defined = 1; - -const int true1 = 1; - -const int false1 = 0; - -const int __DARWIN_ONLY_64_BIT_INO_T = 1; - -const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; - -const int __DARWIN_ONLY_VERS_1050 = 1; - -const int __DARWIN_UNIX03 = 1; - -const int __DARWIN_64_BIT_INO_T = 1; - -const int __DARWIN_VERS_1050 = 1; - -const int __DARWIN_NON_CANCELABLE = 0; - -const String __DARWIN_SUF_EXTSN = '\$DARWIN_EXTSN'; - -const int __DARWIN_C_ANSI = 4096; - -const int __DARWIN_C_FULL = 900000; - -const int __DARWIN_C_LEVEL = 900000; - -const int __STDC_WANT_LIB_EXT1__ = 1; - -const int __DARWIN_NO_LONG_LONG = 0; - -const int _DARWIN_FEATURE_64_BIT_INODE = 1; - -const int _DARWIN_FEATURE_ONLY_64_BIT_INODE = 1; - -const int _DARWIN_FEATURE_ONLY_VERS_1050 = 1; - -const int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1; - -const int _DARWIN_FEATURE_UNIX_CONFORMANCE = 3; - -const int __has_ptrcheck = 0; - -const int __DARWIN_NULL = 0; - -const int __PTHREAD_SIZE__ = 8176; - -const int __PTHREAD_ATTR_SIZE__ = 56; - -const int __PTHREAD_MUTEXATTR_SIZE__ = 8; - -const int __PTHREAD_MUTEX_SIZE__ = 56; - -const int __PTHREAD_CONDATTR_SIZE__ = 8; - -const int __PTHREAD_COND_SIZE__ = 40; - -const int __PTHREAD_ONCE_SIZE__ = 8; - -const int __PTHREAD_RWLOCK_SIZE__ = 192; - -const int __PTHREAD_RWLOCKATTR_SIZE__ = 16; - -const int __DARWIN_WCHAR_MAX = 2147483647; - -const int __DARWIN_WCHAR_MIN = -2147483648; - -const int __DARWIN_WEOF = -1; - -const int _FORTIFY_SOURCE = 2; - -const int NULL = 0; - -const int USER_ADDR_NULL = 0; - -const int __WORDSIZE = 64; - -const int INT8_MAX = 127; - -const int INT16_MAX = 32767; - -const int INT32_MAX = 2147483647; - -const int INT64_MAX = 9223372036854775807; - -const int INT8_MIN = -128; - -const int INT16_MIN = -32768; - -const int INT32_MIN = -2147483648; - -const int INT64_MIN = -9223372036854775808; - -const int UINT8_MAX = 255; - -const int UINT16_MAX = 65535; - -const int UINT32_MAX = 4294967295; - -const int UINT64_MAX = -1; - -const int INT_LEAST8_MIN = -128; - -const int INT_LEAST16_MIN = -32768; - -const int INT_LEAST32_MIN = -2147483648; - -const int INT_LEAST64_MIN = -9223372036854775808; - -const int INT_LEAST8_MAX = 127; - -const int INT_LEAST16_MAX = 32767; - -const int INT_LEAST32_MAX = 2147483647; - -const int INT_LEAST64_MAX = 9223372036854775807; - -const int UINT_LEAST8_MAX = 255; - -const int UINT_LEAST16_MAX = 65535; - -const int UINT_LEAST32_MAX = 4294967295; - -const int UINT_LEAST64_MAX = -1; - -const int INT_FAST8_MIN = -128; - -const int INT_FAST16_MIN = -32768; - -const int INT_FAST32_MIN = -2147483648; - -const int INT_FAST64_MIN = -9223372036854775808; - -const int INT_FAST8_MAX = 127; - -const int INT_FAST16_MAX = 32767; - -const int INT_FAST32_MAX = 2147483647; - -const int INT_FAST64_MAX = 9223372036854775807; - -const int UINT_FAST8_MAX = 255; - -const int UINT_FAST16_MAX = 65535; - -const int UINT_FAST32_MAX = 4294967295; - -const int UINT_FAST64_MAX = -1; - -const int INTPTR_MAX = 9223372036854775807; - -const int INTPTR_MIN = -9223372036854775808; - -const int UINTPTR_MAX = -1; - -const int INTMAX_MAX = 9223372036854775807; - -const int UINTMAX_MAX = -1; - -const int INTMAX_MIN = -9223372036854775808; - -const int PTRDIFF_MIN = -9223372036854775808; - -const int PTRDIFF_MAX = 9223372036854775807; - -const int SIZE_MAX = -1; - -const int RSIZE_MAX = 9223372036854775807; - -const int WCHAR_MAX = 2147483647; - -const int WCHAR_MIN = -2147483648; - -const int WINT_MIN = -2147483648; - -const int WINT_MAX = 2147483647; - -const int SIG_ATOMIC_MIN = -2147483648; - -const int SIG_ATOMIC_MAX = 2147483647; diff --git a/lib/generated_bindings_web.dart b/lib/generated_bindings_web.dart deleted file mode 100644 index b6effd76..00000000 --- a/lib/generated_bindings_web.dart +++ /dev/null @@ -1,1573 +0,0 @@ -// // AUTO GENERATED FILE, DO NOT EDIT. -// // -// // Generated by `package:ffigen`. -// // ignore_for_file: type=lint -// import 'dart:ffi' as ffi; - -// class NativeLibrary { -// /// Holds the symbol lookup function. -// final ffi.Pointer Function(String symbolName) -// _lookup; - -// /// The symbols are looked up in [dynamicLibrary]. -// NativeLibrary(ffi.DynamicLibrary dynamicLibrary) -// : _lookup = dynamicLibrary.lookup; - -// /// The symbols are looked up with [lookup]. -// NativeLibrary.fromLookup( -// ffi.Pointer Function(String symbolName) -// lookup) -// : _lookup = lookup; - -// ffi.Pointer create_filament_viewer( -// ffi.Pointer context, -// ffi.Pointer loader, -// ) { -// return _create_filament_viewer( -// context, -// loader, -// ); -// } - -// late final _create_filament_viewerPtr = _lookup< -// ffi.NativeFunction< -// ffi.Pointer Function(ffi.Pointer, -// ffi.Pointer)>>('create_filament_viewer'); -// late final _create_filament_viewer = _create_filament_viewerPtr.asFunction< -// ffi.Pointer Function( -// ffi.Pointer, ffi.Pointer)>(); - -// ffi.Pointer make_resource_loader( -// LoadFilamentResourceFromOwner loadFn, -// FreeFilamentResourceFromOwner freeFn, -// ffi.Pointer owner, -// ) { -// return _make_resource_loader( -// loadFn, -// freeFn, -// owner, -// ); -// } - -// late final _make_resource_loaderPtr = _lookup< -// ffi.NativeFunction< -// ffi.Pointer Function( -// LoadFilamentResourceFromOwner, -// FreeFilamentResourceFromOwner, -// ffi.Pointer)>>('make_resource_loader'); -// late final _make_resource_loader = _make_resource_loaderPtr.asFunction< -// ffi.Pointer Function(LoadFilamentResourceFromOwner, -// FreeFilamentResourceFromOwner, ffi.Pointer)>(); - -// void destroy_filament_viewer( -// ffi.Pointer viewer, -// ) { -// return _destroy_filament_viewer( -// viewer, -// ); -// } - -// late final _destroy_filament_viewerPtr = -// _lookup)>>( -// 'destroy_filament_viewer'); -// late final _destroy_filament_viewer = _destroy_filament_viewerPtr -// .asFunction)>(); - -// ffi.Pointer get_asset_manager( -// ffi.Pointer viewer, -// ) { -// return _get_asset_manager( -// viewer, -// ); -// } - -// late final _get_asset_managerPtr = _lookup< -// ffi.NativeFunction< -// ffi.Pointer Function( -// ffi.Pointer)>>('get_asset_manager'); -// late final _get_asset_manager = _get_asset_managerPtr -// .asFunction Function(ffi.Pointer)>(); - -// void create_render_target( -// ffi.Pointer viewer, -// int textureId, -// int width, -// int height, -// ) { -// return _create_render_target( -// viewer, -// textureId, -// width, -// height, -// ); -// } - -// late final _create_render_targetPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, ffi.Uint32, ffi.Uint32, -// ffi.Uint32)>>('create_render_target'); -// late final _create_render_target = _create_render_targetPtr -// .asFunction, int, int, int)>(); - -// void clear_background_image( -// ffi.Pointer viewer, -// ) { -// return _clear_background_image( -// viewer, -// ); -// } - -// late final _clear_background_imagePtr = -// _lookup)>>( -// 'clear_background_image'); -// late final _clear_background_image = _clear_background_imagePtr -// .asFunction)>(); - -// void set_background_image( -// ffi.Pointer viewer, -// ffi.Pointer path, -// int fillHeight, -// ) { -// return _set_background_image( -// viewer, -// path, -// fillHeight, -// ); -// } - -// late final _set_background_imagePtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, ffi.Pointer, -// ffi.Int)>>('set_background_image'); -// late final _set_background_image = _set_background_imagePtr.asFunction< -// void Function(ffi.Pointer, ffi.Pointer, int)>(); - -// void set_background_image_position( -// ffi.Pointer viewer, -// double x, -// double y, -// int clamp, -// ) { -// return _set_background_image_position( -// viewer, -// x, -// y, -// clamp, -// ); -// } - -// late final _set_background_image_positionPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, -// ffi.Int)>>('set_background_image_position'); -// late final _set_background_image_position = _set_background_image_positionPtr -// .asFunction, double, double, int)>(); - -// void set_background_color( -// ffi.Pointer viewer, -// double r, -// double g, -// double b, -// double a, -// ) { -// return _set_background_color( -// viewer, -// r, -// g, -// b, -// a, -// ); -// } - -// late final _set_background_colorPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, -// ffi.Float, ffi.Float)>>('set_background_color'); -// late final _set_background_color = _set_background_colorPtr.asFunction< -// void Function(ffi.Pointer, double, double, double, double)>(); - -// void set_tone_mapping( -// ffi.Pointer viewer, -// int toneMapping, -// ) { -// return _set_tone_mapping( -// viewer, -// toneMapping, -// ); -// } - -// late final _set_tone_mappingPtr = _lookup< -// ffi -// .NativeFunction, ffi.Int)>>( -// 'set_tone_mapping'); -// late final _set_tone_mapping = _set_tone_mappingPtr -// .asFunction, int)>(); - -// void set_bloom( -// ffi.Pointer viewer, -// double strength, -// ) { -// return _set_bloom( -// viewer, -// strength, -// ); -// } - -// late final _set_bloomPtr = _lookup< -// ffi -// .NativeFunction, ffi.Float)>>( -// 'set_bloom'); -// late final _set_bloom = -// _set_bloomPtr.asFunction, double)>(); - -// void load_skybox( -// ffi.Pointer viewer, -// ffi.Pointer skyboxPath, -// ) { -// return _load_skybox( -// viewer, -// skyboxPath, -// ); -// } - -// late final _load_skyboxPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function( -// ffi.Pointer, ffi.Pointer)>>('load_skybox'); -// late final _load_skybox = _load_skyboxPtr.asFunction< -// void Function(ffi.Pointer, ffi.Pointer)>(); - -// void load_ibl( -// ffi.Pointer viewer, -// ffi.Pointer iblPath, -// double intensity, -// ) { -// return _load_ibl( -// viewer, -// iblPath, -// intensity, -// ); -// } - -// late final _load_iblPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, ffi.Pointer, -// ffi.Float)>>('load_ibl'); -// late final _load_ibl = _load_iblPtr.asFunction< -// void Function(ffi.Pointer, ffi.Pointer, double)>(); - -// void remove_skybox( -// ffi.Pointer viewer, -// ) { -// return _remove_skybox( -// viewer, -// ); -// } - -// late final _remove_skyboxPtr = -// _lookup)>>( -// 'remove_skybox'); -// late final _remove_skybox = -// _remove_skyboxPtr.asFunction)>(); - -// void remove_ibl( -// ffi.Pointer viewer, -// ) { -// return _remove_ibl( -// viewer, -// ); -// } - -// late final _remove_iblPtr = -// _lookup)>>( -// 'remove_ibl'); -// late final _remove_ibl = -// _remove_iblPtr.asFunction)>(); - -// int add_light( -// ffi.Pointer viewer, -// int type, -// double colour, -// double intensity, -// double posX, -// double posY, -// double posZ, -// double dirX, -// double dirY, -// double dirZ, -// int shadows, -// ) { -// return _add_light( -// viewer, -// type, -// colour, -// intensity, -// posX, -// posY, -// posZ, -// dirX, -// dirY, -// dirZ, -// shadows, -// ); -// } - -// late final _add_lightPtr = _lookup< -// ffi.NativeFunction< -// EntityId Function( -// ffi.Pointer, -// ffi.Uint8, -// ffi.Float, -// ffi.Float, -// ffi.Float, -// ffi.Float, -// ffi.Float, -// ffi.Float, -// ffi.Float, -// ffi.Float, -// ffi.Int)>>('add_light'); -// late final _add_light = _add_lightPtr.asFunction< -// int Function(ffi.Pointer, int, double, double, double, double, -// double, double, double, double, int)>(); - -// void remove_light( -// ffi.Pointer viewer, -// int entityId, -// ) { -// return _remove_light( -// viewer, -// entityId, -// ); -// } - -// late final _remove_lightPtr = _lookup< -// ffi -// .NativeFunction, EntityId)>>( -// 'remove_light'); -// late final _remove_light = -// _remove_lightPtr.asFunction, int)>(); - -// void clear_lights( -// ffi.Pointer viewer, -// ) { -// return _clear_lights( -// viewer, -// ); -// } - -// late final _clear_lightsPtr = -// _lookup)>>( -// 'clear_lights'); -// late final _clear_lights = -// _clear_lightsPtr.asFunction)>(); - -// int load_glb( -// ffi.Pointer assetManager, -// ffi.Pointer assetPath, -// int unlit, -// ) { -// return _load_glb( -// assetManager, -// assetPath, -// unlit, -// ); -// } - -// late final _load_glbPtr = _lookup< -// ffi.NativeFunction< -// EntityId Function(ffi.Pointer, ffi.Pointer, -// ffi.Int)>>('load_glb'); -// late final _load_glb = _load_glbPtr.asFunction< -// int Function(ffi.Pointer, ffi.Pointer, int)>(); - -// int load_gltf( -// ffi.Pointer assetManager, -// ffi.Pointer assetPath, -// ffi.Pointer relativePath, -// ) { -// return _load_gltf( -// assetManager, -// assetPath, -// relativePath, -// ); -// } - -// late final _load_gltfPtr = _lookup< -// ffi.NativeFunction< -// EntityId Function(ffi.Pointer, ffi.Pointer, -// ffi.Pointer)>>('load_gltf'); -// late final _load_gltf = _load_gltfPtr.asFunction< -// int Function(ffi.Pointer, ffi.Pointer, -// ffi.Pointer)>(); - -// int set_camera( -// ffi.Pointer viewer, -// int asset, -// ffi.Pointer nodeName, -// ) { -// return _set_camera( -// viewer, -// asset, -// nodeName, -// ); -// } - -// late final _set_cameraPtr = _lookup< -// ffi.NativeFunction< -// ffi.Int Function(ffi.Pointer, EntityId, -// ffi.Pointer)>>('set_camera'); -// late final _set_camera = _set_cameraPtr.asFunction< -// int Function(ffi.Pointer, int, ffi.Pointer)>(); - -// void render( -// ffi.Pointer viewer, -// int frameTimeInNanos, -// ) { -// return _render( -// viewer, -// frameTimeInNanos, -// ); -// } - -// late final _renderPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, ffi.Uint64)>>('render'); -// late final _render = -// _renderPtr.asFunction, int)>(); - -// void create_swap_chain( -// ffi.Pointer viewer, -// ffi.Pointer surface, -// int width, -// int height, -// ) { -// return _create_swap_chain( -// viewer, -// surface, -// width, -// height, -// ); -// } - -// late final _create_swap_chainPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, ffi.Pointer, -// ffi.Uint32, ffi.Uint32)>>('create_swap_chain'); -// late final _create_swap_chain = _create_swap_chainPtr.asFunction< -// void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - -// void destroy_swap_chain( -// ffi.Pointer viewer, -// ) { -// return _destroy_swap_chain( -// viewer, -// ); -// } - -// late final _destroy_swap_chainPtr = -// _lookup)>>( -// 'destroy_swap_chain'); -// late final _destroy_swap_chain = -// _destroy_swap_chainPtr.asFunction)>(); - -// void set_frame_interval( -// ffi.Pointer viewer, -// double interval, -// ) { -// return _set_frame_interval( -// viewer, -// interval, -// ); -// } - -// late final _set_frame_intervalPtr = _lookup< -// ffi -// .NativeFunction, ffi.Float)>>( -// 'set_frame_interval'); -// late final _set_frame_interval = _set_frame_intervalPtr -// .asFunction, double)>(); - -// void update_viewport_and_camera_projection( -// ffi.Pointer viewer, -// int width, -// int height, -// double scaleFactor, -// ) { -// return _update_viewport_and_camera_projection( -// viewer, -// width, -// height, -// scaleFactor, -// ); -// } - -// late final _update_viewport_and_camera_projectionPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, ffi.Uint32, ffi.Uint32, -// ffi.Float)>>('update_viewport_and_camera_projection'); -// late final _update_viewport_and_camera_projection = -// _update_viewport_and_camera_projectionPtr -// .asFunction, int, int, double)>(); - -// void scroll_begin( -// ffi.Pointer viewer, -// ) { -// return _scroll_begin( -// viewer, -// ); -// } - -// late final _scroll_beginPtr = -// _lookup)>>( -// 'scroll_begin'); -// late final _scroll_begin = -// _scroll_beginPtr.asFunction)>(); - -// void scroll_update( -// ffi.Pointer viewer, -// double x, -// double y, -// double z, -// ) { -// return _scroll_update( -// viewer, -// x, -// y, -// z, -// ); -// } - -// late final _scroll_updatePtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, -// ffi.Float)>>('scroll_update'); -// late final _scroll_update = _scroll_updatePtr.asFunction< -// void Function(ffi.Pointer, double, double, double)>(); - -// void scroll_end( -// ffi.Pointer viewer, -// ) { -// return _scroll_end( -// viewer, -// ); -// } - -// late final _scroll_endPtr = -// _lookup)>>( -// 'scroll_end'); -// late final _scroll_end = -// _scroll_endPtr.asFunction)>(); - -// void grab_begin( -// ffi.Pointer viewer, -// double x, -// double y, -// int pan, -// ) { -// return _grab_begin( -// viewer, -// x, -// y, -// pan, -// ); -// } - -// late final _grab_beginPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, -// ffi.Int)>>('grab_begin'); -// late final _grab_begin = _grab_beginPtr -// .asFunction, double, double, int)>(); - -// void grab_update( -// ffi.Pointer viewer, -// double x, -// double y, -// ) { -// return _grab_update( -// viewer, -// x, -// y, -// ); -// } - -// late final _grab_updatePtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function( -// ffi.Pointer, ffi.Float, ffi.Float)>>('grab_update'); -// late final _grab_update = _grab_updatePtr -// .asFunction, double, double)>(); - -// void grab_end( -// ffi.Pointer viewer, -// ) { -// return _grab_end( -// viewer, -// ); -// } - -// late final _grab_endPtr = -// _lookup)>>( -// 'grab_end'); -// late final _grab_end = -// _grab_endPtr.asFunction)>(); - -// void apply_weights( -// ffi.Pointer assetManager, -// int asset, -// ffi.Pointer entityName, -// ffi.Pointer weights, -// int count, -// ) { -// return _apply_weights( -// assetManager, -// asset, -// entityName, -// weights, -// count, -// ); -// } - -// late final _apply_weightsPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function( -// ffi.Pointer, -// EntityId, -// ffi.Pointer, -// ffi.Pointer, -// ffi.Int)>>('apply_weights'); -// late final _apply_weights = _apply_weightsPtr.asFunction< -// void Function(ffi.Pointer, int, ffi.Pointer, -// ffi.Pointer, int)>(); - -// void set_morph_target_weights( -// ffi.Pointer assetManager, -// int asset, -// ffi.Pointer entityName, -// ffi.Pointer morphData, -// int numWeights, -// ) { -// return _set_morph_target_weights( -// assetManager, -// asset, -// entityName, -// morphData, -// numWeights, -// ); -// } - -// late final _set_morph_target_weightsPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function( -// ffi.Pointer, -// EntityId, -// ffi.Pointer, -// ffi.Pointer, -// ffi.Int)>>('set_morph_target_weights'); -// late final _set_morph_target_weights = -// _set_morph_target_weightsPtr.asFunction< -// void Function(ffi.Pointer, int, ffi.Pointer, -// ffi.Pointer, int)>(); - -// int set_morph_animation( -// ffi.Pointer assetManager, -// int asset, -// ffi.Pointer entityName, -// ffi.Pointer morphData, -// ffi.Pointer morphIndices, -// int numMorphTargets, -// int numFrames, -// double frameLengthInMs, -// ) { -// return _set_morph_animation( -// assetManager, -// asset, -// entityName, -// morphData, -// morphIndices, -// numMorphTargets, -// numFrames, -// frameLengthInMs, -// ); -// } - -// late final _set_morph_animationPtr = _lookup< -// ffi.NativeFunction< -// ffi.Int Function( -// ffi.Pointer, -// EntityId, -// ffi.Pointer, -// ffi.Pointer, -// ffi.Pointer, -// ffi.Int, -// ffi.Int, -// ffi.Float)>>('set_morph_animation'); -// late final _set_morph_animation = _set_morph_animationPtr.asFunction< -// int Function(ffi.Pointer, int, ffi.Pointer, -// ffi.Pointer, ffi.Pointer, int, int, double)>(); - -// void set_bone_animation( -// ffi.Pointer assetManager, -// int asset, -// ffi.Pointer frameData, -// int numFrames, -// int numBones, -// ffi.Pointer> boneNames, -// ffi.Pointer> meshName, -// int numMeshTargets, -// double frameLengthInMs, -// ) { -// return _set_bone_animation( -// assetManager, -// asset, -// frameData, -// numFrames, -// numBones, -// boneNames, -// meshName, -// numMeshTargets, -// frameLengthInMs, -// ); -// } - -// late final _set_bone_animationPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function( -// ffi.Pointer, -// EntityId, -// ffi.Pointer, -// ffi.Int, -// ffi.Int, -// ffi.Pointer>, -// ffi.Pointer>, -// ffi.Int, -// ffi.Float)>>('set_bone_animation'); -// late final _set_bone_animation = _set_bone_animationPtr.asFunction< -// void Function( -// ffi.Pointer, -// int, -// ffi.Pointer, -// int, -// int, -// ffi.Pointer>, -// ffi.Pointer>, -// int, -// double)>(); - -// void play_animation( -// ffi.Pointer assetManager, -// int asset, -// int index, -// int loop, -// int reverse, -// int replaceActive, -// double crossfade, -// ) { -// return _play_animation( -// assetManager, -// asset, -// index, -// loop, -// reverse, -// replaceActive, -// crossfade, -// ); -// } - -// late final _play_animationPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int, -// ffi.Int, ffi.Int, ffi.Float)>>('play_animation'); -// late final _play_animation = _play_animationPtr.asFunction< -// void Function(ffi.Pointer, int, int, int, int, int, double)>(); - -// void set_animation_frame( -// ffi.Pointer assetManager, -// int asset, -// int animationIndex, -// int animationFrame, -// ) { -// return _set_animation_frame( -// assetManager, -// asset, -// animationIndex, -// animationFrame, -// ); -// } - -// late final _set_animation_framePtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, -// ffi.Int)>>('set_animation_frame'); -// late final _set_animation_frame = _set_animation_framePtr -// .asFunction, int, int, int)>(); - -// void stop_animation( -// ffi.Pointer assetManager, -// int asset, -// int index, -// ) { -// return _stop_animation( -// assetManager, -// asset, -// index, -// ); -// } - -// late final _stop_animationPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function( -// ffi.Pointer, EntityId, ffi.Int)>>('stop_animation'); -// late final _stop_animation = _stop_animationPtr -// .asFunction, int, int)>(); - -// int get_animation_count( -// ffi.Pointer assetManager, -// int asset, -// ) { -// return _get_animation_count( -// assetManager, -// asset, -// ); -// } - -// late final _get_animation_countPtr = _lookup< -// ffi -// .NativeFunction, EntityId)>>( -// 'get_animation_count'); -// late final _get_animation_count = _get_animation_countPtr -// .asFunction, int)>(); - -// void get_animation_name( -// ffi.Pointer assetManager, -// int asset, -// ffi.Pointer outPtr, -// int index, -// ) { -// return _get_animation_name( -// assetManager, -// asset, -// outPtr, -// index, -// ); -// } - -// late final _get_animation_namePtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, EntityId, -// ffi.Pointer, ffi.Int)>>('get_animation_name'); -// late final _get_animation_name = _get_animation_namePtr.asFunction< -// void Function(ffi.Pointer, int, ffi.Pointer, int)>(); - -// double get_animation_duration( -// ffi.Pointer assetManager, -// int asset, -// int index, -// ) { -// return _get_animation_duration( -// assetManager, -// asset, -// index, -// ); -// } - -// late final _get_animation_durationPtr = _lookup< -// ffi.NativeFunction< -// ffi.Float Function(ffi.Pointer, EntityId, -// ffi.Int)>>('get_animation_duration'); -// late final _get_animation_duration = _get_animation_durationPtr -// .asFunction, int, int)>(); - -// void get_morph_target_name( -// ffi.Pointer assetManager, -// int asset, -// ffi.Pointer meshName, -// ffi.Pointer outPtr, -// int index, -// ) { -// return _get_morph_target_name( -// assetManager, -// asset, -// meshName, -// outPtr, -// index, -// ); -// } - -// late final _get_morph_target_namePtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function( -// ffi.Pointer, -// EntityId, -// ffi.Pointer, -// ffi.Pointer, -// ffi.Int)>>('get_morph_target_name'); -// late final _get_morph_target_name = _get_morph_target_namePtr.asFunction< -// void Function(ffi.Pointer, int, ffi.Pointer, -// ffi.Pointer, int)>(); - -// int get_morph_target_name_count( -// ffi.Pointer assetManager, -// int asset, -// ffi.Pointer meshName, -// ) { -// return _get_morph_target_name_count( -// assetManager, -// asset, -// meshName, -// ); -// } - -// late final _get_morph_target_name_countPtr = _lookup< -// ffi.NativeFunction< -// ffi.Int Function(ffi.Pointer, EntityId, -// ffi.Pointer)>>('get_morph_target_name_count'); -// late final _get_morph_target_name_count = -// _get_morph_target_name_countPtr.asFunction< -// int Function(ffi.Pointer, int, ffi.Pointer)>(); - -// void remove_asset( -// ffi.Pointer viewer, -// int asset, -// ) { -// return _remove_asset( -// viewer, -// asset, -// ); -// } - -// late final _remove_assetPtr = _lookup< -// ffi -// .NativeFunction, EntityId)>>( -// 'remove_asset'); -// late final _remove_asset = -// _remove_assetPtr.asFunction, int)>(); - -// void clear_assets( -// ffi.Pointer viewer, -// ) { -// return _clear_assets( -// viewer, -// ); -// } - -// late final _clear_assetsPtr = -// _lookup)>>( -// 'clear_assets'); -// late final _clear_assets = -// _clear_assetsPtr.asFunction)>(); - -// void load_texture( -// ffi.Pointer assetManager, -// int asset, -// ffi.Pointer assetPath, -// int renderableIndex, -// ) { -// return _load_texture( -// assetManager, -// asset, -// assetPath, -// renderableIndex, -// ); -// } - -// late final _load_texturePtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, EntityId, -// ffi.Pointer, ffi.Int)>>('load_texture'); -// late final _load_texture = _load_texturePtr.asFunction< -// void Function(ffi.Pointer, int, ffi.Pointer, int)>(); - -// void set_texture( -// ffi.Pointer assetManager, -// int asset, -// ) { -// return _set_texture( -// assetManager, -// asset, -// ); -// } - -// late final _set_texturePtr = _lookup< -// ffi -// .NativeFunction, EntityId)>>( -// 'set_texture'); -// late final _set_texture = -// _set_texturePtr.asFunction, int)>(); - -// int set_material_color( -// ffi.Pointer assetManager, -// int asset, -// ffi.Pointer meshName, -// int materialIndex, -// double r, -// double g, -// double b, -// double a, -// ) { -// return _set_material_color( -// assetManager, -// asset, -// meshName, -// materialIndex, -// r, -// g, -// b, -// a, -// ); -// } - -// late final _set_material_colorPtr = _lookup< -// ffi.NativeFunction< -// ffi.Int Function( -// ffi.Pointer, -// EntityId, -// ffi.Pointer, -// ffi.Int, -// ffi.Float, -// ffi.Float, -// ffi.Float, -// ffi.Float)>>('set_material_color'); -// late final _set_material_color = _set_material_colorPtr.asFunction< -// int Function(ffi.Pointer, int, ffi.Pointer, int, -// double, double, double, double)>(); - -// void transform_to_unit_cube( -// ffi.Pointer assetManager, -// int asset, -// ) { -// return _transform_to_unit_cube( -// assetManager, -// asset, -// ); -// } - -// late final _transform_to_unit_cubePtr = _lookup< -// ffi -// .NativeFunction, EntityId)>>( -// 'transform_to_unit_cube'); -// late final _transform_to_unit_cube = _transform_to_unit_cubePtr -// .asFunction, int)>(); - -// void set_position( -// ffi.Pointer assetManager, -// int asset, -// double x, -// double y, -// double z, -// ) { -// return _set_position( -// assetManager, -// asset, -// x, -// y, -// z, -// ); -// } - -// late final _set_positionPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, EntityId, ffi.Float, -// ffi.Float, ffi.Float)>>('set_position'); -// late final _set_position = _set_positionPtr.asFunction< -// void Function(ffi.Pointer, int, double, double, double)>(); - -// void set_rotation( -// ffi.Pointer assetManager, -// int asset, -// double rads, -// double x, -// double y, -// double z, -// ) { -// return _set_rotation( -// assetManager, -// asset, -// rads, -// x, -// y, -// z, -// ); -// } - -// late final _set_rotationPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, EntityId, ffi.Float, -// ffi.Float, ffi.Float, ffi.Float)>>('set_rotation'); -// late final _set_rotation = _set_rotationPtr.asFunction< -// void Function( -// ffi.Pointer, int, double, double, double, double)>(); - -// void set_scale( -// ffi.Pointer assetManager, -// int asset, -// double scale, -// ) { -// return _set_scale( -// assetManager, -// asset, -// scale, -// ); -// } - -// late final _set_scalePtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function( -// ffi.Pointer, EntityId, ffi.Float)>>('set_scale'); -// late final _set_scale = _set_scalePtr -// .asFunction, int, double)>(); - -// void set_camera_exposure( -// ffi.Pointer viewer, -// double aperture, -// double shutterSpeed, -// double sensitivity, -// ) { -// return _set_camera_exposure( -// viewer, -// aperture, -// shutterSpeed, -// sensitivity, -// ); -// } - -// late final _set_camera_exposurePtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, -// ffi.Float)>>('set_camera_exposure'); -// late final _set_camera_exposure = _set_camera_exposurePtr.asFunction< -// void Function(ffi.Pointer, double, double, double)>(); - -// void set_camera_position( -// ffi.Pointer viewer, -// double x, -// double y, -// double z, -// ) { -// return _set_camera_position( -// viewer, -// x, -// y, -// z, -// ); -// } - -// late final _set_camera_positionPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, -// ffi.Float)>>('set_camera_position'); -// late final _set_camera_position = _set_camera_positionPtr.asFunction< -// void Function(ffi.Pointer, double, double, double)>(); - -// void set_camera_rotation( -// ffi.Pointer viewer, -// double rads, -// double x, -// double y, -// double z, -// ) { -// return _set_camera_rotation( -// viewer, -// rads, -// x, -// y, -// z, -// ); -// } - -// late final _set_camera_rotationPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, -// ffi.Float, ffi.Float)>>('set_camera_rotation'); -// late final _set_camera_rotation = _set_camera_rotationPtr.asFunction< -// void Function(ffi.Pointer, double, double, double, double)>(); - -// void set_camera_model_matrix( -// ffi.Pointer viewer, -// ffi.Pointer matrix, -// ) { -// return _set_camera_model_matrix( -// viewer, -// matrix, -// ); -// } - -// late final _set_camera_model_matrixPtr = _lookup< -// ffi.NativeFunction< -// ffi.Void Function(ffi.Pointer, -// ffi.Pointer)>>('set_camera_model_matrix'); -// late final _set_camera_model_matrix = _set_camera_model_matrixPtr.asFunction< -// void Function(ffi.Pointer, ffi.Pointer)>(); - -// void set_camera_focal_length( -// ffi.Pointer viewer, -// double focalLength, -// ) { -// return _set_camera_focal_length( -// viewer, -// focalLength, -// ); -// } - -// late final _set_camera_focal_lengthPtr = _lookup< -// ffi -// .NativeFunction, ffi.Float)>>( -// 'set_camera_focal_length'); -// late final _set_camera_focal_length = _set_camera_focal_lengthPtr -// .asFunction, double)>(); - -// void set_camera_focus_distance( -// ffi.Pointer viewer, -// double focusDistance, -// ) { -// return _set_camera_focus_distance( -// viewer, -// focusDistance, -// ); -// } - -// late final _set_camera_focus_distancePtr = _lookup< -// ffi -// .NativeFunction, ffi.Float)>>( -// 'set_camera_focus_distance'); -// late final _set_camera_focus_distance = _set_camera_focus_distancePtr -// .asFunction, double)>(); - -// int hide_mesh( -// ffi.Pointer assetManager, -// int asset, -// ffi.Pointer meshName, -// ) { -// return _hide_mesh( -// assetManager, -// asset, -// meshName, -// ); -// } - -// late final _hide_meshPtr = _lookup< -// ffi.NativeFunction< -// ffi.Int Function(ffi.Pointer, EntityId, -// ffi.Pointer)>>('hide_mesh'); -// late final _hide_mesh = _hide_meshPtr.asFunction< -// int Function(ffi.Pointer, int, ffi.Pointer)>(); - -// int reveal_mesh( -// ffi.Pointer assetManager, -// int asset, -// ffi.Pointer meshName, -// ) { -// return _reveal_mesh( -// assetManager, -// asset, -// meshName, -// ); -// } - -// late final _reveal_meshPtr = _lookup< -// ffi.NativeFunction< -// ffi.Int Function(ffi.Pointer, EntityId, -// ffi.Pointer)>>('reveal_mesh'); -// late final _reveal_mesh = _reveal_meshPtr.asFunction< -// int Function(ffi.Pointer, int, ffi.Pointer)>(); - -// void ios_dummy() { -// return _ios_dummy(); -// } - -// late final _ios_dummyPtr = -// _lookup>('ios_dummy'); -// late final _ios_dummy = _ios_dummyPtr.asFunction(); -// } - -// class __mbstate_t extends ffi.Union { -// @ffi.Array.multi([128]) -// external ffi.Array __mbstate8; - -// @ffi.LongLong() -// external int _mbstateL; -// } - -// class __darwin_pthread_handler_rec extends ffi.Struct { -// external ffi -// .Pointer)>> -// __routine; - -// external ffi.Pointer __arg; - -// external ffi.Pointer<__darwin_pthread_handler_rec> __next; -// } - -// class _opaque_pthread_attr_t extends ffi.Struct { -// @ffi.Long() -// external int __sig; - -// @ffi.Array.multi([56]) -// external ffi.Array __opaque; -// } - -// class _opaque_pthread_cond_t extends ffi.Struct { -// @ffi.Long() -// external int __sig; - -// @ffi.Array.multi([40]) -// external ffi.Array __opaque; -// } - -// class _opaque_pthread_condattr_t extends ffi.Struct { -// @ffi.Long() -// external int __sig; - -// @ffi.Array.multi([8]) -// external ffi.Array __opaque; -// } - -// class _opaque_pthread_mutex_t extends ffi.Struct { -// @ffi.Long() -// external int __sig; - -// @ffi.Array.multi([56]) -// external ffi.Array __opaque; -// } - -// class _opaque_pthread_mutexattr_t extends ffi.Struct { -// @ffi.Long() -// external int __sig; - -// @ffi.Array.multi([8]) -// external ffi.Array __opaque; -// } - -// class _opaque_pthread_once_t extends ffi.Struct { -// @ffi.Long() -// external int __sig; - -// @ffi.Array.multi([8]) -// external ffi.Array __opaque; -// } - -// class _opaque_pthread_rwlock_t extends ffi.Struct { -// @ffi.Long() -// external int __sig; - -// @ffi.Array.multi([192]) -// external ffi.Array __opaque; -// } - -// class _opaque_pthread_rwlockattr_t extends ffi.Struct { -// @ffi.Long() -// external int __sig; - -// @ffi.Array.multi([16]) -// external ffi.Array __opaque; -// } - -// class _opaque_pthread_t extends ffi.Struct { -// @ffi.Long() -// external int __sig; - -// external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack; - -// @ffi.Array.multi([8176]) -// external ffi.Array __opaque; -// } - -// class ResourceBuffer extends ffi.Struct { -// external ffi.Pointer data; - -// @ffi.Uint32() -// external int size; - -// @ffi.Uint32() -// external int id; -// } - -// class ResourceLoaderWrapper extends ffi.Struct { -// external LoadResource mLoadResource; - -// external FreeResource mFreeResource; - -// external LoadFilamentResourceFromOwner mLoadFilamentResourceFromOwner; - -// external FreeFilamentResourceFromOwner mFreeFilamentResourceFromOwner; - -// external ffi.Pointer mOwner; -// } - -// typedef LoadResource = ffi.Pointer< -// ffi.NativeFunction uri)>>; -// typedef FreeResource -// = ffi.Pointer>; -// typedef LoadFilamentResourceFromOwner = ffi.Pointer< -// ffi.NativeFunction< -// ResourceBuffer Function(ffi.Pointer, ffi.Pointer)>>; -// typedef FreeFilamentResourceFromOwner = ffi.Pointer< -// ffi -// .NativeFunction)>>; -// typedef EntityId = ffi.Int32; - -// const int __WORDSIZE = 64; - -// const int __DARWIN_ONLY_64_BIT_INO_T = 1; - -// const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; - -// const int __DARWIN_ONLY_VERS_1050 = 1; - -// const int __DARWIN_UNIX03 = 1; - -// const int __DARWIN_64_BIT_INO_T = 1; - -// const int __DARWIN_VERS_1050 = 1; - -// const int __DARWIN_NON_CANCELABLE = 0; - -// const String __DARWIN_SUF_EXTSN = '\$DARWIN_EXTSN'; - -// const int __DARWIN_C_ANSI = 4096; - -// const int __DARWIN_C_FULL = 900000; - -// const int __DARWIN_C_LEVEL = 900000; - -// const int __STDC_WANT_LIB_EXT1__ = 1; - -// const int __DARWIN_NO_LONG_LONG = 0; - -// const int _DARWIN_FEATURE_64_BIT_INODE = 1; - -// const int _DARWIN_FEATURE_ONLY_64_BIT_INODE = 1; - -// const int _DARWIN_FEATURE_ONLY_VERS_1050 = 1; - -// const int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1; - -// const int _DARWIN_FEATURE_UNIX_CONFORMANCE = 3; - -// const int __has_ptrcheck = 0; - -// const int __DARWIN_NULL = 0; - -// const int __PTHREAD_SIZE__ = 8176; - -// const int __PTHREAD_ATTR_SIZE__ = 56; - -// const int __PTHREAD_MUTEXATTR_SIZE__ = 8; - -// const int __PTHREAD_MUTEX_SIZE__ = 56; - -// const int __PTHREAD_CONDATTR_SIZE__ = 8; - -// const int __PTHREAD_COND_SIZE__ = 40; - -// const int __PTHREAD_ONCE_SIZE__ = 8; - -// const int __PTHREAD_RWLOCK_SIZE__ = 192; - -// const int __PTHREAD_RWLOCKATTR_SIZE__ = 16; - -// const int USER_ADDR_NULL = 0; - -// const int INT8_MAX = 127; - -// const int INT16_MAX = 32767; - -// const int INT32_MAX = 2147483647; - -// const int INT64_MAX = 9223372036854775807; - -// const int INT8_MIN = -128; - -// const int INT16_MIN = -32768; - -// const int INT32_MIN = -2147483648; - -// const int INT64_MIN = -9223372036854775808; - -// const int UINT8_MAX = 255; - -// const int UINT16_MAX = 65535; - -// const int UINT32_MAX = 4294967295; - -// const int UINT64_MAX = -1; - -// const int INT_LEAST8_MIN = -128; - -// const int INT_LEAST16_MIN = -32768; - -// const int INT_LEAST32_MIN = -2147483648; - -// const int INT_LEAST64_MIN = -9223372036854775808; - -// const int INT_LEAST8_MAX = 127; - -// const int INT_LEAST16_MAX = 32767; - -// const int INT_LEAST32_MAX = 2147483647; - -// const int INT_LEAST64_MAX = 9223372036854775807; - -// const int UINT_LEAST8_MAX = 255; - -// const int UINT_LEAST16_MAX = 65535; - -// const int UINT_LEAST32_MAX = 4294967295; - -// const int UINT_LEAST64_MAX = -1; - -// const int INT_FAST8_MIN = -128; - -// const int INT_FAST16_MIN = -32768; - -// const int INT_FAST32_MIN = -2147483648; - -// const int INT_FAST64_MIN = -9223372036854775808; - -// const int INT_FAST8_MAX = 127; - -// const int INT_FAST16_MAX = 32767; - -// const int INT_FAST32_MAX = 2147483647; - -// const int INT_FAST64_MAX = 9223372036854775807; - -// const int UINT_FAST8_MAX = 255; - -// const int UINT_FAST16_MAX = 65535; - -// const int UINT_FAST32_MAX = 4294967295; - -// const int UINT_FAST64_MAX = -1; - -// const int INTPTR_MAX = 9223372036854775807; - -// const int INTPTR_MIN = -9223372036854775808; - -// const int UINTPTR_MAX = -1; - -// const int INTMAX_MAX = 9223372036854775807; - -// const int UINTMAX_MAX = -1; - -// const int INTMAX_MIN = -9223372036854775808; - -// const int PTRDIFF_MIN = -9223372036854775808; - -// const int PTRDIFF_MAX = 9223372036854775807; - -// const int SIZE_MAX = -1; - -// const int RSIZE_MAX = 9223372036854775807; - -// const int WCHAR_MAX = 2147483647; - -// const int WCHAR_MIN = -2147483648; - -// const int WINT_MIN = -2147483648; - -// const int WINT_MAX = 2147483647; - -// const int SIG_ATOMIC_MIN = -2147483648; - -// const int SIG_ATOMIC_MAX = 2147483647; diff --git a/lib/rendering_surface.dart b/lib/rendering_surface.dart deleted file mode 100644 index 730d9d2e..00000000 --- a/lib/rendering_surface.dart +++ /dev/null @@ -1,39 +0,0 @@ -import 'dart:ffi'; -import 'dart:developer' as dev; - -class RenderingSurface { - final int flutterTextureId; - final Pointer surface; - final int textureHandle; - final int sharedContext; - - factory RenderingSurface.from(dynamic platformMessage) { - var flutterTextureId = platformMessage[0]; - - // void* on iOS (pointer to pixel buffer), Android (pointer to native window), null on macOS/Windows - var surfaceAddress = platformMessage[1] as int? ?? 0; - - // null on iOS/Android, void* on MacOS (pointer to metal texture), GLuid on Windows/Linux - var nativeTexture = platformMessage[2] as int? ?? 0; - - if (nativeTexture != 0) { - assert(surfaceAddress == 0); - } - - var sharedContext = platformMessage[3] as int? ?? 0; - - dev.log( - "Using flutterTextureId $flutterTextureId, surface $surfaceAddress nativeTexture $nativeTexture and sharedContext $sharedContext"); - return RenderingSurface( - sharedContext: sharedContext, - flutterTextureId: flutterTextureId, - surface: Pointer.fromAddress(surfaceAddress), - textureHandle: nativeTexture); - } - - RenderingSurface( - {required this.sharedContext, - required this.flutterTextureId, - required this.surface, - required this.textureHandle}); -} diff --git a/lib/widgets/filament_gesture_detector.dart b/lib/widgets/filament_gesture_detector.dart deleted file mode 100644 index a9d89ace..00000000 --- a/lib/widgets/filament_gesture_detector.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'dart:io'; - -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_filament/widgets/filament_gesture_detector_desktop.dart'; -import 'package:flutter_filament/widgets/filament_gesture_detector_mobile.dart'; -import '../filament_controller.dart'; - -enum GestureType { rotateCamera, panCamera, panBackground } - -/// -/// A widget that translates finger/mouse gestures to zoom/pan/rotate actions. -/// -class FilamentGestureDetector extends StatelessWidget { - /// - /// The content to display below the gesture detector/listener widget. - /// This will usually be a FilamentWidget (so you can navigate by directly interacting with the viewport), but this is not necessary. - /// It is equally possible to render the viewport/gesture controls elsewhere in the widget hierarchy. The only requirement is that they share the same [FilamentController]. - /// - final Widget? child; - - /// - /// The [controller] attached to the [FilamentWidget] you wish to control. - /// - final FilamentController controller; - - /// - /// If true, an overlay will be shown with buttons to toggle whether pointer movements are interpreted as: - /// 1) rotate or a pan (mobile only), - /// 2) moving the camera or the background image (TODO). - /// - final bool showControlOverlay; - - /// - /// If false, all gestures will be ignored. - /// - final bool listenerEnabled; - - const FilamentGestureDetector( - {Key? key, - required this.controller, - this.child, - this.showControlOverlay = false, - this.listenerEnabled = true}) - : super(key: key); - - @override - Widget build(BuildContext context) { - if (kIsWeb) { - throw Exception("TODO"); - } else if (Platform.isLinux || Platform.isWindows || Platform.isMacOS) { - return FilamentGestureDetectorDesktop( - controller: controller, - child: child, - showControlOverlay: showControlOverlay, - listenerEnabled: listenerEnabled, - ); - } else { - return FilamentGestureDetectorMobile( - controller: controller, - child: child, - showControlOverlay: showControlOverlay, - listenerEnabled: listenerEnabled, - ); - } - } -} diff --git a/lib/widgets/filament_widget.dart b/lib/widgets/filament_widget.dart deleted file mode 100644 index 49d9bb6a..00000000 --- a/lib/widgets/filament_widget.dart +++ /dev/null @@ -1,317 +0,0 @@ -import 'dart:io'; -import 'dart:math'; -import 'dart:developer' as dev; - -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; - -import 'package:flutter_filament/filament_controller.dart'; - -import 'dart:async'; - -typedef ResizeCallback = void Function(Size newSize); - -class ResizeObserver extends SingleChildRenderObjectWidget { - final ResizeCallback onResized; - - const ResizeObserver({ - Key? key, - required this.onResized, - Widget? child, - }) : super( - key: key, - child: child, - ); - - @override - RenderObject createRenderObject(BuildContext context) => - _RenderResizeObserver(onLayoutChangedCallback: onResized); -} - -class _RenderResizeObserver extends RenderProxyBox { - final ResizeCallback onLayoutChangedCallback; - - _RenderResizeObserver({ - RenderBox? child, - required this.onLayoutChangedCallback, - }) : super(child); - - Size _oldSize = Size.zero; - - @override - void performLayout() async { - super.performLayout(); - if (size.width != _oldSize.width || size.height != _oldSize.height) { - onLayoutChangedCallback(size); - _oldSize = Size(size.width, size.height); - } - } -} - -class FilamentWidget extends StatefulWidget { - final FilamentController controller; - - /// - /// The content to render before the texture widget is available. - /// The default is a solid red Container, intentionally chosen to make it clear that there will be at least one frame where the Texture widget is not being rendered. - /// - final Widget? initial; - - const FilamentWidget({Key? key, required this.controller, this.initial}) - : super(key: key); - - @override - _FilamentWidgetState createState() => _FilamentWidgetState(); -} - -class _FilamentWidgetState extends State { - int? _width; - int? _height; - - @override - void initState() { - WidgetsBinding.instance.addPostFrameCallback((timeStamp) async { - var size = ((context.findRenderObject()) as RenderBox).size; - _width = size.width.ceil(); - _height = size.height.ceil(); - setState(() {}); - }); - super.initState(); - } - - @override - Widget build(BuildContext context) { - if (_width == null || _height == null) { - return widget.initial ?? Container(color: Colors.red); - } - - return ResizeObserver( - onResized: (newSize) { - WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - setState(() { - _width = newSize.width.ceil(); - _height = newSize.height.ceil(); - }); - }); - }, - child: _SizedFilamentWidget( - initial: widget.initial, - width: _width!, - height: _height!, - controller: widget.controller, - )); - } -} - -class _SizedFilamentWidget extends StatefulWidget { - final int width; - final int height; - final Widget? initial; - final FilamentController controller; - - const _SizedFilamentWidget( - {required this.width, - required this.height, - this.initial, - required this.controller}); - - @override - State createState() => _SizedFilamentWidgetState(); -} - -class _SizedFilamentWidgetState extends State<_SizedFilamentWidget> { - String? _error; - - late final AppLifecycleListener _appLifecycleListener; - - late double _pixelRatio; - - Rect get _rect { - final renderBox = (context.findRenderObject()) as RenderBox; - final size = renderBox.size; - final translation = renderBox.getTransformTo(null).getTranslation(); - return Rect.fromLTWH(translation.x, translation.y, size.width, size.height); - } - - @override - void initState() { - _appLifecycleListener = AppLifecycleListener( - onStateChange: _handleStateChange, - ); - - WidgetsBinding.instance.addPostFrameCallback((timeStamp) async { - try { - _pixelRatio = MediaQuery.of(context).devicePixelRatio; - widget.controller.setDimensions(_rect, _pixelRatio); - } catch (err) { - dev.log("Fatal error : $err"); - _error = err.toString(); - } - setState(() {}); - }); - - super.initState(); - } - - Timer? _resizeTimer; - bool _resizing = false; - - Future _resize() { - dev.log("Resizing widget"); - final completer = Completer(); - // resizing the window can be sluggish (particular in debug mode), exacerbated when simultaneously recreating the swapchain and resize the window. - // to address this, whenever the widget is resized, we set a timer for Xms in the future. - // this timer will call [resize] with the widget size at that point in time. - // any subsequent widget resizes will cancel the timer and replace with a new one. - // debug mode does need a longer timeout. - _resizeTimer?.cancel(); - - _resizeTimer = Timer( - Duration(milliseconds: (kReleaseMode || Platform.isWindows) ? 10 : 100), - () async { - if (!mounted) { - completer.complete(); - return; - } - try { - while (_resizing) { - await Future.delayed(const Duration(milliseconds: 20)); - } - - _resizing = true; - await widget.controller.setDimensions(_rect, _pixelRatio); - await widget.controller.resize(); - _resizeTimer = null; - setState(() {}); - _resizing = false; - } catch (err) { - dev.log("Error resizing FilamentWidget: $err"); - } finally { - completer.complete(); - } - }); - - return completer.future; - } - - @override - void didUpdateWidget(_SizedFilamentWidget oldWidget) { - super.didUpdateWidget(oldWidget); - - if (oldWidget.height != widget.height || oldWidget.width != widget.width) { - _resize(); - } - } - - @override - void dispose() { - _appLifecycleListener.dispose(); - super.dispose(); - } - - bool _wasRenderingOnInactive = true; - - void _handleStateChange(AppLifecycleState state) async { - switch (state) { - case AppLifecycleState.detached: - dev.log("Detached"); - if (!_wasRenderingOnInactive) { - _wasRenderingOnInactive = widget.controller.rendering; - } - await widget.controller.setRendering(false); - break; - case AppLifecycleState.hidden: - dev.log("Hidden"); - if (!_wasRenderingOnInactive) { - _wasRenderingOnInactive = widget.controller.rendering; - } - await widget.controller.setRendering(false); - break; - case AppLifecycleState.inactive: - dev.log("Inactive"); - if (!_wasRenderingOnInactive) { - _wasRenderingOnInactive = widget.controller.rendering; - } - // on Windows in particular, restoring a window after minimizing stalls the renderer (and the whole application) for a considerable length of time. - // disabling rendering on minimize seems to fix the issue (so I wonder if there's some kind of command buffer that's filling up while the window is minimized). - await widget.controller.setRendering(false); - break; - case AppLifecycleState.paused: - dev.log("Paused"); - if (!_wasRenderingOnInactive) { - _wasRenderingOnInactive = widget.controller.rendering; - } - await widget.controller.setRendering(false); - break; - case AppLifecycleState.resumed: - dev.log("Resumed"); - await widget.controller.setRendering(_wasRenderingOnInactive); - break; - } - } - - @override - Widget build(BuildContext context) { - // if an error was encountered in creating a viewer, display the error message and don't even try to display a Texture widget. - if (_error != null) { - return Container( - color: Colors.white, - child: Column(children: [ - const Text("A fatal error was encountered"), - Text(_error!) - ])); - } - - if (!widget.controller.requiresTextureWidget) { - return Stack(children: [ - Positioned.fill(child: CustomPaint(painter: TransparencyPainter())) - ]); - } - - return ListenableBuilder( - listenable: widget.controller.textureDetails, - builder: (BuildContext ctx, Widget? wdgt) { - if (widget.controller.textureDetails.value == null) { - return Stack(children: [ - Positioned.fill( - child: widget.initial ?? Container(color: Colors.red)) - ]); - } - // see [FilamentControllerFFI.resize] for an explanation of how we deal with resizing - var texture = Texture( - key: ObjectKey( - "texture_${widget.controller.textureDetails.value!.textureId}"), - textureId: widget.controller.textureDetails.value!.textureId, - filterQuality: FilterQuality.none, - freeze: false, - ); - - return Stack(children: [ - Positioned.fill( - child: Platform.isLinux || Platform.isWindows - ? Transform( - alignment: Alignment.center, - transform: Matrix4.rotationX( - pi), // TODO - this rotation is due to OpenGL texture coordinate working in a different space from Flutter, can we move this to the C++ side somewhere? - child: texture) - : texture) - ]); - }); - } -} - -class TransparencyPainter extends CustomPainter { - @override - void paint(Canvas canvas, Size size) { - canvas.drawRect( - Rect.fromLTWH(0, 0, size.width, size.height), - Paint() - ..blendMode = BlendMode.clear - ..color = const Color(0x00000000), - ); - } - - @override - bool shouldRepaint(covariant CustomPainter oldDelegate) => true; -} diff --git a/linux/lib/filament-v1.41.0-linux.tgz b/linux/lib/filament-v1.41.0-linux.tgz deleted file mode 100644 index 8fcd2653..00000000 --- a/linux/lib/filament-v1.41.0-linux.tgz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0429489aafde09944e90e916a20bed6bc528b52f3137fbb0bf954ef5a3803c05 -size 44636732 diff --git a/linux/lib/libbackend.a b/linux/lib/libbackend.a deleted file mode 100644 index dc7ae499..00000000 --- a/linux/lib/libbackend.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:326d07e9416af38355057d2ad449d757cbc037cfaaa3e9759bd25c4c4466be6b -size 2097612 diff --git a/linux/lib/libbasis_encoder.a b/linux/lib/libbasis_encoder.a deleted file mode 100644 index a876f948..00000000 --- a/linux/lib/libbasis_encoder.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d633d3e1c66902e7ab8acd85d8acfa1d0612aeff1bfbbbe288eec0082b896dc -size 1437550 diff --git a/linux/lib/libbasis_transcoder.a b/linux/lib/libbasis_transcoder.a deleted file mode 100644 index 97c9a5c9..00000000 --- a/linux/lib/libbasis_transcoder.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1e4d4cbf8e87082cd8d4d36f8f8baae8ac89b507d24619470d31d5544d30df01 -size 552520 diff --git a/linux/lib/libbluegl.a b/linux/lib/libbluegl.a deleted file mode 100644 index e80bc87c..00000000 --- a/linux/lib/libbluegl.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:19b9a4b82cdbc0ecacaadeda185dafe8ef5c38ad86f24deb39d6e437c3ba1706 -size 1135364 diff --git a/linux/lib/libbluevk.a b/linux/lib/libbluevk.a deleted file mode 100644 index ed97c33c..00000000 --- a/linux/lib/libbluevk.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f211ae118c26fa779eb80ce946311ea9597f54a089b270d4333109760816dd92 -size 175332 diff --git a/linux/lib/libcamutils.a b/linux/lib/libcamutils.a deleted file mode 100644 index 7dca0668..00000000 --- a/linux/lib/libcamutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:647973c7591d20305f238802e9516683e69af4db32fe78cdbe99af7623b62ef7 -size 59964 diff --git a/linux/lib/libcivetweb.a b/linux/lib/libcivetweb.a deleted file mode 100644 index 084ead59..00000000 --- a/linux/lib/libcivetweb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8a767cd1119a855e22bb46efa786531dcd35beb27917f486d33da27eb5cbe408 -size 301758 diff --git a/linux/lib/libdracodec.a b/linux/lib/libdracodec.a deleted file mode 100644 index cc465882..00000000 --- a/linux/lib/libdracodec.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:55dda86e14d75a839289c58edd04a21166e7e4c9d354bad990545806d0f297e2 -size 2736460 diff --git a/linux/lib/libfilabridge.a b/linux/lib/libfilabridge.a deleted file mode 100644 index c3f8bebe..00000000 --- a/linux/lib/libfilabridge.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b62f0c4515df6b474eddc310e66da0e99f748ceb3b29153a5cac832db6dfbbb3 -size 64862 diff --git a/linux/lib/libfilaflat.a b/linux/lib/libfilaflat.a deleted file mode 100644 index 0a728b1d..00000000 --- a/linux/lib/libfilaflat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06ca6bd13d07735ba2c6a4003d724b91aa979d884be271d78f0dd149a28b7f8d -size 53684 diff --git a/linux/lib/libfilamat.a b/linux/lib/libfilamat.a deleted file mode 100644 index d48e3a8d..00000000 --- a/linux/lib/libfilamat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d0fb9205d81b49c661cd8d34a68f6613b44a8b1ed3dec8a8e3749d678373b67c -size 31198232 diff --git a/linux/lib/libfilamat_lite.a b/linux/lib/libfilamat_lite.a deleted file mode 100644 index ccf0ae70..00000000 --- a/linux/lib/libfilamat_lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b6942efce112eb25a0dd557d7943a4e3be3f1080a173ee2670cfa5b0d1aed0f4 -size 663716 diff --git a/linux/lib/libfilament-iblprefilter.a b/linux/lib/libfilament-iblprefilter.a deleted file mode 100644 index 6d8e151c..00000000 --- a/linux/lib/libfilament-iblprefilter.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:baf0f9103beb8f77efea06a2c938f77b27c2af090d52427a6e1eeb19f7787f33 -size 70040 diff --git a/linux/lib/libfilament.a b/linux/lib/libfilament.a deleted file mode 100644 index f01ae8a7..00000000 --- a/linux/lib/libfilament.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0af2e6d391839ae00e24ff1ca0bb098ef10ae1107f185735df50f1133ca747a5 -size 2859018 diff --git a/linux/lib/libfilameshio.a b/linux/lib/libfilameshio.a deleted file mode 100644 index 8b52f286..00000000 --- a/linux/lib/libfilameshio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:14e17d4f05c5c05d01c910dda66ed0e0b143d6d7f00b69123d68bbcbcb6daa72 -size 42216 diff --git a/linux/lib/libgeometry.a b/linux/lib/libgeometry.a deleted file mode 100644 index c799b1b1..00000000 --- a/linux/lib/libgeometry.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2288510e5247d3b4bbb0928399c1b1ac9ca19dc2756f5ab3791a39167964e0d3 -size 122340 diff --git a/linux/lib/libgltfio.a b/linux/lib/libgltfio.a deleted file mode 100644 index 00f3f211..00000000 --- a/linux/lib/libgltfio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:058ef55c342dd39ab7a8aecef52f4f867b1479169780072ee14fa9e14fca1ea3 -size 51056 diff --git a/linux/lib/libgltfio_core.a b/linux/lib/libgltfio_core.a deleted file mode 100644 index 062a9c6e..00000000 --- a/linux/lib/libgltfio_core.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a7c19ebc166180597907382df8893a1cb6b0107445f798f491fb5e02e8880bb1 -size 1273720 diff --git a/linux/lib/libibl-lite.a b/linux/lib/libibl-lite.a deleted file mode 100644 index 53952809..00000000 --- a/linux/lib/libibl-lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b925eaf3d01cd86cbd93e5ac3b7cf0aa5c250f5f0aee0ff1df867ae9d890d864 -size 389598 diff --git a/linux/lib/libibl.a b/linux/lib/libibl.a deleted file mode 100644 index 948743fe..00000000 --- a/linux/lib/libibl.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5237908b95431159cae48b1ec459650dee0dd9106c2ec93503d28824c5a4d420 -size 476644 diff --git a/linux/lib/libimage.a b/linux/lib/libimage.a deleted file mode 100644 index 4c31b6ec..00000000 --- a/linux/lib/libimage.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ef7ee4e72d8acc062ccf4cb82f50758ca5cb7186f9b6fbb1e80e0e4e13c44b21 -size 112214 diff --git a/linux/lib/libimageio.a b/linux/lib/libimageio.a deleted file mode 100644 index d52f1225..00000000 --- a/linux/lib/libimageio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8f1f111242f014ee41cb1f6aae70294d1d98a7513d35531d805cc900d534c205 -size 220784 diff --git a/linux/lib/libktxreader.a b/linux/lib/libktxreader.a deleted file mode 100644 index b3cc4f28..00000000 --- a/linux/lib/libktxreader.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bf545ab255a85b85f05f72758752a1f5ed475a3a881f7371e18f0e65b5636ec1 -size 85610 diff --git a/linux/lib/libmatdbg.a b/linux/lib/libmatdbg.a deleted file mode 100644 index 0edb1c73..00000000 --- a/linux/lib/libmatdbg.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:10ec95bf983a21338b92208fc1604025ca891ceac7356a4886e9b05619a7e5fb -size 8348552 diff --git a/linux/lib/libmath.a b/linux/lib/libmath.a deleted file mode 100644 index 855b848e..00000000 --- a/linux/lib/libmath.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:081baec257e5bb1056b5ddb16a88b1f640320f061cc3ceec053b90ae065cb594 -size 812 diff --git a/linux/lib/libmathio.a b/linux/lib/libmathio.a deleted file mode 100644 index 92e8f69a..00000000 --- a/linux/lib/libmathio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab4b4bbd27990a32da29f7a93f4685daa14d89d1489bf2bf86723585dafb7823 -size 61086 diff --git a/linux/lib/libmeshoptimizer.a b/linux/lib/libmeshoptimizer.a deleted file mode 100644 index 4dc6350d..00000000 --- a/linux/lib/libmeshoptimizer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5698733c2f0ec022fbf73a3ef560962fe705445605a8c92d2a753d2ca4a30054 -size 174864 diff --git a/linux/lib/libmikktspace.a b/linux/lib/libmikktspace.a deleted file mode 100644 index 83623385..00000000 --- a/linux/lib/libmikktspace.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e81e890eea666a2e19f3c1d56ba91f39d71a55fab00c6b0585a7d958e11de2ed -size 26814 diff --git a/linux/lib/libshaders.a b/linux/lib/libshaders.a deleted file mode 100644 index 882882b0..00000000 --- a/linux/lib/libshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d96b998912cba46a10df603a2935a8c6648c4f9ecd81e3ef01d08d3ab5deada -size 127214 diff --git a/linux/lib/libsmol-v.a b/linux/lib/libsmol-v.a deleted file mode 100644 index a4fb2e76..00000000 --- a/linux/lib/libsmol-v.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:385ab5a76cf98b5ab185e36ea341fa78ef62402d57613d8be648a4dd141fd859 -size 52676 diff --git a/linux/lib/libstb.a b/linux/lib/libstb.a deleted file mode 100644 index 2aa9b8f7..00000000 --- a/linux/lib/libstb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8aba29a52ef1dbbdc3d48f1ad9d9616ab544f7d3045733adc9b9de1172ec383e -size 128686 diff --git a/linux/lib/libtinyexr.a b/linux/lib/libtinyexr.a deleted file mode 100644 index b5596491..00000000 --- a/linux/lib/libtinyexr.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bc8e80b0e43fcf1918b6e85368b2d72b20e392bc3badfca0481556e90568f305 -size 203598 diff --git a/linux/lib/libuberarchive.a b/linux/lib/libuberarchive.a deleted file mode 100644 index aa50a973..00000000 --- a/linux/lib/libuberarchive.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b99bfdfd707379e878d4412014345b29029f90d9ad44072832fc9f4f4e3a2c60 -size 1318116 diff --git a/linux/lib/libuberzlib.a b/linux/lib/libuberzlib.a deleted file mode 100644 index f8723cf1..00000000 --- a/linux/lib/libuberzlib.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ac377730ab0d180e7e7c0a0a20f0f87a224d5f133b2a5e0a786f9196609a9623 -size 33806 diff --git a/linux/lib/libutils.a b/linux/lib/libutils.a deleted file mode 100644 index c483d3c2..00000000 --- a/linux/lib/libutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:796695f0dc99759a6c17a0c3a8382ff1f57b62155224ad051ae9f3fee325f455 -size 323506 diff --git a/linux/lib/libviewer.a b/linux/lib/libviewer.a deleted file mode 100644 index 0481530a..00000000 --- a/linux/lib/libviewer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6238d9c7ce9d5943c1df2875ebf32bb07b5004c707afa4d6d083d31d320a2ca5 -size 572924 diff --git a/linux/lib/libvkshaders.a b/linux/lib/libvkshaders.a deleted file mode 100644 index 37f01e8a..00000000 --- a/linux/lib/libvkshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d63c579457652ff0fa3b588004d48e8fdb351f15e51b024a359c86f1cb218c5 -size 2358 diff --git a/linux/lib/libzstd.a b/linux/lib/libzstd.a deleted file mode 100644 index 9cd61aa5..00000000 --- a/linux/lib/libzstd.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c169b961355c52a1213efa6703339007a124cab6be92bf56b8031889b1aa7866 -size 823082 diff --git a/linux/lib/old/libOGLCompiler.a b/linux/lib/old/libOGLCompiler.a deleted file mode 100644 index 73065c07..00000000 --- a/linux/lib/old/libOGLCompiler.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4aaf436489ba71b8c6f5d921cad39f1c4e3104c176c374efae3a728e45d11502 -size 3940 diff --git a/linux/lib/old/libOSDependent.a b/linux/lib/old/libOSDependent.a deleted file mode 100644 index 9f7c0cdf..00000000 --- a/linux/lib/old/libOSDependent.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0327c66ed61c78233914909dcffc410fbb056faa6900d3db17d67459d3f31fa6 -size 5294 diff --git a/linux/lib/old/libSPIRV-Tools-diff.a b/linux/lib/old/libSPIRV-Tools-diff.a deleted file mode 100644 index 434011cf..00000000 --- a/linux/lib/old/libSPIRV-Tools-diff.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ac1387628b4d7ebd89a3121815540256f46e5aaf397c3023d0974bcc3a85506f -size 499778 diff --git a/linux/lib/old/libSPIRV-Tools-link.a b/linux/lib/old/libSPIRV-Tools-link.a deleted file mode 100644 index adba1a80..00000000 --- a/linux/lib/old/libSPIRV-Tools-link.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a75e67e06921513fb04dc8d5aaeb6b975eab1bab0bcd02d3a0a39398c162c6ac -size 162318 diff --git a/linux/lib/old/libSPIRV-Tools-lint.a b/linux/lib/old/libSPIRV-Tools-lint.a deleted file mode 100644 index a6ff63bc..00000000 --- a/linux/lib/old/libSPIRV-Tools-lint.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6b6bab1c7a792a4769f479ad55d0c116f8755c418ebe7d64292ccf7a6fbcb033 -size 273884 diff --git a/linux/lib/old/libSPIRV-Tools-opt.a b/linux/lib/old/libSPIRV-Tools-opt.a deleted file mode 100644 index e5aa63a3..00000000 --- a/linux/lib/old/libSPIRV-Tools-opt.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:464c750b313575d2c2c62cf1ace18eb67813a654c12e9ab809b5e9b5a02b9160 -size 12709646 diff --git a/linux/lib/old/libSPIRV-Tools-reduce.a b/linux/lib/old/libSPIRV-Tools-reduce.a deleted file mode 100644 index 546c8884..00000000 --- a/linux/lib/old/libSPIRV-Tools-reduce.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:88f1ab1b62fec378637a8608d26e39a4f9cccfad68898fe132f1e7d56c57caa7 -size 836218 diff --git a/linux/lib/old/libSPIRV-Tools.a b/linux/lib/old/libSPIRV-Tools.a deleted file mode 100644 index dc59d99c..00000000 --- a/linux/lib/old/libSPIRV-Tools.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:70c565068260155b85b1b20e3fc65469475f522fa38581482f4f15e984a8a26f -size 4047794 diff --git a/linux/lib/old/libSPIRV.a b/linux/lib/old/libSPIRV.a deleted file mode 100644 index 9734ccae..00000000 --- a/linux/lib/old/libSPIRV.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2933df356c0346f58d55c0682a6a9828561a3d0a3c16119220efe20d1467e4cc -size 1773318 diff --git a/linux/lib/old/libassimp.a b/linux/lib/old/libassimp.a deleted file mode 100644 index 4e45eea9..00000000 --- a/linux/lib/old/libassimp.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa3d111b7912c2e1e23fe382dcecd19a33091800da9e27635980de264cd89efe -size 3880496 diff --git a/linux/lib/old/libbackend.a b/linux/lib/old/libbackend.a deleted file mode 100644 index 93f628e9..00000000 --- a/linux/lib/old/libbackend.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b9233bbaf23bf4b02ca13f93b2bbb7a6c40ee0d933dfc0dfe3830ecd6ec68b38 -size 2107852 diff --git a/linux/lib/old/libbasis_encoder.a b/linux/lib/old/libbasis_encoder.a deleted file mode 100644 index 1996b229..00000000 --- a/linux/lib/old/libbasis_encoder.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:17bd4166018341677a88d292dd7304a3fcf8a2e7fff90efda230baac0fdf2f1d -size 1410760 diff --git a/linux/lib/old/libbasis_transcoder.a b/linux/lib/old/libbasis_transcoder.a deleted file mode 100644 index 5b99d570..00000000 --- a/linux/lib/old/libbasis_transcoder.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:281309f415bd4ecc69dcb29e77629fe40abd6f7c9ca242026ce797a907984fc1 -size 551702 diff --git a/linux/lib/old/libbenchmark.a b/linux/lib/old/libbenchmark.a deleted file mode 100644 index b34c6295..00000000 --- a/linux/lib/old/libbenchmark.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2741667ac0e1e0e0272a80e1fc73de59bbbc39740e19fd79bd06c98a6269757e -size 591234 diff --git a/linux/lib/old/libbenchmark_main.a b/linux/lib/old/libbenchmark_main.a deleted file mode 100644 index f63e76b3..00000000 --- a/linux/lib/old/libbenchmark_main.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:22b4861b8b446fe1b1f5aa785ab09bb81d8eeae50bf5e428ac3043c08201fcf2 -size 2192 diff --git a/linux/lib/old/libbluegl.a b/linux/lib/old/libbluegl.a deleted file mode 100644 index b5c36026..00000000 --- a/linux/lib/old/libbluegl.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e2ba9458f588d16f7ba1fffaddb71cac3b918266bbe88d30710547d03fe7f533 -size 1135298 diff --git a/linux/lib/old/libbluevk.a b/linux/lib/old/libbluevk.a deleted file mode 100644 index 2312d7fa..00000000 --- a/linux/lib/old/libbluevk.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:88fb5b1d62898e8f6e5d485f4e7e60b6d71c2e2246aa81aea70e300a7a91068e -size 175364 diff --git a/linux/lib/old/libcamutils.a b/linux/lib/old/libcamutils.a deleted file mode 100644 index a54cff57..00000000 --- a/linux/lib/old/libcamutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fcb1603eb181df3098f80f150b8a0d23d32f772f152fee063599ba85c3818b9b -size 62092 diff --git a/linux/lib/old/libcivetweb.a b/linux/lib/old/libcivetweb.a deleted file mode 100644 index 92934f10..00000000 --- a/linux/lib/old/libcivetweb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d57782d4dca672e74332d51c534b78d03b3646725e86710f3556184ba71e3f9c -size 300742 diff --git a/linux/lib/old/libdracodec.a b/linux/lib/old/libdracodec.a deleted file mode 100644 index 09c01d96..00000000 --- a/linux/lib/old/libdracodec.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e5bc48d7c66f24823f093b1dfc7d45073526b2a1f7f8660e337cadbc82081182 -size 2745300 diff --git a/linux/lib/old/libfilabridge.a b/linux/lib/old/libfilabridge.a deleted file mode 100644 index 3969919c..00000000 --- a/linux/lib/old/libfilabridge.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bda7d726a5c7fc7dc6bacb6460dbc338d86d63d7cfb311b3aa2678cf118fad8d -size 71580 diff --git a/linux/lib/old/libfilaflat.a b/linux/lib/old/libfilaflat.a deleted file mode 100644 index 6d22d093..00000000 --- a/linux/lib/old/libfilaflat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d06d5f9fe917fbe6095c1cee333fced10a07f295e689e8bc91eefee3ab7aa934 -size 50170 diff --git a/linux/lib/old/libfilagui.a b/linux/lib/old/libfilagui.a deleted file mode 100644 index 8871facd..00000000 --- a/linux/lib/old/libfilagui.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:34eb1d23ed8172a1f889262c9a19e4f79c95cc400d81af242ae88920f3c6fc74 -size 114036 diff --git a/linux/lib/old/libfilamat.a b/linux/lib/old/libfilamat.a deleted file mode 100644 index f2f950f3..00000000 --- a/linux/lib/old/libfilamat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2bf46fcbae5a2472d09a321119ef0e094018a6185dda50cd94671f4827a9fe49 -size 31487058 diff --git a/linux/lib/old/libfilamat_combined.a b/linux/lib/old/libfilamat_combined.a deleted file mode 100644 index 35211231..00000000 --- a/linux/lib/old/libfilamat_combined.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fdde9c8708cadcde670a376407c455b4b16c53892cbefa0d6436307c249e6eaf -size 29448180 diff --git a/linux/lib/old/libfilamat_lite.a b/linux/lib/old/libfilamat_lite.a deleted file mode 100644 index 0aeec211..00000000 --- a/linux/lib/old/libfilamat_lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a648a8f87cd29bc9bf44c9ee2a80d79d9ecd1e008d421409f5f512e449af9860 -size 685184 diff --git a/linux/lib/old/libfilament-iblprefilter.a b/linux/lib/old/libfilament-iblprefilter.a deleted file mode 100644 index e782aa7c..00000000 --- a/linux/lib/old/libfilament-iblprefilter.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ac11be97f3bcc3c00f52185d8489e64781c99691579b31be14790a73111cadf2 -size 70144 diff --git a/linux/lib/old/libfilament.a b/linux/lib/old/libfilament.a deleted file mode 100644 index 1e0d9318..00000000 --- a/linux/lib/old/libfilament.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:86f8afa67a774faab4d30bc295b67801d8d70df6dbd2cd893459484592cc43cb -size 2849794 diff --git a/linux/lib/old/libfilamentapp-resources.a b/linux/lib/old/libfilamentapp-resources.a deleted file mode 100644 index a835bd88..00000000 --- a/linux/lib/old/libfilamentapp-resources.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:32daace64e95eab47eeedcf41316a206ea7524242da5b978e11e5c126ccb1950 -size 1017810 diff --git a/linux/lib/old/libfilamentapp.a b/linux/lib/old/libfilamentapp.a deleted file mode 100644 index e858176f..00000000 --- a/linux/lib/old/libfilamentapp.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:38f04e48455161b25bb8c713713bee391ce7908f4f1881d1464585e7ad59b2d2 -size 356048 diff --git a/linux/lib/old/libfilameshio.a b/linux/lib/old/libfilameshio.a deleted file mode 100644 index 1655c198..00000000 --- a/linux/lib/old/libfilameshio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f1748f7b321170f0d2c62c344f79dd18aa544bcc15e24012a08171508e87070a -size 41324 diff --git a/linux/lib/old/libgeometry.a b/linux/lib/old/libgeometry.a deleted file mode 100644 index 4c55794d..00000000 --- a/linux/lib/old/libgeometry.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:382b1617880bf2553a51debd2ce2a8171d8e3a7739287ea583dfda5747150783 -size 123772 diff --git a/linux/lib/old/libgetopt.a b/linux/lib/old/libgetopt.a deleted file mode 100644 index 55d0864b..00000000 --- a/linux/lib/old/libgetopt.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d30c6cbedc32007ec3100a1f5b683e5dd6183ef321ac953de09b9862b1e6d40d -size 8016 diff --git a/linux/lib/old/libglslang.a b/linux/lib/old/libglslang.a deleted file mode 100644 index 25e39074..00000000 --- a/linux/lib/old/libglslang.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de4997c7619ed8f581dc93fde892cbdb7a8a193c96f3f464a9164ce539cc876e -size 4621260 diff --git a/linux/lib/old/libgltf-demo-resources.a b/linux/lib/old/libgltf-demo-resources.a deleted file mode 100644 index 82c6e005..00000000 --- a/linux/lib/old/libgltf-demo-resources.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:696c21bc5f7c0b33f0779b508a47cffde4bbb0fd3e3e2be356fe8b0eb6567120 -size 3955646 diff --git a/linux/lib/old/libgltfio.a b/linux/lib/old/libgltfio.a deleted file mode 100644 index c7f9b8f5..00000000 --- a/linux/lib/old/libgltfio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a3bc7fa31ee5a598e4398c76da43d4631cefb717d3b4edeb6382c0a0c9adffe -size 47924 diff --git a/linux/lib/old/libgltfio_core.a b/linux/lib/old/libgltfio_core.a deleted file mode 100644 index de7d639a..00000000 --- a/linux/lib/old/libgltfio_core.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e9c3fa5af012fec4c7b416319295ed1d596c41e050bc6fbc0569cec624a532a -size 1250160 diff --git a/linux/lib/old/libgtest.a b/linux/lib/old/libgtest.a deleted file mode 100644 index ecd94297..00000000 --- a/linux/lib/old/libgtest.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4708f5c09ce031cc389ff2b2da2015c118f2e615846c4989a89900ce8b6b8547 -size 891830 diff --git a/linux/lib/old/libibl-lite.a b/linux/lib/old/libibl-lite.a deleted file mode 100644 index e775e6c8..00000000 --- a/linux/lib/old/libibl-lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a05e4b140cf4d8e6444401308c636a877c01399533798e73d1430a3b6765a512 -size 399170 diff --git a/linux/lib/old/libibl.a b/linux/lib/old/libibl.a deleted file mode 100644 index 1a0ffeec..00000000 --- a/linux/lib/old/libibl.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d45dd173257b3b3df778bb923a324f2e57cb61b4b5fa226839d646cae530a10d -size 486290 diff --git a/linux/lib/old/libimage.a b/linux/lib/old/libimage.a deleted file mode 100644 index 160fdb9e..00000000 --- a/linux/lib/old/libimage.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8a4aded9717cd630ceda3bf468cdc9b383c2e6cb0f6f5b8191642bef55677eac -size 113934 diff --git a/linux/lib/old/libimgui.a b/linux/lib/old/libimgui.a deleted file mode 100644 index 50d0c244..00000000 --- a/linux/lib/old/libimgui.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a21917307e13645d9dbcb80e516ce7fc0ec74a08f05fd6260741109ae213c59 -size 1984050 diff --git a/linux/lib/old/libktxreader.a b/linux/lib/old/libktxreader.a deleted file mode 100644 index 793dd53f..00000000 --- a/linux/lib/old/libktxreader.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a5a99686de9781302ad3989167352dbe3050c63f611d9d9825dea50a25722253 -size 85792 diff --git a/linux/lib/old/libmatdbg.a b/linux/lib/old/libmatdbg.a deleted file mode 100644 index aec48d19..00000000 --- a/linux/lib/old/libmatdbg.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:abcbab3fe10636113804ee35f706132b1c689312df6e64b3cc12241fd8807e3f -size 8427566 diff --git a/linux/lib/old/libmatdbg_combined.a b/linux/lib/old/libmatdbg_combined.a deleted file mode 100644 index 26ada9d9..00000000 --- a/linux/lib/old/libmatdbg_combined.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7dfc57add9555eb8ff3973ff294f10c6dd45e4119be046bccceb45e4f91faef7 -size 7384824 diff --git a/linux/lib/old/libmatdbg_resources.a b/linux/lib/old/libmatdbg_resources.a deleted file mode 100644 index 60bd0708..00000000 --- a/linux/lib/old/libmatdbg_resources.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3c7227ca0aea3a171e1dba93bc434d9ea8e175d4f31cc52165ebdecb00282f8f -size 23744 diff --git a/linux/lib/old/libmatlang.a b/linux/lib/old/libmatlang.a deleted file mode 100644 index f4189abb..00000000 --- a/linux/lib/old/libmatlang.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c2372bd1a5d8c119a61042f66e0cc153fe02b901bb4194379886e6960eccc158 -size 735324 diff --git a/linux/lib/old/libmeshoptimizer.a b/linux/lib/old/libmeshoptimizer.a deleted file mode 100644 index 5e851a57..00000000 --- a/linux/lib/old/libmeshoptimizer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2181fb9a0a814117e6f427741fca5b94a74ff7d1c561e42a2ac3fda45cb978e7 -size 177664 diff --git a/linux/lib/old/libmikktspace.a b/linux/lib/old/libmikktspace.a deleted file mode 100644 index bbda7ace..00000000 --- a/linux/lib/old/libmikktspace.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a52df85ad23304c30afbc5c07831c2ac030ecb5eccdaa8eef0cfb5a04fd80109 -size 26798 diff --git a/linux/lib/old/libpng.a b/linux/lib/old/libpng.a deleted file mode 100644 index b212b312..00000000 --- a/linux/lib/old/libpng.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8ecd3731472c14aa487a51052f3becbbf12077e10c8373c66ef72559134cd70b -size 380418 diff --git a/linux/lib/old/libsample-resources.a b/linux/lib/old/libsample-resources.a deleted file mode 100644 index 169fa46b..00000000 --- a/linux/lib/old/libsample-resources.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:617c1a04b3ec1e41374faf6d8f37796c7ce1fd9fba72199f4ce873fccb4c3013 -size 8140782 diff --git a/linux/lib/old/libsdl2.a b/linux/lib/old/libsdl2.a deleted file mode 100644 index 0c8c8bc0..00000000 --- a/linux/lib/old/libsdl2.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9991225fc5156f48ae4bb31f5b5cbba90978dd45b92fec3115cfc7d90fa61cac -size 2029366 diff --git a/linux/lib/old/libshaders.a b/linux/lib/old/libshaders.a deleted file mode 100644 index 882882b0..00000000 --- a/linux/lib/old/libshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d96b998912cba46a10df603a2935a8c6648c4f9ecd81e3ef01d08d3ab5deada -size 127214 diff --git a/linux/lib/old/libsmol-v.a b/linux/lib/old/libsmol-v.a deleted file mode 100644 index 31f43b55..00000000 --- a/linux/lib/old/libsmol-v.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2055559c7fd28e2c5ab6fa95571e7b804dada6c0264403a7691e9d48864fad2f -size 49236 diff --git a/linux/lib/old/libspirv-cross-core.a b/linux/lib/old/libspirv-cross-core.a deleted file mode 100644 index fccc245b..00000000 --- a/linux/lib/old/libspirv-cross-core.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e4bd7682f5884060b1a8a374a7f9a0e73c5f1e1d747cde27fc98fdaa4040e37f -size 914436 diff --git a/linux/lib/old/libspirv-cross-glsl.a b/linux/lib/old/libspirv-cross-glsl.a deleted file mode 100644 index bbc83904..00000000 --- a/linux/lib/old/libspirv-cross-glsl.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f86993e4f2dcf29040046ec3aac2966f06bd430947a2f6cfc41ea62a8bca5d55 -size 1746516 diff --git a/linux/lib/old/libspirv-cross-msl.a b/linux/lib/old/libspirv-cross-msl.a deleted file mode 100644 index 29a8a605..00000000 --- a/linux/lib/old/libspirv-cross-msl.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd6b1dd81857b4c156bf4c8e10bcc2b55a4e811b67c1586845ed38dd54fc49e1 -size 2596394 diff --git a/linux/lib/old/libstb.a b/linux/lib/old/libstb.a deleted file mode 100644 index fb31d88f..00000000 --- a/linux/lib/old/libstb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:78c97d940ac5dfd3fbc146f8168c7b89c20d4aa6ba8c323dc26c022d4155d8e1 -size 130070 diff --git a/linux/lib/old/libsuzanne-resources.a b/linux/lib/old/libsuzanne-resources.a deleted file mode 100644 index fb972786..00000000 --- a/linux/lib/old/libsuzanne-resources.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fcf631b71a70fb97ac175a1c130c1718bc82f3b3127585903a2ac52855456bd0 -size 4403048 diff --git a/linux/lib/old/libuberarchive.a b/linux/lib/old/libuberarchive.a deleted file mode 100644 index e1e4e6f3..00000000 --- a/linux/lib/old/libuberarchive.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a766234ee09ccaee43e9e7e8ea162dd8d247cc299f3963372da64660166fa61b -size 1318108 diff --git a/linux/lib/old/libuberzlib.a b/linux/lib/old/libuberzlib.a deleted file mode 100644 index f22c5089..00000000 --- a/linux/lib/old/libuberzlib.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fc90bdc0cf7a3181de1f7b768b00615a43e484d76d940362b34d23983cdeaaca -size 33632 diff --git a/linux/lib/old/libutils.a b/linux/lib/old/libutils.a deleted file mode 100644 index f9855c7e..00000000 --- a/linux/lib/old/libutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed36b2ab76f7698d107a9d9943e0bf17bd1ba3e2f11103134ad8df583eb919e3 -size 327224 diff --git a/linux/lib/old/libviewer.a b/linux/lib/old/libviewer.a deleted file mode 100644 index 5f2ceeaf..00000000 --- a/linux/lib/old/libviewer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1d7fedd4fe79bc4a8ffe668830b21211e95d167676b0bea7376daef211b2eb4b -size 571874 diff --git a/linux/lib/old/libvkshaders.a b/linux/lib/old/libvkshaders.a deleted file mode 100644 index e462e398..00000000 --- a/linux/lib/old/libvkshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c3175887fd3d05fb95619930273ea26f80200eef48f1a7a82b9f94ba0d895ee3 -size 2350 diff --git a/linux/lib/old/libz.a b/linux/lib/old/libz.a deleted file mode 100644 index 768355f0..00000000 --- a/linux/lib/old/libz.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3fca5266e22d18bb79cda9d05e8484e2c3c7dcfd4d2893999aef2e1a6b4b1d32 -size 135482 diff --git a/linux/lib/old/libzstd.a b/linux/lib/old/libzstd.a deleted file mode 100644 index 0f89e87b..00000000 --- a/linux/lib/old/libzstd.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:909eac77748638ea1d56bd0c3017b0c4adaf4b027051e716c8b7b185b4c092bc -size 849602 diff --git a/linux/test/polyvox_filament_plugin_test.cc b/linux/test/polyvox_filament_plugin_test.cc deleted file mode 100644 index 40c63fa6..00000000 --- a/linux/test/polyvox_filament_plugin_test.cc +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include - -#include "include/flutter_filament/flutter_filament_plugin.h" -#include "flutter_filament_plugin_private.h" - -// This demonstrates a simple unit test of the C portion of this plugin's -// implementation. -// -// Once you have built the plugin's example app, you can run these tests -// from the command line. For instance, for a plugin called my_plugin -// built for x64 debug, run: -// $ build/linux/x64/debug/plugins/my_plugin/my_plugin_test - -namespace flutter_filament { -namespace test { - -TEST(FlutterFilamentPlugin, GetPlatformVersion) { - g_autoptr(FlMethodResponse) response = get_platform_version(); - ASSERT_NE(response, nullptr); - ASSERT_TRUE(FL_IS_METHOD_SUCCESS_RESPONSE(response)); - FlValue* result = fl_method_success_response_get_result( - FL_METHOD_SUCCESS_RESPONSE(response)); - ASSERT_EQ(fl_value_get_type(result), FL_VALUE_TYPE_STRING); - // The full string varies, so just validate that it has the right format. - EXPECT_THAT(fl_value_get_string(result), testing::StartsWith("Linux ")); -} - -} // namespace test -} // namespace flutter_filament diff --git a/macos/Classes/SwiftPolyvoxFilamentPlugin.swift b/macos/Classes/SwiftPolyvoxFilamentPlugin.swift deleted file mode 100644 index 4e439054..00000000 --- a/macos/Classes/SwiftPolyvoxFilamentPlugin.swift +++ /dev/null @@ -1,169 +0,0 @@ -import FlutterMacOS -import GLKit - -public class SwiftFlutterFilamentPlugin: NSObject, FlutterPlugin, FlutterTexture { - - var registrar : FlutterPluginRegistrar - var flutterTextureId: Int64? - var registry: FlutterTextureRegistry - - var pixelBuffer: CVPixelBuffer?; - - var createdAt = Date() - - var pixelBufferAttrs = [ - kCVPixelBufferPixelFormatTypeKey: NSNumber(value: kCVPixelFormatType_32ABGR ), - kCVPixelBufferOpenGLCompatibilityKey: kCFBooleanTrue!, - kCVPixelBufferIOSurfacePropertiesKey: [:] - ] as CFDictionary - - var resources:[UInt32:NSData] = [:] - - static var messenger : FlutterBinaryMessenger? = nil; - - var loadResource : @convention(c) (UnsafePointer?, UnsafeMutableRawPointer?) -> ResourceBuffer = { uri, resourcesPtr in - - let instance:SwiftFlutterFilamentPlugin = Unmanaged.fromOpaque(resourcesPtr!).takeUnretainedValue() - - var uriString = String(cString:uri!) - - var path:String? = nil - - print("Received request to load \(uriString)") - - if(uriString.hasPrefix("file://")) { - path = String(uriString.dropFirst(7)) - } else { - if(uriString.hasPrefix("asset://")) { - uriString = String(uriString.dropFirst(8)) - } - let bundle = Bundle.init(identifier: "io.flutter.flutter.app")! - path = bundle.path(forResource:uriString, ofType: nil, inDirectory: "flutter_assets") - } - - if(path != nil) { - do { - let data = try Data(contentsOf: URL(fileURLWithPath:path!)) - let nsData = data as NSData - let resId = UInt32(instance.resources.count) - instance.resources[resId] = nsData - let length = nsData.length - print("Resolved asset to file of length \(Int32(length)) at path \(path!)") - return ResourceBuffer(data:nsData.bytes, size:Int32(UInt32(nsData.length)), id:Int32(UInt32(resId))) - } catch { - print("ERROR LOADING RESOURCE") - } - } - return ResourceBuffer() - } - - var freeResource : @convention(c) (ResourceBuffer,UnsafeMutableRawPointer?) -> () = { rbuf, resourcesPtr in - let instance:SwiftFlutterFilamentPlugin = Unmanaged.fromOpaque(resourcesPtr!).takeUnretainedValue() - instance.resources.removeValue(forKey:UInt32(rbuf.id)) - } - - var markTextureFrameAvailable : @convention(c) (UnsafeMutableRawPointer?) -> () = { instancePtr in - let instance:SwiftFlutterFilamentPlugin = Unmanaged.fromOpaque(instancePtr!).takeUnretainedValue() - if(instance.flutterTextureId != nil) { - instance.registry.textureFrameAvailable(instance.flutterTextureId!) - } - } - - public func copyPixelBuffer() -> Unmanaged? { - if(pixelBuffer == nil) { - return nil; - } - return Unmanaged.passRetained(pixelBuffer!); - } - - public func onTextureUnregistered(_ texture:FlutterTexture) { - print("Texture unregistered") - } - - public static func register(with registrar: FlutterPluginRegistrar) { - let _messenger = registrar.messenger; - messenger = _messenger; - let channel = FlutterMethodChannel(name: "app.polyvox.filament/event", binaryMessenger: _messenger) - let instance = SwiftFlutterFilamentPlugin(textureRegistry: registrar.textures, registrar:registrar) - registrar.addMethodCallDelegate(instance, channel: channel) - } - - init(textureRegistry: FlutterTextureRegistry, registrar:FlutterPluginRegistrar) { - self.registry = textureRegistry; - self.registrar = registrar - self.metalDevice = MTLCreateSystemDefaultDevice()! - } - - private func createPixelBuffer(width:Int, height:Int) { - if(CVPixelBufferCreate(kCFAllocatorDefault, Int(width), Int(height), - kCVPixelFormatType_32BGRA, pixelBufferAttrs, &pixelBuffer) != kCVReturnSuccess) { - print("Error allocating pixel buffer") - } - self.flutterTextureId = self.registry.register(self) - } - - - var cvMetalTextureCache:CVMetalTextureCache? = nil - var cvMetalTexture:CVMetalTexture? = nil - var metalTexture:MTLTexture? = nil - var metalDevice:MTLDevice? = nil - - public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { - let methodName = call.method; - switch methodName { - case "getResourceLoaderWrapper": - let resourceLoaderWrapper = make_resource_loader(loadResource, freeResource, Unmanaged.passUnretained(self).toOpaque()) - result(unsafeBitCast(resourceLoaderWrapper, to:Int64.self)) - case "getRenderCallback": - let renderCallback = markTextureFrameAvailable - result([ - unsafeBitCast(renderCallback, to:Int64.self), unsafeBitCast(Unmanaged.passUnretained(self), to:UInt64.self)]) - case "createTexture": - let args = call.arguments as! [Any] - let width = UInt32(args[0] as! Int64) - let height = UInt32(args[1] as! Int64) - createPixelBuffer(width:Int(width), height:Int(height)) - - var cvret = CVMetalTextureCacheCreate( - kCFAllocatorDefault, - nil, - metalDevice!, - nil, - &cvMetalTextureCache); - if(cvret != 0) { - result(FlutterError()) - return - } - cvret = CVMetalTextureCacheCreateTextureFromImage( - kCFAllocatorDefault, - cvMetalTextureCache!, - pixelBuffer!, nil, - MTLPixelFormat.bgra8Unorm, - Int(width), Int(height), - 0, - &cvMetalTexture); - if(cvret != 0) { - result(FlutterError()) - return - } - metalTexture = CVMetalTextureGetTexture(cvMetalTexture!); - let pixelBufferPtr = CVPixelBufferGetBaseAddress(pixelBuffer!); - let pixelBufferAddress = Int(bitPattern:pixelBufferPtr); - let metalTexturePtr = Unmanaged.passUnretained(metalTexture!).toOpaque() - let metalTextureAddress = Int(bitPattern:metalTexturePtr) - - result([self.flutterTextureId as Any, nil, metalTextureAddress, nil]) - case "destroyTexture": - if(self.flutterTextureId != nil) { - self.registry.unregisterTexture(self.flutterTextureId!) - } - self.flutterTextureId = nil - self.pixelBuffer = nil - self.metalTexture = nil - result(true) - default: - result(FlutterMethodNotImplemented) - } - } -} - diff --git a/macos/flutter_filament.podspec b/macos/flutter_filament.podspec deleted file mode 100644 index 0134458b..00000000 --- a/macos/flutter_filament.podspec +++ /dev/null @@ -1,45 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint flutter_filament.podspec` to validate before publishing. -# -Pod::Spec.new do |s| - s.name = 'flutter_filament' - s.version = '0.0.1' - s.summary = 'A new Flutter plugin project.' - s.description = <<-DESC -A new Flutter plugin project. - DESC - s.homepage = 'http://example.com' - s.license = { :file => '../LICENSE' } - s.author = { 'Your Company' => 'email@example.com' } - - s.source = { :path => '.' } - s.source_files = 'Classes/*', 'src/*', "src/camutils/*", 'include/filament/*', 'include/*', 'include/material/*.c' - s.public_header_files = 'include/SwiftFlutterFilamentPlugin-Bridging-Header.h', 'include/FlutterFilamentApi.h', 'include/FlutterFilamentFFIApi.h', 'include/ResourceBuffer.hpp' #, 'include/filament/*' - s.dependency 'FlutterMacOS' - - s.platform = :osx, '13' - # s.user_target_xcconfig = { - # 'DEFINES_MODULE' => 'YES', - # 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386', - # "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", - # 'OTHER_CFLAGS' => '"-fvisibility=default" "$(inherited)"', - # 'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/flutter_filament/macos/zzzinclude" "${PODS_ROOT}/../.symlinks/plugins/flutter_filament/macos/src" "${PODS_ROOT}/../.symlinks/plugins/flutter_filament/macos/src/image" "${PODS_ROOT}/../.symlinks/plugins/flutter_filament/macos/src/shaders" "$(inherited)"', - # 'ALWAYS_SEARCH_USER_PATHS' => 'YES', - # "OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -limageio -ltinyexr -lcamutils -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -lpng -lpng16 -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd', - # 'LIBRARY_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/flutter_filament/macos/lib" "$(inherited)"', - # } - - s.pod_target_xcconfig = { - 'DEFINES_MODULE' => 'YES', - "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", - 'OTHER_CXXFLAGS' => '"--std=c++17" "-fmodules" "-fcxx-modules" "-fvisibility=default" "$(inherited)"', - 'OTHER_CFLAGS' => '"-fvisibility=default" "$(inherited)"', - 'USER_HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/include" "${PODS_TARGET_SRCROOT}/include/filament" "$(inherited)"', - 'ALWAYS_SEARCH_USER_PATHS' => 'YES', - "OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -limageio -ltinyexr -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -lpng -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd -lvkshaders -lbluegl -lbluevk -lbasis_transcoder -lmeshoptimizer', - 'LIBRARY_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/lib" "$(inherited)"', - } - s.swift_version = '5.0' - -end diff --git a/macos/lib/libbackend.a b/macos/lib/libbackend.a deleted file mode 100644 index bb816e82..00000000 --- a/macos/lib/libbackend.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09757d5b57757ec3acb4155dd7ecc440dfa5745112ebe896a8c91452f511f7d1 -size 3831840 diff --git a/macos/lib/libbackend_test.a b/macos/lib/libbackend_test.a deleted file mode 100644 index 869b7689..00000000 --- a/macos/lib/libbackend_test.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0fa1e6af01b8d8a7d14415e4957dd0abc21acef6e63179b66e3369cf275e024d -size 873832 diff --git a/macos/lib/libbackendtest_combined.a b/macos/lib/libbackendtest_combined.a deleted file mode 100644 index 5e5c3b49..00000000 --- a/macos/lib/libbackendtest_combined.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67c07db47f89dc63159acc217f2ca01bb726858f81f992d27358700f3c58dddb -size 2078304 diff --git a/macos/lib/libbasis_transcoder.a b/macos/lib/libbasis_transcoder.a deleted file mode 100644 index 4be8a115..00000000 --- a/macos/lib/libbasis_transcoder.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1d7ba1b5ec9a6819f908c7b1807d6dd4acc7fba449bbcad71f2d11107fa0215c -size 982664 diff --git a/macos/lib/libbluegl.a b/macos/lib/libbluegl.a deleted file mode 100644 index 91fe1ce4..00000000 --- a/macos/lib/libbluegl.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:56eb2cd30a3b38666da15daa09317ae8973137bfcfd25fac814f2b03c6d8d30c -size 1701896 diff --git a/macos/lib/libbluevk.a b/macos/lib/libbluevk.a deleted file mode 100644 index 1055183e..00000000 --- a/macos/lib/libbluevk.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:02262fbb49ba069b9ff7eb19dbd7d7500e3568da781722f6a0c5e9a53f09b3c9 -size 217552 diff --git a/macos/lib/libcamutils.a b/macos/lib/libcamutils.a deleted file mode 100644 index 12e23642..00000000 --- a/macos/lib/libcamutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9e0797b06fb490ecf4c64e16006149290d01c92595d083e37593b2c490b2c66c -size 130544 diff --git a/macos/lib/libcivetweb.a b/macos/lib/libcivetweb.a deleted file mode 100644 index a40b5ea3..00000000 --- a/macos/lib/libcivetweb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:43026aa84bae0aad8958c10bc85b0291d732bb24aaacbe97a5021cf6b924975c -size 475008 diff --git a/macos/lib/libdracodec.a b/macos/lib/libdracodec.a deleted file mode 100644 index a81a7169..00000000 --- a/macos/lib/libdracodec.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c70050d2339debde79794beb5bc11c2bbce77626167bb7f59efdc04221025336 -size 3661992 diff --git a/macos/lib/libfilabridge.a b/macos/lib/libfilabridge.a deleted file mode 100644 index 5af1257a..00000000 --- a/macos/lib/libfilabridge.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:def34717d6cd325271d68914def6f48c7d6cac9f9c491e68a1bf473634c39ddc -size 88016 diff --git a/macos/lib/libfilaflat.a b/macos/lib/libfilaflat.a deleted file mode 100644 index 05546b71..00000000 --- a/macos/lib/libfilaflat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a4f7b1cdfe29d1de31069d2b6b0ccab463544d76cf868ab46f30a80001ad442f -size 67160 diff --git a/macos/lib/libfilagui.a b/macos/lib/libfilagui.a deleted file mode 100644 index fc01079c..00000000 --- a/macos/lib/libfilagui.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3489e9fda68af9a5401b134660288fbf6f40b6ed4bdcdca7ad57f619df4e1685 -size 239408 diff --git a/macos/lib/libfilamat.a b/macos/lib/libfilamat.a deleted file mode 100644 index 2a7e9f24..00000000 --- a/macos/lib/libfilamat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9b664bba6ce2e6c4557195f3306347e5984c215c36d4242b21ed43f2a93f96d5 -size 1491016 diff --git a/macos/lib/libfilamat_combined.a b/macos/lib/libfilamat_combined.a deleted file mode 100644 index 97e600d3..00000000 --- a/macos/lib/libfilamat_combined.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:32b5db3f25f6ae708a9df7e5b1b8eb1df80df1e4719ab59336c375c5015e28ae -size 39527640 diff --git a/macos/lib/libfilamat_lite.a b/macos/lib/libfilamat_lite.a deleted file mode 100644 index 6aa7f6c0..00000000 --- a/macos/lib/libfilamat_lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c5159dbdbe33a2cbd3657a750f6526c97f5c6070df31c6eb14bf0dc80672bbb2 -size 892408 diff --git a/macos/lib/libfilament-iblprefilter.a b/macos/lib/libfilament-iblprefilter.a deleted file mode 100644 index b6900ed4..00000000 --- a/macos/lib/libfilament-iblprefilter.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5ec5dc0c50beb55fc366a9c9e506faec8617d1dfb6fb5dfbdaf79cae837cf63c -size 144376 diff --git a/macos/lib/libfilament.a b/macos/lib/libfilament.a deleted file mode 100644 index 28c6d27c..00000000 --- a/macos/lib/libfilament.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:36dc692e24212451cad53d84306137d56d995e0bc648b34c2d1bb263f4168d18 -size 4681896 diff --git a/macos/lib/libfilamentapp-resources.a b/macos/lib/libfilamentapp-resources.a deleted file mode 100644 index 93ca4d8f..00000000 --- a/macos/lib/libfilamentapp-resources.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e848551b716a74831fd8e7c5d50c883bb0d7bcfbd34c5c26233459d4fc8ba9ba -size 4589600 diff --git a/macos/lib/libfilamentapp.a b/macos/lib/libfilamentapp.a deleted file mode 100644 index 1f537a18..00000000 --- a/macos/lib/libfilamentapp.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d3e2f971133340bb0eab9138c71cf10440d4c026a520014655f4f0fc69b21663 -size 471912 diff --git a/macos/lib/libfilameshio.a b/macos/lib/libfilameshio.a deleted file mode 100644 index 2006affd..00000000 --- a/macos/lib/libfilameshio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2937613ada10541708b2aa33966b7e86ead5df33fd79177b19b44cf314429fdb -size 58216 diff --git a/macos/lib/libgeometry.a b/macos/lib/libgeometry.a deleted file mode 100644 index 3df0ea94..00000000 --- a/macos/lib/libgeometry.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a24df1eb3b34d9ee0c47bbae6d9e70d623c4bc854f2de4101a48a9a95880f6f5 -size 153032 diff --git a/macos/lib/libgeometry_combined.a b/macos/lib/libgeometry_combined.a deleted file mode 100644 index 877337f5..00000000 --- a/macos/lib/libgeometry_combined.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e2ae9e4155fb6b007c0b4607ad3bbf95f0b7b5ec2b624dad69202a6f28f4d22c -size 153144 diff --git a/macos/lib/libgltfio.a b/macos/lib/libgltfio.a deleted file mode 100644 index 53cf59cb..00000000 --- a/macos/lib/libgltfio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:283ac8a7ac3a5d5b1c4ab56b46c500f759595099cf09089b6fb0d763aaec4284 -size 65576 diff --git a/macos/lib/libgltfio_core.a b/macos/lib/libgltfio_core.a deleted file mode 100644 index 1bef6ffc..00000000 --- a/macos/lib/libgltfio_core.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7f8ff2f2049d5825b0868251020d01c42a66a60950754e88379efdcf39796a9a -size 1678080 diff --git a/macos/lib/libibl-lite.a b/macos/lib/libibl-lite.a deleted file mode 100644 index 03415113..00000000 --- a/macos/lib/libibl-lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:15229f75c9fa7a3cf70e0a65d2e34c7a4e85644975b5c5253cad8fd0d3b5a9d8 -size 530544 diff --git a/macos/lib/libibl.a b/macos/lib/libibl.a deleted file mode 100644 index bf7b7d77..00000000 --- a/macos/lib/libibl.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a40e6f5e2f50fb16a457afee0e988f98f219cb3930c4f3b4b2cd01e8d218041b -size 648424 diff --git a/macos/lib/libimage.a b/macos/lib/libimage.a deleted file mode 100644 index dd3e62f3..00000000 --- a/macos/lib/libimage.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:29ea19346b4ab0bb83246c0ec820b14ad634b9637eb957f0743ec44af24a2337 -size 150640 diff --git a/macos/lib/libimageio.a b/macos/lib/libimageio.a deleted file mode 100644 index 557c9a81..00000000 --- a/macos/lib/libimageio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d9e127b2cf73ac440a80136b4e4122b322b4389a4096cd4935aba699d5d53bf2 -size 253968 diff --git a/macos/lib/libktxreader.a b/macos/lib/libktxreader.a deleted file mode 100644 index 47a8bca9..00000000 --- a/macos/lib/libktxreader.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc26fd72a9c51c1f9c6e669c7c83e96f63da9859ff783ace9b7217931c146346 -size 72200 diff --git a/macos/lib/libmatdbg.a b/macos/lib/libmatdbg.a deleted file mode 100644 index eff95b0d..00000000 --- a/macos/lib/libmatdbg.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0ebee6abd2614267eb8863d2f587aa1aa1257411ee8542ac5e988d0ad9a62b79 -size 425480 diff --git a/macos/lib/libmatdbg_combined.a b/macos/lib/libmatdbg_combined.a deleted file mode 100644 index 4e6e3d35..00000000 --- a/macos/lib/libmatdbg_combined.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:14c2fb432233dc9892807f27f90651eb8d7f7a7483c20354e5494a15c022e0ea -size 10639272 diff --git a/macos/lib/libmatdbg_resources.a b/macos/lib/libmatdbg_resources.a deleted file mode 100644 index 1a8e0ee6..00000000 --- a/macos/lib/libmatdbg_resources.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f0cfb5a4b14f4cf7331756038af1100117c9ec9d2e19160cb7a681c26fbf37b0 -size 46968 diff --git a/macos/lib/libmath.a b/macos/lib/libmath.a deleted file mode 100644 index 3fa1114b..00000000 --- a/macos/lib/libmath.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f72d56b122b391c7f3502184d476b4ce27f0b4a8275713d9c224821c9b10c0b1 -size 944 diff --git a/macos/lib/libmathio.a b/macos/lib/libmathio.a deleted file mode 100644 index 9fbd4993..00000000 --- a/macos/lib/libmathio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bafc1948b89206f781ea809f04c922e161d28875dcc8952d9d8466ca5b971748 -size 66904 diff --git a/macos/lib/libmeshoptimizer.a b/macos/lib/libmeshoptimizer.a deleted file mode 100644 index 54b0cffc..00000000 --- a/macos/lib/libmeshoptimizer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7208c167a3e069c07c5f6fd7340d8a82015d4bea600f29e513c75ebc0bfda551 -size 225072 diff --git a/macos/lib/libmikktspace.a b/macos/lib/libmikktspace.a deleted file mode 100644 index ed471b54..00000000 --- a/macos/lib/libmikktspace.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9cb8d4053830589f7e2569ce60962e33f550bdd2fd8511be5d40dc94317e20af -size 42888 diff --git a/macos/lib/libpng.a b/macos/lib/libpng.a deleted file mode 100644 index ba0f6108..00000000 --- a/macos/lib/libpng.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a9f9670d0e7a745d717e25c567440bbede44e45d86694957a072a7285d53b86 -size 612144 diff --git a/macos/lib/libshaders.a b/macos/lib/libshaders.a deleted file mode 100644 index 9f748ec6..00000000 --- a/macos/lib/libshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:161adfa9f2311777aaaebbee3085821f92653d5af78aaa91ff135e31212e38b3 -size 254568 diff --git a/macos/lib/libsmol-v.a b/macos/lib/libsmol-v.a deleted file mode 100644 index c0460962..00000000 --- a/macos/lib/libsmol-v.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:319641d38e7e4b3b3a3457157535eb4bdd4706f94879721402fa8b9072f9be85 -size 74048 diff --git a/macos/lib/libstb.a b/macos/lib/libstb.a deleted file mode 100644 index ccf49f36..00000000 --- a/macos/lib/libstb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f91237fb0be219506b164bf090f2b9595e281dcacff18849873243887f25c372 -size 213552 diff --git a/macos/lib/libtinyexr.a b/macos/lib/libtinyexr.a deleted file mode 100644 index 6684ff28..00000000 --- a/macos/lib/libtinyexr.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:34ad29c149c864f29c177321c08552bac39e39c20fb6395191221d3aacddaa08 -size 290424 diff --git a/macos/lib/libuberarchive.a b/macos/lib/libuberarchive.a deleted file mode 100644 index 5e4e729e..00000000 --- a/macos/lib/libuberarchive.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1d3f9b5ee96c8c4e6d7c183a46c5bb5d440d506c9e3cdc315db4c9fb4d079896 -size 5194504 diff --git a/macos/lib/libuberzlib.a b/macos/lib/libuberzlib.a deleted file mode 100644 index 006cff0f..00000000 --- a/macos/lib/libuberzlib.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a42644f21e60c7cbc10fef26115e6a46ffb65d19fa9155139f0e345d82db9f3a -size 46424 diff --git a/macos/lib/libutils.a b/macos/lib/libutils.a deleted file mode 100644 index 95a3e7c5..00000000 --- a/macos/lib/libutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:62aac58956fc98020132057b653ecd27d91fa808d3920be78d260da31ca0e8be -size 387064 diff --git a/macos/lib/libviewer.a b/macos/lib/libviewer.a deleted file mode 100644 index 1f7cd238..00000000 --- a/macos/lib/libviewer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:413b97827518e7b4518de298a95d39a58f018adc1b88072da7a2513adc2b6d8f -size 658432 diff --git a/macos/lib/libvkshaders.a b/macos/lib/libvkshaders.a deleted file mode 100644 index 2fff20bb..00000000 --- a/macos/lib/libvkshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5121cc0a5bef025d3c61769024dc784db85bef596135e13da9df9e143d121936 -size 4016 diff --git a/macos/lib/libzstd.a b/macos/lib/libzstd.a deleted file mode 100644 index 3c73185d..00000000 --- a/macos/lib/libzstd.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:36944974c247b8e7daba6d2d2d55fb840c7dc812cc5fd88c9c904582597c3025 -size 1451440 diff --git a/materials/Makefile b/materials/Makefile new file mode 100644 index 00000000..1fd88cde --- /dev/null +++ b/materials/Makefile @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14a484a441dacbc49ce6b8b189a8900a7bb2ab2072731a3a493676aa046b5888 +size 1009 diff --git a/materials/gizmo.filamat b/materials/gizmo.filamat new file mode 100644 index 00000000..905361a9 --- /dev/null +++ b/materials/gizmo.filamat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f51fc0e67176e28fdf75f351834fa1d36b0993be066d5685eef10aa30ae68b1b +size 26876 diff --git a/materials/gizmo.mat b/materials/gizmo.mat new file mode 100644 index 00000000..5b7bc75b --- /dev/null +++ b/materials/gizmo.mat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3158461d081f058dcb9582ce19cc2daedc73abbe758ba5094c94df89028d8c4d +size 981 diff --git a/materials/image.filamat b/materials/image.filamat new file mode 100644 index 00000000..afb6454a --- /dev/null +++ b/materials/image.filamat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e709d2481f88bf81153a316c0e118f03e89dc7fe99272091d6884ceaac4233ff +size 37409 diff --git a/materials/image.mat b/materials/image.mat index 5acabd9f..0775f048 100644 --- a/materials/image.mat +++ b/materials/image.mat @@ -1,54 +1,3 @@ -material { - name : Image, - parameters : [ - { - type : sampler2d, - name : image - }, - { - type : mat4, - name : transform, - precision : high - }, - { - type : float3, - name : backgroundColor - }, - { - type : int, - name : showImage - } - ], - variables : [ - imageUV - ], - vertexDomain : device, - depthWrite : false, - shadingModel : unlit, - variantFilter : [ skinning, shadowReceiver, vsm ], - culling: none -} - -vertex { - void materialVertex(inout MaterialVertexInputs material) { - material.imageUV.st = getPosition().st * 0.5 + 0.5; - } -} - -fragment { - void material(inout MaterialInputs material) { - prepareMaterial(material); - - vec4 bg = vec4(materialParams.backgroundColor, 1.0); - highp vec2 uv = (materialParams.transform * vec4(saturate(variable_imageUV.st), 1.0, 1.0)).st; - if (materialParams.showImage == 0 || uv.s > 1.0 || uv.s < 0.0 || uv.t < 0.0 || uv.t > 1.0) { - material.baseColor = bg; - } else { - uv.t = 1.0 - uv.t; - vec4 color = max(texture(materialParams_image, uv.st), 0.0); - color.rgb *= color.a; - // Manual, pre-multiplied srcOver with opaque destination optimization - material.baseColor.rgb = color.rgb + bg.rgb * (1.0 - color.a); - } - } -} +version https://git-lfs.github.com/spec/v1 +oid sha256:273059c97f96c6848807914d937583864445b51d8e0f1cd98c3e4e0e4bd9f411 +size 1451 diff --git a/materials/unlit_fade.mat b/materials/unlit_fade.mat index 55ef76d0..846cd441 100644 --- a/materials/unlit_fade.mat +++ b/materials/unlit_fade.mat @@ -1,178 +1,3 @@ -material { - name : unlit_fade, - requires : [ uv0, uv1, color ], - shadingModel : ${SHADINGMODEL}, - blending : ${BLENDING}, - doubleSided : ${DOUBLESIDED}, - transparency : ${TRANSPARENCY}, - flipUV : false, - specularAmbientOcclusion : simple, - specularAntiAliasing : true, - clearCoatIorChange : false, - reflections : screenspace, - parameters : [ - - { type : float3, name : specularFactor }, - { type : float, name : glossinessFactor }, - - // Base Color - { type : int, name : baseColorIndex }, - { type : float4, name : baseColorFactor }, - { type : sampler2d, name : baseColorMap }, - { type : mat3, name : baseColorUvMatrix, precision: high }, - - // Metallic-Roughness Map - { type : int, name : metallicRoughnessIndex }, - { type : float, name : metallicFactor }, - { type : float, name : roughnessFactor }, - { type : sampler2d, name : metallicRoughnessMap }, - { type : mat3, name : metallicRoughnessUvMatrix, precision: high }, - - // Normal Map - { type : int, name : normalIndex }, - { type : float, name : normalScale }, - { type : sampler2d, name : normalMap }, - { type : mat3, name : normalUvMatrix, precision: high }, - - // Ambient Occlusion - { type : int, name : aoIndex }, - { type : float, name : aoStrength }, - { type : sampler2d, name : occlusionMap }, - { type : mat3, name : occlusionUvMatrix, precision: high }, - - // Emissive Map - { type : int, name : emissiveIndex }, - { type : float3, name : emissiveFactor }, - { type : float, name : emissiveStrength }, - { type : sampler2d, name : emissiveMap }, - { type : mat3, name : emissiveUvMatrix, precision: high }, - - // Clear coat - { type : float, name : clearCoatFactor }, - { type : float, name : clearCoatRoughnessFactor }, - { type : int, name : clearCoatIndex }, - { type : sampler2d, name : clearCoatMap }, - { type : mat3, name : clearCoatUvMatrix, precision: high }, - { type : int, name : clearCoatRoughnessIndex }, - { type : sampler2d, name : clearCoatRoughnessMap }, - { type : mat3, name : clearCoatRoughnessUvMatrix, precision: high }, - { type : int, name : clearCoatNormalIndex }, - { type : sampler2d, name : clearCoatNormalMap }, - { type : mat3, name : clearCoatNormalUvMatrix, precision: high }, - { type : float, name : clearCoatNormalScale }, - - // Reflectance - { type : float, name : reflectance } - - ${CUSTOM_PARAMS} - ], -} - -vertex { - void materialVertex(inout MaterialVertexInputs material) { - ${CUSTOM_VERTEX} - } -} - -fragment { - void material(inout MaterialInputs material) { - highp float2 uvs[2]; - uvs[0] = getUV0(); - uvs[1] = getUV1(); - - #if !defined(SHADING_MODEL_UNLIT) - if (materialParams.normalIndex > -1) { - highp float2 uv = uvs[materialParams.normalIndex]; - uv = (vec3(uv, 1.0) * materialParams.normalUvMatrix).xy; - material.normal = texture(materialParams_normalMap, uv).xyz * 2.0 - 1.0; - material.normal.xy *= materialParams.normalScale; - } - #if defined(SHADING_MODEL_LIT) - if (materialParams.clearCoatNormalIndex > -1) { - highp float2 uv = uvs[materialParams.clearCoatNormalIndex]; - uv = (vec3(uv, 1.0) * materialParams.clearCoatNormalUvMatrix).xy; - material.clearCoatNormal = texture(materialParams_clearCoatNormalMap, uv).xyz * 2.0 - 1.0; - material.clearCoatNormal.xy *= materialParams.clearCoatNormalScale; - } - #endif - #endif - - prepareMaterial(material); - material.baseColor = materialParams.baseColorFactor; - - if (materialParams.baseColorIndex > -1) { - highp float2 uv = uvs[materialParams.baseColorIndex]; - uv = (vec3(uv, 1.0) * materialParams.baseColorUvMatrix).xy; - material.baseColor *= texture(materialParams_baseColorMap, uv); - } - - #if defined(BLEND_MODE_TRANSPARENT) - material.baseColor.rgb *= material.baseColor.a; - #endif - - material.baseColor *= getColor(); - - #if !defined(SHADING_MODEL_UNLIT) - - #if defined(SHADING_MODEL_LIT) - material.roughness = materialParams.roughnessFactor; - material.metallic = materialParams.metallicFactor; - - // KHR_materials_clearcoat forbids clear coat from - // being applied in the specular/glossiness model - material.clearCoat = materialParams.clearCoatFactor; - material.clearCoatRoughness = materialParams.clearCoatRoughnessFactor; - - if (materialParams.clearCoatIndex > -1) { - highp float2 uv = uvs[materialParams.clearCoatIndex]; - uv = (vec3(uv, 1.0) * materialParams.clearCoatUvMatrix).xy; - material.clearCoat *= texture(materialParams_clearCoatMap, uv).r; - } - if (materialParams.clearCoatRoughnessIndex > -1) { - highp float2 uv = uvs[materialParams.clearCoatRoughnessIndex]; - uv = (vec3(uv, 1.0) * materialParams.clearCoatRoughnessUvMatrix).xy; - material.clearCoatRoughness *= texture(materialParams_clearCoatRoughnessMap, uv).g; - } - #endif - - material.emissive = vec4(materialParams.emissiveStrength * - materialParams.emissiveFactor.rgb, 0.0); - - #if defined(SHADING_MODEL_SPECULAR_GLOSSINESS) - material.glossiness = materialParams.glossinessFactor; - material.specularColor = materialParams.specularFactor; - #else - material.reflectance = materialParams.reflectance; - #endif - - if (materialParams.metallicRoughnessIndex > -1) { - highp float2 uv = uvs[materialParams.metallicRoughnessIndex]; - uv = (vec3(uv, 1.0) * materialParams.metallicRoughnessUvMatrix).xy; - - #if defined(SHADING_MODEL_SPECULAR_GLOSSINESS) - vec4 sg = texture(materialParams_metallicRoughnessMap, uv); - material.specularColor *= sg.rgb; - material.glossiness *= sg.a; - #else - vec4 mr = texture(materialParams_metallicRoughnessMap, uv); - material.roughness *= mr.g; - material.metallic *= mr.b; - #endif - } - - if (materialParams.aoIndex > -1) { - highp float2 uv = uvs[materialParams.aoIndex]; - uv = (vec3(uv, 1.0) * materialParams.occlusionUvMatrix).xy; - float occlusion = texture(materialParams_occlusionMap, uv).r; - material.ambientOcclusion = 1.0 + materialParams.aoStrength * (occlusion - 1.0); - } - if (materialParams.emissiveIndex > -1) { - highp float2 uv = uvs[materialParams.emissiveIndex]; - uv = (vec3(uv, 1.0) * materialParams.emissiveUvMatrix).xy; - material.emissive.rgb *= texture(materialParams_emissiveMap, uv).rgb; - } - #endif - - ${CUSTOM_FRAGMENT} - } -} +version https://git-lfs.github.com/spec/v1 +oid sha256:bca5e20d7fa68fbc2bb7fa3cd65b07e0ac35c8cf961686cfaa267a941ab96d8f +size 7393 diff --git a/materials/unlit_opaque.mat b/materials/unlit_opaque.mat index 1b0722cb..a322a468 100644 --- a/materials/unlit_opaque.mat +++ b/materials/unlit_opaque.mat @@ -1,178 +1,3 @@ -material { - name : unlit_opaque, - requires : [ uv0, uv1, color ], - shadingModel : unlit, - blending : ${BLENDING}, - doubleSided : ${DOUBLESIDED}, - transparency : ${TRANSPARENCY}, - flipUV : false, - specularAmbientOcclusion : simple, - specularAntiAliasing : true, - clearCoatIorChange : false, - reflections : screenspace, - parameters : [ - - { type : float3, name : specularFactor }, - { type : float, name : glossinessFactor }, - - // Base Color - { type : int, name : baseColorIndex }, - { type : float4, name : baseColorFactor }, - { type : sampler2d, name : baseColorMap }, - { type : mat3, name : baseColorUvMatrix, precision: high }, - - // Metallic-Roughness Map - { type : int, name : metallicRoughnessIndex }, - { type : float, name : metallicFactor }, - { type : float, name : roughnessFactor }, - { type : sampler2d, name : metallicRoughnessMap }, - { type : mat3, name : metallicRoughnessUvMatrix, precision: high }, - - // Normal Map - { type : int, name : normalIndex }, - { type : float, name : normalScale }, - { type : sampler2d, name : normalMap }, - { type : mat3, name : normalUvMatrix, precision: high }, - - // Ambient Occlusion - { type : int, name : aoIndex }, - { type : float, name : aoStrength }, - { type : sampler2d, name : occlusionMap }, - { type : mat3, name : occlusionUvMatrix, precision: high }, - - // Emissive Map - { type : int, name : emissiveIndex }, - { type : float3, name : emissiveFactor }, - { type : float, name : emissiveStrength }, - { type : sampler2d, name : emissiveMap }, - { type : mat3, name : emissiveUvMatrix, precision: high }, - - // Clear coat - { type : float, name : clearCoatFactor }, - { type : float, name : clearCoatRoughnessFactor }, - { type : int, name : clearCoatIndex }, - { type : sampler2d, name : clearCoatMap }, - { type : mat3, name : clearCoatUvMatrix, precision: high }, - { type : int, name : clearCoatRoughnessIndex }, - { type : sampler2d, name : clearCoatRoughnessMap }, - { type : mat3, name : clearCoatRoughnessUvMatrix, precision: high }, - { type : int, name : clearCoatNormalIndex }, - { type : sampler2d, name : clearCoatNormalMap }, - { type : mat3, name : clearCoatNormalUvMatrix, precision: high }, - { type : float, name : clearCoatNormalScale }, - - // Reflectance - { type : float, name : reflectance } - - ${CUSTOM_PARAMS} - ], -} - -vertex { - void materialVertex(inout MaterialVertexInputs material) { - ${CUSTOM_VERTEX} - } -} - -fragment { - void material(inout MaterialInputs material) { - highp float2 uvs[2]; - uvs[0] = getUV0(); - uvs[1] = getUV1(); - - #if !defined(SHADING_MODEL_UNLIT) - if (materialParams.normalIndex > -1) { - highp float2 uv = uvs[materialParams.normalIndex]; - uv = (vec3(uv, 1.0) * materialParams.normalUvMatrix).xy; - material.normal = texture(materialParams_normalMap, uv).xyz * 2.0 - 1.0; - material.normal.xy *= materialParams.normalScale; - } - #if defined(SHADING_MODEL_LIT) - if (materialParams.clearCoatNormalIndex > -1) { - highp float2 uv = uvs[materialParams.clearCoatNormalIndex]; - uv = (vec3(uv, 1.0) * materialParams.clearCoatNormalUvMatrix).xy; - material.clearCoatNormal = texture(materialParams_clearCoatNormalMap, uv).xyz * 2.0 - 1.0; - material.clearCoatNormal.xy *= materialParams.clearCoatNormalScale; - } - #endif - #endif - - prepareMaterial(material); - material.baseColor = materialParams.baseColorFactor; - - if (materialParams.baseColorIndex > -1) { - highp float2 uv = uvs[materialParams.baseColorIndex]; - uv = (vec3(uv, 1.0) * materialParams.baseColorUvMatrix).xy; - material.baseColor *= texture(materialParams_baseColorMap, uv); - } - - #if defined(BLEND_MODE_TRANSPARENT) - material.baseColor.rgb *= material.baseColor.a; - #endif - - material.baseColor *= getColor(); - - #if !defined(SHADING_MODEL_UNLIT) - - #if defined(SHADING_MODEL_LIT) - material.roughness = materialParams.roughnessFactor; - material.metallic = materialParams.metallicFactor; - - // KHR_materials_clearcoat forbids clear coat from - // being applied in the specular/glossiness model - material.clearCoat = materialParams.clearCoatFactor; - material.clearCoatRoughness = materialParams.clearCoatRoughnessFactor; - - if (materialParams.clearCoatIndex > -1) { - highp float2 uv = uvs[materialParams.clearCoatIndex]; - uv = (vec3(uv, 1.0) * materialParams.clearCoatUvMatrix).xy; - material.clearCoat *= texture(materialParams_clearCoatMap, uv).r; - } - if (materialParams.clearCoatRoughnessIndex > -1) { - highp float2 uv = uvs[materialParams.clearCoatRoughnessIndex]; - uv = (vec3(uv, 1.0) * materialParams.clearCoatRoughnessUvMatrix).xy; - material.clearCoatRoughness *= texture(materialParams_clearCoatRoughnessMap, uv).g; - } - #endif - - material.emissive = vec4(materialParams.emissiveStrength * - materialParams.emissiveFactor.rgb, 0.0); - - #if defined(SHADING_MODEL_SPECULAR_GLOSSINESS) - material.glossiness = materialParams.glossinessFactor; - material.specularColor = materialParams.specularFactor; - #else - material.reflectance = materialParams.reflectance; - #endif - - if (materialParams.metallicRoughnessIndex > -1) { - highp float2 uv = uvs[materialParams.metallicRoughnessIndex]; - uv = (vec3(uv, 1.0) * materialParams.metallicRoughnessUvMatrix).xy; - - #if defined(SHADING_MODEL_SPECULAR_GLOSSINESS) - vec4 sg = texture(materialParams_metallicRoughnessMap, uv); - material.specularColor *= sg.rgb; - material.glossiness *= sg.a; - #else - vec4 mr = texture(materialParams_metallicRoughnessMap, uv); - material.roughness *= mr.g; - material.metallic *= mr.b; - #endif - } - - if (materialParams.aoIndex > -1) { - highp float2 uv = uvs[materialParams.aoIndex]; - uv = (vec3(uv, 1.0) * materialParams.occlusionUvMatrix).xy; - float occlusion = texture(materialParams_occlusionMap, uv).r; - material.ambientOcclusion = 1.0 + materialParams.aoStrength * (occlusion - 1.0); - } - if (materialParams.emissiveIndex > -1) { - highp float2 uv = uvs[materialParams.emissiveIndex]; - uv = (vec3(uv, 1.0) * materialParams.emissiveUvMatrix).xy; - material.emissive.rgb *= texture(materialParams_emissiveMap, uv).rgb; - } - #endif - - ${CUSTOM_FRAGMENT} - } -} +version https://git-lfs.github.com/spec/v1 +oid sha256:4abb9e737d20956cced366af6a54dd31ab17cc8d0d1773f02c57a5712760fe10 +size 7385 diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index 73757d23..00000000 --- a/pubspec.lock +++ /dev/null @@ -1,290 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - args: - dependency: transitive - description: - name: args - sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440" - url: "https://pub.dev" - source: hosted - version: "2.4.0" - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - characters: - dependency: transitive - description: - name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - cli_util: - dependency: transitive - description: - name: cli_util - sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7 - url: "https://pub.dev" - source: hosted - version: "0.4.0" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - collection: - dependency: transitive - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - ffi: - dependency: "direct main" - description: - name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 - url: "https://pub.dev" - source: hosted - version: "2.0.1" - ffigen: - dependency: "direct dev" - description: - name: ffigen - sha256: "3a80687577e7e51ba915114742f389a128e8aa241c52ce69a0f70aecb8e14365" - url: "https://pub.dev" - source: hosted - version: "9.0.1" - file: - dependency: transitive - description: - name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493 - url: "https://pub.dev" - source: hosted - version: "1.0.4" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - glob: - dependency: transitive - description: - name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - lints: - dependency: transitive - description: - name: lints - sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c - url: "https://pub.dev" - source: hosted - version: "1.0.1" - logging: - dependency: transitive - description: - name: logging - sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - matcher: - dependency: transitive - description: - name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" - url: "https://pub.dev" - source: hosted - version: "0.12.16" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" - url: "https://pub.dev" - source: hosted - version: "0.5.0" - meta: - dependency: transitive - description: - name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e - url: "https://pub.dev" - source: hosted - version: "1.10.0" - package_config: - dependency: transitive - description: - name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - path: - dependency: transitive - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" - plugin_platform_interface: - dependency: "direct main" - description: - name: plugin_platform_interface - sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a - url: "https://pub.dev" - source: hosted - version: "2.1.3" - quiver: - dependency: transitive - description: - name: quiver - sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 - url: "https://pub.dev" - source: hosted - version: "3.2.1" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" - tuple: - dependency: "direct main" - description: - name: tuple - sha256: "0ea99cd2f9352b2586583ab2ce6489d1f95a5f6de6fb9492faaf97ae2060f0aa" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - vector_math: - dependency: "direct main" - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - web: - dependency: transitive - description: - name: web - sha256: "14f1f70c51119012600c5f1f60ca68efda5a9b6077748163c6af2893ec5df8fc" - url: "https://pub.dev" - source: hosted - version: "0.2.1-beta" - yaml: - dependency: transitive - description: - name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - yaml_edit: - dependency: transitive - description: - name: yaml_edit - sha256: "0b968021754d8fbd3e9c83563b538ee417d88b2cc587606da5615546b7ee033b" - url: "https://pub.dev" - source: hosted - version: "2.1.0" -sdks: - dart: ">=3.2.0-157.0.dev <4.0.0" - flutter: ">=3.16.0-0.2.pre" diff --git a/pubspec.yaml b/pubspec.yaml deleted file mode 100644 index 6c0af69a..00000000 --- a/pubspec.yaml +++ /dev/null @@ -1,49 +0,0 @@ -name: flutter_filament -description: A Flutter plugin to wrap the Filament rendering engine. -version: 0.5.0 -homepage: - -environment: - sdk: ">=3.0.0 <4.0.0" - flutter: ">=3.16.0-0.2.pre" - -dependencies: - flutter: - sdk: flutter - flutter_web_plugins: - sdk: flutter - vector_math: ^2.1.2 - plugin_platform_interface: ^2.0.0 - tuple: - ffi: - -dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^1.0.0 - ffigen: ^9.0.1 - -ffigen: - output: 'lib/generated_bindings.dart' - headers: - entry-points: - - 'ios/include/FlutterFilamentFFIApi.h' - ffi-native: - asset: 'flutter_filament_plugin' -flutter: - plugin: - platforms: - android: - pluginClass: FlutterFilamentPlugin - package: app.polyvox.filament - ios: - pluginClass: SwiftFlutterFilamentPlugin - macos: - pluginClass: SwiftFlutterFilamentPlugin - windows: - pluginClass: FlutterFilamentPluginCApi - linux: - pluginClass: FlutterFilamentPlugin - web: - pluginClass: FlutterFilamentPluginWeb - fileName: FlutterFilamentPluginWeb.dart diff --git a/thermion_dart/.gitattributes b/thermion_dart/.gitattributes new file mode 100644 index 00000000..01df7502 --- /dev/null +++ b/thermion_dart/.gitattributes @@ -0,0 +1,56 @@ +native/web/lib/release/libvkshaders.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libz.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libbenchmark_main.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libfilagui.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libgtest.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libibl.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libpng.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libspirv-cross-core.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libmikktspace.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libshaders.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libimgui.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libbluevk.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libfilameshio.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libimageio.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libsmol-v.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libgtest.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libvkshaders.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libcamutils.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libtinyexr.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libspirv-cross-glsl.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libbenchmark_main.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libfilagui.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libfilament-iblprefilter.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libgeometry_combined.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libibl.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libSPIRV-Tools.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libfilamat.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libfilamat_combined.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libglslang.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libmathio.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libbenchmark.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libviewer.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libgetopt.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libcivetweb.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libSPIRV.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libfilament-iblprefilter.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libgetopt.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libviewer.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libfilameshio.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libsmol-v.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libimgui.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libmathio.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libbenchmark.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libshaders.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/debug/libcamutils.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libOGLCompiler.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libSPIRV-Tools-opt.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libassimp.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libbluegl.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libgeometry_combined.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libspirv-cross-msl.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libOSDependent.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libcivetweb.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libmatlang.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/release/libmikktspace.a filter=lfs diff=lfs merge=lfs -text +native/web/lib/**/*.a filter=lfs diff=lfs merge=lfs -text diff --git a/thermion_dart/.gitignore b/thermion_dart/.gitignore new file mode 100644 index 00000000..f8c0ca47 --- /dev/null +++ b/thermion_dart/.gitignore @@ -0,0 +1,4 @@ +native/web/build/ +native/web/lib/**/* +pubspec.lock +test/output/* \ No newline at end of file diff --git a/thermion_dart/CHANGELOG.md b/thermion_dart/CHANGELOG.md new file mode 100644 index 00000000..feb7a4bf --- /dev/null +++ b/thermion_dart/CHANGELOG.md @@ -0,0 +1,2 @@ +## 0.0.1 +* First release of Dart-only package diff --git a/thermion_dart/LICENSE b/thermion_dart/LICENSE new file mode 100644 index 00000000..e6853914 --- /dev/null +++ b/thermion_dart/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024 Nick Fisher + + 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. diff --git a/thermion_dart/README.md b/thermion_dart/README.md new file mode 100644 index 00000000..12053abd --- /dev/null +++ b/thermion_dart/README.md @@ -0,0 +1,22 @@ +![Thermion Logo](https://raw.githubusercontent.com/nmfisher/flutter_filament/f19ea9b/docs/logo.png) + +

+ Quickstart (Flutter) • + Documentation • + Showcase • + Discord +

+ +## Cross-platform 3D engine for Dart and Flutter. + +pub +github +discord +contributors + +### Features + +- Supports iOS (arm64), MacOS (arm64/x64), Android (arm64), Windows (x64) (>= 10), Web/WASM +- glTF, KTX, PNG & JPEG texture support +- camera/entity manipulation with mouse (desktop) and gestures (mobile) +- skinning + morph animations diff --git a/thermion_dart/ffigen/native.yaml b/thermion_dart/ffigen/native.yaml new file mode 100644 index 00000000..c4472fde --- /dev/null +++ b/thermion_dart/ffigen/native.yaml @@ -0,0 +1,13 @@ +output: '../lib/thermion_dart/compatibility/native/thermion_dart.g.dart' +headers: + entry-points: + - '../native/include/ThermionDartFFIApi.h' + - '../native/include/ThermionDartApi.h' + - '../native/include/ResourceBuffer.h' + include-directives: + - '../native/include/ThermionDartFFIApi.h' + - '../native/include/ThermionDartApi.h' + - '../native/include/ResourceBuffer.h' +ffi-native: + assetId: package:thermion_dart/thermion_dart.dart +ignore-source-errors: true diff --git a/thermion_dart/ffigen/swift.yaml b/thermion_dart/ffigen/swift.yaml new file mode 100644 index 00000000..fae767e1 --- /dev/null +++ b/thermion_dart/ffigen/swift.yaml @@ -0,0 +1,15 @@ +name: ThermionDartTexture +description: Bindings for ThermionDartTexture. +language: objc +output: 'lib/thermion_dart/swift/swift_bindings.g.dart' +exclude-all-by-default: true +objc-interfaces: + include: + - 'ThermionDartTexture' + module: + 'ThermionDartTexture': 'thermion_dart_texture' +headers: + entry-points: + - 'native/lib/macos/swift/ThermionDartTexture.h' +preamble: | + // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field, return_of_invalid_type, void_checks, annotate_overrides, no_leading_underscores_for_local_identifiers, library_private_types_in_public_apia \ No newline at end of file diff --git a/thermion_dart/ffigen/web.yaml b/thermion_dart/ffigen/web.yaml new file mode 100644 index 00000000..5ee8f3ab --- /dev/null +++ b/thermion_dart/ffigen/web.yaml @@ -0,0 +1,28 @@ +output: '../lib/thermion_dart/compatibility/web/thermion_dart.g.dart' +headers: + entry-points: + - '../native/web/include/ThermionFlutterWebApi.h' + - '../native/include/ThermionDartFFIApi.h' + - '../native/include/ThermionDartApi.h' + - '../native/include/ResourceBuffer.h' + include-directives: + - '../native/web/include/ThermionFlutterWebApi.h' + - '../native/include/ThermionDartFFIApi.h' + - '../native/include/ThermionDartApi.h' + - '../native/include/ResourceBuffer.h' +compiler-opts: + - "-D__EMSCRIPTEN__" +structs: + dependency-only: opaque + exclude: + - '.*' +unions: + dependency-only: opaque + exclude: + - '.*' +globals: + exclude: + - '.*' +ffi-native: + assetId: thermion_dart +ignore-source-errors: true diff --git a/thermion_dart/hook/build.dart b/thermion_dart/hook/build.dart new file mode 100644 index 00000000..70615995 --- /dev/null +++ b/thermion_dart/hook/build.dart @@ -0,0 +1,248 @@ +import 'dart:io'; +import 'package:archive/archive.dart'; +import 'package:logging/logging.dart'; +import 'package:native_assets_cli/native_assets_cli.dart'; +import 'package:native_toolchain_c/native_toolchain_c.dart'; + +void main(List args) async { + await build(args, (config, output) async { + + final logger = Logger("")..level = Level.ALL + ..onRecord.listen((record) => print(record.message)); + + var platform = config.targetOS.toString().toLowerCase(); + + var libDir = config.dryRun ? "" : (await getLibDir(config, logger)).path; + + final packageName = config.packageName; + + final sources = Directory("${config.packageRoot.toFilePath()}/native/src") + .listSync(recursive: true) + .whereType() + .map((f) => f.path) + .toList(); + sources.addAll([ + "${config.packageRoot.toFilePath()}/native/include/material/gizmo.c", + "${config.packageRoot.toFilePath()}/native/include/material/image.c", + ]); + + final libs = [ + "filament", + "backend", + "filameshio", + "viewer", + "filamat", + "geometry", + "utils", + "filabridge", + "gltfio_core", + "filament-iblprefilter", + "image", + "imageio", + "tinyexr", + "gltfio_core", + "filaflat", + "dracodec", + "ibl", + "ktxreader", + "png", + "z", + "stb", + "uberzlib", + "smol-v", + "uberarchive", + "zstd", + "basis_transcoder" + ]; + + final linkWith = []; + + if (platform == "windows") { + linkWith.addAll(libs.map((lib) => "$libDir/$lib.lib")); + linkWith.addAll(["$libDir/bluevk.lib", "$libDir/bluegl.lib"]); + linkWith.addAll([ + "gdi32.lib", + "user32.lib", + "shell32.lib", + "opengl32.lib", + "dwmapi.lib", + "comctl32.lib" + ]); + } else { + libs.add("stdc++"); + } + final flags = []; + final defines = {}; + var frameworks = []; + + if (platform != "windows") { + flags.addAll(['-std=c++17']); + } else { + defines["WIN32"] = "1"; + defines["_DEBUG"] = "1"; + defines["_DLL"] = "1"; + flags.addAll(["/std:c++20", "/MDd"]); + } + + if (platform == "ios") { + frameworks.addAll(['Foundation', 'CoreGraphics', 'QuartzCore', 'GLKit', "Metal", 'CoreVideo', 'OpenGLES']); + } else if (platform == "macos") { + frameworks.addAll([ + 'Foundation', + 'CoreVideo', + 'Cocoa', + "Metal", + ]); + libs.addAll(["bluegl", "bluevk"]); + } else if (platform == "android") { + libs.addAll(["GLESv3", "EGL", "bluevk", "dl", "android"]); + } + + frameworks = frameworks.expand((f) => ["-framework", f]).toList(); + + final cbuilder = CBuilder.library( + name: packageName, + language: Language.cpp, + assetName: 'thermion_dart.dart', + sources: sources, + includes: ['native/include', 'native/include/filament'], + defines: defines, + // UNCOMMENT THIS IF YOU ARE BUILDING WITH THE CUSTOM native_toolchain_c FORK FOR WINDOWS + // linkWith: linkWith, + flags: [ + if (platform == "macos") '-mmacosx-version-min=13.0', + if (platform == "ios") '-mios-version-min=13.0', + ...flags, + ...frameworks, + if (platform != "windows") ...libs.map((lib) => "-l$lib"), + "-L$libDir", + ], + dartBuildFiles: ['hook/build.dart'], + ); + + await cbuilder.run( + buildConfig: config, + buildOutput: output, + logger: logger, + ); + if (config.targetOS == OS.android) { + if (!config.dryRun) { + final archExtension = switch (config.targetArchitecture) { + Architecture.arm => "arm-linux-androideabi", + Architecture.arm64 => "aarch64-linux-android", + Architecture.x64 => "x86_64-linux-android", + Architecture.ia32 => "i686-linux-android", + _ => throw FormatException('Invalid') + }; + var ndkRoot = File(config.cCompiler.compiler!.path).parent.parent.path; + var stlPath = + File("$ndkRoot/sysroot/usr/lib/${archExtension}/libc++_shared.so"); + output.addAsset(NativeCodeAsset( + package: "thermion_dart", + name: "libc++_shared.so", + linkMode: DynamicLoadingBundled(), + os: config.targetOS, + file: stlPath.uri, + architecture: config.targetArchitecture)); + } + } + // do we need this? + if (config.targetOS == "windows") { + output.addAsset( + NativeCodeAsset( + package: "thermion_dart", + name: "thermion_dart.dll", + linkMode: DynamicLoadingBundled(), + os: config.targetOS, + file: Uri.file( + config.outputDirectory.toFilePath() + "/thermion_dart.dll"), + architecture: config.targetArchitecture), + linkInPackage: config.packageName); + } + }); +} + +String _FILAMENT_VERSION ="v1.51.2"; +String _getLibraryUrl(String platform, String mode) { + return "https://pub-c8b6266320924116aaddce03b5313c0a.r2.dev/filament-${_FILAMENT_VERSION}-${platform}-${mode}.zip"; +} + +// +// Download precompiled Filament libraries for the target platform from Cloudflare. +// +Future getLibDir(BuildConfig config, Logger logger) async { + + var platform = config.targetOS.toString().toLowerCase(); + + // Except on Windows, most users will only need release builds of Filament. + // Debug builds are probably only relevant if you're a package developer debugging an internal Filament issue + // or if you're working on Flutter+Windows (which requires the CRT debug DLLs). + // Also note that there are known driver issues with Android debug builds, e.g.: + // https://github.com/google/filament/issues/7162 + // (these aren't present in Filament release builds). + // However, if you know what you're doing, you can change "release" to "debug" below. + // TODO - check if we can pass this as a CLI compiler flag + var mode = "release"; + if(platform == "windows") { + mode = config.buildMode == BuildMode.debug ? "debug" : "release"; + } + + var libDir = Directory("${config.packageRoot.toFilePath()}/.dart_tool/thermion_dart/lib/${_FILAMENT_VERSION}/$platform/$mode/"); + + if (platform == "android") { + final archExtension = switch (config.targetArchitecture) { + Architecture.arm => "armeabi-v7a", + Architecture.arm64 => "arm64-v8a", + Architecture.x64 => "x86_64", + Architecture.ia32 => "x86", + _ => throw FormatException('Invalid') + }; + libDir = Directory("${libDir.path}/$archExtension/"); + } else if(platform == "windows") { + if(config.targetArchitecture != Architecture.x64) { + throw Exception("Unsupported architecture : ${config.targetArchitecture}"); + } + } + + final url = _getLibraryUrl(platform, mode); + + final filename = url.split("/").last; + + // Assume that the libraries exist if the directory containing them exists. + if (!libDir.existsSync()) { + + final unzipDir = platform == "android" ? libDir.parent.path : libDir.path; + + final libraryZip = File("$unzipDir/$filename"); + + if(libraryZip.existsSync()) { + libraryZip.deleteSync(); + } + + if(!libraryZip.parent.existsSync()) { + libraryZip.parent.createSync(recursive: true); + } + + logger.info("Downloading prebuilt libraries for $platform/$mode from $url to ${libraryZip}, files will be unzipped to ${unzipDir}"); + final request = await HttpClient().getUrl(Uri.parse(url)); + final response = await request.close(); + + await response.pipe(libraryZip.openWrite()); + + final archive = ZipDecoder().decodeBytes(await libraryZip.readAsBytes()); + + for (final file in archive) { + final filename = file.name; + if (file.isFile) { + final data = file.content as List; + final f = File('${unzipDir}/$filename'); + await f.create(recursive: true); + await f.writeAsBytes(data); + } else { + final d = Directory('${unzipDir}/$filename'); + await d.create(recursive: true); + } + } + } + return libDir; +} diff --git a/thermion_dart/lib/thermion_dart.dart b/thermion_dart/lib/thermion_dart.dart new file mode 100644 index 00000000..0d69812a --- /dev/null +++ b/thermion_dart/lib/thermion_dart.dart @@ -0,0 +1,5 @@ +library filament_dart; + +export 'thermion_dart/thermion_viewer.dart'; +export 'thermion_dart/thermion_viewer_ffi.dart'; +export 'thermion_dart/entities/entity_transform_controller.dart'; diff --git a/thermion_dart/lib/thermion_dart/compatibility/compatibility.dart b/thermion_dart/lib/thermion_dart/compatibility/compatibility.dart new file mode 100644 index 00000000..55e1f5e0 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/compatibility/compatibility.dart @@ -0,0 +1,3 @@ +export 'web/compatibility.dart' if (dart.library.io) 'native/compatibility.dart'; + + diff --git a/thermion_dart/lib/thermion_dart/compatibility/native/compatibility.dart b/thermion_dart/lib/thermion_dart/compatibility/native/compatibility.dart new file mode 100644 index 00000000..453f3bb4 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/compatibility/native/compatibility.dart @@ -0,0 +1,85 @@ +import 'dart:async'; +import 'dart:ffi'; + +import 'package:ffi/ffi.dart'; +export 'package:ffi/ffi.dart'; +export 'dart:ffi'; +export 'thermion_dart.g.dart'; + +final allocator = calloc; + +Future withVoidCallback( + Function(Pointer>) func) async { + final completer = Completer(); + // ignore: prefer_function_declarations_over_variables + void Function() callback = () { + completer.complete(); + }; + final nativeCallable = NativeCallable.listener(callback); + func.call(nativeCallable.nativeFunction); + await completer.future; + nativeCallable.close(); +} + +Future withVoidPointerCallback( + Function(Pointer)>>) + func) async { + final completer = Completer>(); + // ignore: prefer_function_declarations_over_variables + void Function(Pointer) callback = (Pointer ptr) { + completer.complete(ptr); + }; + final nativeCallable = + NativeCallable)>.listener(callback); + func.call(nativeCallable.nativeFunction); + var ptr = await completer.future; + nativeCallable.close(); + return ptr.address; +} + +Future withBoolCallback( + Function(Pointer>) func) async { + final completer = Completer(); + // ignore: prefer_function_declarations_over_variables + void Function(bool) callback = (bool result) { + completer.complete(result); + }; + final nativeCallable = NativeCallable.listener(callback); + func.call(nativeCallable.nativeFunction); + await completer.future; + nativeCallable.close(); + return completer.future; +} + +Future withIntCallback( + Function(Pointer>) func) async { + final completer = Completer(); + // ignore: prefer_function_declarations_over_variables + void Function(int) callback = (int result) { + completer.complete(result); + }; + final nativeCallable = + NativeCallable.listener(callback); + func.call(nativeCallable.nativeFunction); + await completer.future; + nativeCallable.close(); + return completer.future; +} + +Future withCharPtrCallback( + Function(Pointer)>>) + func) async { + final completer = Completer(); + // ignore: prefer_function_declarations_over_variables + void Function(Pointer) callback = (Pointer result) { + completer.complete(result.cast().toDartString()); + }; + final nativeCallable = + NativeCallable)>.listener(callback); + func.call(nativeCallable.nativeFunction); + await completer.future; + nativeCallable.close(); + return completer.future; +} + +class Compatibility {} diff --git a/thermion_dart/lib/thermion_dart/compatibility/native/thermion_dart.g.dart b/thermion_dart/lib/thermion_dart/compatibility/native/thermion_dart.g.dart new file mode 100644 index 00000000..a3f3746f --- /dev/null +++ b/thermion_dart/lib/thermion_dart/compatibility/native/thermion_dart.g.dart @@ -0,0 +1,1836 @@ +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint +import 'dart:ffi' as ffi; + +@ffi.Native< + ffi.Pointer Function(LoadFilamentResourceFromOwner, + FreeFilamentResourceFromOwner, ffi.Pointer)>( + symbol: 'make_resource_loader', + assetId: 'package:thermion_dart/thermion_dart.dart') +external ffi.Pointer make_resource_loader( + LoadFilamentResourceFromOwner loadFn, + FreeFilamentResourceFromOwner freeFn, + ffi.Pointer owner, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + symbol: 'create_filament_viewer', + assetId: 'package:thermion_dart/thermion_dart.dart') +external ffi.Pointer create_filament_viewer( + ffi.Pointer context, + ffi.Pointer loader, + ffi.Pointer platform, + ffi.Pointer uberArchivePath, +); + +@ffi.Native)>( + symbol: 'destroy_filament_viewer', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void destroy_filament_viewer( + ffi.Pointer viewer, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: 'get_scene_manager', + assetId: 'package:thermion_dart/thermion_dart.dart') +external ffi.Pointer get_scene_manager( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.IntPtr, ffi.Uint32, ffi.Uint32)>( + symbol: 'create_render_target', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void create_render_target( + ffi.Pointer viewer, + int texture, + int width, + int height, +); + +@ffi.Native)>( + symbol: 'clear_background_image', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void clear_background_image( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Bool)>( + symbol: 'set_background_image', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_background_image( + ffi.Pointer viewer, + ffi.Pointer path, + bool fillHeight, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Float, ffi.Float, ffi.Bool)>( + symbol: 'set_background_image_position', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_background_image_position( + ffi.Pointer viewer, + double x, + double y, + bool clamp, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Float, ffi.Float, ffi.Float, ffi.Float)>( + symbol: 'set_background_color', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_background_color( + ffi.Pointer viewer, + double r, + double g, + double b, + double a, +); + +@ffi.Native, ffi.Int)>( + symbol: 'set_tone_mapping', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_tone_mapping( + ffi.Pointer viewer, + int toneMapping, +); + +@ffi.Native, ffi.Float)>( + symbol: 'set_bloom', assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_bloom( + ffi.Pointer viewer, + double strength, +); + +@ffi.Native, ffi.Pointer)>( + symbol: 'load_skybox', assetId: 'package:thermion_dart/thermion_dart.dart') +external void load_skybox( + ffi.Pointer viewer, + ffi.Pointer skyboxPath, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Float)>( + symbol: 'load_ibl', assetId: 'package:thermion_dart/thermion_dart.dart') +external void load_ibl( + ffi.Pointer viewer, + ffi.Pointer iblPath, + double intensity, +); + +@ffi.Native, ffi.Pointer)>( + symbol: 'rotate_ibl', assetId: 'package:thermion_dart/thermion_dart.dart') +external void rotate_ibl( + ffi.Pointer viewer, + ffi.Pointer rotationMatrix, +); + +@ffi.Native)>( + symbol: 'remove_skybox', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void remove_skybox( + ffi.Pointer viewer, +); + +@ffi.Native)>( + symbol: 'remove_ibl', assetId: 'package:thermion_dart/thermion_dart.dart') +external void remove_ibl( + ffi.Pointer viewer, +); + +@ffi.Native< + EntityId Function( + ffi.Pointer, + ffi.Uint8, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Bool)>( + symbol: 'add_light', assetId: 'package:thermion_dart/thermion_dart.dart') +external int add_light( + ffi.Pointer viewer, + int type, + double colour, + double intensity, + double posX, + double posY, + double posZ, + double dirX, + double dirY, + double dirZ, + double falloffRadius, + double spotLightConeInner, + double spotLightConeOuter, + double sunAngularRadius, + double sunHaloSize, + double sunHaloFallof, + bool shadows, +); + +@ffi.Native, EntityId)>( + symbol: 'remove_light', assetId: 'package:thermion_dart/thermion_dart.dart') +external void remove_light( + ffi.Pointer viewer, + int entityId, +); + +@ffi.Native)>( + symbol: 'clear_lights', assetId: 'package:thermion_dart/thermion_dart.dart') +external void clear_lights( + ffi.Pointer viewer, +); + +@ffi.Native< + EntityId Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>( + symbol: 'load_glb', assetId: 'package:thermion_dart/thermion_dart.dart') +external int load_glb( + ffi.Pointer sceneManager, + ffi.Pointer assetPath, + int numInstances, +); + +@ffi.Native< + EntityId Function( + ffi.Pointer, ffi.Pointer, ffi.Size)>( + symbol: 'load_glb_from_buffer', + assetId: 'package:thermion_dart/thermion_dart.dart') +external int load_glb_from_buffer( + ffi.Pointer sceneManager, + ffi.Pointer data, + int length, +); + +@ffi.Native< + EntityId Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>( + symbol: 'load_gltf', assetId: 'package:thermion_dart/thermion_dart.dart') +external int load_gltf( + ffi.Pointer sceneManager, + ffi.Pointer assetPath, + ffi.Pointer relativePath, +); + +@ffi.Native, EntityId)>( + symbol: 'create_instance', + assetId: 'package:thermion_dart/thermion_dart.dart') +external int create_instance( + ffi.Pointer sceneManager, + int id, +); + +@ffi.Native, EntityId)>( + symbol: 'get_instance_count', + assetId: 'package:thermion_dart/thermion_dart.dart') +external int get_instance_count( + ffi.Pointer sceneManager, + int entityId, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, EntityId, ffi.Pointer)>( + symbol: 'get_instances', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_instances( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer out, +); + +@ffi.Native)>( + symbol: 'set_main_camera', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_main_camera( + ffi.Pointer viewer, +); + +@ffi.Native)>( + symbol: 'get_main_camera', + assetId: 'package:thermion_dart/thermion_dart.dart') +external int get_main_camera( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Bool Function( + ffi.Pointer, EntityId, ffi.Pointer)>( + symbol: 'set_camera', assetId: 'package:thermion_dart/thermion_dart.dart') +external bool set_camera( + ffi.Pointer viewer, + int entity, + ffi.Pointer nodeName, +); + +@ffi.Native, ffi.Bool)>( + symbol: 'set_view_frustum_culling', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_view_frustum_culling( + ffi.Pointer viewer, + bool enabled, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Uint64, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer buf, ffi.Size size, + ffi.Pointer data)>>, + ffi.Pointer)>( + symbol: 'render', assetId: 'package:thermion_dart/thermion_dart.dart') +external void render( + ffi.Pointer viewer, + int frameTimeInNanos, + ffi.Pointer pixelBuffer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer buf, ffi.Size size, + ffi.Pointer data)>> + callback, + ffi.Pointer data, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Uint32, ffi.Uint32)>( + symbol: 'create_swap_chain', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void create_swap_chain( + ffi.Pointer viewer, + ffi.Pointer window, + int width, + int height, +); + +@ffi.Native)>( + symbol: 'destroy_swap_chain', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void destroy_swap_chain( + ffi.Pointer viewer, +); + +@ffi.Native, ffi.Float)>( + symbol: 'set_frame_interval', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_frame_interval( + ffi.Pointer viewer, + double interval, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Uint32, ffi.Uint32, ffi.Float)>( + symbol: 'update_viewport_and_camera_projection', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void update_viewport_and_camera_projection( + ffi.Pointer viewer, + int width, + int height, + double scaleFactor, +); + +@ffi.Native)>( + symbol: 'scroll_begin', assetId: 'package:thermion_dart/thermion_dart.dart') +external void scroll_begin( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Float, ffi.Float, ffi.Float)>( + symbol: 'scroll_update', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void scroll_update( + ffi.Pointer viewer, + double x, + double y, + double z, +); + +@ffi.Native)>( + symbol: 'scroll_end', assetId: 'package:thermion_dart/thermion_dart.dart') +external void scroll_end( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Float, ffi.Float, ffi.Bool)>( + symbol: 'grab_begin', assetId: 'package:thermion_dart/thermion_dart.dart') +external void grab_begin( + ffi.Pointer viewer, + double x, + double y, + bool pan, +); + +@ffi.Native, ffi.Float, ffi.Float)>( + symbol: 'grab_update', assetId: 'package:thermion_dart/thermion_dart.dart') +external void grab_update( + ffi.Pointer viewer, + double x, + double y, +); + +@ffi.Native)>( + symbol: 'grab_end', assetId: 'package:thermion_dart/thermion_dart.dart') +external void grab_end( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer, ffi.Pointer, ffi.Int)>( + symbol: 'apply_weights', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void apply_weights( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer entityName, + ffi.Pointer weights, + int count, +); + +@ffi.Native< + ffi.Bool Function( + ffi.Pointer, EntityId, ffi.Pointer, ffi.Int)>( + symbol: 'set_morph_target_weights', + assetId: 'package:thermion_dart/thermion_dart.dart') +external bool set_morph_target_weights( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer morphData, + int numWeights, +); + +@ffi.Native< + ffi.Bool Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Float)>( + symbol: 'set_morph_animation', + assetId: 'package:thermion_dart/thermion_dart.dart') +external bool set_morph_animation( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer morphData, + ffi.Pointer morphIndices, + int numMorphTargets, + int numFrames, + double frameLengthInMs, +); + +@ffi.Native, EntityId)>( + symbol: 'reset_to_rest_pose', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void reset_to_rest_pose( + ffi.Pointer sceneManager, + int asset, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Int, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float)>( + symbol: 'add_bone_animation', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void add_bone_animation( + ffi.Pointer sceneManager, + int entity, + int skinIndex, + int boneIndex, + ffi.Pointer frameData, + int numFrames, + double frameLengthInMs, + double fadeOutInSecs, + double fadeInInSecs, + double maxDelta, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, EntityId, ffi.Pointer)>( + symbol: 'get_local_transform', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_local_transform( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer arg2, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, + ffi.Pointer, ffi.Int)>( + symbol: 'get_rest_local_transforms', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_rest_local_transforms( + ffi.Pointer sceneManager, + int entityId, + int skinIndex, + ffi.Pointer out, + int numBones, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, EntityId, ffi.Pointer)>( + symbol: 'get_world_transform', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_world_transform( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer arg2, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int, + ffi.Pointer)>( + symbol: 'get_inverse_bind_matrix', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_inverse_bind_matrix( + ffi.Pointer sceneManager, + int entityId, + int skinIndex, + int boneIndex, + ffi.Pointer arg4, +); + +@ffi.Native< + ffi.Bool Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int, + ffi.Pointer)>( + symbol: 'set_bone_transform', + assetId: 'package:thermion_dart/thermion_dart.dart') +external bool set_bone_transform( + ffi.Pointer sceneManager, + int entity, + int skinIndex, + int boneIndex, + ffi.Pointer transform, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Bool, + ffi.Bool, ffi.Bool, ffi.Float)>( + symbol: 'play_animation', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void play_animation( + ffi.Pointer sceneManager, + int entity, + int index, + bool loop, + bool reverse, + bool replaceActive, + double crossfade, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int)>( + symbol: 'set_animation_frame', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_animation_frame( + ffi.Pointer sceneManager, + int entity, + int animationIndex, + int animationFrame, +); + +@ffi.Native, EntityId, ffi.Int)>( + symbol: 'stop_animation', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void stop_animation( + ffi.Pointer sceneManager, + int entity, + int index, +); + +@ffi.Native, EntityId)>( + symbol: 'get_animation_count', + assetId: 'package:thermion_dart/thermion_dart.dart') +external int get_animation_count( + ffi.Pointer sceneManager, + int asset, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, EntityId, ffi.Pointer, ffi.Int)>( + symbol: 'get_animation_name', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_animation_name( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer outPtr, + int index, +); + +@ffi.Native, EntityId, ffi.Int)>( + symbol: 'get_animation_duration', + assetId: 'package:thermion_dart/thermion_dart.dart') +external double get_animation_duration( + ffi.Pointer sceneManager, + int entity, + int index, +); + +@ffi.Native, EntityId, ffi.Int)>( + symbol: 'get_bone_count', + assetId: 'package:thermion_dart/thermion_dart.dart') +external int get_bone_count( + ffi.Pointer sceneManager, + int assetEntity, + int skinIndex, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer>, ffi.Int)>( + symbol: 'get_bone_names', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_bone_names( + ffi.Pointer sceneManager, + int assetEntity, + ffi.Pointer> outPtr, + int skinIndex, +); + +@ffi.Native< + EntityId Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int)>( + symbol: 'get_bone', assetId: 'package:thermion_dart/thermion_dart.dart') +external int get_bone( + ffi.Pointer sceneManager, + int entityId, + int skinIndex, + int boneIndex, +); + +@ffi.Native< + ffi.Bool Function( + ffi.Pointer, EntityId, ffi.Pointer)>( + symbol: 'set_transform', + assetId: 'package:thermion_dart/thermion_dart.dart') +external bool set_transform( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer transform, +); + +@ffi.Native, EntityId)>( + symbol: 'update_bone_matrices', + assetId: 'package:thermion_dart/thermion_dart.dart') +external bool update_bone_matrices( + ffi.Pointer sceneManager, + int entityId, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, EntityId, + ffi.Pointer, ffi.Int)>( + symbol: 'get_morph_target_name', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_morph_target_name( + ffi.Pointer sceneManager, + int assetEntity, + int childEntity, + ffi.Pointer outPtr, + int index, +); + +@ffi.Native, EntityId, EntityId)>( + symbol: 'get_morph_target_name_count', + assetId: 'package:thermion_dart/thermion_dart.dart') +external int get_morph_target_name_count( + ffi.Pointer sceneManager, + int assetEntity, + int childEntity, +); + +@ffi.Native, EntityId)>( + symbol: 'remove_entity', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void remove_entity( + ffi.Pointer viewer, + int asset, +); + +@ffi.Native)>( + symbol: 'clear_entities', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void clear_entities( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Bool Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Int, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float)>( + symbol: 'set_material_color', + assetId: 'package:thermion_dart/thermion_dart.dart') +external bool set_material_color( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer meshName, + int materialIndex, + double r, + double g, + double b, + double a, +); + +@ffi.Native, EntityId)>( + symbol: 'transform_to_unit_cube', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void transform_to_unit_cube( + ffi.Pointer sceneManager, + int asset, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Float, ffi.Float, + ffi.Float, ffi.Bool)>( + symbol: 'queue_position_update', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void queue_position_update( + ffi.Pointer sceneManager, + int entity, + double x, + double y, + double z, + bool relative, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Float, ffi.Float, + ffi.Float, ffi.Float, ffi.Float, ffi.Bool)>( + symbol: 'queue_rotation_update', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void queue_rotation_update( + ffi.Pointer sceneManager, + int entity, + double rads, + double x, + double y, + double z, + double w, + bool relative, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, EntityId, ffi.Float, ffi.Float, ffi.Float)>( + symbol: 'set_position', assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_position( + ffi.Pointer sceneManager, + int entity, + double x, + double y, + double z, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Float, ffi.Float, + ffi.Float, ffi.Float, ffi.Float)>( + symbol: 'set_rotation', assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_rotation( + ffi.Pointer sceneManager, + int entity, + double rads, + double x, + double y, + double z, + double w, +); + +@ffi.Native, EntityId, ffi.Float)>( + symbol: 'set_scale', assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_scale( + ffi.Pointer sceneManager, + int entity, + double scale, +); + +@ffi.Native, EntityId)>( + symbol: 'move_camera_to_asset', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void move_camera_to_asset( + ffi.Pointer viewer, + int asset, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Float, ffi.Float, ffi.Float)>( + symbol: 'set_camera_exposure', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_camera_exposure( + ffi.Pointer viewer, + double aperture, + double shutterSpeed, + double sensitivity, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Float, ffi.Float, ffi.Float)>( + symbol: 'set_camera_position', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_camera_position( + ffi.Pointer viewer, + double x, + double y, + double z, +); + +@ffi.Native)>( + symbol: 'get_camera_position', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_camera_position( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Float, ffi.Float, ffi.Float, ffi.Float)>( + symbol: 'set_camera_rotation', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_camera_rotation( + ffi.Pointer viewer, + double w, + double x, + double y, + double z, +); + +@ffi.Native, ffi.Pointer)>( + symbol: 'set_camera_model_matrix', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_camera_model_matrix( + ffi.Pointer viewer, + ffi.Pointer matrix, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: 'get_camera_model_matrix', + assetId: 'package:thermion_dart/thermion_dart.dart') +external ffi.Pointer get_camera_model_matrix( + ffi.Pointer viewer, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: 'get_camera_view_matrix', + assetId: 'package:thermion_dart/thermion_dart.dart') +external ffi.Pointer get_camera_view_matrix( + ffi.Pointer viewer, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: 'get_camera_projection_matrix', + assetId: 'package:thermion_dart/thermion_dart.dart') +external ffi.Pointer get_camera_projection_matrix( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Double, ffi.Double)>( + symbol: 'set_camera_projection_matrix', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_camera_projection_matrix( + ffi.Pointer viewer, + ffi.Pointer matrix, + double near, + double far, +); + +@ffi.Native, ffi.Double, ffi.Double)>( + symbol: 'set_camera_culling', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_camera_culling( + ffi.Pointer viewer, + double near, + double far, +); + +@ffi.Native)>( + symbol: 'get_camera_culling_near', + assetId: 'package:thermion_dart/thermion_dart.dart') +external double get_camera_culling_near( + ffi.Pointer viewer, +); + +@ffi.Native)>( + symbol: 'get_camera_culling_far', + assetId: 'package:thermion_dart/thermion_dart.dart') +external double get_camera_culling_far( + ffi.Pointer viewer, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: 'get_camera_culling_projection_matrix', + assetId: 'package:thermion_dart/thermion_dart.dart') +external ffi.Pointer get_camera_culling_projection_matrix( + ffi.Pointer viewer, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: 'get_camera_frustum', + assetId: 'package:thermion_dart/thermion_dart.dart') +external ffi.Pointer get_camera_frustum( + ffi.Pointer viewer, +); + +@ffi.Native, ffi.Float, ffi.Float)>( + symbol: 'set_camera_fov', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_camera_fov( + ffi.Pointer viewer, + double fovInDegrees, + double aspect, +); + +@ffi.Native, ffi.Float)>( + symbol: 'set_camera_focal_length', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_camera_focal_length( + ffi.Pointer viewer, + double focalLength, +); + +@ffi.Native, ffi.Float)>( + symbol: 'set_camera_focus_distance', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_camera_focus_distance( + ffi.Pointer viewer, + double focusDistance, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, _ManipulatorMode, ffi.Double, + ffi.Double, ffi.Double)>( + symbol: 'set_camera_manipulator_options', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_camera_manipulator_options( + ffi.Pointer viewer, + int mode, + double orbitSpeedX, + double orbitSpeedY, + double zoomSpeed, +); + +@ffi.Native< + ffi.Int Function( + ffi.Pointer, EntityId, ffi.Pointer)>( + symbol: 'hide_mesh', assetId: 'package:thermion_dart/thermion_dart.dart') +external int hide_mesh( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer meshName, +); + +@ffi.Native< + ffi.Int Function( + ffi.Pointer, EntityId, ffi.Pointer)>( + symbol: 'reveal_mesh', assetId: 'package:thermion_dart/thermion_dart.dart') +external int reveal_mesh( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer meshName, +); + +@ffi.Native, ffi.Bool)>( + symbol: 'set_post_processing', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_post_processing( + ffi.Pointer viewer, + bool enabled, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Bool, ffi.Bool, ffi.Bool)>( + symbol: 'set_antialiasing', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_antialiasing( + ffi.Pointer viewer, + bool msaa, + bool fxaa, + bool taa, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + EntityId entityId, ffi.Int x, ffi.Int y)>>)>( + symbol: 'filament_pick', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void filament_pick( + ffi.Pointer viewer, + int x, + int y, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(EntityId entityId, ffi.Int x, ffi.Int y)>> + callback, +); + +@ffi.Native Function(ffi.Pointer, EntityId)>( + symbol: 'get_name_for_entity', + assetId: 'package:thermion_dart/thermion_dart.dart') +external ffi.Pointer get_name_for_entity( + ffi.Pointer sceneManager, + int entityId, +); + +@ffi.Native< + EntityId Function( + ffi.Pointer, EntityId, ffi.Pointer)>( + symbol: 'find_child_entity_by_name', + assetId: 'package:thermion_dart/thermion_dart.dart') +external int find_child_entity_by_name( + ffi.Pointer sceneManager, + int parent, + ffi.Pointer name, +); + +@ffi.Native, EntityId, ffi.Bool)>( + symbol: 'get_entity_count', + assetId: 'package:thermion_dart/thermion_dart.dart') +external int get_entity_count( + ffi.Pointer sceneManager, + int target, + bool renderableOnly, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, EntityId, ffi.Bool, ffi.Pointer)>( + symbol: 'get_entities', assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_entities( + ffi.Pointer sceneManager, + int target, + bool renderableOnly, + ffi.Pointer out, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, EntityId, ffi.Int, ffi.Bool)>( + symbol: 'get_entity_name_at', + assetId: 'package:thermion_dart/thermion_dart.dart') +external ffi.Pointer get_entity_name_at( + ffi.Pointer sceneManager, + int target, + int index, + bool renderableOnly, +); + +@ffi.Native, ffi.Bool)>( + symbol: 'set_recording', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_recording( + ffi.Pointer viewer, + bool recording, +); + +@ffi.Native, ffi.Pointer)>( + symbol: 'set_recording_output_directory', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_recording_output_directory( + ffi.Pointer viewer, + ffi.Pointer outputDirectory, +); + +@ffi.Native( + symbol: 'ios_dummy', assetId: 'package:thermion_dart/thermion_dart.dart') +external void ios_dummy(); + +@ffi.Native)>( + symbol: 'thermion_flutter_free', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void thermion_flutter_free( + ffi.Pointer ptr, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(EntityId entityId1, EntityId entityId2)>>, + ffi.Bool)>( + symbol: 'add_collision_component', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void add_collision_component( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(EntityId entityId1, EntityId entityId2)>> + callback, + bool affectsCollidingTransform, +); + +@ffi.Native, EntityId)>( + symbol: 'remove_collision_component', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void remove_collision_component( + ffi.Pointer sceneManager, + int entityId, +); + +@ffi.Native, EntityId)>( + symbol: 'add_animation_component', + assetId: 'package:thermion_dart/thermion_dart.dart') +external bool add_animation_component( + ffi.Pointer sceneManager, + int entityId, +); + +@ffi.Native, EntityId)>( + symbol: 'remove_animation_component', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void remove_animation_component( + ffi.Pointer sceneManager, + int entityId, +); + +@ffi.Native< + EntityId Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Pointer)>( + symbol: 'create_geometry', + assetId: 'package:thermion_dart/thermion_dart.dart') +external int create_geometry( + ffi.Pointer viewer, + ffi.Pointer vertices, + int numVertices, + ffi.Pointer indices, + int numIndices, + int primitiveType, + ffi.Pointer materialPath, +); + +@ffi.Native, EntityId)>( + symbol: 'get_parent', assetId: 'package:thermion_dart/thermion_dart.dart') +external int get_parent( + ffi.Pointer sceneManager, + int child, +); + +@ffi.Native, EntityId, EntityId)>( + symbol: 'set_parent', assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_parent( + ffi.Pointer sceneManager, + int child, + int parent, +); + +@ffi.Native, EntityId)>( + symbol: 'test_collisions', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void test_collisions( + ffi.Pointer sceneManager, + int entity, +); + +@ffi.Native, EntityId, ffi.Int)>( + symbol: 'set_priority', assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_priority( + ffi.Pointer sceneManager, + int entityId, + int priority, +); + +@ffi.Native, ffi.Pointer)>( + symbol: 'get_gizmo', assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_gizmo( + ffi.Pointer sceneManager, + ffi.Pointer out, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi + .Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer renderCallbackOwner)>>, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer viewer)>>)>( + symbol: 'create_filament_viewer_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void create_filament_viewer_ffi( + ffi.Pointer context, + ffi.Pointer platform, + ffi.Pointer uberArchivePath, + ffi.Pointer loader, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer renderCallbackOwner)>> + renderCallback, + ffi.Pointer renderCallbackOwner, + ffi.Pointer< + ffi.NativeFunction viewer)>> + callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Uint32, + ffi.Uint32, + ffi.Pointer>)>( + symbol: 'create_swap_chain_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void create_swap_chain_ffi( + ffi.Pointer viewer, + ffi.Pointer surface, + int width, + int height, + ffi.Pointer> onComplete, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, + ffi.Pointer>)>( + symbol: 'destroy_swap_chain_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void destroy_swap_chain_ffi( + ffi.Pointer viewer, + ffi.Pointer> onComplete, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.IntPtr, ffi.Uint32, + ffi.Uint32, ffi.Pointer>)>( + symbol: 'create_render_target_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void create_render_target_ffi( + ffi.Pointer viewer, + int nativeTextureId, + int width, + int height, + ffi.Pointer> onComplete, +); + +@ffi.Native)>( + symbol: 'destroy_filament_viewer_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void destroy_filament_viewer_ffi( + ffi.Pointer viewer, +); + +@ffi.Native)>( + symbol: 'render_ffi', assetId: 'package:thermion_dart/thermion_dart.dart') +external void render_ffi( + ffi.Pointer viewer, +); + +@ffi.Native( + symbol: 'make_render_callback_fn_pointer', + assetId: 'package:thermion_dart/thermion_dart.dart') +external FilamentRenderCallback make_render_callback_fn_pointer( + FilamentRenderCallback arg0, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Bool, + ffi.Pointer>)>( + symbol: 'set_rendering_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_rendering_ffi( + ffi.Pointer viewer, + bool rendering, + ffi.Pointer> onComplete, +); + +@ffi.Native, ffi.Float)>( + symbol: 'set_frame_interval_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_frame_interval_ffi( + ffi.Pointer viewer, + double frameInterval, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Uint32, ffi.Uint32, + ffi.Float, ffi.Pointer>)>( + symbol: 'update_viewport_and_camera_projection_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void update_viewport_and_camera_projection_ffi( + ffi.Pointer viewer, + int width, + int height, + double scaleFactor, + ffi.Pointer> onComplete, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Float, ffi.Float, ffi.Float, ffi.Float)>( + symbol: 'set_background_color_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_background_color_ffi( + ffi.Pointer viewer, + double r, + double g, + double b, + double a, +); + +@ffi.Native)>( + symbol: 'clear_background_image_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void clear_background_image_ffi( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Bool, ffi.Pointer>)>( + symbol: 'set_background_image_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_background_image_ffi( + ffi.Pointer viewer, + ffi.Pointer path, + bool fillHeight, + ffi.Pointer> onComplete, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Float, ffi.Float, ffi.Bool)>( + symbol: 'set_background_image_position_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_background_image_position_ffi( + ffi.Pointer viewer, + double x, + double y, + bool clamp, +); + +@ffi.Native, ffi.Int)>( + symbol: 'set_tone_mapping_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_tone_mapping_ffi( + ffi.Pointer viewer, + int toneMapping, +); + +@ffi.Native, ffi.Float)>( + symbol: 'set_bloom_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_bloom_ffi( + ffi.Pointer viewer, + double strength, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>( + symbol: 'load_skybox_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void load_skybox_ffi( + ffi.Pointer viewer, + ffi.Pointer skyboxPath, + ffi.Pointer> onComplete, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Float)>( + symbol: 'load_ibl_ffi', assetId: 'package:thermion_dart/thermion_dart.dart') +external void load_ibl_ffi( + ffi.Pointer viewer, + ffi.Pointer iblPath, + double intensity, +); + +@ffi.Native)>( + symbol: 'remove_skybox_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void remove_skybox_ffi( + ffi.Pointer viewer, +); + +@ffi.Native)>( + symbol: 'remove_ibl_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void remove_ibl_ffi( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Uint8, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Bool, + ffi.Pointer>)>( + symbol: 'add_light_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void add_light_ffi( + ffi.Pointer viewer, + int type, + double colour, + double intensity, + double posX, + double posY, + double posZ, + double dirX, + double dirY, + double dirZ, + double falloffRadius, + double spotLightConeInner, + double spotLightConeOuter, + double sunAngularRadius, + double sunHaloSize, + double sunHaloFallof, + bool shadows, + ffi.Pointer> callback, +); + +@ffi.Native, EntityId)>( + symbol: 'remove_light_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void remove_light_ffi( + ffi.Pointer viewer, + int entityId, +); + +@ffi.Native)>( + symbol: 'clear_lights_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void clear_lights_ffi( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int, + ffi.Pointer>)>( + symbol: 'load_glb_ffi', assetId: 'package:thermion_dart/thermion_dart.dart') +external void load_glb_ffi( + ffi.Pointer sceneManager, + ffi.Pointer assetPath, + int numInstances, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Int, + ffi.Pointer>)>( + symbol: 'load_glb_from_buffer_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void load_glb_from_buffer_ffi( + ffi.Pointer sceneManager, + ffi.Pointer data, + int length, + int numInstances, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>( + symbol: 'load_gltf_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void load_gltf_ffi( + ffi.Pointer sceneManager, + ffi.Pointer assetPath, + ffi.Pointer relativePath, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer>)>( + symbol: 'create_instance_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void create_instance_ffi( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer>)>( + symbol: 'remove_entity_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void remove_entity_ffi( + ffi.Pointer viewer, + int asset, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, + ffi.Pointer>)>( + symbol: 'clear_entities_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void clear_entities_ffi( + ffi.Pointer viewer, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Pointer>)>( + symbol: 'set_camera_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_camera_ffi( + ffi.Pointer viewer, + int asset, + ffi.Pointer nodeName, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer, ffi.Pointer, ffi.Int)>( + symbol: 'apply_weights_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void apply_weights_ffi( + ffi.Pointer sceneManager, + int asset, + ffi.Pointer entityName, + ffi.Pointer weights, + int count, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Bool, + ffi.Bool, ffi.Bool, ffi.Float)>( + symbol: 'play_animation_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void play_animation_ffi( + ffi.Pointer sceneManager, + int asset, + int index, + bool loop, + bool reverse, + bool replaceActive, + double crossfade, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int)>( + symbol: 'set_animation_frame_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_animation_frame_ffi( + ffi.Pointer sceneManager, + int asset, + int animationIndex, + int animationFrame, +); + +@ffi.Native, EntityId, ffi.Int)>( + symbol: 'stop_animation_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void stop_animation_ffi( + ffi.Pointer sceneManager, + int asset, + int index, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer>)>( + symbol: 'get_animation_count_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_animation_count_ffi( + ffi.Pointer sceneManager, + int asset, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Int, + ffi.Pointer>)>( + symbol: 'get_animation_name_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_animation_name_ffi( + ffi.Pointer sceneManager, + int asset, + ffi.Pointer outPtr, + int index, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + EntityId, + ffi.Pointer, + ffi.Int, + ffi.Pointer>)>( + symbol: 'get_morph_target_name_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_morph_target_name_ffi( + ffi.Pointer sceneManager, + int assetEntity, + int childEntity, + ffi.Pointer outPtr, + int index, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, EntityId, + ffi.Pointer>)>( + symbol: 'get_morph_target_name_count_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void get_morph_target_name_count_ffi( + ffi.Pointer sceneManager, + int asset, + int childEntity, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Int, + ffi.Pointer>)>( + symbol: 'set_morph_target_weights_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_morph_target_weights_ffi( + ffi.Pointer sceneManager, + int asset, + ffi.Pointer morphData, + int numWeights, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer>)>( + symbol: 'update_bone_matrices_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void update_bone_matrices_ffi( + ffi.Pointer sceneManager, + int asset, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Int, + ffi.Int, + ffi.Pointer, + ffi.Pointer>)>( + symbol: 'set_bone_transform_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_bone_transform_ffi( + ffi.Pointer sceneManager, + int asset, + int skinIndex, + int boneIndex, + ffi.Pointer transform, + ffi.Pointer> callback, +); + +@ffi.Native, ffi.Bool)>( + symbol: 'set_post_processing_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void set_post_processing_ffi( + ffi.Pointer viewer, + bool enabled, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer>)>( + symbol: 'reset_to_rest_pose_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void reset_to_rest_pose_ffi( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Pointer, + ffi.Pointer>)>( + symbol: 'create_geometry_ffi', + assetId: 'package:thermion_dart/thermion_dart.dart') +external void create_geometry_ffi( + ffi.Pointer viewer, + ffi.Pointer vertices, + int numVertices, + ffi.Pointer indices, + int numIndices, + int primitiveType, + ffi.Pointer materialPath, + ffi.Pointer> callback, +); + +final class ResourceBuffer extends ffi.Struct { + external ffi.Pointer data; + + @ffi.Int32() + external int size; + + @ffi.Int32() + external int id; +} + +final class ResourceLoaderWrapper extends ffi.Struct { + external LoadFilamentResource loadResource; + + external FreeFilamentResource freeResource; + + external LoadFilamentResourceFromOwner loadFromOwner; + + external FreeFilamentResourceFromOwner freeFromOwner; + + external ffi.Pointer owner; + + external LoadFilamentResourceIntoOutPointer loadToOut; +} + +typedef LoadFilamentResource + = ffi.Pointer>; +typedef LoadFilamentResourceFunction = ResourceBuffer Function( + ffi.Pointer uri); +typedef FreeFilamentResource + = ffi.Pointer>; +typedef FreeFilamentResourceFunction = ffi.Void Function(ResourceBuffer); +typedef DartFreeFilamentResourceFunction = void Function(ResourceBuffer); +typedef LoadFilamentResourceFromOwner + = ffi.Pointer>; +typedef LoadFilamentResourceFromOwnerFunction = ResourceBuffer Function( + ffi.Pointer, ffi.Pointer); +typedef FreeFilamentResourceFromOwner + = ffi.Pointer>; +typedef FreeFilamentResourceFromOwnerFunction = ffi.Void Function( + ResourceBuffer, ffi.Pointer); +typedef DartFreeFilamentResourceFromOwnerFunction = void Function( + ResourceBuffer, ffi.Pointer); +typedef LoadFilamentResourceIntoOutPointer = ffi + .Pointer>; +typedef LoadFilamentResourceIntoOutPointerFunction = ffi.Void Function( + ffi.Pointer uri, ffi.Pointer out); +typedef DartLoadFilamentResourceIntoOutPointerFunction = void Function( + ffi.Pointer uri, ffi.Pointer out); + +/// This header replicates most of the methods in ThermionDartApi.h. +/// It represents the interface for: +/// - invoking those methods that must be called on the main Filament engine thread +/// - setting up a render loop +typedef EntityId = ffi.Int32; +typedef DartEntityId = int; +typedef _ManipulatorMode = ffi.Int32; +typedef Dart_ManipulatorMode = int; +typedef FilamentRenderCallback + = ffi.Pointer>; +typedef FilamentRenderCallbackFunction = ffi.Void Function( + ffi.Pointer owner); +typedef ThermionDartRenderCallbackFunction = void Function( + ffi.Pointer owner); + +const int __bool_true_false_are_defined = 1; + +const int true1 = 1; + +const int false1 = 0; diff --git a/thermion_dart/lib/thermion_dart/compatibility/web/allocator.dart b/thermion_dart/lib/thermion_dart/compatibility/web/allocator.dart new file mode 100644 index 00000000..c19ace21 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/compatibility/web/allocator.dart @@ -0,0 +1,238 @@ +import 'dart:ffi'; +export "allocator.dart"; +export "thermion_dart.g.dart"; + +import 'dart:convert'; +import 'dart:ffi' as ffi hide Uint8Pointer, FloatPointer; +import 'dart:typed_data'; + +import 'package:thermion_dart/thermion_dart/compatibility/web/thermion_dart.g.dart'; + +import 'package:ffi/ffi.dart'; +export 'package:ffi/ffi.dart' hide StringUtf8Pointer, Utf8Pointer; +export 'dart:ffi' + hide + Uint8Pointer, + FloatPointer, + DoublePointer, + Int32Pointer, + Int64Pointer, + PointerPointer, + Allocator; + +class Allocator implements ffi.Allocator { + const Allocator(); + @override + ffi.Pointer allocate(int byteCount, + {int? alignment}) { + return thermion_flutter_web_allocate(byteCount).cast(); + } + + @override + void free(ffi.Pointer pointer) { + thermion_flutter_web_free(pointer.cast()); + } +} + +extension CharPointer on ffi.Pointer { + int get value { + return thermion_flutter_web_get(this, 0); + } + + set value(int value) { + thermion_flutter_web_set(this, 0, value); + } + + void operator []=(int index, int value) { + this.elementAt(index).value = value; + } + + ffi.Pointer elementAt(int index) => + ffi.Pointer.fromAddress(address + ffi.sizeOf() * index); +} + +extension IntPointer on ffi.Pointer { + int get value { + return thermion_flutter_web_get_int32(this.cast(), 0); + } + + set value(int value) { + thermion_flutter_web_set_int32(this.cast(), 0, value); + } + + void operator []=(int index, int value) { + this.elementAt(index).value = value; + } + + int operator [](int index) { + return this.elementAt(index).value; + } + + ffi.Pointer elementAt(int index) => + ffi.Pointer.fromAddress(address + ffi.sizeOf() * index); +} + +extension Int32Pointer on ffi.Pointer { + int get value { + return thermion_flutter_web_get_int32(this, 0); + } + + set value(int value) { + thermion_flutter_web_set_int32(this, 0, value); + } + + void operator []=(int index, int value) { + this.elementAt(index).value = value; + } + + int operator [](int index) { + return this.elementAt(index).value; + } + + ffi.Pointer elementAt(int index) => + ffi.Pointer.fromAddress(address + ffi.sizeOf() * index); +} + +extension UInt8Pointer on ffi.Pointer { + int get value { + return thermion_flutter_web_get(this.cast(), 0); + } + + set value(int value) { + thermion_flutter_web_set(this.cast(), 0, value); + } + + void operator []=(int index, int value) { + this.elementAt(index).value = value; + } + + int operator [](int index) { + return this.elementAt(index).value; + } + + ffi.Pointer elementAt(int index) => + ffi.Pointer.fromAddress(address + ffi.sizeOf() * index); +} + +extension PointerPointer + on ffi.Pointer> { + ffi.Pointer get value { + return thermion_flutter_web_get_pointer(cast>(), 0) + .cast(); + } + + set value(ffi.Pointer value) { + thermion_flutter_web_set_pointer( + cast>(), 0, value.cast()); + } + + + ffi.Pointer operator [](int index) { + return this.elementAt(index).value; + } + + void operator []=(int index, ffi.Pointer value) { + this.elementAt(index).value = value; + } + + ffi.Pointer> elementAt(int index) => + ffi.Pointer.fromAddress(address + ffi.sizeOf() * index); +} + +extension FloatPointer on ffi.Pointer { + double get value { + return thermion_flutter_web_get_float(this, 0); + } + + set value(double value) { + thermion_flutter_web_set_float(this, 0, value); + } + + double operator [](int index) { + return this.elementAt(index).value; + } + + void operator []=(int index, double value) { + this.elementAt(index).value = value; + } + + ffi.Pointer elementAt(int index) => + ffi.Pointer.fromAddress(address + ffi.sizeOf() * index); + + Float32List asTypedList(int length) { + var list = Float32List(length); + + for (int i = 0; i < length; i++) { + list[i] = this[i]; + } + return list; + } +} + +extension StringConversion on String { + ffi.Pointer toNativeUtf8({ffi.Allocator? allocator}) { + final units = utf8.encode(this); + final ffi.Pointer result = + allocator!(units.length + 1); + for (int i = 0; i < units.length; i++) { + result.elementAt(i).value = units[i]; + } + result.elementAt(units.length).value = 0; + return result.cast(); + } +} + +extension StringUtf8Pointer on ffi.Pointer { + static int _length(ffi.Pointer codeUnits) { + var length = 0; + while (codeUnits[length] != 0) { + length++; + } + return length; + } + + String toDartString({int? length}) { + final codeUnits = this.cast(); + final list = []; + + if (length != null) { + RangeError.checkNotNegative(length, 'length'); + } else { + length = _length(codeUnits); + } + for (int i = 0; i < length; i++) { + list.add(codeUnits.elementAt(i).value); + } + return utf8.decode(list); + } +} + +extension DoublePointer on ffi.Pointer { + double get value { + return thermion_flutter_web_get_double(this, 0); + } + + set value(double value) { + return thermion_flutter_web_set_double(this, 0, value); + } + + Float64List asTypedList(int length) { + var list = Float64List(length); + + for (int i = 0; i < length; i++) { + list[i] = elementAt(i).value; + } + return list; + } + + double operator [](int index) { + return elementAt(index).value; + } + + void operator []=(int index, double value) { + elementAt(index).value = value; + } + + ffi.Pointer elementAt(int index) => + ffi.Pointer.fromAddress(address + ffi.sizeOf() * index); +} diff --git a/thermion_dart/lib/thermion_dart/compatibility/web/compatibility.dart b/thermion_dart/lib/thermion_dart/compatibility/web/compatibility.dart new file mode 100644 index 00000000..f8da247c --- /dev/null +++ b/thermion_dart/lib/thermion_dart/compatibility/web/compatibility.dart @@ -0,0 +1,118 @@ +import 'dart:async'; +import 'dart:js_interop'; +import 'package:thermion_dart/thermion_dart/compatibility/web/interop.dart'; + +import "allocator.dart"; + +export "allocator.dart"; +export "thermion_dart.g.dart"; + +export 'package:ffi/ffi.dart' hide StringUtf8Pointer, Utf8Pointer; +export 'dart:ffi' + hide + Uint8Pointer, + FloatPointer, + DoublePointer, + Int32Pointer, + Int64Pointer, + PointerPointer, + Allocator; + +const allocator = Allocator(); + +@AbiSpecificIntegerMapping({ + Abi.androidArm: Uint8(), + Abi.androidArm64: Uint8(), + Abi.androidIA32: Int8(), + Abi.androidX64: Int8(), + Abi.androidRiscv64: Uint8(), + Abi.fuchsiaArm64: Uint8(), + Abi.fuchsiaX64: Int8(), + Abi.fuchsiaRiscv64: Uint8(), + Abi.iosArm: Int8(), + Abi.iosArm64: Int8(), + Abi.iosX64: Int8(), + Abi.linuxArm: Uint8(), + Abi.linuxArm64: Uint8(), + Abi.linuxIA32: Int8(), + Abi.linuxX64: Int8(), + Abi.linuxRiscv32: Uint8(), + Abi.linuxRiscv64: Uint8(), + Abi.macosArm64: Int8(), + Abi.macosX64: Int8(), + Abi.windowsArm64: Int8(), + Abi.windowsIA32: Int8(), + Abi.windowsX64: Int8(), +}) +final class FooChar extends AbiSpecificInteger { + const FooChar(); +} + +class Compatibility { + final _foo = FooChar(); +} + +Future withVoidCallback( + Function(Pointer>) func) async { + JSArray retVal = createVoidCallback(); + var promise = retVal.toDart[0] as JSPromise; + var fnPtrAddress = retVal.toDart[1] as JSNumber; + var fnPtr = Pointer>.fromAddress( + fnPtrAddress.toDartInt); + func(fnPtr); + await promise.toDart; +} + +Future withVoidPointerCallback( + void Function(Pointer)>>) + func) async { + JSArray retVal = createVoidPointerCallback(); + var promise = retVal.toDart[0] as JSPromise; + + var fnPtrAddress = retVal.toDart[1] as JSNumber; + var fnPtr = Pointer)>>.fromAddress( + fnPtrAddress.toDartInt); + func(fnPtr); + final addr = await promise.toDart; + return addr.toDartInt; +} + +Future withBoolCallback( + Function(Pointer>) func) async { + JSArray retVal = createBoolCallback(); + var promise = retVal.toDart[0] as JSPromise; + + var fnPtrAddress = retVal.toDart[1] as JSNumber; + var fnPtr = Pointer>.fromAddress( + fnPtrAddress.toDartInt); + func(fnPtr); + final addr = await promise.toDart; + return addr.toDart; +} + +Future withIntCallback( + Function(Pointer>) func) async { + JSArray retVal = createBoolCallback(); + var promise = retVal.toDart[0] as JSPromise; + + var fnPtrAddress = retVal.toDart[1] as JSNumber; + var fnPtr = Pointer>.fromAddress( + fnPtrAddress.toDartInt); + func(fnPtr); + final addr = await promise.toDart; + return addr.toDartInt; +} + +Future withCharPtrCallback( + Function(Pointer)>>) + func) async { + JSArray retVal = createVoidPointerCallback(); + var promise = retVal.toDart[0] as JSPromise; + + var fnPtrAddress = retVal.toDart[1] as JSNumber; + var fnPtr = Pointer)>>.fromAddress( + fnPtrAddress.toDartInt); + func(fnPtr); + final addr = await promise.toDart; + return Pointer.fromAddress(addr.toDartInt).toDartString(); +} diff --git a/thermion_dart/lib/thermion_dart/compatibility/web/interop.dart b/thermion_dart/lib/thermion_dart/compatibility/web/interop.dart new file mode 100644 index 00000000..4773d252 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/compatibility/web/interop.dart @@ -0,0 +1,16 @@ +import 'dart:js_interop'; + +@JS() +external JSArray createIntCallback(); + +@JS() +external JSArray createBoolCallback(); + +@JS() +external JSArray createVoidPointerCallback(); + +@JS() +external JSArray createVoidCallback(); + + + diff --git a/thermion_dart/lib/thermion_dart/compatibility/web/interop/filament_viewer_js.dart b/thermion_dart/lib/thermion_dart/compatibility/web/interop/filament_viewer_js.dart new file mode 100644 index 00000000..7abe2477 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/compatibility/web/interop/filament_viewer_js.dart @@ -0,0 +1,816 @@ +import 'dart:js_interop'; +import 'dart:js_interop_unsafe'; +import 'dart:math'; + +import 'package:animation_tools_dart/animation_tools_dart.dart'; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; + +import 'package:thermion_dart/thermion_dart/scene.dart'; +import 'package:vector_math/vector_math_64.dart'; +import 'shims/thermion_viewer_js_shim.dart'; + +/// +/// An [ThermionViewer] implementation that forwards calls to +/// a corresponding Javascript shim implementation (see [ThermionViewerJSShim]). +/// +class ThermionViewerFFIJS implements ThermionViewer { + late final ThermionViewerJSShim _shim; + + ThermionViewerFFIJS.fromGlobalProperty(String globalPropertyName) { + this._shim = globalContext.getProperty(globalPropertyName.toJS) + as ThermionViewerJSShim; + } + + ThermionViewerFFIJS(this._shim); + + @override + Future get initialized async { + var inited = _shim.initialized; + final JSBoolean result = await inited.toDart; + return result.toDart; + } + + @override + Stream get pickResult { + throw UnimplementedError(); + } + + @override + bool get rendering => _shim.rendering; + + @override + Future setRendering(bool render) async { + await _shim.setRendering(render).toDart; + } + + @override + Future render() async { + await _shim.render().toDart; + } + + @override + Future setFrameRate(int framerate) async { + await _shim.setFrameRate(framerate).toDart; + } + + @override + Future dispose() async { + await _shim.dispose().toDart; + } + + @override + Future setBackgroundImage(String path, + {bool fillHeight = false}) async { + await _shim.setBackgroundImage(path, fillHeight).toDart; + } + + @override + Future setBackgroundImagePosition(double x, double y, + {bool clamp = false}) async { + await _shim.setBackgroundImagePosition(x, y, clamp).toDart; + } + + @override + Future clearBackgroundImage() async { + await _shim.clearBackgroundImage().toDart; + } + + @override + Future setBackgroundColor( + double r, double g, double b, double alpha) async { + await _shim.setBackgroundColor(r, g, b, alpha).toDart; + } + + @override + Future loadSkybox(String skyboxPath) async { + await _shim.loadSkybox(skyboxPath).toDart; + } + + @override + Future removeSkybox() async { + await _shim.removeSkybox().toDart; + } + + @override + Future loadIbl(String lightingPath, {double intensity = 30000}) async { + await _shim.loadIbl(lightingPath, intensity).toDart; + } + + @override + Future rotateIbl(Matrix3 rotation) async { + await _shim + .rotateIbl(rotation.storage.map((v) => v.toJS).toList().toJS) + .toDart; + } + + @override + Future removeIbl() async { + await _shim.removeIbl().toDart; + } + + @override + Future addLight( + LightType type, + double colour, + double intensity, + double posX, + double posY, + double posZ, + double dirX, + double dirY, + double dirZ, + {double falloffRadius = 1.0, + double spotLightConeInner = pi / 8, + double spotLightConeOuter = pi / 4, + double sunAngularRadius = 0.545, + double sunHaloSize = 10.0, + double sunHaloFallof = 80.0, + bool castShadows = true}) async { + return (await _shim + .addLight( + type.index, + colour, + intensity, + posX, + posY, + posZ, + dirX, + dirY, + dirZ, + falloffRadius, + spotLightConeInner, + spotLightConeOuter, + sunAngularRadius, + sunHaloSize, + sunHaloFallof, + castShadows) + .toDart) + .toDartInt; + } + + @override + Future removeLight(ThermionEntity light) async { + await _shim.removeLight(light).toDart; + } + + @override + Future clearLights() async { + await _shim.clearLights().toDart; + } + + @override + Future loadGlb(String path, {int numInstances = 1}) async { + var entity = (await _shim.loadGlb(path, numInstances).toDart).toDartInt; + scene.registerEntity(entity); + return entity; + } + + @override + Future createInstance(ThermionEntity entity) async { + return (await _shim.createInstance(entity).toDart).toDartInt; + } + + @override + Future getInstanceCount(ThermionEntity entity) async { + return (await _shim.getInstanceCount(entity).toDart).toDartInt; + } + + @override + Future> getInstances(ThermionEntity entity) async { + throw UnimplementedError(); + // final List jsInstances = + // await _shim.getInstances(entity).toDart; + // return jsInstances + // .map((js) => ThermionEntity._fromJSObject(js)) + // .toList() + // .toDart; + } + + @override + Future loadGltf(String path, String relativeResourcePath, + {bool force = false}) async { + throw UnimplementedError(); + // final ThermionEntity jsEntity = await _shim + // .loadGltf(path, relativeResourcePath, force: force) + // .toDart; + // return ThermionEntity._fromJSObject(jsEntity).toDart; + } + + @override + Future panStart(double x, double y) async { + await _shim.panStart(x, y).toDart; + } + + @override + Future panUpdate(double x, double y) async { + await _shim.panUpdate(x, y).toDart; + } + + @override + Future panEnd() async { + await _shim.panEnd().toDart; + } + + @override + Future rotateStart(double x, double y) async { + await _shim.rotateStart(x, y).toDart; + } + + @override + Future rotateUpdate(double x, double y) async { + await _shim.rotateUpdate(x, y).toDart; + } + + @override + Future rotateEnd() async { + await _shim.rotateEnd().toDart; + } + + @override + Future setMorphTargetWeights( + ThermionEntity entity, List weights) async { + var jsWeights = weights.map((x) => x.toJS).cast().toList().toJS; + var promise = _shim.setMorphTargetWeights(entity, jsWeights); + await promise.toDart; + } + + @override + Future> getMorphTargetNames( + ThermionEntity entity, ThermionEntity childEntity) async { + var result = await _shim.getMorphTargetNames(entity, childEntity).toDart; + return result.toDart.map((r) => r.toDart).toList(); + } + + @override + Future> getAnimationNames(ThermionEntity entity) async { + var names = (await (_shim.getAnimationNames(entity).toDart)) + .toDart + .map((x) => x.toDart) + .toList(); + return names; + } + + @override + Future getAnimationDuration( + ThermionEntity entity, int animationIndex) async { + return (await _shim.getAnimationDuration(entity, animationIndex).toDart) + .toDartDouble; + } + + @override + Future setMorphAnimationData( + ThermionEntity entity, MorphAnimationData animation, + {List? targetMeshNames}) async { + try { + var animationDataJs = animation.data + .map((x) => x.map((y) => y.toJS).toList().toJS) + .toList() + .toJS; + var morphTargetsJs = animation.morphTargets + .map((x) => x.toJS) + .cast() + .toList() + .toJS; + var targetMeshNamesJS = + targetMeshNames?.map((x) => x.toJS).cast().toList().toJS; + await _shim + .setMorphAnimationData(entity, animationDataJs, morphTargetsJs, + targetMeshNamesJS, animation.frameLengthInMs) + .toDart; + } catch (err, st) { + print(err); + print(st); + rethrow; + } + } + + @override + Future resetBones(ThermionEntity entity) async { + await _shim.resetBones(entity).toDart; + } + + @override + Future addBoneAnimation( + ThermionEntity entity, BoneAnimationData animation, + {int skinIndex = 0, + double fadeInInSecs = 0.0, + double fadeOutInSecs = 0.0, + double maxDelta = 1.0}) async { + var boneNames = animation.bones.map((n) => n.toJS).toList().toJS; + var frameData = animation.frameData + .map((frame) => frame + .map((q) => [ + q.translation[0].toJS, + q.translation[1].toJS, + q.translation[2].toJS, + q.rotation.x.toJS, + q.rotation.y.toJS, + q.rotation.z.toJS, + q.rotation.w.toJS, + ].toJS) + .toList() + .toJS) + .toList() + .toJS; + + await _shim + .addBoneAnimation( + entity, + boneNames, + frameData, + animation.frameLengthInMs.toJS, + animation.space.index.toJS, + skinIndex.toJS, + fadeInInSecs.toJS, + fadeOutInSecs.toJS, + maxDelta.toJS) + .toDart; + } + + @override + Future removeEntity(ThermionEntity entity) async { + await _shim.removeEntity(entity).toDart; + } + + @override + Future clearEntities() async { + await _shim.clearEntities().toDart; + } + + @override + Future zoomBegin() async { + await _shim.zoomBegin().toDart; + } + + @override + Future zoomUpdate(double x, double y, double z) async { + await _shim.zoomUpdate(x, y, z).toDart; + } + + @override + Future zoomEnd() async { + await _shim.zoomEnd().toDart; + } + + @override + Future playAnimation(ThermionEntity entity, int index, + {bool loop = false, + bool reverse = false, + bool replaceActive = true, + double crossfade = 0.0}) async { + await _shim + .playAnimation(entity, index, loop, reverse, replaceActive, crossfade) + .toDart; + } + + @override + Future playAnimationByName(ThermionEntity entity, String name, + {bool loop = false, + bool reverse = false, + bool replaceActive = true, + double crossfade = 0.0}) async { + await _shim + .playAnimationByName( + entity, name, loop, reverse, replaceActive, crossfade) + .toDart; + } + + @override + Future setAnimationFrame( + ThermionEntity entity, int index, int animationFrame) async { + await _shim.setAnimationFrame(entity, index, animationFrame).toDart; + } + + @override + Future stopAnimation(ThermionEntity entity, int animationIndex) async { + await _shim.stopAnimation(entity, animationIndex).toDart; + } + + @override + Future stopAnimationByName(ThermionEntity entity, String name) async { + await _shim.stopAnimationByName(entity, name).toDart; + } + + @override + Future setCamera(ThermionEntity entity, String? name) async { + await _shim.setCamera(entity, name).toDart; + } + + @override + Future setMainCamera() async { + await _shim.setMainCamera().toDart; + } + + @override + Future getMainCamera() async { + throw UnimplementedError(); + // final ThermionEntity jsEntity = await _shim.getMainCamera().toDart; + // return ThermionEntity._fromJSObject(jsEntity).toDart; + } + + @override + Future setCameraFov(double degrees, double width, double height) async { + await _shim.setCameraFov(degrees, width, height).toDart; + } + + @override + Future setToneMapping(ToneMapper mapper) async { + await _shim.setToneMapping(mapper.index).toDart; + } + + @override + Future setBloom(double bloom) async { + await _shim.setBloom(bloom).toDart; + } + + @override + Future setCameraFocalLength(double focalLength) async { + await _shim.setCameraFocalLength(focalLength).toDart; + } + + @override + Future setCameraCulling(double near, double far) async { + await _shim.setCameraCulling(near, far).toDart; + } + + @override + Future getCameraCullingNear() async { + return (await _shim.getCameraCullingNear().toDart).toDartDouble; + } + + @override + Future getCameraCullingFar() async { + return (await _shim.getCameraCullingFar().toDart).toDartDouble; + } + + @override + Future setCameraFocusDistance(double focusDistance) async { + await _shim.setCameraFocusDistance(focusDistance).toDart; + } + + @override + Future getCameraPosition() async { + final jsPosition = (await _shim.getCameraPosition().toDart).toDart; + return Vector3(jsPosition[0].toDartDouble, jsPosition[1].toDartDouble, + jsPosition[2].toDartDouble); + } + + @override + Future getCameraModelMatrix() async { + throw UnimplementedError(); + // final JSMatrix4 jsMatrix = await _shim.getCameraModelMatrix().toDart; + // return Matrix4.fromList(jsMatrix.storage).toDart; + } + + @override + Future getCameraViewMatrix() async { + throw UnimplementedError(); + // final JSMatrix4 jsMatrix = await _shim.getCameraViewMatrix().toDart; + // return Matrix4.fromList(jsMatrix.storage).toDart; + } + + @override + Future getCameraProjectionMatrix() async { + throw UnimplementedError(); + // final JSMatrix4 jsMatrix = + // await _shim.getCameraProjectionMatrix().toDart; + // return Matrix4.fromList(jsMatrix.storage).toDart; + } + + @override + Future getCameraCullingProjectionMatrix() async { + throw UnimplementedError(); + // final JSMatrix4 jsMatrix = + // await _shim.getCameraCullingProjectionMatrix().toDart; + // return Matrix4.fromList(jsMatrix.storage).toDart; + } + + @override + Future getCameraFrustum() async { + throw UnimplementedError(); + // final JSObject jsFrustum = await _shim.getCameraFrustum().toDart; + // // Assuming Frustum is a class that can be constructed from the JSObject + // return Frustum._fromJSObject(jsFrustum).toDart; + } + + @override + Future setCameraPosition(double x, double y, double z) async { + await _shim.setCameraPosition(x, y, z).toDart; + } + + @override + Future getCameraRotation() async { + throw UnimplementedError(); + // final JSMatrix3 jsRotation = await _shim.getCameraRotation().toDart; + // return Matrix3.fromList(jsRotation.storage).toDart; + } + + @override + Future moveCameraToAsset(ThermionEntity entity) async { + await _shim.moveCameraToAsset(entity).toDart; + } + + @override + Future setViewFrustumCulling(bool enabled) async { + throw UnimplementedError(); + // await _shim.setViewFrustumCulling(enabled.toJSBoolean()).toDart; + } + + @override + Future setCameraExposure( + double aperture, double shutterSpeed, double sensitivity) async { + await _shim.setCameraExposure(aperture, shutterSpeed, sensitivity).toDart; + } + + @override + Future setCameraRotation(Quaternion quaternion) async { + final values = [ + quaternion.x.toJS, + quaternion.y.toJS, + quaternion.z.toJS, + quaternion.w.toJS + ]; + await _shim.setCameraRotation(values.toJS).toDart; + } + + @override + Future setCameraModelMatrix(List matrix) async { + throw UnimplementedError(); + + // await _shim.setCameraModelMatrix(matrix.toJSBox).toDart; + } + + @override + Future setMaterialColor(ThermionEntity entity, String meshName, + int materialIndex, double r, double g, double b, double a) async { + await _shim + .setMaterialColor(entity, meshName, materialIndex, r, g, b, a) + .toDart; + } + + @override + Future transformToUnitCube(ThermionEntity entity) async { + await _shim.transformToUnitCube(entity).toDart; + } + + @override + Future setPosition( + ThermionEntity entity, double x, double y, double z) async { + await _shim.setPosition(entity, x, y, z).toDart; + } + + @override + Future setScale(ThermionEntity entity, double scale) async { + await _shim.setScale(entity, scale).toDart; + } + + @override + Future setRotation( + ThermionEntity entity, double rads, double x, double y, double z) async { + await _shim.setRotation(entity, rads, x, y, z).toDart; + } + + @override + Future queuePositionUpdate( + ThermionEntity entity, double x, double y, double z, + {bool relative = false}) async { + await _shim.queuePositionUpdate(entity, x, y, z, relative).toDart; + } + + @override + Future queueRotationUpdate( + ThermionEntity entity, double rads, double x, double y, double z, + {bool relative = false}) async { + await _shim.queueRotationUpdate(entity, rads, x, y, z, relative).toDart; + } + + @override + Future queueRotationUpdateQuat(ThermionEntity entity, Quaternion quat, + {bool relative = false}) async { + throw UnimplementedError(); + + // final JSQuaternion jsQuat = quat.toJSQuaternion().toDart; + // await _shim + // .queueRotationUpdateQuat(entity, jsQuat, relative: relative) + // .toDart; + } + + @override + Future setPostProcessing(bool enabled) async { + await _shim.setPostProcessing(enabled).toDart; + } + + @override + Future setAntiAliasing(bool msaa, bool fxaa, bool taa) async { + await _shim.setAntiAliasing(msaa, fxaa, taa).toDart; + } + + @override + Future setRotationQuat( + ThermionEntity entity, Quaternion rotation) async { + throw UnimplementedError(); + // final JSQuaternion jsRotation = rotation.toJSQuaternion().toDart; + // await _shim.setRotationQuat(entity, jsRotation).toDart; + } + + @override + Future reveal(ThermionEntity entity, String? meshName) async { + throw UnimplementedError(); + // await _shim.reveal(entity, meshName).toDart; + } + + @override + Future hide(ThermionEntity entity, String? meshName) async { + throw UnimplementedError(); + // await _shim.hide(entity, meshName).toDart; + } + + @override + void pick(int x, int y) { + throw UnimplementedError(); + // _shim.pick(x, y).toDart; + } + + @override + String? getNameForEntity(ThermionEntity entity) { + return _shim.getNameForEntity(entity); + } + + @override + Future setCameraManipulatorOptions( + {ManipulatorMode mode = ManipulatorMode.ORBIT, + double orbitSpeedX = 0.01, + double orbitSpeedY = 0.01, + double zoomSpeed = 0.01}) async { + await _shim + .setCameraManipulatorOptions( + mode.index, orbitSpeedX, orbitSpeedY, zoomSpeed) + .toDart; + } + + @override + Future> getChildEntities( + ThermionEntity parent, bool renderableOnly) async { + final children = + await _shim.getChildEntities(parent, renderableOnly).toDart; + return children.toDart + .map((js) => js.toDartInt) + .cast() + .toList(); + } + + @override + Future getChildEntity( + ThermionEntity parent, String childName) async { + return (await _shim.getChildEntity(parent, childName).toDart).toDartInt; + } + + @override + Future> getChildEntityNames(ThermionEntity entity, + {bool renderableOnly = true}) async { + var names = await _shim.getChildEntityNames(entity, renderableOnly).toDart; + return names.toDart.map((x) => x.toDart).toList(); + } + + @override + Future setRecording(bool recording) async { + throw UnimplementedError(); + // await _shim.setRecording(recording.toJSBoolean()).toDart; + } + + @override + Future setRecordingOutputDirectory(String outputDirectory) async { + await _shim.setRecordingOutputDirectory(outputDirectory).toDart; + } + + @override + Future addAnimationComponent(ThermionEntity entity) async { + await _shim.addAnimationComponent(entity).toDart; + } + + @override + Future addCollisionComponent(ThermionEntity entity, + {void Function(int entityId1, int entityId2)? callback, + bool affectsTransform = false}) async { + throw UnimplementedError(); + // final JSFunction? jsCallback = callback != null + // ? allowInterop( + // (int entityId1, int entityId2) => callback(entityId1, entityId2)) + // : null; + // await _shim + // .addCollisionComponent(entity, + // callback: jsCallback, + // affectsTransform: affectsTransform.toJSBoolean()) + // .toDart; + } + + @override + Future removeCollisionComponent(ThermionEntity entity) async { + await _shim.removeCollisionComponent(entity).toDart; + } + + @override + Future createGeometry( + List vertices, List indices, + {String? materialPath, + PrimitiveType primitiveType = PrimitiveType.TRIANGLES}) async { + throw UnimplementedError(); + // final ThermionEntity jsEntity = await _shim + // .createGeometry(vertices, indices, + // materialPath: materialPath, primitiveType: primitiveType.index) + // .toDart; + // return ThermionEntity._fromJSObject(jsEntity).toDart; + } + + @override + Future setParent(ThermionEntity child, ThermionEntity parent) async { + await _shim.setParent(child, parent).toDart; + } + + @override + Future testCollisions(ThermionEntity entity) async { + await _shim.testCollisions(entity).toDart; + } + + @override + Future setPriority(ThermionEntity entityId, int priority) async { + await _shim.setPriority(entityId, priority).toDart; + } + + Scene? _scene; + + // @override + Scene get scene { + _scene ??= SceneImpl(this); + return _scene!; + } + + AbstractGizmo? get gizmo => null; + + @override + Future> getBoneNames(ThermionEntity entity, + {int skinIndex = 0}) async { + var result = await _shim.getBoneNames(entity, skinIndex).toDart; + return result.toDart.map((n) => n.toDart).toList(); + } + + @override + Future getBone(ThermionEntity entity, int boneIndex, + {int skinIndex = 0}) async { + var result = await _shim.getBone(entity, boneIndex, skinIndex).toDart; + return result.toDartInt; + } + + @override + Future getInverseBindMatrix(ThermionEntity parent, int boneIndex, + {int skinIndex = 0}) { + // TODO: implement getInverseBindMatrix + throw UnimplementedError(); + } + + @override + Future getLocalTransform(ThermionEntity entity) async { + var result = await _shim.getLocalTransform(entity).toDart; + return Matrix4.fromList(result.toDart.map((v) => v.toDartDouble).toList()); + } + + @override + Future getParent(ThermionEntity child) async { + var result = await _shim.getParent(child).toDart; + return result.toDartInt; + } + + @override + Future getWorldTransform(ThermionEntity entity) async { + var result = await _shim.getLocalTransform(entity).toDart; + return Matrix4.fromList(result.toDart.map((v) => v.toDartDouble).toList()); + } + + @override + Future removeAnimationComponent(ThermionEntity entity) { + return _shim.removeAnimationComponent(entity).toDart; + } + + @override + Future setBoneTransform( + ThermionEntity entity, int boneIndex, Matrix4 transform, + {int skinIndex = 0}) { + return _shim + .setBoneTransform(entity, boneIndex, + transform.storage.map((v) => v.toJS).toList().toJS, skinIndex) + .toDart; + } + + @override + Future setTransform(ThermionEntity entity, Matrix4 transform) { + return _shim + .setTransform( + entity, transform.storage.map((v) => v.toJS).toList().toJS) + .toDart; + } + + @override + Future updateBoneMatrices(ThermionEntity entity) { + return _shim.updateBoneMatrices(entity).toDart; + } +} diff --git a/thermion_dart/lib/thermion_dart/compatibility/web/interop/filament_viewer_js_dart_bridge.dart b/thermion_dart/lib/thermion_dart/compatibility/web/interop/filament_viewer_js_dart_bridge.dart new file mode 100644 index 00000000..edffe64c --- /dev/null +++ b/thermion_dart/lib/thermion_dart/compatibility/web/interop/filament_viewer_js_dart_bridge.dart @@ -0,0 +1,721 @@ +@JS() +library thermion_flutter_js; + +import 'dart:js_interop'; +import 'package:thermion_dart/thermion_dart/compatibility/web/interop/shims/thermion_viewer_js_shim.dart'; + +import 'package:vector_math/vector_math_64.dart' as v64; +import 'package:animation_tools_dart/animation_tools_dart.dart'; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; +import 'dart:js_interop_unsafe'; + +import 'package:vector_math/vector_math_64.dart'; + +/// +/// A (Dart) class that wraps a (Dart) instance of [ThermionViewer], +/// but exported to JS by binding to a global property. +/// This is effectively an implementation of [ThermionViewerJSShim]; +/// allowing users to interact with an instance of [ThermionViewer] +/// (presumably compiled to WASM) from any Javascript context (including +/// the browser console). +/// +@JSExport() +class ThermionViewerFFIJSDartBridge { + final ThermionViewer viewer; + + ThermionViewerFFIJSDartBridge(this.viewer); + + void bind( + {String globalPropertyName = "filamentViewer"}) { + var wrapper = createJSInteropWrapper(this) + as ThermionViewerJSShim; + globalContext.setProperty(globalPropertyName.toJS, wrapper); + } + + JSPromise get initialized { + return viewer.initialized.then((v) => v.toJS).toJS; + } + + @JSExport() + JSBoolean get rendering => viewer.rendering.toJS; + + @JSExport() + JSPromise setRendering(bool render) { + return viewer.setRendering(render).toJS; + } + + @JSExport() + JSPromise render() => viewer.render().toJS; + + @JSExport() + JSPromise setFrameRate(int framerate) => viewer.setFrameRate(framerate).toJS; + + @JSExport() + JSPromise dispose() => viewer.dispose().toJS; + + @JSExport() + JSPromise setBackgroundImage(String path, {bool fillHeight = false}) => + viewer.setBackgroundImage(path, fillHeight: fillHeight).toJS; + + @JSExport() + JSPromise setBackgroundImagePosition(double x, double y, + {bool clamp = false}) => + viewer.setBackgroundImagePosition(x, y, clamp: clamp).toJS; + + @JSExport() + JSPromise clearBackgroundImage() => viewer.clearBackgroundImage().toJS; + + @JSExport() + JSPromise setBackgroundColor(double r, double g, double b, double alpha) => + viewer.setBackgroundColor(r, g, b, alpha).toJS; + + @JSExport() + JSPromise loadSkybox(String skyboxPath) => viewer.loadSkybox(skyboxPath).toJS; + + @JSExport() + JSPromise removeSkybox() => viewer.removeSkybox().toJS; + + @JSExport() + JSPromise loadIbl(String lightingPath, double intensity) { + print("Loading IBL from $lightingPath with intensity $intensity"); + return viewer.loadIbl(lightingPath, intensity: intensity).toJS; + } + + @JSExport() + JSPromise rotateIbl(JSArray rotation) { + var matrix = + Matrix3.fromList(rotation.toDart.map((v) => v.toDartDouble).toList()); + return viewer.rotateIbl(matrix).toJS; + } + + @JSExport() + JSPromise removeIbl() => viewer.removeIbl().toJS; + + @JSExport() + JSPromise addLight( + int type, + double colour, + double intensity, + double posX, + double posY, + double posZ, + double dirX, + double dirY, + double dirZ, + double falloffRadius, + double spotLightConeInner, + double spotLightConeOuter, + double sunAngularRadius, + double sunHaloSize, + double sunHaloFallof, + bool castShadows) { + return viewer + .addLight(LightType.values[type], colour, intensity, posX, posY, posZ, + dirX, dirY, dirZ, + falloffRadius: falloffRadius, + spotLightConeInner: spotLightConeInner, + spotLightConeOuter: spotLightConeOuter, + sunAngularRadius: sunAngularRadius, + sunHaloSize: sunHaloSize, + sunHaloFallof: sunHaloFallof, + castShadows: castShadows) + .then((entity) => entity.toJS) + .toJS; + } + + @JSExport() + JSPromise removeLight(ThermionEntity light) => viewer.removeLight(light).toJS; + + @JSExport() + JSPromise clearLights() => viewer.clearLights().toJS; + + @JSExport() + JSPromise loadGlb(String path, {int numInstances = 1}) { + return viewer + .loadGlb(path, numInstances: numInstances) + .then((entity) => entity.toJS) + .toJS; + } + + @JSExport() + JSPromise createInstance(ThermionEntity entity) { + return viewer.createInstance(entity).then((instance) => instance.toJS).toJS; + } + + @JSExport() + JSPromise getInstanceCount(ThermionEntity entity) => + viewer.getInstanceCount(entity).then((v) => v.toJS).toJS; + + @JSExport() + JSPromise> getInstances(ThermionEntity entity) { + return viewer + .getInstances(entity) + .then((instances) => + instances.map((instance) => instance.toJS).toList().toJS) + .toJS; + } + + @JSExport() + JSPromise loadGltf(String path, String relativeResourcePath, + {bool force = false}) { + return viewer + .loadGltf(path, relativeResourcePath, force: force) + .then((entity) => entity.toJS) + .toJS; + } + + @JSExport() + JSPromise panStart(double x, double y) => viewer.panStart(x, y).toJS; + + @JSExport() + JSPromise panUpdate(double x, double y) => viewer.panUpdate(x, y).toJS; + + @JSExport() + JSPromise panEnd() => viewer.panEnd().toJS; + + @JSExport() + JSPromise rotateStart(double x, double y) => viewer.rotateStart(x, y).toJS; + + @JSExport() + JSPromise rotateUpdate(double x, double y) => viewer.rotateUpdate(x, y).toJS; + + @JSExport() + JSPromise rotateEnd() => viewer.rotateEnd().toJS; + + @JSExport() + JSPromise setMorphTargetWeights( + ThermionEntity entity, JSArray weights) { + var dartWeights = weights.toDart.map((w) => w.toDartDouble).toList(); + return viewer.setMorphTargetWeights(entity, dartWeights).toJS; + } + + @JSExport() + JSPromise> getMorphTargetNames( + ThermionEntity entity, ThermionEntity childEntity) { + var morphTargetNames = viewer + .getMorphTargetNames(entity, childEntity) + .then((v) => v.map((s) => s.toJS).toList().toJS); + return morphTargetNames.toJS; + } + + @JSExport() + JSPromise> getBoneNames( + ThermionEntity entity, int skinIndex) { + return viewer + .getBoneNames(entity, skinIndex: skinIndex) + .then((v) => v.map((s) => s.toJS).toList().toJS) + .toJS; + } + + @JSExport() + JSPromise> getAnimationNames(ThermionEntity entity) => + viewer + .getAnimationNames(entity) + .then((v) => v.map((s) => s.toJS).toList().toJS) + .toJS; + + @JSExport() + JSPromise getAnimationDuration( + ThermionEntity entity, int animationIndex) => + viewer + .getAnimationDuration(entity, animationIndex) + .then((v) => v.toJS) + .toJS; + + @JSExport() + JSPromise setMorphAnimationData( + ThermionEntity entity, + JSArray> animation, + JSArray morphTargets, + JSArray? targetMeshNames, + double frameLengthInMs) { + try { + var morphTargetsDart = morphTargets.toDart.map((m) => m.toDart).toList(); + var animationDataDart = animation.toDart + .map((x) => x.toDart.map((y) => y.toDartDouble).toList()) + .toList(); + + var morphAnimationData = MorphAnimationData( + animationDataDart, morphTargetsDart, + frameLengthInMs: frameLengthInMs); + var targetMeshNamesDart = + targetMeshNames?.toDart.map((x) => x.toDart).toList(); + if (animationDataDart.first.length != morphTargetsDart.length) { + throw Exception( + "Length mismatch between morph targets and animation data"); + } + var result = viewer + .setMorphAnimationData( + entity, + morphAnimationData, + targetMeshNames: targetMeshNamesDart, + ) + .onError((err, st) { + print("ERROR SETTING MORPH ANIMATION DATA : $err\n$st"); + return null; + }); + return result.toJS; + } catch (err, st) { + print(err); + print(st); + rethrow; + } + } + + @JSExport() + JSPromise resetBones(ThermionEntity entity) => viewer.resetBones(entity).toJS; + + @JSExport() + JSPromise addBoneAnimation( + ThermionEntity entity, + JSArray bones, + JSArray>> frameData, + JSNumber frameLengthInMs, + JSNumber spaceEnum, + JSNumber skinIndex, + JSNumber fadeInInSecs, + JSNumber fadeOutInSecs, + JSNumber maxDelta) { + var frameDataDart = frameData.toDart + .map((frame) => frame.toDart + .map((v) { + var values = v.toDart; + var trans = v64.Vector3(values[0].toDartDouble, + values[1].toDartDouble, values[2].toDartDouble); + var rot = v64.Quaternion( + values[3].toDartDouble, + values[4].toDartDouble, + values[5].toDartDouble, + values[6].toDartDouble); + return (rotation: rot, translation: trans); + }) + .cast() + .toList()) + .toList(); + + var data = BoneAnimationData( + bones.toDart.map((n) => n.toDart).toList(), frameDataDart, + frameLengthInMs: frameLengthInMs.toDartDouble, + space: Space.values[spaceEnum.toDartInt]); + + return viewer + .addBoneAnimation(entity, data, + skinIndex: skinIndex.toDartInt, + fadeInInSecs: fadeInInSecs.toDartDouble, + fadeOutInSecs: fadeOutInSecs.toDartDouble) + .toJS; + } + + @JSExport() + JSPromise removeEntity(ThermionEntity entity) => + viewer.removeEntity(entity).toJS; + + @JSExport() + JSPromise clearEntities() { + return viewer.clearEntities().toJS; + } + + @JSExport() + JSPromise zoomBegin() => viewer.zoomBegin().toJS; + + @JSExport() + JSPromise zoomUpdate(double x, double y, double z) => + viewer.zoomUpdate(x, y, z).toJS; + + @JSExport() + JSPromise zoomEnd() => viewer.zoomEnd().toJS; + + @JSExport() + JSPromise playAnimation(ThermionEntity entity, int index, + {bool loop = false, + bool reverse = false, + bool replaceActive = true, + double crossfade = 0.0}) => + viewer + .playAnimation( + entity, + index, + loop: loop, + reverse: reverse, + replaceActive: replaceActive, + crossfade: crossfade, + ) + .toJS; + + @JSExport() + JSPromise playAnimationByName(ThermionEntity entity, String name, + {bool loop = false, + bool reverse = false, + bool replaceActive = true, + double crossfade = 0.0}) => + viewer + .playAnimationByName( + entity, + name, + loop: loop, + reverse: reverse, + replaceActive: replaceActive, + crossfade: crossfade, + ) + .toJS; + + @JSExport() + JSPromise setAnimationFrame( + ThermionEntity entity, int index, int animationFrame) => + viewer + .setAnimationFrame( + entity, + index, + animationFrame, + ) + .toJS; + + @JSExport() + JSPromise stopAnimation(ThermionEntity entity, int animationIndex) => + viewer.stopAnimation(entity, animationIndex).toJS; + + @JSExport() + JSPromise stopAnimationByName(ThermionEntity entity, String name) => + viewer.stopAnimationByName(entity, name).toJS; + + @JSExport() + JSPromise setCamera(ThermionEntity entity, String? name) => + viewer.setCamera(entity, name).toJS; + + @JSExport() + JSPromise setMainCamera() => viewer.setMainCamera().toJS; + + @JSExport() + JSPromise getMainCamera() { + return viewer.getMainCamera().then((camera) => camera.toJS).toJS; + } + + @JSExport() + JSPromise setCameraFov(double degrees, double width, double height) => + viewer.setCameraFov(degrees, width, height).toJS; + + @JSExport() + JSPromise setToneMapping(int mapper) => + viewer.setToneMapping(ToneMapper.values[mapper]).toJS; + + @JSExport() + JSPromise setBloom(double bloom) => viewer.setBloom(bloom).toJS; + + @JSExport() + JSPromise setCameraFocalLength(double focalLength) => + viewer.setCameraFocalLength(focalLength).toJS; + + @JSExport() + JSPromise setCameraCulling(double near, double far) => + viewer.setCameraCulling(near, far).toJS; + + @JSExport() + JSPromise getCameraCullingNear() => + viewer.getCameraCullingNear().then((v) => v.toJS).toJS; + + @JSExport() + JSPromise getCameraCullingFar() => + viewer.getCameraCullingFar().then((v) => v.toJS).toJS; + + @JSExport() + JSPromise setCameraFocusDistance(double focusDistance) => + viewer.setCameraFocusDistance(focusDistance).toJS; + + @JSExport() + JSPromise> getCameraPosition() { + throw UnimplementedError(); + // return viewer.getCameraPosition().then((position) => position.toJS).toJS; + } + + @JSExport() + JSPromise> getCameraModelMatrix() { + throw UnimplementedError(); + // return viewer.getCameraModelMatrix().then((matrix) => matrix.toJSArray()).toJS; + } + + @JSExport() + JSPromise> getCameraViewMatrix() { + throw UnimplementedError(); + // return viewer.getCameraViewMatrix().then((matrix) => matrix.toJSArray()).toJS; + } + + @JSExport() + JSPromise> getCameraProjectionMatrix() { + throw UnimplementedError(); + // return viewer.getCameraProjectionMatrix().then((matrix) => matrix.toJSArray()).toJS; + } + + @JSExport() + JSPromise> getCameraCullingProjectionMatrix() { + throw UnimplementedError(); + // return viewer.getCameraCullingProjectionMatrix().then((matrix) => matrix.toJSArray()).toJS; + } + + @JSExport() + JSPromise getCameraFrustum() { + throw UnimplementedError(); + // return viewer.getCameraFrustum().then((frustum) => frustum.toJS).toJS; + } + + @JSExport() + JSPromise setCameraPosition(double x, double y, double z) => + viewer.setCameraPosition(x, y, z).toJS; + @JSExport() + JSPromise> getCameraRotation() { + return viewer + .getCameraRotation() + .then((rotation) => rotation.storage.map((v) => v.toJS).toList().toJS) + .toJS; + } + + @JSExport() + JSPromise moveCameraToAsset(ThermionEntity entity) => + throw UnimplementedError(); +// viewer.moveCameraToAsset(entity)).toJS; + + @JSExport() + JSPromise setViewFrustumCulling(JSBoolean enabled) => + throw UnimplementedError(); +// viewer.setViewFrustumCulling(enabled).toJS; + + @JSExport() + JSPromise setCameraExposure( + double aperture, double shutterSpeed, double sensitivity) => + viewer.setCameraExposure(aperture, shutterSpeed, sensitivity).toJS; + + @JSExport() + JSPromise setCameraRotation(JSArray quaternion) { + var dartVals = quaternion.toDart; + return viewer + .setCameraRotation(v64.Quaternion( + dartVals[0].toDartDouble, + dartVals[1].toDartDouble, + dartVals[2].toDartDouble, + dartVals[3].toDartDouble)) + .toJS; + } + + @JSExport() + JSPromise setCameraModelMatrix(JSArray matrix) { + throw UnimplementedError(); + // viewer.setCameraModelMatrix(matrix).toJS; + } + + @JSExport() + JSPromise setMaterialColor(ThermionEntity entity, String meshName, + int materialIndex, double r, double g, double b, double a) => + throw UnimplementedError(); +// viewer.setMaterialColor( +// entity), +// meshName, +// materialIndex, +// r, +// g, +// b, +// a, +// ).toJS; + @JSExport() + JSPromise transformToUnitCube(ThermionEntity entity) => + viewer.transformToUnitCube(entity).toJS; + @JSExport() + JSPromise setPosition(ThermionEntity entity, double x, double y, double z) => + viewer.setPosition(entity, x, y, z).toJS; + @JSExport() + JSPromise setScale(ThermionEntity entity, double scale) => + viewer.setScale(entity, scale).toJS; + @JSExport() + JSPromise setRotation( + ThermionEntity entity, double rads, double x, double y, double z) => + viewer.setRotation(entity, rads, x, y, z).toJS; + @JSExport() + JSPromise queuePositionUpdate( + ThermionEntity entity, double x, double y, double z, bool relative) => + viewer + .queuePositionUpdate( + entity, + x, + y, + z, + relative: relative, + ) + .toJS; + @JSExport() + JSPromise queueRotationUpdate(ThermionEntity entity, double rads, double x, + double y, double z, bool relative) => + viewer + .queueRotationUpdate( + entity, + rads, + x, + y, + z, + relative: relative, + ) + .toJS; + @JSExport() + JSPromise queueRotationUpdateQuat( + ThermionEntity entity, JSArray quat, JSBoolean relative) => + throw UnimplementedError(); +// viewer.queueRotationUpdateQuat( +// entity, +// quat.toDartQuaternion(), +// relative: relative, +// ).toJS; + + @JSExport() + JSPromise setPostProcessing(bool enabled) => + viewer.setPostProcessing(enabled).toJS; + + @JSExport() + JSPromise setAntiAliasing(bool msaa, bool fxaa, bool taa) => + viewer.setAntiAliasing(msaa, fxaa, taa).toJS; + + @JSExport() + JSPromise setRotationQuat( + ThermionEntity entity, JSArray rotation) => + throw UnimplementedError(); + + @JSExport() + JSPromise reveal(ThermionEntity entity, String? meshName) => + viewer.reveal(entity, meshName).toJS; + + @JSExport() + JSPromise hide(ThermionEntity entity, String? meshName) => + viewer.hide(entity, meshName).toJS; + + @JSExport() + void pick(int x, int y) => viewer.pick(x, y); + + @JSExport() + String? getNameForEntity(ThermionEntity entity) => + viewer.getNameForEntity(entity); + + @JSExport() + JSPromise setCameraManipulatorOptions({ + int mode = 0, + double orbitSpeedX = 0.01, + double orbitSpeedY = 0.01, + double zoomSpeed = 0.01, + }) => + viewer + .setCameraManipulatorOptions( + mode: ManipulatorMode.values[mode], + orbitSpeedX: orbitSpeedX, + orbitSpeedY: orbitSpeedY, + zoomSpeed: zoomSpeed, + ) + .toJS; + + @JSExport() + JSPromise> getChildEntities( + ThermionEntity parent, bool renderableOnly) { + return viewer + .getChildEntities( + parent, + renderableOnly, + ) + .then((entities) => entities.map((entity) => entity.toJS).toList().toJS) + .onError((e, st) async { + print("Error : $e\n$st"); + return [].toJS; + }).toJS; + } + + @JSExport() + JSPromise getChildEntity(ThermionEntity parent, String childName) { + return viewer + .getChildEntity( + parent, + childName, + ) + .then((entity) => entity.toJS) + .onError((e, st) async { + print("Error getChildEntity : $e\n$st"); + return 0.toJS; + }).toJS; + } + + @JSExport() + JSPromise> getChildEntityNames( + ThermionEntity entity, bool renderableOnly) => + viewer + .getChildEntityNames( + entity, + renderableOnly: renderableOnly, + ) + .then((v) => v.map((s) => s.toJS).toList().toJS) + .toJS; + + @JSExport() + JSPromise setRecording(bool recording) => viewer.setRecording(recording).toJS; + + @JSExport() + JSPromise setRecordingOutputDirectory(String outputDirectory) => + viewer.setRecordingOutputDirectory(outputDirectory).toJS; + + @JSExport() + JSPromise addAnimationComponent(ThermionEntity entity) => + viewer.addAnimationComponent(entity).toJS; + + @JSExport() + JSPromise removeAnimationComponent(ThermionEntity entity) => + viewer.removeAnimationComponent(entity).toJS; + + @JSExport() + JSPromise getParent(ThermionEntity entity) => + viewer.removeAnimationComponent(entity).toJS; + + @JSExport() + JSPromise getBone(ThermionEntity entity, int boneIndex, int skinIndex) => + viewer.getBone(entity, boneIndex, skinIndex: skinIndex).toJS; + + @JSExport() + JSPromise> getLocalTransform(ThermionEntity entity) { + return viewer + .getLocalTransform(entity) + .then((t) => t.storage.map((v) => v.toJS).toList().toJS) + .toJS; + } + + @JSExport() + JSPromise> getWorldTransform(ThermionEntity entity) { + return viewer + .getWorldTransform(entity) + .then((t) => t.storage.map((v) => v.toJS).toList().toJS) + .toJS; + } + + @JSExport() + JSPromise setTransform(ThermionEntity entity, JSArray transform) { + return viewer + .setTransform( + entity, + Matrix4.fromList( + transform.toDart.map((v) => v.toDartDouble).toList())) + .toJS; + } + + @JSExport() + JSPromise updateBoneMatrices(ThermionEntity entity) { + return viewer.updateBoneMatrices(entity).toJS; + } + + @JSExport() + JSPromise setBoneTransform(ThermionEntity entity, int boneIndex, + JSArray transform, int skinIndex) { + return viewer + .setBoneTransform( + entity, + boneIndex, + Matrix4.fromList( + transform.toDart.map((v) => v.toDartDouble).toList()), + skinIndex: skinIndex) + .toJS; + } + + @JSExport() + JSPromise addCollisionComponent(ThermionEntity entity, + {JSFunction? callback, bool affectsTransform = false}) { + throw UnimplementedError(); + } +} diff --git a/thermion_dart/lib/thermion_dart/compatibility/web/interop/filament_viewer_wasm.dart b/thermion_dart/lib/thermion_dart/compatibility/web/interop/filament_viewer_wasm.dart new file mode 100644 index 00000000..cbca9454 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/compatibility/web/interop/filament_viewer_wasm.dart @@ -0,0 +1,1447 @@ +import 'dart:js_interop'; +import 'dart:js_interop_unsafe'; +import 'dart:math'; +import 'dart:typed_data' as td; +import 'dart:typed_data'; +import 'package:web/web.dart'; +import 'package:animation_tools_dart/animation_tools_dart.dart'; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; +import 'package:vector_math/vector_math_64.dart'; + +extension type _EmscriptenModule(JSObject _) implements JSObject { + external JSAny? ccall(String name, String returnType, + JSArray argTypes, JSArray args, JSAny? opts); + + external JSNumber _malloc(int numBytes); + external void _free(JSNumber addr); + external JSNumber stackAlloc(int numBytes); + + external JSAny getValue(JSNumber addr, String llvmType); + external void setValue(JSNumber addr, JSNumber value, String llvmType); + + external JSString intArrayToString(JSAny ptr); + external JSString UTF8ToString(JSAny ptr); + external void stringToUTF8( + JSString str, JSNumber ptr, JSNumber maxBytesToWrite); + external void writeArrayToMemory(JSUint8Array data, JSNumber ptr); + external JSAny get ALLOC_STACK; + external JSAny get HEAPU32; + external JSAny get HEAP32; +} + +/// +/// An [ThermionViewer] implementation that forwards calls to +/// the (Emscripten-generated) ThermionDart JS module. +/// +class ThermionViewerFFIWasm implements ThermionViewer { + late _EmscriptenModule _module; + + bool _initialized = false; + bool _rendering = false; + + ThermionViewerFFIWasm() { + _module = window.getProperty<_EmscriptenModule>("df".toJS); + } + + JSBigInt? _viewer; + JSBigInt? _sceneManager; + + @override + Future initialize(int width, int height, {String? uberArchivePath}) async { + final context = _module.ccall("thermion_dart_web_create_gl_context", "int", + [].toJS, [].toJS, null); + final loader = _module.ccall( + "thermion_dart_web_get_resource_loader_wrapper", + "void*", + [].toJS, + [].toJS, + null); + _viewer = _module.ccall( + "create_filament_viewer", + "void*", + ["void*".toJS, "void*".toJS, "void*".toJS, "string".toJS].toJS, + [context, loader, null, uberArchivePath?.toJS].toJS, + null) as JSBigInt; + print("Created viewer"); + await createSwapChain(width, height); + _updateViewportAndCameraProjection(width, height, 1.0); + _sceneManager = _module.ccall("get_scene_manager", "void*", + ["void*".toJS].toJS, [_viewer!].toJS, null) as JSBigInt; + _initialized = true; + } + + Future createSwapChain(int width, int height) async { + _module.ccall( + "create_swap_chain", + "void", + ["void*".toJS, "void*".toJS, "uint32_t".toJS, "uint32_t".toJS].toJS, + [_viewer!, null, width.toJS, height.toJS].toJS, + null); + } + + Future destroySwapChain() async { + _module.ccall("destroy_swap_chain", "void", ["void*".toJS].toJS, + [_viewer!].toJS, null); + } + + @override + void _updateViewportAndCameraProjection( + int width, int height, double scaleFactor) { + _module.ccall( + "update_viewport_and_camera_projection", + "void", + ["void*".toJS, "uint32_t".toJS, "uint32_t".toJS, "float".toJS].toJS, + [_viewer!, width.toJS, height.toJS, scaleFactor.toJS].toJS, + null); + } + + @override + Future get initialized async { + return _initialized; + } + + @override + Stream get pickResult { + throw UnimplementedError(); + } + + @override + bool get rendering => _rendering; + + @override + Future dispose() async { + _module.ccall("destroy_filament_viewer", "void", ["void*".toJS].toJS, + [_viewer].toJS, null); + _initialized = false; + _viewer = null; + } + + @override + Future setBackgroundColor(double r, double g, double b, double alpha) async { + _module.ccall( + "set_background_color", + "void", + ["void*".toJS, "float".toJS, "float".toJS, "float".toJS, "float".toJS] + .toJS, + [_viewer!, r.toJS, g.toJS, b.toJS, alpha.toJS].toJS, + null); + } + + @override + Future addAnimationComponent(ThermionEntity entity) async { + _module.ccall( + "add_animation_component", + "bool", + ["void*".toJS, "int32_t".toJS].toJS, + [_sceneManager!, entity.toJS].toJS, + null); + } + + Matrix4 _matrixFromPtr(JSNumber matPtr) { + final mat = Matrix4.zero(); + for (int i = 0; i < 16; i++) { + mat[i] = (_module.getValue((matPtr.toDartInt + (i * 4)).toJS, "float") + as JSNumber) + .toDartDouble; + } + return mat; + } + + @override + Future> getRestLocalTransforms(ThermionEntity entity, + {int skinIndex = 0}) async { + var boneCountJS = _module.ccall( + "get_bone_count", + "int", + ["void*".toJS, "int".toJS, "int".toJS].toJS, + [_sceneManager!, entity.toJS, skinIndex.toJS].toJS, + null) as JSNumber; + var boneCount = boneCountJS.toDartInt; + var buf = _module._malloc(boneCount * 16 * 4) as JSNumber; + _module.ccall( + "get_rest_local_transforms", + "void", + ["void*".toJS, "int".toJS, "int".toJS, "float*".toJS, "int".toJS].toJS, + [_sceneManager!, entity.toJS, skinIndex.toJS, buf, boneCount.toJS].toJS, + null); + var transforms = []; + for (int i = 0; i < boneCount; i++) { + var matPtr = (buf.toDartInt + (i * 16 * 4)).toJS; + transforms.add(_matrixFromPtr(matPtr)); + } + _module._free(buf); + return transforms; + } + + @override + Future getBone(ThermionEntity parent, int boneIndex, + {int skinIndex = 0}) async { + final boneId = _module.ccall( + "get_bone", + "int", + ["void*".toJS, "int32_t".toJS, "int32_t".toJS, "int32_t".toJS].toJS, + [_sceneManager!, parent.toJS, skinIndex.toJS, boneIndex.toJS].toJS, + null) as JSNumber; + if (boneId.toDartInt == -1) { + throw Exception("Failed to get bone"); + } + return boneId.toDartInt; + } + + Future> getBones(ThermionEntity entity, + {int skinIndex = 0}) async { + final boneNames = await getBoneNames(entity); + final bones = await Future.wait(List.generate( + boneNames.length, (i) => getBone(entity, i, skinIndex: skinIndex))); + return bones; + } + + @override + Future addBoneAnimation(ThermionEntity entity, BoneAnimationData animation, + {int skinIndex = 0, + double fadeInInSecs = 0.0, + double fadeOutInSecs = 0.0, + double maxDelta = 1.0}) async { + final boneNames = await getBoneNames(entity); + final bones = await getBones(entity); + + var numBytes = animation.numFrames * 16 * 4; + var floatPtr = _module._malloc(numBytes); + + var restLocalTransforms = await getRestLocalTransforms(entity); + + for (int i = 0; i < animation.bones.length; i++) { + final boneName = animation.bones[i]; + final entityBoneIndex = boneNames.indexOf(boneName); + + var boneEntity = bones[entityBoneIndex]; + + var baseTransform = restLocalTransforms[entityBoneIndex]; + + var world = Matrix4.identity(); + + // this odd use of ! is intentional, without it, the WASM optimizer gets in trouble + var parentBoneEntity = (await getParent(boneEntity))!; + while (true) { + if (!bones.contains(parentBoneEntity!)) { + break; + } + world = restLocalTransforms[bones.indexOf(parentBoneEntity!)] * world; + parentBoneEntity = (await getParent(parentBoneEntity))!; + } + + world = Matrix4.identity()..setRotation(world.getRotation()); + var worldInverse = Matrix4.identity()..copyInverse(world); + + for (int frameNum = 0; frameNum < animation.numFrames; frameNum++) { + var rotation = animation.frameData[frameNum][i].rotation; + var translation = animation.frameData[frameNum][i].translation; + var frameTransform = + Matrix4.compose(translation, rotation, Vector3.all(1.0)); + var newLocalTransform = frameTransform.clone(); + if (animation.space == Space.Bone) { + newLocalTransform = baseTransform * frameTransform; + } else if (animation.space == Space.ParentWorldRotation) { + newLocalTransform = + baseTransform * (worldInverse * frameTransform * world); + } + for (int j = 0; j < 16; j++) { + var offset = ((frameNum * 16) + j) * 4; + _module.setValue((floatPtr.toDartInt + offset).toJS, + newLocalTransform.storage[j].toJS, "float"); + } + } + + _module.ccall( + "add_bone_animation", + "void", + [ + "void*".toJS, + "int".toJS, + "int".toJS, + "int".toJS, + "float*".toJS, + "int".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS + ].toJS, + [ + _sceneManager!, + entity.toJS, + skinIndex.toJS, + entityBoneIndex.toJS, + floatPtr, + animation.numFrames.toJS, + animation.frameLengthInMs.toJS, + fadeOutInSecs.toJS, + fadeInInSecs.toJS, + maxDelta.toJS + ].toJS, + null); + } + _module._free(floatPtr); + } + + @override + Future addCollisionComponent(ThermionEntity entity, + {void Function(int entityId1, int entityId2)? callback, + bool affectsTransform = false}) { + // TODO: implement addCollisionComponent + throw UnimplementedError(); + } + + @override + Future addLight( + LightType type, + double colour, + double intensity, + double posX, + double posY, + double posZ, + double dirX, + double dirY, + double dirZ, + {double falloffRadius = 1.0, + double spotLightConeInner = pi / 8, + double spotLightConeOuter = pi / 4, + double sunAngularRadius = 0.545, + double sunHaloSize = 10.0, + double sunHaloFallof = 80.0, + bool castShadows = true}) async { + final entityId = _module.ccall( + "add_light", + "int", + [ + "void*".toJS, + "uint8_t".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "bool".toJS + ].toJS, + [ + _viewer, + type.index.toJS, + colour.toJS, + intensity.toJS, + posX.toJS, + posY.toJS, + posZ.toJS, + dirX.toJS, + dirY.toJS, + dirZ.toJS, + falloffRadius.toJS, + spotLightConeInner.toJS, + spotLightConeOuter.toJS, + sunAngularRadius.toJS, + sunHaloSize.toJS, + sunHaloFallof.toJS, + castShadows.toJS + ].toJS, + null) as JSNumber; + if (entityId.toDartInt == -1) { + throw Exception("Failed to add light"); + } + return entityId.toDartInt; + } + + @override + Future clearBackgroundImage() { + // TODO: implement clearBackgroundImage + throw UnimplementedError(); + } + + @override + Future clearEntities() { + // TODO: implement clearEntities + throw UnimplementedError(); + } + + @override + Future clearLights() { + // TODO: implement clearLights + throw UnimplementedError(); + } + + @override + Future createGeometry(List vertices, List indices, + {String? materialPath, + PrimitiveType primitiveType = PrimitiveType.TRIANGLES}) { + // TODO: implement createGeometry + throw UnimplementedError(); + } + + @override + Future createInstance(ThermionEntity entity) { + // TODO: implement createInstance + throw UnimplementedError(); + } + + @override + Future getAnimationDuration( + ThermionEntity entity, int animationIndex) { + // TODO: implement getAnimationDuration + throw UnimplementedError(); + } + + @override + Future> getAnimationNames(ThermionEntity entity) { + // TODO: implement getAnimationNames + throw UnimplementedError(); + } + + @override + Future> getBoneNames(ThermionEntity entity, + {int skinIndex = 0}) async { + var boneCountJS = _module.ccall( + "get_bone_count", + "int", + ["void*".toJS, "int".toJS, "int".toJS].toJS, + [_sceneManager!, entity.toJS, skinIndex.toJS].toJS, + null) as JSNumber; + var boneCount = boneCountJS.toDartInt; + var buf = _module._malloc(boneCount * 4) as JSNumber; + + var empty = " ".toJS; + var ptrs = []; + for (int i = 0; i < boneCount; i++) { + var ptr = _module._malloc(256); + _module.stringToUTF8(empty, ptr, 255.toJS); + ptrs.add(ptr); + _module.setValue((buf.toDartInt + (i * 4)).toJS, ptr, "i32"); + } + _module.ccall( + "get_bone_names", + "void", + ["void*".toJS, "int".toJS, "char**".toJS, "int".toJS].toJS, + [_sceneManager!, entity.toJS, buf, skinIndex.toJS].toJS, + null); + var names = []; + for (int i = 0; i < boneCount; i++) { + var name = _module.UTF8ToString(ptrs[i]).toDart; + names.add(name); + } + + return names; + } + + @override + Future getCameraCullingFar() { + // TODO: implement getCameraCullingFar + throw UnimplementedError(); + } + + @override + Future getCameraCullingNear() { + // TODO: implement getCameraCullingNear + throw UnimplementedError(); + } + + @override + Future getCameraCullingProjectionMatrix() { + // TODO: implement getCameraCullingProjectionMatrix + throw UnimplementedError(); + } + + @override + Future getCameraFrustum() { + // TODO: implement getCameraFrustum + throw UnimplementedError(); + } + + @override + Future getCameraModelMatrix() { + // TODO: implement getCameraModelMatrix + throw UnimplementedError(); + } + + @override + Future getCameraPosition() { + // TODO: implement getCameraPosition + throw UnimplementedError(); + } + + @override + Future getCameraProjectionMatrix() { + // TODO: implement getCameraProjectionMatrix + throw UnimplementedError(); + } + + @override + Future getCameraRotation() { + // TODO: implement getCameraRotation + throw UnimplementedError(); + } + + @override + Future getCameraViewMatrix() { + // TODO: implement getCameraViewMatrix + throw UnimplementedError(); + } + + @override + Future> getChildEntities( + ThermionEntity parent, bool renderableOnly) async { + var entityCountJS = _module.ccall( + "get_entity_count", + "int", + ["void*".toJS, "int".toJS, "bool".toJS].toJS, + [_sceneManager!, parent.toJS, renderableOnly.toJS].toJS, + null) as JSNumber; + var entityCount = entityCountJS.toDartInt; + var entities = []; + var buf = _module._malloc(entityCount * 4) as JSNumber; + + _module.ccall( + "get_entities", + "void", + ["void*".toJS, "int".toJS, "bool".toJS, "int*".toJS].toJS, + [_sceneManager!, parent.toJS, renderableOnly.toJS, buf].toJS, + null); + for (int i = 0; i < entityCount; i++) { + var entityId = + _module.getValue((buf.toDartInt + (i * 4)).toJS, "i32") as JSNumber; + entities.add(entityId.toDartInt); + } + _module._free(buf); + return entities; + } + + @override + Future getChildEntity( + ThermionEntity parent, String childName) async { + final entityId = _module.ccall( + "find_child_entity_by_name", + "int", + ["void*".toJS, "int".toJS, "string".toJS].toJS, + [_sceneManager!, parent.toJS, childName.toJS].toJS, + null) as JSNumber; + if (entityId.toDartInt == -1) { + throw Exception("Failed to find child entity"); + } + return entityId.toDartInt; + } + + @override + Future> getChildEntityNames(ThermionEntity entity, + {bool renderableOnly = true}) async { + var entityCountJS = _module.ccall( + "get_entity_count", + "int", + ["void*".toJS, "int".toJS, "bool".toJS].toJS, + [_sceneManager!, entity.toJS, renderableOnly.toJS].toJS, + null) as JSNumber; + var entityCount = entityCountJS.toDartInt; + var names = []; + for (int i = 0; i < entityCount; i++) { + var namePtr = _module.ccall( + "get_entity_name_at", + "char*", + ["void*".toJS, "int".toJS, "int".toJS, "bool".toJS].toJS, + [_sceneManager!, entity.toJS, i.toJS, renderableOnly.toJS].toJS, + null) as JSNumber; + names.add(_module.UTF8ToString(namePtr).toDart); + } + return names; + } + + @override + Future getInstanceCount(ThermionEntity entity) { + // TODO: implement getInstanceCount + throw UnimplementedError(); + } + + @override + Future> getInstances(ThermionEntity entity) { + // TODO: implement getInstances + throw UnimplementedError(); + } + + @override + Future getInverseBindMatrix(ThermionEntity parent, int boneIndex, + {int skinIndex = 0}) { + // TODO: implement getInverseBindMatrix + throw UnimplementedError(); + } + + @override + Future getLocalTransform(ThermionEntity entity) { + // TODO: implement getLocalTransform + throw UnimplementedError(); + } + + @override + Future getMainCamera() async { + final entityId = _module.ccall( + "get_main_camera", "int", ["void*".toJS].toJS, [_viewer].toJS, null) + as JSNumber; + if (entityId.toDartInt == -1) { + throw Exception("Failed to get main camera"); + } + return entityId.toDartInt; + } + + @override + Future> getMorphTargetNames( + ThermionEntity entity, ThermionEntity childEntity) async { + var morphTargetCountJS = _module.ccall( + "get_morph_target_name_count", + "int", + ["void*".toJS, "int32_t".toJS, "int32_t".toJS].toJS, + [_sceneManager!, entity.toJS, childEntity.toJS].toJS, + null) as JSNumber; + var morphTargetCount = morphTargetCountJS.toDartInt; + var names = []; + for (int i = 0; i < morphTargetCount; i++) { + var buf = _module._malloc(256) as JSNumber; + _module.ccall( + "get_morph_target_name", + "void", + [ + "void*".toJS, + "int32_t".toJS, + "int32_t".toJS, + "char*".toJS, + "int32_t".toJS + ].toJS, + [_sceneManager!, entity.toJS, childEntity.toJS, buf, i.toJS].toJS, + null); + names.add(_module.UTF8ToString(buf).toDart); + _module._free(buf); + } + return names; + } + + @override + String? getNameForEntity(ThermionEntity entity) { + final namePtr = _module.ccall( + "get_name_for_entity", + "char*", + ["void*".toJS, "int32_t".toJS].toJS, + [_sceneManager!, entity.toJS].toJS, + null) as JSNumber; + if (namePtr.toDartInt == 0) { + return null; + } + return _module.UTF8ToString(namePtr).toDart; + } + + @override + Future getParent(ThermionEntity child) async { + final parentId = _module.ccall( + "get_parent", + "int", + ["void*".toJS, "int32_t".toJS].toJS, + [_sceneManager!, child.toJS].toJS, + null) as JSNumber; + if (parentId.toDartInt == -1) { + return null; + } + return parentId.toDartInt; + } + + @override + Future getWorldTransform(ThermionEntity entity) async { + final matrixPtr = _module._malloc(16 * 4) as JSNumber; + _module.ccall( + "get_world_transform", + "void", + ["void*".toJS, "int32_t".toJS, "float*".toJS].toJS, + [_sceneManager!, entity.toJS, matrixPtr].toJS, + null); + final matrix = _matrixFromPtr(matrixPtr); + _module._free(matrixPtr); + return matrix; + } + + @override + // TODO: implement gizmo + AbstractGizmo? get gizmo => throw UnimplementedError(); + + @override + Future hide(ThermionEntity entity, String? meshName) async { + if (meshName != null) { + final result = _module.ccall( + "hide_mesh", + "int", + ["void*".toJS, "int".toJS, "string".toJS].toJS, + [_sceneManager!, entity.toJS, meshName.toJS].toJS, + null) as JSNumber; + if (result.toDartInt == -1) { + throw Exception( + "Failed to hide mesh ${meshName} on entity ${entity.toJS}"); + } + } else { + throw Exception( + "Cannot hide mesh, meshName must be specified when invoking this method"); + } + } + + Future loadGlbFromBuffer(Uint8List data, + {int numInstances = 1}) async { + if (numInstances != 1) { + throw Exception("TODO"); + } + final ptr = _module._malloc(data.length); + _module.writeArrayToMemory(data.toJS, ptr); + + final result = _module.ccall( + "load_glb_from_buffer", + "int", + ["void*".toJS, "void*".toJS, "size_t".toJS].toJS, + [_sceneManager!, ptr, data.lengthInBytes.toJS].toJS, + null) as JSNumber; + final entityId = result.toDartInt; + _module._free(ptr); + if (entityId == -1) { + throw Exception("Failed to load GLB"); + } + return entityId; + } + + @override + Future loadGlb(String path, {int numInstances = 1}) async { + final promise = _module.ccall( + "load_glb", + "int", + ["void*".toJS, "string".toJS, "int".toJS].toJS, + [_sceneManager!, path.toJS, numInstances.toJS].toJS, + {"async": true}.jsify()) as JSPromise; + final entityId = (await promise.toDart).toDartInt; + if (entityId == -1) { + throw Exception("Failed to load GLB"); + } + return entityId; + } + + @override + Future loadGltf(String path, String relativeResourcePath, + {bool force = false}) async { + final promise = _module.ccall( + "load_gltf", + "int", + ["void*".toJS, "string".toJS, "string".toJS, "bool".toJS].toJS, + [_sceneManager!, path.toJS, relativeResourcePath.toJS, force.toJS].toJS, + {"async": true}.jsify()) as JSPromise; + final entityId = (await promise.toDart).toDartInt; + if (entityId == -1) { + throw Exception("Failed to load GLTF"); + } + return entityId; + } + + @override + Future loadIbl(String lightingPath, {double intensity = 30000}) async { + var promise = _module.ccall( + "load_ibl", + "void", + ["void*".toJS, "string".toJS, "float".toJS].toJS, + [_viewer!, lightingPath.toJS, intensity.toJS].toJS, + {"async": true}.jsify()) as JSPromise; + await promise.toDart; + } + + @override + Future loadSkybox(String skyboxPath) async { + var promise = _module.ccall( + "load_skybox", + "void", + ["void*".toJS, "string".toJS].toJS, + [_viewer!, skyboxPath.toJS].toJS, + {"async": true}.jsify()) as JSPromise; + await promise.toDart; + } + + @override + Future moveCameraToAsset(ThermionEntity entity) { + // TODO: implement moveCameraToAsset + throw UnimplementedError(); + } + + @override + Future panEnd() { + // TODO: implement panEnd + throw UnimplementedError(); + } + + @override + Future panStart(double x, double y) { + // TODO: implement panStart + throw UnimplementedError(); + } + + @override + Future panUpdate(double x, double y) { + // TODO: implement panUpdate + throw UnimplementedError(); + } + + @override + void pick(int x, int y) { + // TODO: implement pick + } + + @override + Future playAnimation(ThermionEntity entity, int index, + {bool loop = false, + bool reverse = false, + bool replaceActive = true, + double crossfade = 0.0}) async { + _module.ccall( + "play_animation", + "void", + [ + "void*".toJS, + "int32_t".toJS, + "int32_t".toJS, + "bool".toJS, + "bool".toJS, + "bool".toJS, + "float".toJS + ].toJS, + [ + _sceneManager!, + entity.toJS, + index.toJS, + loop.toJS, + reverse.toJS, + replaceActive.toJS, + crossfade.toJS + ].toJS, + null); + } + + @override + Future playAnimationByName(ThermionEntity entity, String name, + {bool loop = false, + bool reverse = false, + bool replaceActive = true, + double crossfade = 0.0}) { + // TODO: implement playAnimationByName + throw UnimplementedError(); + } + + @override + Future queuePositionUpdate( + ThermionEntity entity, double x, double y, double z, + {bool relative = false}) { + // TODO: implement queuePositionUpdate + throw UnimplementedError(); + } + + @override + Future queueRotationUpdate( + ThermionEntity entity, double rads, double x, double y, double z, + {bool relative = false}) { + // TODO: implement queueRotationUpdate + throw UnimplementedError(); + } + + @override + Future queueRotationUpdateQuat(ThermionEntity entity, Quaternion quat, + {bool relative = false}) { + // TODO: implement queueRotationUpdateQuat + throw UnimplementedError(); + } + + @override + Future removeAnimationComponent(ThermionEntity entity) { + // TODO: implement removeAnimationComponent + throw UnimplementedError(); + } + + @override + Future removeCollisionComponent(ThermionEntity entity) { + // TODO: implement removeCollisionComponent + throw UnimplementedError(); + } + + @override + Future removeEntity(ThermionEntity entity) { + // TODO: implement removeEntity + throw UnimplementedError(); + } + + @override + Future removeIbl() { + // TODO: implement removeIbl + throw UnimplementedError(); + } + + @override + Future removeLight(ThermionEntity light) { + // TODO: implement removeLight + throw UnimplementedError(); + } + + @override + Future removeSkybox() { + // TODO: implement removeSkybox + throw UnimplementedError(); + } + + int _last = 0; + + @override + Future render() async { + _last = DateTime.now().millisecondsSinceEpoch * 1000000; + _module.ccall( + "render", + "void", + [ + "void*".toJS, + "uint64_t".toJS, + "void*".toJS, + "void*".toJS, + "void*".toJS + ].toJS, + [ + _viewer!, + 0.toJS, + null, // pixelBuffer, + null, // callback + null // data + ].toJS, + null); + } + + @override + Future resetBones(ThermionEntity entity) { + // TODO: implement resetBones + throw UnimplementedError(); + } + + @override + Future reveal(ThermionEntity entity, String? meshName) { + // TODO: implement reveal + throw UnimplementedError(); + } + + @override + Future rotateEnd() { + // TODO: implement rotateEnd + throw UnimplementedError(); + } + + @override + Future rotateIbl(Matrix3 rotation) { + // TODO: implement rotateIbl + throw UnimplementedError(); + } + + @override + Future rotateStart(double x, double y) { + // TODO: implement rotateStart + throw UnimplementedError(); + } + + @override + Future rotateUpdate(double x, double y) { + // TODO: implement rotateUpdate + throw UnimplementedError(); + } + + @override + // TODO: implement scene + Scene get scene => throw UnimplementedError(); + + @override + Future setAnimationFrame( + ThermionEntity entity, int index, int animationFrame) { + // TODO: implement setAnimationFrame + throw UnimplementedError(); + } + + @override + Future setAntiAliasing(bool msaa, bool fxaa, bool taa) async { + _module.ccall( + "set_antialiasing", + "void", + ["void*".toJS, "bool".toJS, "bool".toJS, "bool".toJS].toJS, + [_viewer!, msaa.toJS, fxaa.toJS, taa.toJS].toJS, + null); + } + + @override + Future setBackgroundImage(String path, {bool fillHeight = false}) { + // TODO: implement setBackgroundImage + throw UnimplementedError(); + } + + @override + Future setBackgroundImagePosition(double x, double y, {bool clamp = false}) { + // TODO: implement setBackgroundImagePosition + throw UnimplementedError(); + } + + @override + Future setBloom(double bloom) { + // TODO: implement setBloom + throw UnimplementedError(); + } + + @override + Future setBoneTransform( + ThermionEntity entity, int boneIndex, Matrix4 transform, + {int skinIndex = 0}) { + // TODO: implement setBoneTransform + throw UnimplementedError(); + } + + @override + Future setCamera(ThermionEntity entity, String? name) { + // TODO: implement setCamera + throw UnimplementedError(); + } + + @override + Future setCameraCulling(double near, double far) { + // TODO: implement setCameraCulling + throw UnimplementedError(); + } + + @override + Future setCameraExposure( + double aperture, double shutterSpeed, double sensitivity) { + // TODO: implement setCameraExposure + throw UnimplementedError(); + } + + @override + Future setCameraFocalLength(double focalLength) { + // TODO: implement setCameraFocalLength + throw UnimplementedError(); + } + + @override + Future setCameraFocusDistance(double focusDistance) { + // TODO: implement setCameraFocusDistance + throw UnimplementedError(); + } + + @override + Future setCameraFov(double degrees, double width, double height) { + // TODO: implement setCameraFov + throw UnimplementedError(); + } + + @override + Future setCameraManipulatorOptions( + {ManipulatorMode mode = ManipulatorMode.ORBIT, + double orbitSpeedX = 0.01, + double orbitSpeedY = 0.01, + double zoomSpeed = 0.01}) { + // TODO: implement setCameraManipulatorOptions + throw UnimplementedError(); + } + + @override + Future setCameraModelMatrix(List matrix) { + // TODO: implement setCameraModelMatrix + throw UnimplementedError(); + } + + @override + Future setCameraPosition(double x, double y, double z) async { + _module.ccall( + "set_camera_position", + "void", + ["void*".toJS, "float".toJS, "float".toJS, "float".toJS].toJS, + [_viewer!, x.toJS, y.toJS, z.toJS].toJS, + null); + } + + @override + Future setCameraRotation(Quaternion quaternion) async { + _module.ccall( + "set_camera_rotation", + "void", + ["void*".toJS, "float".toJS, "float".toJS, "float".toJS, "float".toJS] + .toJS, + [ + _viewer!, + quaternion.w.toJS, + quaternion.x.toJS, + quaternion.y.toJS, + quaternion.z.toJS + ].toJS, + null); + } + + @override + Future setFrameRate(int framerate) { + // TODO: implement setFrameRate + throw UnimplementedError(); + } + + @override + Future setMainCamera() { + // TODO: implement setMainCamera + throw UnimplementedError(); + } + + @override + Future setMaterialColor(ThermionEntity entity, String meshName, + int materialIndex, double r, double g, double b, double a) { + // TODO: implement setMaterialColor + throw UnimplementedError(); + } + + // @override + // Future setMorphAnimationData( + // ThermionEntity entity, MorphAnimationData animation, + // {List? targetMeshNames}) async { + // final morphTargetNames = await getMorphTargetNames(entity, entity); + + // // We need to create a JS array for the morph indices and morph data + // final numFrames = animation.numFrames; + // final numMorphTargets = morphTargetNames.length; + // final numBytes = numFrames * numMorphTargets * 4; + // final floatPtr = _module._malloc(numBytes); + // final morphIndicesPtr = _module._malloc(numFrames * 4); + + // // Extract the morph data for the target morph targets + // final morphData = animation.extract(morphTargets: targetMeshNames); + + // // Create a list of morph indices based on the target morph targets + // final morphIndices = targetMeshNames != null + // ? animation._getMorphTargetIndices(targetMeshNames) + // : List.generate(morphTargetNames.length, (i) => i); + // final morphIndicesList = td.Int32List.fromList(morphIndices); + + // // Set the morph data and indices into the JS arrays + // _module.writeArrayToMemory(morphData.buffer.asUint8List(morphData.offsetInBytes).toJS, floatPtr); + // _module.writeArrayToMemory(morphIndicesList.buffer.asUint8List(morphData.offsetInBytes).toJS, morphIndicesPtr); + + // // Set the morph animation data + // _module.ccall( + // "set_morph_animation", + // "bool", + // [ + // "void*".toJS, + // "int".toJS, + // "float*".toJS, + // "int*".toJS, + // "int".toJS, + // "int".toJS, + // "float".toJS + // ].toJS, + // [ + // _sceneManager!, + // entity.toJS, + // floatPtr, + // morphIndicesPtr, + // numMorphTargets.toJS, + // numFrames.toJS, + // animation.frameLengthInMs.toJS + // ].toJS, + // null); + + // // Free the memory allocated for the JS arrays + // _module._free(floatPtr); + // _module._free(morphIndicesPtr); + // } + + @override + Future setMorphAnimationData( + ThermionEntity entity, MorphAnimationData animation, + {List? targetMeshNames, bool useNextEntity = false}) async { + var meshNames = await getChildEntityNames(entity, renderableOnly: false); + if (targetMeshNames != null) { + for (final targetMeshName in targetMeshNames) { + if (!meshNames.contains(targetMeshName)) { + throw Exception( + "Error: mesh ${targetMeshName} does not exist under the specified entity. Available meshes : ${meshNames}"); + } + } + } + + var meshEntities = await getChildEntities(entity, false); + + // Entities are not guaranteed to have the same morph targets (or share the same order), + // either from each other, or from those specified in [animation]. + // We therefore set morph targets separately for each mesh. + // For each mesh, allocate enough memory to hold FxM 32-bit floats + // (where F is the number of Frames, and M is the number of morph targets in the mesh). + // we call [extract] on [animation] to return frame data only for morph targets that present in both the mesh and the animation + for (int i = 0; i < meshNames.length; i++) { + var meshName = meshNames[i]; + var meshEntity = meshEntities[i]; + + if (targetMeshNames?.contains(meshName) == false) { + // print("Skipping $meshName, not contained in target"); + continue; + } + + if (useNextEntity) meshEntity += 1; + + var meshMorphTargets = await getMorphTargetNames(entity, meshEntity); + + print("Got mesh morph targets ${meshMorphTargets}"); + + var intersection = animation.morphTargets + .toSet() + .intersection(meshMorphTargets.toSet()) + .toList(); + + if (intersection.isEmpty) { + throw Exception( + """No morph targets specified in animation are present on mesh $meshName. + If you weren't intending to animate every mesh, specify [targetMeshNames] when invoking this method. + Animation morph targets: ${animation.morphTargets}\n + Mesh morph targets ${meshMorphTargets} + Child meshes: ${meshNames}"""); + } + + var indices = + intersection.map((m) => meshMorphTargets.indexOf(m)).toList(); + + var frameData = animation.extract(morphTargets: intersection); + + assert(frameData.length == animation.numFrames * intersection.length); + + // Allocate memory in WASM for the morph data + var dataPtr = _module._malloc(frameData.length * 4) as JSNumber; + + // Create a Float32List to copy the morph data to + var dataList = td.Float32List.fromList(frameData); + + // Copy the morph data to WASM + _module.writeArrayToMemory( + dataList.buffer.asUint8List(dataList.offsetInBytes).toJS, dataPtr); + + // Allocate memory in WASM for the morph indices + var idxPtr = _module._malloc(indices.length * 4) as JSNumber; + + // Create an Int32List to copy the morph indices to + var idxList = td.Int32List.fromList(indices); + + // Copy the morph indices to WASM + _module.writeArrayToMemory( + idxList.buffer.asUint8List(idxList.offsetInBytes).toJS, idxPtr); + + var result = _module.ccall( + "set_morph_animation", + "bool", + [ + "void*".toJS, + "int".toJS, + "float*".toJS, + "int*".toJS, + "int".toJS, + "int".toJS, + "float".toJS + ].toJS, + [ + _sceneManager!, + meshEntity.toJS, + dataPtr, + idxPtr, + indices.length.toJS, + animation.numFrames.toJS, + animation.frameLengthInMs.toJS + ].toJS, + null) as JSBoolean; + + // Free the memory allocated in WASM + _module._free(dataPtr); + _module._free(idxPtr); + + if (!result.toDart) { + throw Exception("Failed to set morph animation data for ${meshName}"); + } + } + } + + @override + Future setMorphTargetWeights(ThermionEntity entity, List weights) { + // TODO: implement setMorphTargetWeights + throw UnimplementedError(); + } + + @override + Future setParent(ThermionEntity child, ThermionEntity parent) { + // TODO: implement setParent + throw UnimplementedError(); + } + + @override + Future setPosition( + ThermionEntity entity, double x, double y, double z) async { + _module.ccall( + "set_position", + "void", + ["void*".toJS, "int".toJS, "float".toJS, "float".toJS, "float".toJS] + .toJS, + [_sceneManager!, entity.toJS, x.toJS, y.toJS, z.toJS].toJS, + null); + } + + @override + Future setPostProcessing(bool enabled) async { + _module.ccall("set_post_processing", "void", + ["void*".toJS, "bool".toJS].toJS, [_viewer!, enabled.toJS].toJS, null); + } + + @override + Future setPriority(ThermionEntity entityId, int priority) { + // TODO: implement setPriority + throw UnimplementedError(); + } + + @override + Future setRecording(bool recording) { + // TODO: implement setRecording + throw UnimplementedError(); + } + + @override + Future setRecordingOutputDirectory(String outputDirectory) { + // TODO: implement setRecordingOutputDirectory + throw UnimplementedError(); + } + + @override + Future setRendering(bool render) { + // TODO: implement setRendering + throw UnimplementedError(); + } + + @override + Future setRotation( + ThermionEntity entity, double rads, double x, double y, double z) async { + var quaternion = Quaternion.axisAngle(Vector3(x, y, z), rads); + _module.ccall( + "set_rotation", + "void", + [ + "void*".toJS, + "int".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS + ].toJS, + [ + _sceneManager!, + entity.toJS, + quaternion.radians.toJS, + quaternion.x.toJS, + quaternion.y.toJS, + quaternion.z.toJS, + quaternion.w.toJS + ].toJS, + null); + } + + @override + Future setRotationQuat(ThermionEntity entity, Quaternion rotation) async { + _module.ccall( + "set_rotation", + "void", + [ + "void*".toJS, + "int".toJS, + "float".toJS, + "float".toJS, + "float".toJS, + "float".toJS + ].toJS, + [ + _sceneManager!, + entity.toJS, + rotation.radians.toJS, + rotation.x.toJS, + rotation.y.toJS, + rotation.z.toJS, + rotation.w.toJS + ].toJS, + null); + } + + @override + Future setScale(ThermionEntity entity, double scale) { + // TODO: implement setScale + throw UnimplementedError(); + } + + @override + Future setToneMapping(ToneMapper mapper) { + // TODO: implement setToneMapping + throw UnimplementedError(); + } + + @override + Future setTransform(ThermionEntity entity, Matrix4 transform) { + // TODO: implement setTransform + throw UnimplementedError(); + } + + @override + Future setViewFrustumCulling(bool enabled) { + // TODO: implement setViewFrustumCulling + throw UnimplementedError(); + } + + @override + Future stopAnimation(ThermionEntity entity, int animationIndex) { + // TODO: implement stopAnimation + throw UnimplementedError(); + } + + @override + Future stopAnimationByName(ThermionEntity entity, String name) { + // TODO: implement stopAnimationByName + throw UnimplementedError(); + } + + @override + Future testCollisions(ThermionEntity entity) { + // TODO: implement testCollisions + throw UnimplementedError(); + } + + @override + Future transformToUnitCube(ThermionEntity entity) { + // TODO: implement transformToUnitCube + throw UnimplementedError(); + } + + @override + Future updateBoneMatrices(ThermionEntity entity) { + // TODO: implement updateBoneMatrices + throw UnimplementedError(); + } + + @override + Future zoomBegin() { + // TODO: implement zoomBegin + throw UnimplementedError(); + } + + @override + Future zoomEnd() { + // TODO: implement zoomEnd + throw UnimplementedError(); + } + + @override + Future zoomUpdate(double x, double y, double z) { + // TODO: implement zoomUpdate + throw UnimplementedError(); + } +} diff --git a/thermion_dart/lib/thermion_dart/compatibility/web/interop/shims/thermion_dart_api_js_shim.dart b/thermion_dart/lib/thermion_dart/compatibility/web/interop/shims/thermion_dart_api_js_shim.dart new file mode 100644 index 00000000..dab1daed --- /dev/null +++ b/thermion_dart/lib/thermion_dart/compatibility/web/interop/shims/thermion_dart_api_js_shim.dart @@ -0,0 +1,403 @@ +@JS() +library thermion_flutter_js; + +import 'dart:js_interop'; + +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; + +/// +/// An extension type on [JSObject] that represents a +/// Javascript shim implementation for the [ThermionViewer] interface. +/// +extension type ThermionDartAPIJSShim(JSObject _) implements JSObject { + + @JS('wasm_test') + external JSPromise wasm_test(String str); + + @JS('set_rendering') + external JSPromise set_rendering(bool render); + + @JS('render') + external JSPromise render(); + + @JS('setFrameRate') + external JSPromise setFrameRate(int framerate); + + @JS('setBackgroundImage') + external JSPromise setBackgroundImage(String path, bool fillHeight); + + @JS('setBackgroundImagePosition') + external JSPromise setBackgroundImagePosition(double x, double y, bool clamp); + + @JS('clearBackgroundImage') + external JSPromise clearBackgroundImage(); + + @JS('setBackgroundColor') + external JSPromise setBackgroundColor( + double r, double g, double b, double alpha); + + @JS('loadSkybox') + external JSPromise loadSkybox(String skyboxPath); + + @JS('removeSkybox') + external JSPromise removeSkybox(); + + @JS('loadIbl') + external JSPromise loadIbl(String lightingPath, double intensity); + + @JS('rotateIbl') + external JSPromise rotateIbl(JSArray rotationMatrix); + + @JS('removeIbl') + external JSPromise removeIbl(); + + @JS('addLight') + external JSPromise addLight( + int type, + double colour, + double intensity, + double posX, + double posY, + double posZ, + double dirX, + double dirY, + double dirZ, + double falloffRadius, + double spotLightConeInner, + double spotLightConeOuter, + double sunAngularRadius, + double sunHaloSize, + double sunHaloFallof, + bool castShadows); + + @JS('removeLight') + external JSPromise removeLight(ThermionEntity light); + + @JS('clearLights') + external JSPromise clearLights(); + + @JS('loadGlb') + external JSPromise loadGlb(String path, int numInstances); + + @JS('createInstance') + external JSPromise createInstance(ThermionEntity entity); + + @JS('getInstanceCount') + external JSPromise getInstanceCount(ThermionEntity entity); + + @JS('getInstances') + external JSPromise> getInstances(ThermionEntity entity); + + @JS('loadGltf') + external JSPromise loadGltf( + String path, String relativeResourcePath); + + @JS('panStart') + external JSPromise panStart(double x, double y); + + @JS('panUpdate') + external JSPromise panUpdate(double x, double y); + + @JS('panEnd') + external JSPromise panEnd(); + + @JS('rotateStart') + external JSPromise rotateStart(double x, double y); + + @JS('rotateUpdate') + external JSPromise rotateUpdate(double x, double y); + + @JS('rotateEnd') + external JSPromise rotateEnd(); + + @JS('setMorphTargetWeights') + external JSPromise setMorphTargetWeights( + ThermionEntity entity, JSArray weights); + + @JS('getMorphTargetNames') + external JSPromise> getMorphTargetNames( + ThermionEntity entity, ThermionEntity childEntity); + + @JS('getBoneNames') + external JSPromise> getBoneNames( + ThermionEntity entity, int skinIndex); + + @JS('getAnimationNames') + external JSPromise> getAnimationNames( + ThermionEntity entity); + + @JS('getAnimationDuration') + external JSPromise getAnimationDuration( + ThermionEntity entity, int animationIndex); + + @JS('setMorphAnimationData') + external JSPromise setMorphAnimationData( + ThermionEntity entity, + JSArray> animation, + JSArray morphTargets, + JSArray? targetMeshNames, + double frameLengthInMs); + + @JS('resetBones') + external JSPromise resetBones(ThermionEntity entity); + + @JS('addBoneAnimation') + external JSPromise addBoneAnimation( + ThermionEntity entity, + JSArray bones, + JSArray>> frameData, + JSNumber frameLengthInMs, + JSNumber spaceEnum, + JSNumber skinIndex, + JSNumber fadeInInSecs, + JSNumber fadeOutInSecs, + JSNumber maxDelta); + + @JS('removeEntity') + external JSPromise removeEntity(ThermionEntity entity); + + @JS('clearEntities') + external JSPromise clearEntities(); + + @JS('zoomBegin') + external JSPromise zoomBegin(); + + @JS('zoomUpdate') + external JSPromise zoomUpdate(double x, double y, double z); + + @JS('zoomEnd') + external JSPromise zoomEnd(); + + @JS('playAnimation') + external JSPromise playAnimation( + ThermionEntity entity, + int index, + bool loop, + bool reverse, + bool replaceActive, + double crossfade, + ); + + @JS('playAnimationByName') + external JSPromise playAnimationByName( + ThermionEntity entity, + String name, + bool loop, + bool reverse, + bool replaceActive, + double crossfade, + ); + + @JS('setAnimationFrame') + external JSPromise setAnimationFrame( + ThermionEntity entity, int index, int animationFrame); + + @JS('stopAnimation') + external JSPromise stopAnimation(ThermionEntity entity, int animationIndex); + + @JS('stopAnimationByName') + external JSPromise stopAnimationByName(ThermionEntity entity, String name); + + @JS('setCamera') + external JSPromise setCamera(ThermionEntity entity, String? name); + + @JS('setMainCamera') + external JSPromise setMainCamera(); + + @JS('getMainCamera') + external JSPromise getMainCamera(); + + @JS('setCameraFov') + external JSPromise setCameraFov(double degrees, double width, double height); + + @JS('setToneMapping') + external JSPromise setToneMapping(int mapper); + + @JS('setBloom') + external JSPromise setBloom(double bloom); + + @JS('setCameraFocalLength') + external JSPromise setCameraFocalLength(double focalLength); + + @JS('setCameraCulling') + external JSPromise setCameraCulling(double near, double far); + + @JS('getCameraCullingNear') + external JSPromise getCameraCullingNear(); + + @JS('getCameraCullingFar') + external JSPromise getCameraCullingFar(); + + @JS('setCameraFocusDistance') + external JSPromise setCameraFocusDistance(double focusDistance); + + @JS('getCameraPosition') + external JSPromise> getCameraPosition(); + + @JS('getCameraModelMatrix') + external JSPromise> getCameraModelMatrix(); + + @JS('getCameraViewMatrix') + external JSPromise> getCameraViewMatrix(); + + @JS('getCameraProjectionMatrix') + external JSPromise> getCameraProjectionMatrix(); + + @JS('getCameraCullingProjectionMatrix') + external JSPromise> getCameraCullingProjectionMatrix(); + + @JS('getCameraFrustum') + external JSPromise getCameraFrustum(); + + @JS('setCameraPosition') + external JSPromise setCameraPosition(double x, double y, double z); + + @JS('getCameraRotation') + external JSPromise> getCameraRotation(); + + @JS('moveCameraToAsset') + external JSPromise moveCameraToAsset(ThermionEntity entity); + + @JS('setViewFrustumCulling') + external JSPromise setViewFrustumCulling(JSBoolean enabled); + + @JS('setCameraExposure') + external JSPromise setCameraExposure( + double aperture, double shutterSpeed, double sensitivity); + + @JS('setCameraRotation') + external JSPromise setCameraRotation(JSArray quaternion); + + @JS('setCameraModelMatrix') + external JSPromise setCameraModelMatrix(JSArray matrix); + + @JS('setMaterialColor') + external JSPromise setMaterialColor(ThermionEntity entity, String meshName, + int materialIndex, double r, double g, double b, double a); + + @JS('transformToUnitCube') + external JSPromise transformToUnitCube(ThermionEntity entity); + + @JS('setPosition') + external JSPromise setPosition( + ThermionEntity entity, double x, double y, double z); + + @JS('setScale') + external JSPromise setScale(ThermionEntity entity, double scale); + + @JS('setRotation') + external JSPromise setRotation( + ThermionEntity entity, double rads, double x, double y, double z); + + @JS('queuePositionUpdate') + external JSPromise queuePositionUpdate( + ThermionEntity entity, double x, double y, double z, bool relative); + + @JS('queueRotationUpdate') + external JSPromise queueRotationUpdate(ThermionEntity entity, double rads, + double x, double y, double z, bool relative); + + @JS('queueRotationUpdateQuat') + external JSPromise queueRotationUpdateQuat( + ThermionEntity entity, JSArray quat, bool relative); + + @JS('setPostProcessing') + external JSPromise setPostProcessing(bool enabled); + + @JS('setAntiAliasing') + external JSPromise setAntiAliasing(bool msaa, bool fxaa, bool taa); + + @JS('setRotationQuat') + external JSPromise setRotationQuat( + ThermionEntity entity, JSArray rotation); + + @JS('reveal') + external JSPromise reveal(ThermionEntity entity, String? meshName); + + @JS('hide') + external JSPromise hide(ThermionEntity entity, String? meshName); + + @JS('pick') + external void pick(int x, int y); + + @JS('getNameForEntity') + external String? getNameForEntity(ThermionEntity entity); + + @JS('setCameraManipulatorOptions') + external JSPromise setCameraManipulatorOptions( + int mode, + double orbitSpeedX, + double orbitSpeedY, + double zoomSpeed, + ); + + @JS('getChildEntities') + external JSPromise> getChildEntities( + ThermionEntity parent, bool renderableOnly); + + @JS('getChildEntity') + external JSPromise getChildEntity( + ThermionEntity parent, String childName); + + @JS('getChildEntityNames') + external JSPromise> getChildEntityNames( + ThermionEntity entity, bool renderableOnly); + + @JS('setRecording') + external JSPromise setRecording(JSBoolean recording); + + @JS('setRecordingOutputDirectory') + external JSPromise setRecordingOutputDirectory(String outputDirectory); + + @JS('addAnimationComponent') + external JSPromise addAnimationComponent(ThermionEntity entity); + + @JS('removeAnimationComponent') + external JSPromise removeAnimationComponent(ThermionEntity entity); + + @JS('addCollisionComponent') + external JSPromise addCollisionComponent(ThermionEntity entity); + + @JS('removeCollisionComponent') + external JSPromise removeCollisionComponent(ThermionEntity entity); + + @JS('createGeometry') + external JSPromise createGeometry(JSArray vertices, + JSArray indices, String? materialPath, int primitiveType); + + @JS('setParent') + external JSPromise setParent(ThermionEntity child, ThermionEntity parent); + + @JS('getParent') + external JSPromise getParent(ThermionEntity child); + + @JS('getParent') + external JSPromise getBone( + ThermionEntity child, int boneIndex, int skinIndex); + + @JS('testCollisions') + external JSPromise testCollisions(ThermionEntity entity); + + @JS('setPriority') + external JSPromise setPriority(ThermionEntity entityId, int priority); + + @JS('getLocalTransform') + external JSPromise> getLocalTransform( + ThermionEntity entity); + + @JS('getWorldTransform') + external JSPromise> getWorldTransform( + ThermionEntity entity); + + @JS('updateBoneMatrices') + external JSPromise updateBoneMatrices(ThermionEntity entity); + + @JS('setTransform') + external JSPromise setTransform( + ThermionEntity entity, JSArray transform); + + @JS('setBoneTransform') + external JSPromise setBoneTransform( + ThermionEntity entity, int boneIndex, JSArray transform, int skinIndex); +} + diff --git a/thermion_dart/lib/thermion_dart/compatibility/web/interop/shims/thermion_viewer_js_shim.dart b/thermion_dart/lib/thermion_dart/compatibility/web/interop/shims/thermion_viewer_js_shim.dart new file mode 100644 index 00000000..41dd763d --- /dev/null +++ b/thermion_dart/lib/thermion_dart/compatibility/web/interop/shims/thermion_viewer_js_shim.dart @@ -0,0 +1,409 @@ +@JS() +library thermion_flutter_js; + +import 'dart:js_interop'; + +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; + +/// +/// An extension type on [JSObject] that represents a +/// Javascript shim implementation of the [ThermionViewer] interface. +/// +extension type ThermionViewerJSShim(JSObject _) implements JSObject { + + @JS('initialized') + external JSPromise get initialized; + + @JS('rendering') + external bool get rendering; + + @JS('setRendering') + external JSPromise setRendering(bool render); + + @JS('render') + external JSPromise render(); + + @JS('setFrameRate') + external JSPromise setFrameRate(int framerate); + + @JS('dispose') + external JSPromise dispose(); + + @JS('setBackgroundImage') + external JSPromise setBackgroundImage(String path, bool fillHeight); + + @JS('setBackgroundImagePosition') + external JSPromise setBackgroundImagePosition(double x, double y, bool clamp); + + @JS('clearBackgroundImage') + external JSPromise clearBackgroundImage(); + + @JS('setBackgroundColor') + external JSPromise setBackgroundColor( + double r, double g, double b, double alpha); + + @JS('loadSkybox') + external JSPromise loadSkybox(String skyboxPath); + + @JS('removeSkybox') + external JSPromise removeSkybox(); + + @JS('loadIbl') + external JSPromise loadIbl(String lightingPath, double intensity); + + @JS('rotateIbl') + external JSPromise rotateIbl(JSArray rotationMatrix); + + @JS('removeIbl') + external JSPromise removeIbl(); + + @JS('addLight') + external JSPromise addLight( + int type, + double colour, + double intensity, + double posX, + double posY, + double posZ, + double dirX, + double dirY, + double dirZ, + double falloffRadius, + double spotLightConeInner, + double spotLightConeOuter, + double sunAngularRadius, + double sunHaloSize, + double sunHaloFallof, + bool castShadows); + + @JS('removeLight') + external JSPromise removeLight(ThermionEntity light); + + @JS('clearLights') + external JSPromise clearLights(); + + @JS('loadGlb') + external JSPromise loadGlb(String path, int numInstances); + + @JS('createInstance') + external JSPromise createInstance(ThermionEntity entity); + + @JS('getInstanceCount') + external JSPromise getInstanceCount(ThermionEntity entity); + + @JS('getInstances') + external JSPromise> getInstances(ThermionEntity entity); + + @JS('loadGltf') + external JSPromise loadGltf( + String path, String relativeResourcePath); + + @JS('panStart') + external JSPromise panStart(double x, double y); + + @JS('panUpdate') + external JSPromise panUpdate(double x, double y); + + @JS('panEnd') + external JSPromise panEnd(); + + @JS('rotateStart') + external JSPromise rotateStart(double x, double y); + + @JS('rotateUpdate') + external JSPromise rotateUpdate(double x, double y); + + @JS('rotateEnd') + external JSPromise rotateEnd(); + + @JS('setMorphTargetWeights') + external JSPromise setMorphTargetWeights( + ThermionEntity entity, JSArray weights); + + @JS('getMorphTargetNames') + external JSPromise> getMorphTargetNames( + ThermionEntity entity, ThermionEntity childEntity); + + @JS('getBoneNames') + external JSPromise> getBoneNames( + ThermionEntity entity, int skinIndex); + + @JS('getAnimationNames') + external JSPromise> getAnimationNames( + ThermionEntity entity); + + @JS('getAnimationDuration') + external JSPromise getAnimationDuration( + ThermionEntity entity, int animationIndex); + + @JS('setMorphAnimationData') + external JSPromise setMorphAnimationData( + ThermionEntity entity, + JSArray> animation, + JSArray morphTargets, + JSArray? targetMeshNames, + double frameLengthInMs); + + @JS('resetBones') + external JSPromise resetBones(ThermionEntity entity); + + @JS('addBoneAnimation') + external JSPromise addBoneAnimation( + ThermionEntity entity, + JSArray bones, + JSArray>> frameData, + JSNumber frameLengthInMs, + JSNumber spaceEnum, + JSNumber skinIndex, + JSNumber fadeInInSecs, + JSNumber fadeOutInSecs, + JSNumber maxDelta); + + @JS('removeEntity') + external JSPromise removeEntity(ThermionEntity entity); + + @JS('clearEntities') + external JSPromise clearEntities(); + + @JS('zoomBegin') + external JSPromise zoomBegin(); + + @JS('zoomUpdate') + external JSPromise zoomUpdate(double x, double y, double z); + + @JS('zoomEnd') + external JSPromise zoomEnd(); + + @JS('playAnimation') + external JSPromise playAnimation( + ThermionEntity entity, + int index, + bool loop, + bool reverse, + bool replaceActive, + double crossfade, + ); + + @JS('playAnimationByName') + external JSPromise playAnimationByName( + ThermionEntity entity, + String name, + bool loop, + bool reverse, + bool replaceActive, + double crossfade, + ); + + @JS('setAnimationFrame') + external JSPromise setAnimationFrame( + ThermionEntity entity, int index, int animationFrame); + + @JS('stopAnimation') + external JSPromise stopAnimation(ThermionEntity entity, int animationIndex); + + @JS('stopAnimationByName') + external JSPromise stopAnimationByName(ThermionEntity entity, String name); + + @JS('setCamera') + external JSPromise setCamera(ThermionEntity entity, String? name); + + @JS('setMainCamera') + external JSPromise setMainCamera(); + + @JS('getMainCamera') + external JSPromise getMainCamera(); + + @JS('setCameraFov') + external JSPromise setCameraFov(double degrees, double width, double height); + + @JS('setToneMapping') + external JSPromise setToneMapping(int mapper); + + @JS('setBloom') + external JSPromise setBloom(double bloom); + + @JS('setCameraFocalLength') + external JSPromise setCameraFocalLength(double focalLength); + + @JS('setCameraCulling') + external JSPromise setCameraCulling(double near, double far); + + @JS('getCameraCullingNear') + external JSPromise getCameraCullingNear(); + + @JS('getCameraCullingFar') + external JSPromise getCameraCullingFar(); + + @JS('setCameraFocusDistance') + external JSPromise setCameraFocusDistance(double focusDistance); + + @JS('getCameraPosition') + external JSPromise> getCameraPosition(); + + @JS('getCameraModelMatrix') + external JSPromise> getCameraModelMatrix(); + + @JS('getCameraViewMatrix') + external JSPromise> getCameraViewMatrix(); + + @JS('getCameraProjectionMatrix') + external JSPromise> getCameraProjectionMatrix(); + + @JS('getCameraCullingProjectionMatrix') + external JSPromise> getCameraCullingProjectionMatrix(); + + @JS('getCameraFrustum') + external JSPromise getCameraFrustum(); + + @JS('setCameraPosition') + external JSPromise setCameraPosition(double x, double y, double z); + + @JS('getCameraRotation') + external JSPromise> getCameraRotation(); + + @JS('moveCameraToAsset') + external JSPromise moveCameraToAsset(ThermionEntity entity); + + @JS('setViewFrustumCulling') + external JSPromise setViewFrustumCulling(JSBoolean enabled); + + @JS('setCameraExposure') + external JSPromise setCameraExposure( + double aperture, double shutterSpeed, double sensitivity); + + @JS('setCameraRotation') + external JSPromise setCameraRotation(JSArray quaternion); + + @JS('setCameraModelMatrix') + external JSPromise setCameraModelMatrix(JSArray matrix); + + @JS('setMaterialColor') + external JSPromise setMaterialColor(ThermionEntity entity, String meshName, + int materialIndex, double r, double g, double b, double a); + + @JS('transformToUnitCube') + external JSPromise transformToUnitCube(ThermionEntity entity); + + @JS('setPosition') + external JSPromise setPosition( + ThermionEntity entity, double x, double y, double z); + + @JS('setScale') + external JSPromise setScale(ThermionEntity entity, double scale); + + @JS('setRotation') + external JSPromise setRotation( + ThermionEntity entity, double rads, double x, double y, double z); + + @JS('queuePositionUpdate') + external JSPromise queuePositionUpdate( + ThermionEntity entity, double x, double y, double z, bool relative); + + @JS('queueRotationUpdate') + external JSPromise queueRotationUpdate(ThermionEntity entity, double rads, + double x, double y, double z, bool relative); + + @JS('queueRotationUpdateQuat') + external JSPromise queueRotationUpdateQuat( + ThermionEntity entity, JSArray quat, bool relative); + + @JS('setPostProcessing') + external JSPromise setPostProcessing(bool enabled); + + @JS('setAntiAliasing') + external JSPromise setAntiAliasing(bool msaa, bool fxaa, bool taa); + + @JS('setRotationQuat') + external JSPromise setRotationQuat( + ThermionEntity entity, JSArray rotation); + + @JS('reveal') + external JSPromise reveal(ThermionEntity entity, String? meshName); + + @JS('hide') + external JSPromise hide(ThermionEntity entity, String? meshName); + + @JS('pick') + external void pick(int x, int y); + + @JS('getNameForEntity') + external String? getNameForEntity(ThermionEntity entity); + + @JS('setCameraManipulatorOptions') + external JSPromise setCameraManipulatorOptions( + int mode, + double orbitSpeedX, + double orbitSpeedY, + double zoomSpeed, + ); + + @JS('getChildEntities') + external JSPromise> getChildEntities( + ThermionEntity parent, bool renderableOnly); + + @JS('getChildEntity') + external JSPromise getChildEntity( + ThermionEntity parent, String childName); + + @JS('getChildEntityNames') + external JSPromise> getChildEntityNames( + ThermionEntity entity, bool renderableOnly); + + @JS('setRecording') + external JSPromise setRecording(JSBoolean recording); + + @JS('setRecordingOutputDirectory') + external JSPromise setRecordingOutputDirectory(String outputDirectory); + + @JS('addAnimationComponent') + external JSPromise addAnimationComponent(ThermionEntity entity); + + @JS('removeAnimationComponent') + external JSPromise removeAnimationComponent(ThermionEntity entity); + + @JS('addCollisionComponent') + external JSPromise addCollisionComponent(ThermionEntity entity); + + @JS('removeCollisionComponent') + external JSPromise removeCollisionComponent(ThermionEntity entity); + + @JS('createGeometry') + external JSPromise createGeometry(JSArray vertices, + JSArray indices, String? materialPath, int primitiveType); + + @JS('setParent') + external JSPromise setParent(ThermionEntity child, ThermionEntity parent); + + @JS('getParent') + external JSPromise getParent(ThermionEntity child); + + @JS('getParent') + external JSPromise getBone( + ThermionEntity child, int boneIndex, int skinIndex); + + @JS('testCollisions') + external JSPromise testCollisions(ThermionEntity entity); + + @JS('setPriority') + external JSPromise setPriority(ThermionEntity entityId, int priority); + + @JS('getLocalTransform') + external JSPromise> getLocalTransform( + ThermionEntity entity); + + @JS('getWorldTransform') + external JSPromise> getWorldTransform( + ThermionEntity entity); + + @JS('updateBoneMatrices') + external JSPromise updateBoneMatrices(ThermionEntity entity); + + @JS('setTransform') + external JSPromise setTransform( + ThermionEntity entity, JSArray transform); + + @JS('setBoneTransform') + external JSPromise setBoneTransform( + ThermionEntity entity, int boneIndex, JSArray transform, int skinIndex); +} + diff --git a/thermion_dart/lib/thermion_dart/compatibility/web/thermion_dart.g.dart b/thermion_dart/lib/thermion_dart/compatibility/web/thermion_dart.g.dart new file mode 100644 index 00000000..898a00b2 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/compatibility/web/thermion_dart.g.dart @@ -0,0 +1,1811 @@ +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint +import 'dart:ffi' as ffi; + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Int32, ffi.Pointer)>( + symbol: '_thermion_flutter_web_load_resource_callback', + assetId: 'thermion_dart') +external void thermion_flutter_web_load_resource_callback( + ffi.Pointer data, + int length, + ffi.Pointer context, +); + +@ffi.Native, ffi.Int32)>( + symbol: '_thermion_flutter_web_get', assetId: 'thermion_dart') +external int thermion_flutter_web_get( + ffi.Pointer ptr, + int offset, +); + +@ffi.Native, ffi.Int32)>( + symbol: '_thermion_flutter_web_get_float', assetId: 'thermion_dart') +external double thermion_flutter_web_get_float( + ffi.Pointer ptr, + int offset, +); + +@ffi.Native, ffi.Int32)>( + symbol: '_thermion_flutter_web_get_double', assetId: 'thermion_dart') +external double thermion_flutter_web_get_double( + ffi.Pointer ptr, + int offset, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer>, ffi.Int32)>( + symbol: '_thermion_flutter_web_get_pointer', assetId: 'thermion_dart') +external ffi.Pointer thermion_flutter_web_get_pointer( + ffi.Pointer> ptr, + int offset, +); + +@ffi.Native, ffi.Int32, ffi.Int32)>( + symbol: '_thermion_flutter_web_set', assetId: 'thermion_dart') +external void thermion_flutter_web_set( + ffi.Pointer ptr, + int offset, + int val, +); + +@ffi.Native, ffi.Int32, ffi.Float)>( + symbol: '_thermion_flutter_web_set_float', assetId: 'thermion_dart') +external void thermion_flutter_web_set_float( + ffi.Pointer ptr, + int offset, + double val, +); + +@ffi.Native, ffi.Int32, ffi.Double)>( + symbol: '_thermion_flutter_web_set_double', assetId: 'thermion_dart') +external void thermion_flutter_web_set_double( + ffi.Pointer ptr, + int offset, + double val, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer>, ffi.Int32, + ffi.Pointer)>( + symbol: '_thermion_flutter_web_set_pointer', assetId: 'thermion_dart') +external void thermion_flutter_web_set_pointer( + ffi.Pointer> ptr, + int offset, + ffi.Pointer val, +); + +@ffi.Native, ffi.Int32)>( + symbol: '_thermion_flutter_web_get_int32', assetId: 'thermion_dart') +external int thermion_flutter_web_get_int32( + ffi.Pointer ptr, + int offset, +); + +@ffi.Native, ffi.Int32, ffi.Int32)>( + symbol: '_thermion_flutter_web_set_int32', assetId: 'thermion_dart') +external void thermion_flutter_web_set_int32( + ffi.Pointer ptr, + int offset, + int value, +); + +@ffi.Native>)>( + symbol: '_thermion_flutter_web_get_address', assetId: 'thermion_dart') +external int thermion_flutter_web_get_address( + ffi.Pointer> out, +); + +@ffi.Native Function(ffi.Int32)>( + symbol: '_thermion_flutter_web_allocate', assetId: 'thermion_dart') +external ffi.Pointer thermion_flutter_web_allocate( + int size, +); + +@ffi.Native)>( + symbol: '_thermion_flutter_web_free', assetId: 'thermion_dart') +external void thermion_flutter_web_free( + ffi.Pointer ptr, +); + +@ffi.Native( + symbol: '_thermion_dart_web_create_gl_context', assetId: 'thermion_dart') +external int thermion_dart_web_create_gl_context(); + +@ffi.Native Function()>( + symbol: '_thermion_dart_web_get_resource_loader_wrapper', + assetId: 'thermion_dart') +external ffi.Pointer thermion_dart_web_get_resource_loader_wrapper(); + +@ffi.Native< + ffi.Pointer Function(LoadFilamentResourceFromOwner, + FreeFilamentResourceFromOwner, ffi.Pointer)>( + symbol: '_make_resource_loader', assetId: 'thermion_dart') +external ffi.Pointer make_resource_loader( + LoadFilamentResourceFromOwner loadFn, + FreeFilamentResourceFromOwner freeFn, + ffi.Pointer owner, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + symbol: '_create_filament_viewer', assetId: 'thermion_dart') +external ffi.Pointer create_filament_viewer( + ffi.Pointer context, + ffi.Pointer loader, + ffi.Pointer platform, + ffi.Pointer uberArchivePath, +); + +@ffi.Native)>( + symbol: '_destroy_filament_viewer', assetId: 'thermion_dart') +external void destroy_filament_viewer( + ffi.Pointer viewer, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: '_get_scene_manager', assetId: 'thermion_dart') +external ffi.Pointer get_scene_manager( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.IntPtr, ffi.Uint32, + ffi.Uint32)>(symbol: '_create_render_target', assetId: 'thermion_dart') +external void create_render_target( + ffi.Pointer viewer, + int texture, + int width, + int height, +); + +@ffi.Native)>( + symbol: '_clear_background_image', assetId: 'thermion_dart') +external void clear_background_image( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Bool)>(symbol: '_set_background_image', assetId: 'thermion_dart') +external void set_background_image( + ffi.Pointer viewer, + ffi.Pointer path, + bool fillHeight, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Float, ffi.Float, ffi.Bool)>( + symbol: '_set_background_image_position', assetId: 'thermion_dart') +external void set_background_image_position( + ffi.Pointer viewer, + double x, + double y, + bool clamp, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, ffi.Float, + ffi.Float)>(symbol: '_set_background_color', assetId: 'thermion_dart') +external void set_background_color( + ffi.Pointer viewer, + double r, + double g, + double b, + double a, +); + +@ffi.Native, ffi.Int)>( + symbol: '_set_tone_mapping', assetId: 'thermion_dart') +external void set_tone_mapping( + ffi.Pointer viewer, + int toneMapping, +); + +@ffi.Native, ffi.Float)>( + symbol: '_set_bloom', assetId: 'thermion_dart') +external void set_bloom( + ffi.Pointer viewer, + double strength, +); + +@ffi.Native, ffi.Pointer)>( + symbol: '_load_skybox', assetId: 'thermion_dart') +external void load_skybox( + ffi.Pointer viewer, + ffi.Pointer skyboxPath, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Float)>(symbol: '_load_ibl', assetId: 'thermion_dart') +external void load_ibl( + ffi.Pointer viewer, + ffi.Pointer iblPath, + double intensity, +); + +@ffi.Native, ffi.Pointer)>( + symbol: '_rotate_ibl', assetId: 'thermion_dart') +external void rotate_ibl( + ffi.Pointer viewer, + ffi.Pointer rotationMatrix, +); + +@ffi.Native)>( + symbol: '_remove_skybox', assetId: 'thermion_dart') +external void remove_skybox( + ffi.Pointer viewer, +); + +@ffi.Native)>( + symbol: '_remove_ibl', assetId: 'thermion_dart') +external void remove_ibl( + ffi.Pointer viewer, +); + +@ffi.Native< + EntityId Function( + ffi.Pointer, + ffi.Uint8, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Bool)>(symbol: '_add_light', assetId: 'thermion_dart') +external int add_light( + ffi.Pointer viewer, + int type, + double colour, + double intensity, + double posX, + double posY, + double posZ, + double dirX, + double dirY, + double dirZ, + double falloffRadius, + double spotLightConeInner, + double spotLightConeOuter, + double sunAngularRadius, + double sunHaloSize, + double sunHaloFallof, + bool shadows, +); + +@ffi.Native, EntityId)>( + symbol: '_remove_light', assetId: 'thermion_dart') +external void remove_light( + ffi.Pointer viewer, + int entityId, +); + +@ffi.Native)>( + symbol: '_clear_lights', assetId: 'thermion_dart') +external void clear_lights( + ffi.Pointer viewer, +); + +@ffi.Native< + EntityId Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>(symbol: '_load_glb', assetId: 'thermion_dart') +external int load_glb( + ffi.Pointer sceneManager, + ffi.Pointer assetPath, + int numInstances, +); + +@ffi.Native< + EntityId Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>(symbol: '_load_glb_from_buffer', assetId: 'thermion_dart') +external int load_glb_from_buffer( + ffi.Pointer sceneManager, + ffi.Pointer data, + int length, +); + +@ffi.Native< + EntityId Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(symbol: '_load_gltf', assetId: 'thermion_dart') +external int load_gltf( + ffi.Pointer sceneManager, + ffi.Pointer assetPath, + ffi.Pointer relativePath, +); + +@ffi.Native, EntityId)>( + symbol: '_create_instance', assetId: 'thermion_dart') +external int create_instance( + ffi.Pointer sceneManager, + int id, +); + +@ffi.Native, EntityId)>( + symbol: '_get_instance_count', assetId: 'thermion_dart') +external int get_instance_count( + ffi.Pointer sceneManager, + int entityId, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, EntityId, ffi.Pointer)>( + symbol: '_get_instances', assetId: 'thermion_dart') +external void get_instances( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer out, +); + +@ffi.Native)>( + symbol: '_set_main_camera', assetId: 'thermion_dart') +external void set_main_camera( + ffi.Pointer viewer, +); + +@ffi.Native)>( + symbol: '_get_main_camera', assetId: 'thermion_dart') +external int get_main_camera( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Bool Function(ffi.Pointer, EntityId, + ffi.Pointer)>(symbol: '_set_camera', assetId: 'thermion_dart') +external bool set_camera( + ffi.Pointer viewer, + int entity, + ffi.Pointer nodeName, +); + +@ffi.Native, ffi.Bool)>( + symbol: '_set_view_frustum_culling', assetId: 'thermion_dart') +external void set_view_frustum_culling( + ffi.Pointer viewer, + bool enabled, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Uint64, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer buf, ffi.Size size, + ffi.Pointer data)>>, + ffi.Pointer)>(symbol: '_render', assetId: 'thermion_dart') +external void render( + ffi.Pointer viewer, + int frameTimeInNanos, + ffi.Pointer pixelBuffer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer buf, ffi.Size size, + ffi.Pointer data)>> + callback, + ffi.Pointer data, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Uint32, + ffi.Uint32)>(symbol: '_create_swap_chain', assetId: 'thermion_dart') +external void create_swap_chain( + ffi.Pointer viewer, + ffi.Pointer window, + int width, + int height, +); + +@ffi.Native)>( + symbol: '_destroy_swap_chain', assetId: 'thermion_dart') +external void destroy_swap_chain( + ffi.Pointer viewer, +); + +@ffi.Native, ffi.Float)>( + symbol: '_set_frame_interval', assetId: 'thermion_dart') +external void set_frame_interval( + ffi.Pointer viewer, + double interval, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Uint32, ffi.Uint32, ffi.Float)>( + symbol: '_update_viewport_and_camera_projection', assetId: 'thermion_dart') +external void update_viewport_and_camera_projection( + ffi.Pointer viewer, + int width, + int height, + double scaleFactor, +); + +@ffi.Native)>( + symbol: '_scroll_begin', assetId: 'thermion_dart') +external void scroll_begin( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, + ffi.Float)>(symbol: '_scroll_update', assetId: 'thermion_dart') +external void scroll_update( + ffi.Pointer viewer, + double x, + double y, + double z, +); + +@ffi.Native)>( + symbol: '_scroll_end', assetId: 'thermion_dart') +external void scroll_end( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, + ffi.Bool)>(symbol: '_grab_begin', assetId: 'thermion_dart') +external void grab_begin( + ffi.Pointer viewer, + double x, + double y, + bool pan, +); + +@ffi.Native, ffi.Float, ffi.Float)>( + symbol: '_grab_update', assetId: 'thermion_dart') +external void grab_update( + ffi.Pointer viewer, + double x, + double y, +); + +@ffi.Native)>( + symbol: '_grab_end', assetId: 'thermion_dart') +external void grab_end( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>(symbol: '_apply_weights', assetId: 'thermion_dart') +external void apply_weights( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer entityName, + ffi.Pointer weights, + int count, +); + +@ffi.Native< + ffi.Bool Function(ffi.Pointer, EntityId, ffi.Pointer, + ffi.Int)>(symbol: '_set_morph_target_weights', assetId: 'thermion_dart') +external bool set_morph_target_weights( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer morphData, + int numWeights, +); + +@ffi.Native< + ffi.Bool Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Float)>(symbol: '_set_morph_animation', assetId: 'thermion_dart') +external bool set_morph_animation( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer morphData, + ffi.Pointer morphIndices, + int numMorphTargets, + int numFrames, + double frameLengthInMs, +); + +@ffi.Native, EntityId)>( + symbol: '_reset_to_rest_pose', assetId: 'thermion_dart') +external void reset_to_rest_pose( + ffi.Pointer sceneManager, + int asset, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Int, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float)>(symbol: '_add_bone_animation', assetId: 'thermion_dart') +external void add_bone_animation( + ffi.Pointer sceneManager, + int entity, + int skinIndex, + int boneIndex, + ffi.Pointer frameData, + int numFrames, + double frameLengthInMs, + double fadeOutInSecs, + double fadeInInSecs, + double maxDelta, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, EntityId, ffi.Pointer)>( + symbol: '_get_local_transform', assetId: 'thermion_dart') +external void get_local_transform( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer arg2, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Int, + ffi.Pointer, + ffi.Int)>(symbol: '_get_rest_local_transforms', assetId: 'thermion_dart') +external void get_rest_local_transforms( + ffi.Pointer sceneManager, + int entityId, + int skinIndex, + ffi.Pointer out, + int numBones, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, EntityId, ffi.Pointer)>( + symbol: '_get_world_transform', assetId: 'thermion_dart') +external void get_world_transform( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer arg2, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int, + ffi.Pointer)>( + symbol: '_get_inverse_bind_matrix', assetId: 'thermion_dart') +external void get_inverse_bind_matrix( + ffi.Pointer sceneManager, + int entityId, + int skinIndex, + int boneIndex, + ffi.Pointer arg4, +); + +@ffi.Native< + ffi.Bool Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int, + ffi.Pointer)>( + symbol: '_set_bone_transform', assetId: 'thermion_dart') +external bool set_bone_transform( + ffi.Pointer sceneManager, + int entity, + int skinIndex, + int boneIndex, + ffi.Pointer transform, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Int, + ffi.Bool, + ffi.Bool, + ffi.Bool, + ffi.Float)>(symbol: '_play_animation', assetId: 'thermion_dart') +external void play_animation( + ffi.Pointer sceneManager, + int entity, + int index, + bool loop, + bool reverse, + bool replaceActive, + double crossfade, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int)>( + symbol: '_set_animation_frame', assetId: 'thermion_dart') +external void set_animation_frame( + ffi.Pointer sceneManager, + int entity, + int animationIndex, + int animationFrame, +); + +@ffi.Native, EntityId, ffi.Int)>( + symbol: '_stop_animation', assetId: 'thermion_dart') +external void stop_animation( + ffi.Pointer sceneManager, + int entity, + int index, +); + +@ffi.Native, EntityId)>( + symbol: '_get_animation_count', assetId: 'thermion_dart') +external int get_animation_count( + ffi.Pointer sceneManager, + int asset, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Pointer, + ffi.Int)>(symbol: '_get_animation_name', assetId: 'thermion_dart') +external void get_animation_name( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer outPtr, + int index, +); + +@ffi.Native, EntityId, ffi.Int)>( + symbol: '_get_animation_duration', assetId: 'thermion_dart') +external double get_animation_duration( + ffi.Pointer sceneManager, + int entity, + int index, +); + +@ffi.Native, EntityId, ffi.Int)>( + symbol: '_get_bone_count', assetId: 'thermion_dart') +external int get_bone_count( + ffi.Pointer sceneManager, + int assetEntity, + int skinIndex, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer>, + ffi.Int)>(symbol: '_get_bone_names', assetId: 'thermion_dart') +external void get_bone_names( + ffi.Pointer sceneManager, + int assetEntity, + ffi.Pointer> outPtr, + int skinIndex, +); + +@ffi.Native< + EntityId Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int)>( + symbol: '_get_bone', assetId: 'thermion_dart') +external int get_bone( + ffi.Pointer sceneManager, + int entityId, + int skinIndex, + int boneIndex, +); + +@ffi.Native< + ffi.Bool Function( + ffi.Pointer, EntityId, ffi.Pointer)>( + symbol: '_set_transform', assetId: 'thermion_dart') +external bool set_transform( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer transform, +); + +@ffi.Native, EntityId)>( + symbol: '_update_bone_matrices', assetId: 'thermion_dart') +external bool update_bone_matrices( + ffi.Pointer sceneManager, + int entityId, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + EntityId, + ffi.Pointer, + ffi.Int)>(symbol: '_get_morph_target_name', assetId: 'thermion_dart') +external void get_morph_target_name( + ffi.Pointer sceneManager, + int assetEntity, + int childEntity, + ffi.Pointer outPtr, + int index, +); + +@ffi.Native, EntityId, EntityId)>( + symbol: '_get_morph_target_name_count', assetId: 'thermion_dart') +external int get_morph_target_name_count( + ffi.Pointer sceneManager, + int assetEntity, + int childEntity, +); + +@ffi.Native, EntityId)>( + symbol: '_remove_entity', assetId: 'thermion_dart') +external void remove_entity( + ffi.Pointer viewer, + int asset, +); + +@ffi.Native)>( + symbol: '_clear_entities', assetId: 'thermion_dart') +external void clear_entities( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Bool Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Int, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float)>(symbol: '_set_material_color', assetId: 'thermion_dart') +external bool set_material_color( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer meshName, + int materialIndex, + double r, + double g, + double b, + double a, +); + +@ffi.Native, EntityId)>( + symbol: '_transform_to_unit_cube', assetId: 'thermion_dart') +external void transform_to_unit_cube( + ffi.Pointer sceneManager, + int asset, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Bool)>(symbol: '_queue_position_update', assetId: 'thermion_dart') +external void queue_position_update( + ffi.Pointer sceneManager, + int entity, + double x, + double y, + double z, + bool relative, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Bool)>(symbol: '_queue_rotation_update', assetId: 'thermion_dart') +external void queue_rotation_update( + ffi.Pointer sceneManager, + int entity, + double rads, + double x, + double y, + double z, + double w, + bool relative, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Float, ffi.Float, + ffi.Float)>(symbol: '_set_position', assetId: 'thermion_dart') +external void set_position( + ffi.Pointer sceneManager, + int entity, + double x, + double y, + double z, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float)>(symbol: '_set_rotation', assetId: 'thermion_dart') +external void set_rotation( + ffi.Pointer sceneManager, + int entity, + double rads, + double x, + double y, + double z, + double w, +); + +@ffi.Native, EntityId, ffi.Float)>( + symbol: '_set_scale', assetId: 'thermion_dart') +external void set_scale( + ffi.Pointer sceneManager, + int entity, + double scale, +); + +@ffi.Native, EntityId)>( + symbol: '_move_camera_to_asset', assetId: 'thermion_dart') +external void move_camera_to_asset( + ffi.Pointer viewer, + int asset, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, + ffi.Float)>(symbol: '_set_camera_exposure', assetId: 'thermion_dart') +external void set_camera_exposure( + ffi.Pointer viewer, + double aperture, + double shutterSpeed, + double sensitivity, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, + ffi.Float)>(symbol: '_set_camera_position', assetId: 'thermion_dart') +external void set_camera_position( + ffi.Pointer viewer, + double x, + double y, + double z, +); + +@ffi.Native)>( + symbol: '_get_camera_position', assetId: 'thermion_dart') +external void get_camera_position( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, ffi.Float, + ffi.Float)>(symbol: '_set_camera_rotation', assetId: 'thermion_dart') +external void set_camera_rotation( + ffi.Pointer viewer, + double w, + double x, + double y, + double z, +); + +@ffi.Native, ffi.Pointer)>( + symbol: '_set_camera_model_matrix', assetId: 'thermion_dart') +external void set_camera_model_matrix( + ffi.Pointer viewer, + ffi.Pointer matrix, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: '_get_camera_model_matrix', assetId: 'thermion_dart') +external ffi.Pointer get_camera_model_matrix( + ffi.Pointer viewer, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: '_get_camera_view_matrix', assetId: 'thermion_dart') +external ffi.Pointer get_camera_view_matrix( + ffi.Pointer viewer, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: '_get_camera_projection_matrix', assetId: 'thermion_dart') +external ffi.Pointer get_camera_projection_matrix( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Double, ffi.Double)>( + symbol: '_set_camera_projection_matrix', assetId: 'thermion_dart') +external void set_camera_projection_matrix( + ffi.Pointer viewer, + ffi.Pointer matrix, + double near, + double far, +); + +@ffi.Native, ffi.Double, ffi.Double)>( + symbol: '_set_camera_culling', assetId: 'thermion_dart') +external void set_camera_culling( + ffi.Pointer viewer, + double near, + double far, +); + +@ffi.Native)>( + symbol: '_get_camera_culling_near', assetId: 'thermion_dart') +external double get_camera_culling_near( + ffi.Pointer viewer, +); + +@ffi.Native)>( + symbol: '_get_camera_culling_far', assetId: 'thermion_dart') +external double get_camera_culling_far( + ffi.Pointer viewer, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: '_get_camera_culling_projection_matrix', assetId: 'thermion_dart') +external ffi.Pointer get_camera_culling_projection_matrix( + ffi.Pointer viewer, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: '_get_camera_frustum', assetId: 'thermion_dart') +external ffi.Pointer get_camera_frustum( + ffi.Pointer viewer, +); + +@ffi.Native, ffi.Float, ffi.Float)>( + symbol: '_set_camera_fov', assetId: 'thermion_dart') +external void set_camera_fov( + ffi.Pointer viewer, + double fovInDegrees, + double aspect, +); + +@ffi.Native, ffi.Float)>( + symbol: '_set_camera_focal_length', assetId: 'thermion_dart') +external void set_camera_focal_length( + ffi.Pointer viewer, + double focalLength, +); + +@ffi.Native, ffi.Float)>( + symbol: '_set_camera_focus_distance', assetId: 'thermion_dart') +external void set_camera_focus_distance( + ffi.Pointer viewer, + double focusDistance, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, _ManipulatorMode, ffi.Double, + ffi.Double, ffi.Double)>( + symbol: '_set_camera_manipulator_options', assetId: 'thermion_dart') +external void set_camera_manipulator_options( + ffi.Pointer viewer, + int mode, + double orbitSpeedX, + double orbitSpeedY, + double zoomSpeed, +); + +@ffi.Native< + ffi.Int Function(ffi.Pointer, EntityId, + ffi.Pointer)>(symbol: '_hide_mesh', assetId: 'thermion_dart') +external int hide_mesh( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer meshName, +); + +@ffi.Native< + ffi.Int Function(ffi.Pointer, EntityId, + ffi.Pointer)>(symbol: '_reveal_mesh', assetId: 'thermion_dart') +external int reveal_mesh( + ffi.Pointer sceneManager, + int entity, + ffi.Pointer meshName, +); + +@ffi.Native, ffi.Bool)>( + symbol: '_set_post_processing', assetId: 'thermion_dart') +external void set_post_processing( + ffi.Pointer viewer, + bool enabled, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Bool, ffi.Bool, ffi.Bool)>( + symbol: '_set_antialiasing', assetId: 'thermion_dart') +external void set_antialiasing( + ffi.Pointer viewer, + bool msaa, + bool fxaa, + bool taa, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + EntityId entityId, ffi.Int x, ffi.Int y)>>)>( + symbol: '_filament_pick', assetId: 'thermion_dart') +external void filament_pick( + ffi.Pointer viewer, + int x, + int y, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(EntityId entityId, ffi.Int x, ffi.Int y)>> + callback, +); + +@ffi.Native Function(ffi.Pointer, EntityId)>( + symbol: '_get_name_for_entity', assetId: 'thermion_dart') +external ffi.Pointer get_name_for_entity( + ffi.Pointer sceneManager, + int entityId, +); + +@ffi.Native< + EntityId Function( + ffi.Pointer, EntityId, ffi.Pointer)>( + symbol: '_find_child_entity_by_name', assetId: 'thermion_dart') +external int find_child_entity_by_name( + ffi.Pointer sceneManager, + int parent, + ffi.Pointer name, +); + +@ffi.Native, EntityId, ffi.Bool)>( + symbol: '_get_entity_count', assetId: 'thermion_dart') +external int get_entity_count( + ffi.Pointer sceneManager, + int target, + bool renderableOnly, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, EntityId, ffi.Bool, ffi.Pointer)>( + symbol: '_get_entities', assetId: 'thermion_dart') +external void get_entities( + ffi.Pointer sceneManager, + int target, + bool renderableOnly, + ffi.Pointer out, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer, EntityId, ffi.Int, + ffi.Bool)>(symbol: '_get_entity_name_at', assetId: 'thermion_dart') +external ffi.Pointer get_entity_name_at( + ffi.Pointer sceneManager, + int target, + int index, + bool renderableOnly, +); + +@ffi.Native, ffi.Bool)>( + symbol: '_set_recording', assetId: 'thermion_dart') +external void set_recording( + ffi.Pointer viewer, + bool recording, +); + +@ffi.Native, ffi.Pointer)>( + symbol: '_set_recording_output_directory', assetId: 'thermion_dart') +external void set_recording_output_directory( + ffi.Pointer viewer, + ffi.Pointer outputDirectory, +); + +@ffi.Native(symbol: '_ios_dummy', assetId: 'thermion_dart') +external void ios_dummy(); + +@ffi.Native)>( + symbol: '_thermion_flutter_free', assetId: 'thermion_dart') +external void thermion_flutter_free( + ffi.Pointer ptr, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(EntityId entityId1, EntityId entityId2)>>, + ffi.Bool)>(symbol: '_add_collision_component', assetId: 'thermion_dart') +external void add_collision_component( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(EntityId entityId1, EntityId entityId2)>> + callback, + bool affectsCollidingTransform, +); + +@ffi.Native, EntityId)>( + symbol: '_remove_collision_component', assetId: 'thermion_dart') +external void remove_collision_component( + ffi.Pointer sceneManager, + int entityId, +); + +@ffi.Native, EntityId)>( + symbol: '_add_animation_component', assetId: 'thermion_dart') +external bool add_animation_component( + ffi.Pointer sceneManager, + int entityId, +); + +@ffi.Native, EntityId)>( + symbol: '_remove_animation_component', assetId: 'thermion_dart') +external void remove_animation_component( + ffi.Pointer sceneManager, + int entityId, +); + +@ffi.Native< + EntityId Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Pointer)>( + symbol: '_create_geometry', assetId: 'thermion_dart') +external int create_geometry( + ffi.Pointer viewer, + ffi.Pointer vertices, + int numVertices, + ffi.Pointer indices, + int numIndices, + int primitiveType, + ffi.Pointer materialPath, +); + +@ffi.Native, EntityId)>( + symbol: '_get_parent', assetId: 'thermion_dart') +external int get_parent( + ffi.Pointer sceneManager, + int child, +); + +@ffi.Native, EntityId, EntityId)>( + symbol: '_set_parent', assetId: 'thermion_dart') +external void set_parent( + ffi.Pointer sceneManager, + int child, + int parent, +); + +@ffi.Native, EntityId)>( + symbol: '_test_collisions', assetId: 'thermion_dart') +external void test_collisions( + ffi.Pointer sceneManager, + int entity, +); + +@ffi.Native, EntityId, ffi.Int)>( + symbol: '_set_priority', assetId: 'thermion_dart') +external void set_priority( + ffi.Pointer sceneManager, + int entityId, + int priority, +); + +@ffi.Native, ffi.Pointer)>( + symbol: '_get_gizmo', assetId: 'thermion_dart') +external void get_gizmo( + ffi.Pointer sceneManager, + ffi.Pointer out, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi + .Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer renderCallbackOwner)>>, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer viewer)>>)>( + symbol: '_create_filament_viewer_ffi', assetId: 'thermion_dart') +external void create_filament_viewer_ffi( + ffi.Pointer context, + ffi.Pointer platform, + ffi.Pointer uberArchivePath, + ffi.Pointer loader, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer renderCallbackOwner)>> + renderCallback, + ffi.Pointer renderCallbackOwner, + ffi.Pointer< + ffi.NativeFunction viewer)>> + callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Uint32, + ffi.Uint32, + ffi.Pointer>)>( + symbol: '_create_swap_chain_ffi', assetId: 'thermion_dart') +external void create_swap_chain_ffi( + ffi.Pointer viewer, + ffi.Pointer surface, + int width, + int height, + ffi.Pointer> onComplete, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, + ffi.Pointer>)>( + symbol: '_destroy_swap_chain_ffi', assetId: 'thermion_dart') +external void destroy_swap_chain_ffi( + ffi.Pointer viewer, + ffi.Pointer> onComplete, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.IntPtr, ffi.Uint32, + ffi.Uint32, ffi.Pointer>)>( + symbol: '_create_render_target_ffi', assetId: 'thermion_dart') +external void create_render_target_ffi( + ffi.Pointer viewer, + int nativeTextureId, + int width, + int height, + ffi.Pointer> onComplete, +); + +@ffi.Native)>( + symbol: '_destroy_filament_viewer_ffi', assetId: 'thermion_dart') +external void destroy_filament_viewer_ffi( + ffi.Pointer viewer, +); + +@ffi.Native)>( + symbol: '_render_ffi', assetId: 'thermion_dart') +external void render_ffi( + ffi.Pointer viewer, +); + +@ffi.Native( + symbol: '_make_render_callback_fn_pointer', assetId: 'thermion_dart') +external FilamentRenderCallback make_render_callback_fn_pointer( + FilamentRenderCallback arg0, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Bool, + ffi.Pointer>)>( + symbol: '_set_rendering_ffi', assetId: 'thermion_dart') +external void set_rendering_ffi( + ffi.Pointer viewer, + bool rendering, + ffi.Pointer> onComplete, +); + +@ffi.Native, ffi.Float)>( + symbol: '_set_frame_interval_ffi', assetId: 'thermion_dart') +external void set_frame_interval_ffi( + ffi.Pointer viewer, + double frameInterval, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Uint32, ffi.Uint32, + ffi.Float, ffi.Pointer>)>( + symbol: '_update_viewport_and_camera_projection_ffi', + assetId: 'thermion_dart') +external void update_viewport_and_camera_projection_ffi( + ffi.Pointer viewer, + int width, + int height, + double scaleFactor, + ffi.Pointer> onComplete, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Float, ffi.Float, ffi.Float, ffi.Float)>( + symbol: '_set_background_color_ffi', assetId: 'thermion_dart') +external void set_background_color_ffi( + ffi.Pointer viewer, + double r, + double g, + double b, + double a, +); + +@ffi.Native)>( + symbol: '_clear_background_image_ffi', assetId: 'thermion_dart') +external void clear_background_image_ffi( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Bool, ffi.Pointer>)>( + symbol: '_set_background_image_ffi', assetId: 'thermion_dart') +external void set_background_image_ffi( + ffi.Pointer viewer, + ffi.Pointer path, + bool fillHeight, + ffi.Pointer> onComplete, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, ffi.Float, ffi.Float, ffi.Bool)>( + symbol: '_set_background_image_position_ffi', assetId: 'thermion_dart') +external void set_background_image_position_ffi( + ffi.Pointer viewer, + double x, + double y, + bool clamp, +); + +@ffi.Native, ffi.Int)>( + symbol: '_set_tone_mapping_ffi', assetId: 'thermion_dart') +external void set_tone_mapping_ffi( + ffi.Pointer viewer, + int toneMapping, +); + +@ffi.Native, ffi.Float)>( + symbol: '_set_bloom_ffi', assetId: 'thermion_dart') +external void set_bloom_ffi( + ffi.Pointer viewer, + double strength, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>( + symbol: '_load_skybox_ffi', assetId: 'thermion_dart') +external void load_skybox_ffi( + ffi.Pointer viewer, + ffi.Pointer skyboxPath, + ffi.Pointer> onComplete, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Float)>(symbol: '_load_ibl_ffi', assetId: 'thermion_dart') +external void load_ibl_ffi( + ffi.Pointer viewer, + ffi.Pointer iblPath, + double intensity, +); + +@ffi.Native)>( + symbol: '_remove_skybox_ffi', assetId: 'thermion_dart') +external void remove_skybox_ffi( + ffi.Pointer viewer, +); + +@ffi.Native)>( + symbol: '_remove_ibl_ffi', assetId: 'thermion_dart') +external void remove_ibl_ffi( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Uint8, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Bool, + ffi.Pointer>)>( + symbol: '_add_light_ffi', assetId: 'thermion_dart') +external void add_light_ffi( + ffi.Pointer viewer, + int type, + double colour, + double intensity, + double posX, + double posY, + double posZ, + double dirX, + double dirY, + double dirZ, + double falloffRadius, + double spotLightConeInner, + double spotLightConeOuter, + double sunAngularRadius, + double sunHaloSize, + double sunHaloFallof, + bool shadows, + ffi.Pointer> callback, +); + +@ffi.Native, EntityId)>( + symbol: '_remove_light_ffi', assetId: 'thermion_dart') +external void remove_light_ffi( + ffi.Pointer viewer, + int entityId, +); + +@ffi.Native)>( + symbol: '_clear_lights_ffi', assetId: 'thermion_dart') +external void clear_lights_ffi( + ffi.Pointer viewer, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int, + ffi.Pointer>)>( + symbol: '_load_glb_ffi', assetId: 'thermion_dart') +external void load_glb_ffi( + ffi.Pointer sceneManager, + ffi.Pointer assetPath, + int numInstances, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Int, + ffi.Pointer>)>( + symbol: '_load_glb_from_buffer_ffi', assetId: 'thermion_dart') +external void load_glb_from_buffer_ffi( + ffi.Pointer sceneManager, + ffi.Pointer data, + int length, + int numInstances, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>( + symbol: '_load_gltf_ffi', assetId: 'thermion_dart') +external void load_gltf_ffi( + ffi.Pointer sceneManager, + ffi.Pointer assetPath, + ffi.Pointer relativePath, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer>)>( + symbol: '_create_instance_ffi', assetId: 'thermion_dart') +external void create_instance_ffi( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer>)>( + symbol: '_remove_entity_ffi', assetId: 'thermion_dart') +external void remove_entity_ffi( + ffi.Pointer viewer, + int asset, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, + ffi.Pointer>)>( + symbol: '_clear_entities_ffi', assetId: 'thermion_dart') +external void clear_entities_ffi( + ffi.Pointer viewer, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Pointer>)>( + symbol: '_set_camera_ffi', assetId: 'thermion_dart') +external void set_camera_ffi( + ffi.Pointer viewer, + int asset, + ffi.Pointer nodeName, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>(symbol: '_apply_weights_ffi', assetId: 'thermion_dart') +external void apply_weights_ffi( + ffi.Pointer sceneManager, + int asset, + ffi.Pointer entityName, + ffi.Pointer weights, + int count, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Int, + ffi.Bool, + ffi.Bool, + ffi.Bool, + ffi.Float)>(symbol: '_play_animation_ffi', assetId: 'thermion_dart') +external void play_animation_ffi( + ffi.Pointer sceneManager, + int asset, + int index, + bool loop, + bool reverse, + bool replaceActive, + double crossfade, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int)>( + symbol: '_set_animation_frame_ffi', assetId: 'thermion_dart') +external void set_animation_frame_ffi( + ffi.Pointer sceneManager, + int asset, + int animationIndex, + int animationFrame, +); + +@ffi.Native, EntityId, ffi.Int)>( + symbol: '_stop_animation_ffi', assetId: 'thermion_dart') +external void stop_animation_ffi( + ffi.Pointer sceneManager, + int asset, + int index, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer>)>( + symbol: '_get_animation_count_ffi', assetId: 'thermion_dart') +external void get_animation_count_ffi( + ffi.Pointer sceneManager, + int asset, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Int, + ffi.Pointer>)>( + symbol: '_get_animation_name_ffi', assetId: 'thermion_dart') +external void get_animation_name_ffi( + ffi.Pointer sceneManager, + int asset, + ffi.Pointer outPtr, + int index, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + EntityId, + ffi.Pointer, + ffi.Int, + ffi.Pointer>)>( + symbol: '_get_morph_target_name_ffi', assetId: 'thermion_dart') +external void get_morph_target_name_ffi( + ffi.Pointer sceneManager, + int assetEntity, + int childEntity, + ffi.Pointer outPtr, + int index, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, EntityId, + ffi.Pointer>)>( + symbol: '_get_morph_target_name_count_ffi', assetId: 'thermion_dart') +external void get_morph_target_name_count_ffi( + ffi.Pointer sceneManager, + int asset, + int childEntity, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Int, + ffi.Pointer>)>( + symbol: '_set_morph_target_weights_ffi', assetId: 'thermion_dart') +external void set_morph_target_weights_ffi( + ffi.Pointer sceneManager, + int asset, + ffi.Pointer morphData, + int numWeights, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer>)>( + symbol: '_update_bone_matrices_ffi', assetId: 'thermion_dart') +external void update_bone_matrices_ffi( + ffi.Pointer sceneManager, + int asset, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Int, + ffi.Int, + ffi.Pointer, + ffi.Pointer>)>( + symbol: '_set_bone_transform_ffi', assetId: 'thermion_dart') +external void set_bone_transform_ffi( + ffi.Pointer sceneManager, + int asset, + int skinIndex, + int boneIndex, + ffi.Pointer transform, + ffi.Pointer> callback, +); + +@ffi.Native, ffi.Bool)>( + symbol: '_set_post_processing_ffi', assetId: 'thermion_dart') +external void set_post_processing_ffi( + ffi.Pointer viewer, + bool enabled, +); + +@ffi.Native< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer>)>( + symbol: '_reset_to_rest_pose_ffi', assetId: 'thermion_dart') +external void reset_to_rest_pose_ffi( + ffi.Pointer sceneManager, + int entityId, + ffi.Pointer> callback, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Pointer, + ffi.Pointer>)>( + symbol: '_create_geometry_ffi', assetId: 'thermion_dart') +external void create_geometry_ffi( + ffi.Pointer viewer, + ffi.Pointer vertices, + int numVertices, + ffi.Pointer indices, + int numIndices, + int primitiveType, + ffi.Pointer materialPath, + ffi.Pointer> callback, +); + +typedef LoadFilamentResourceFromOwner + = ffi.Pointer>; +typedef LoadFilamentResourceFromOwnerFunction = ResourceBuffer Function( + ffi.Pointer, ffi.Pointer); + +final class ResourceBuffer extends ffi.Struct { + external ffi.Pointer data; + + @ffi.Int32() + external int size; + + @ffi.Int32() + external int id; +} + +typedef FreeFilamentResourceFromOwner + = ffi.Pointer>; +typedef FreeFilamentResourceFromOwnerFunction = ffi.Void Function( + ResourceBuffer, ffi.Pointer); +typedef DartFreeFilamentResourceFromOwnerFunction = void Function( + ResourceBuffer, ffi.Pointer); + +/// This header replicates most of the methods in ThermionDartApi.h. +/// It represents the interface for: +/// - invoking those methods that must be called on the main Filament engine thread +/// - setting up a render loop +typedef EntityId = ffi.Int32; +typedef DartEntityId = int; +typedef _ManipulatorMode = ffi.Int32; +typedef Dart_ManipulatorMode = int; +typedef FilamentRenderCallback + = ffi.Pointer>; +typedef FilamentRenderCallbackFunction = ffi.Void Function( + ffi.Pointer owner); +typedef ThermionDartRenderCallbackFunction = void Function( + ffi.Pointer owner); + +const int __bool_true_false_are_defined = 1; + +const int true1 = 1; + +const int false1 = 0; diff --git a/thermion_dart/lib/thermion_dart/entities/abstract_gizmo.dart b/thermion_dart/lib/thermion_dart/entities/abstract_gizmo.dart new file mode 100644 index 00000000..b28b04f6 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/entities/abstract_gizmo.dart @@ -0,0 +1,3 @@ + + + diff --git a/thermion_dart/lib/thermion_dart/entities/entity_transform_controller.dart b/thermion_dart/lib/thermion_dart/entities/entity_transform_controller.dart new file mode 100644 index 00000000..185a336a --- /dev/null +++ b/thermion_dart/lib/thermion_dart/entities/entity_transform_controller.dart @@ -0,0 +1,179 @@ +import 'dart:async'; +import 'dart:math'; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; +import 'package:vector_math/vector_math_64.dart' as v; + +class EntityTransformController { + final ThermionViewer controller; + final ThermionEntity _entity; + + late Timer _ticker; + + double translationSpeed; + double rotationRadsPerSecond; + + bool _forward = false; + bool _strafeLeft = false; + bool _strafeRight = false; + bool _back = false; + bool _rotateLeft = false; + bool _rotateRight = false; + double _rotY = 0; + + int? forwardAnimationIndex; + int? backwardAnimationIndex; + int? strafeLeftAnimationIndex; + int? strafeRightAnimationIndex; + + EntityTransformController(this.controller, this._entity, + {this.translationSpeed = 1, + this.rotationRadsPerSecond = pi / 2, + this.forwardAnimationIndex, + this.backwardAnimationIndex, + this.strafeLeftAnimationIndex, + this.strafeRightAnimationIndex}) { + var translationSpeedPerTick = translationSpeed / (1000 / 16.667); + var rotationRadsPerTick = rotationRadsPerSecond / (1000 / 16.667); + _ticker = Timer.periodic(const Duration(milliseconds: 16), (timer) { + _update(translationSpeedPerTick, rotationRadsPerTick); + }); + } + + bool _enabled = true; + void enable() { + _enabled = true; + } + + void disable() { + _enabled = false; + } + + void _update( + double translationSpeedPerTick, double rotationRadsPerTick) async { + if (!_enabled) { + return; + } + var _position = v.Vector3.zero(); + bool updateTranslation = false; + if (_forward) { + _position.add(v.Vector3(0, 0, -translationSpeedPerTick)); + updateTranslation = true; + } + if (_back) { + _position.add(v.Vector3(0, 0, translationSpeedPerTick)); + updateTranslation = true; + } + if (_strafeLeft) { + _position.add(v.Vector3(-translationSpeedPerTick, 0, 0)); + updateTranslation = true; + } + if (_strafeRight) { + _position.add(v.Vector3(translationSpeedPerTick, 0, 0)); + updateTranslation = true; + } + + // TODO - use pitch/yaw/roll + bool updateRotation = false; + var _rotation = v.Quaternion.identity(); + + double rads = 0.0; + if (_rotY != 0) { + rads = _rotY * pi / 1000; + var rotY = v.Quaternion.axisAngle(v.Vector3(0, 1, 0), rads).normalized(); + _rotation = rotY; + updateRotation = true; + _rotY = 0; + } + + if (updateTranslation) { + await controller.queuePositionUpdate( + _entity, _position.x, _position.y, _position.z, + relative: true); + } + if (updateRotation) { + await controller.queueRotationUpdateQuat(_entity, _rotation, + relative: true); + } + } + + void look(double deltaX) async { + _rotY -= deltaX; + } + + void dispose() { + _ticker.cancel(); + } + + bool _playingForwardAnimation = false; + bool _playingBackwardAnimation = false; + + void forwardPressed() async { + _forward = true; + if (forwardAnimationIndex != null && !_playingForwardAnimation) { + await controller.playAnimation(_entity, forwardAnimationIndex!, + loop: true, replaceActive: false); + _playingForwardAnimation = true; + } + } + + void forwardReleased() async { + _forward = false; + await Future.delayed(Duration(milliseconds: 50)); + if (!_forward) { + _playingForwardAnimation = false; + if (forwardAnimationIndex != null) { + await controller.stopAnimation(_entity, forwardAnimationIndex!); + } + } + } + + void backPressed() async { + _back = true; + if (forwardAnimationIndex != null) { + if (!_playingBackwardAnimation) { + await controller.playAnimation(_entity, forwardAnimationIndex!, + loop: true, replaceActive: false, reverse: true); + _playingBackwardAnimation = true; + } + } + } + + void backReleased() async { + _back = false; + if (forwardAnimationIndex != null) { + await controller.stopAnimation(_entity, forwardAnimationIndex!); + } + _playingBackwardAnimation = false; + } + + void strafeLeftPressed() { + _strafeLeft = true; + } + + void strafeLeftReleased() async { + _strafeLeft = false; + } + + void strafeRightPressed() { + _strafeRight = true; + } + + void strafeRightReleased() async { + _strafeRight = false; + } + + void Function()? _mouse1DownCallback; + void onMouse1Down(void Function() callback) { + _mouse1DownCallback = callback; + } + + void mouse1Down() async { + _mouse1DownCallback?.call(); + } + + void mouse1Up() async {} + + void mouse2Up() async {} + + void mouse2Down() async {} +} diff --git a/thermion_dart/lib/thermion_dart/entities/gizmo.dart b/thermion_dart/lib/thermion_dart/entities/gizmo.dart new file mode 100644 index 00000000..ccfb0019 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/entities/gizmo.dart @@ -0,0 +1,79 @@ + +import 'package:vector_math/vector_math_64.dart'; +import '../thermion_viewer.dart'; + +class Gizmo extends AbstractGizmo { + final ThermionEntity x; + Vector3 _x = Vector3(0.1, 0, 0); + final ThermionEntity y; + Vector3 _y = Vector3(0.0, 0.1, 0); + final ThermionEntity z; + Vector3 _z = Vector3(0.0, 0.0, 0.1); + + final ThermionViewer controller; + + ThermionEntity? _activeAxis; + ThermionEntity? _activeEntity; + bool get isActive => _activeAxis != null; + + final Set ignore; + + Gizmo(this.x, this.y, this.z, this.controller, + {this.ignore = const {}}) { + controller.pickResult.listen(_onPickResult); + } + + Future _reveal() async { + await controller.reveal(x, null); + await controller.reveal(y, null); + await controller.reveal(z, null); + } + + void translate(double transX, double transY) async { + late Vector3 vec; + if (_activeAxis == x) { + vec = _x; + } else if (_activeAxis == y) { + vec = _y; + } else if (_activeAxis == z) { + vec = _z; + } + await controller.queuePositionUpdate( + _activeEntity!, transX * vec.x, -transY * vec.y, -transX * vec.z, + relative: true); + } + + void reset() { + _activeAxis = null; + } + + void _onPickResult(FilamentPickResult result) async { + if (ignore.contains(result)) { + detach(); + return; + } + if (result.entity == x || result.entity == y || result.entity == z) { + _activeAxis = result.entity; + } else { + attach(result.entity); + } + } + + void attach(ThermionEntity entity) async { + _activeAxis = null; + _activeEntity = entity; + await _reveal(); + await controller.setParent(x, entity); + await controller.setParent(y, entity); + await controller.setParent(z, entity); + } + + void detach() async { + await controller.setParent(x, 0); + await controller.setParent(y, 0); + await controller.setParent(z, 0); + await controller.hide(x, null); + await controller.hide(y, null); + await controller.hide(z, null); + } +} diff --git a/thermion_dart/lib/thermion_dart/scene.dart b/thermion_dart/lib/thermion_dart/scene.dart new file mode 100644 index 00000000..2bb820b4 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/scene.dart @@ -0,0 +1,120 @@ +import 'dart:async'; + +import 'thermion_viewer.dart'; + +/// +/// For now, this class just holds the entities that have been loaded (though not necessarily visible in the Filament Scene). +/// +class SceneImpl extends Scene { + + ThermionViewer controller; + + SceneImpl(this.controller); + + @override + ThermionEntity? selected; + + final _onUpdatedController = StreamController.broadcast(); + @override + Stream get onUpdated => _onUpdatedController.stream; + + final _onLoadController = StreamController.broadcast(); + @override + Stream get onLoad => _onLoadController.stream; + + final _onUnloadController = StreamController.broadcast(); + @override + Stream get onUnload => _onUnloadController.stream; + + final _lights = {}; + final _entities = {}; + + void registerLight(ThermionEntity entity) { + _lights.add(entity); + _onLoadController.sink.add(entity); + _onUpdatedController.add(true); + } + + void unregisterLight(ThermionEntity entity) async { + var children = await controller.getChildEntities(entity, true); + if (selected == entity || children.contains(selected)) { + selected = null; + controller.gizmo?.detach(); + } + _lights.remove(entity); + _onUnloadController.add(entity); + _onUpdatedController.add(true); + } + + void unregisterEntity(ThermionEntity entity) async { + var children = await controller.getChildEntities(entity, true); + if (selected == entity || children.contains(selected)) { + selected = null; + + controller.gizmo?.detach(); + } + _entities.remove(entity); + _onUnloadController.add(entity); + _onUpdatedController.add(true); + } + + void registerEntity(ThermionEntity entity) { + _entities.add(entity); + _onLoadController.sink.add(entity); + _onUpdatedController.add(true); + } + + void clearLights() { + for (final light in _lights) { + if (selected == light) { + selected = null; + controller.gizmo?.detach(); + } + _onUnloadController.add(light); + } + + _lights.clear(); + _onUpdatedController.add(true); + } + + void clearEntities() { + for (final entity in _entities) { + if (selected == entity) { + selected = null; + controller.gizmo?.detach(); + } + _onUnloadController.add(entity); + } + _entities.clear(); + _onUpdatedController.add(true); + } + + /// + /// Lists all entities currently loaded (not necessarily active in the scene). + /// + Iterable listLights() { + return _lights; + } + + @override + Iterable listEntities() { + return _entities; + } + + void registerSelected(ThermionEntity entity) { + selected = entity; + _onUpdatedController.add(true); + } + + void unregisterSelected() { + selected = null; + _onUpdatedController.add(true); + } + + @override + void select(ThermionEntity entity) { + selected = entity; + controller.gizmo?.attach(entity); + _onUpdatedController.add(true); + } +} diff --git a/thermion_dart/lib/thermion_dart/swift/swift_bindings.g.dart b/thermion_dart/lib/thermion_dart/swift/swift_bindings.g.dart new file mode 100644 index 00000000..2c64a267 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/swift/swift_bindings.g.dart @@ -0,0 +1,73832 @@ +// ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field, return_of_invalid_type, void_checks, annotate_overrides, no_leading_underscores_for_local_identifiers, library_private_types_in_public_apia +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint +import 'dart:ffi' as ffi; +import 'package:ffi/ffi.dart' as pkg_ffi; + +/// Bindings for ThermionDartTexture. +class ThermionDartTexture1 { + /// Holds the symbol lookup function. + final ffi.Pointer Function(String symbolName) + _lookup; + + /// The symbols are looked up in [dynamicLibrary]. + ThermionDartTexture1(ffi.DynamicLibrary dynamicLibrary) + : _lookup = dynamicLibrary.lookup; + + /// The symbols are looked up with [lookup]. + ThermionDartTexture1.fromLookup( + ffi.Pointer Function(String symbolName) + lookup) + : _lookup = lookup; + + ffi.Pointer _registerName1(String name) { + final cstr = name.toNativeUtf8(); + final sel = _sel_registerName(cstr.cast()); + pkg_ffi.calloc.free(cstr); + return sel; + } + + ffi.Pointer _sel_registerName( + ffi.Pointer str, + ) { + return __sel_registerName( + str, + ); + } + + late final __sel_registerNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('sel_registerName'); + late final __sel_registerName = __sel_registerNamePtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer _getClass1(String name) { + final cstr = name.toNativeUtf8(); + final clazz = _objc_getClass(cstr.cast()); + pkg_ffi.calloc.free(cstr); + if (clazz == ffi.nullptr) { + throw Exception('Failed to load Objective-C class: $name'); + } + return clazz; + } + + ffi.Pointer _objc_getClass( + ffi.Pointer str, + ) { + return __objc_getClass( + str, + ); + } + + late final __objc_getClassPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('objc_getClass'); + late final __objc_getClass = __objc_getClassPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer _objc_retain( + ffi.Pointer value, + ) { + return __objc_retain( + value, + ); + } + + late final __objc_retainPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('objc_retain'); + late final __objc_retain = __objc_retainPtr + .asFunction Function(ffi.Pointer)>(); + + void _objc_release( + ffi.Pointer value, + ) { + return __objc_release( + value, + ); + } + + late final __objc_releasePtr = + _lookup)>>( + 'objc_release'); + late final __objc_release = + __objc_releasePtr.asFunction)>(); + + late final _objc_releaseFinalizer2 = + ffi.NativeFinalizer(__objc_releasePtr.cast()); + late final _class_NSObject1 = _getClass1("NSObject"); + late final _sel_load1 = _registerName1("load"); + void _objc_msgSend_1( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1( + obj, + sel, + ); + } + + late final __objc_msgSend_1Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initialize1 = _registerName1("initialize"); + late final _sel_init1 = _registerName1("init"); + instancetype _objc_msgSend_2( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_2( + obj, + sel, + ); + } + + late final __objc_msgSend_2Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_new1 = _registerName1("new"); + late final _sel_allocWithZone_1 = _registerName1("allocWithZone:"); + instancetype _objc_msgSend_3( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_NSZone> zone, + ) { + return __objc_msgSend_3( + obj, + sel, + zone, + ); + } + + late final __objc_msgSend_3Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_NSZone>)>>('objc_msgSend'); + late final __objc_msgSend_3 = __objc_msgSend_3Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_NSZone>)>(); + + late final _sel_alloc1 = _registerName1("alloc"); + late final _sel_dealloc1 = _registerName1("dealloc"); + late final _sel_finalize1 = _registerName1("finalize"); + late final _sel_copy1 = _registerName1("copy"); + late final _sel_mutableCopy1 = _registerName1("mutableCopy"); + late final _sel_copyWithZone_1 = _registerName1("copyWithZone:"); + late final _sel_mutableCopyWithZone_1 = + _registerName1("mutableCopyWithZone:"); + late final _sel_instancesRespondToSelector_1 = + _registerName1("instancesRespondToSelector:"); + bool _objc_msgSend_4( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ) { + return __objc_msgSend_4( + obj, + sel, + aSelector, + ); + } + + late final __objc_msgSend_4Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_4 = __objc_msgSend_4Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + bool _objc_msgSend_0( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer clazz, + ) { + return __objc_msgSend_0( + obj, + sel, + clazz, + ); + } + + late final __objc_msgSend_0Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_isKindOfClass_1 = _registerName1("isKindOfClass:"); + late final _class_Protocol1 = _getClass1("Protocol"); + late final _sel_conformsToProtocol_1 = _registerName1("conformsToProtocol:"); + bool _objc_msgSend_5( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer protocol, + ) { + return __objc_msgSend_5( + obj, + sel, + protocol, + ); + } + + late final __objc_msgSend_5Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_5 = __objc_msgSend_5Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_methodForSelector_1 = _registerName1("methodForSelector:"); + ffi.Pointer> _objc_msgSend_6( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ) { + return __objc_msgSend_6( + obj, + sel, + aSelector, + ); + } + + late final __objc_msgSend_6Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_6 = __objc_msgSend_6Ptr.asFunction< + ffi.Pointer> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_instanceMethodForSelector_1 = + _registerName1("instanceMethodForSelector:"); + late final _sel_doesNotRecognizeSelector_1 = + _registerName1("doesNotRecognizeSelector:"); + void _objc_msgSend_7( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ) { + return __objc_msgSend_7( + obj, + sel, + aSelector, + ); + } + + late final __objc_msgSend_7Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_7 = __objc_msgSend_7Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_forwardingTargetForSelector_1 = + _registerName1("forwardingTargetForSelector:"); + ffi.Pointer _objc_msgSend_8( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ) { + return __objc_msgSend_8( + obj, + sel, + aSelector, + ); + } + + late final __objc_msgSend_8Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_8 = __objc_msgSend_8Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSInvocation1 = _getClass1("NSInvocation"); + late final _class_NSMethodSignature1 = _getClass1("NSMethodSignature"); + late final _sel_signatureWithObjCTypes_1 = + _registerName1("signatureWithObjCTypes:"); + ffi.Pointer _objc_msgSend_9( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer types, + ) { + return __objc_msgSend_9( + obj, + sel, + types, + ); + } + + late final __objc_msgSend_9Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_9 = __objc_msgSend_9Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_numberOfArguments1 = _registerName1("numberOfArguments"); + int _objc_msgSend_10( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_10( + obj, + sel, + ); + } + + late final __objc_msgSend_10Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_getArgumentTypeAtIndex_1 = + _registerName1("getArgumentTypeAtIndex:"); + ffi.Pointer _objc_msgSend_11( + ffi.Pointer obj, + ffi.Pointer sel, + int idx, + ) { + return __objc_msgSend_11( + obj, + sel, + idx, + ); + } + + late final __objc_msgSend_11Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_11 = __objc_msgSend_11Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_frameLength1 = _registerName1("frameLength"); + late final _sel_isOneway1 = _registerName1("isOneway"); + bool _objc_msgSend_12( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_12( + obj, + sel, + ); + } + + late final __objc_msgSend_12Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_12 = __objc_msgSend_12Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_methodReturnType1 = _registerName1("methodReturnType"); + ffi.Pointer _objc_msgSend_13( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_13( + obj, + sel, + ); + } + + late final __objc_msgSend_13Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_methodReturnLength1 = _registerName1("methodReturnLength"); + late final _sel_cancelPreviousPerformRequestsWithTarget_selector_object_1 = + _registerName1( + "cancelPreviousPerformRequestsWithTarget:selector:object:"); + void _objc_msgSend_14( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aTarget, + ffi.Pointer aSelector, + ffi.Pointer anArgument, + ) { + return __objc_msgSend_14( + obj, + sel, + aTarget, + aSelector, + anArgument, + ); + } + + late final __objc_msgSend_14Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_cancelPreviousPerformRequestsWithTarget_1 = + _registerName1("cancelPreviousPerformRequestsWithTarget:"); + void _objc_msgSend_15( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aTarget, + ) { + return __objc_msgSend_15( + obj, + sel, + aTarget, + ); + } + + late final __objc_msgSend_15Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_accessInstanceVariablesDirectly1 = + _registerName1("accessInstanceVariablesDirectly"); + late final _sel_useStoredAccessor1 = _registerName1("useStoredAccessor"); + late final _class_NSSet1 = _getClass1("NSSet"); + late final _sel_count1 = _registerName1("count"); + late final _sel_member_1 = _registerName1("member:"); + ffi.Pointer _objc_msgSend_16( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + ) { + return __objc_msgSend_16( + obj, + sel, + object, + ); + } + + late final __objc_msgSend_16Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSEnumerator1 = _getClass1("NSEnumerator"); + late final _sel_nextObject1 = _registerName1("nextObject"); + ffi.Pointer _objc_msgSend_17( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_17( + obj, + sel, + ); + } + + late final __objc_msgSend_17Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_allObjects1 = _registerName1("allObjects"); + late final _class_NSString1 = _getClass1("NSString"); + late final _sel_length1 = _registerName1("length"); + late final _sel_characterAtIndex_1 = _registerName1("characterAtIndex:"); + int _objc_msgSend_18( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_18( + obj, + sel, + index, + ); + } + + late final __objc_msgSend_18Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedShort Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _class_NSCoder1 = _getClass1("NSCoder"); + late final _sel_encodeValueOfObjCType_at_1 = + _registerName1("encodeValueOfObjCType:at:"); + void _objc_msgSend_19( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer type, + ffi.Pointer addr, + ) { + return __objc_msgSend_19( + obj, + sel, + type, + addr, + ); + } + + late final __objc_msgSend_19Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSData1 = _getClass1("NSData"); + late final _sel_bytes1 = _registerName1("bytes"); + ffi.Pointer _objc_msgSend_20( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_20( + obj, + sel, + ); + } + + late final __objc_msgSend_20Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_description1 = _registerName1("description"); + ffi.Pointer _objc_msgSend_21( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_21( + obj, + sel, + ); + } + + late final __objc_msgSend_21Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_getBytes_length_1 = _registerName1("getBytes:length:"); + void _objc_msgSend_22( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + int length, + ) { + return __objc_msgSend_22( + obj, + sel, + buffer, + length, + ); + } + + late final __objc_msgSend_22Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_getBytes_range_1 = _registerName1("getBytes:range:"); + void _objc_msgSend_23( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + _NSRange range, + ) { + return __objc_msgSend_23( + obj, + sel, + buffer, + range, + ); + } + + late final __objc_msgSend_23Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>(); + + late final _sel_isEqualToData_1 = _registerName1("isEqualToData:"); + bool _objc_msgSend_24( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + ) { + return __objc_msgSend_24( + obj, + sel, + other, + ); + } + + late final __objc_msgSend_24Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); + ffi.Pointer _objc_msgSend_25( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_25( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_25Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, _NSRange)>(); + + late final _sel_writeToFile_atomically_1 = + _registerName1("writeToFile:atomically:"); + bool _objc_msgSend_26( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool useAuxiliaryFile, + ) { + return __objc_msgSend_26( + obj, + sel, + path, + useAuxiliaryFile, + ); + } + + late final __objc_msgSend_26Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _class_NSURL1 = _getClass1("NSURL"); + late final _sel_initWithScheme_host_path_1 = + _registerName1("initWithScheme:host:path:"); + instancetype _objc_msgSend_27( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer scheme, + ffi.Pointer host, + ffi.Pointer path, + ) { + return __objc_msgSend_27( + obj, + sel, + scheme, + host, + path, + ); + } + + late final __objc_msgSend_27Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initFileURLWithPath_isDirectory_relativeToURL_1 = + _registerName1("initFileURLWithPath:isDirectory:relativeToURL:"); + instancetype _objc_msgSend_28( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_28( + obj, + sel, + path, + isDir, + baseURL, + ); + } + + late final __objc_msgSend_28Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool, ffi.Pointer)>(); + + late final _sel_initFileURLWithPath_relativeToURL_1 = + _registerName1("initFileURLWithPath:relativeToURL:"); + instancetype _objc_msgSend_29( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_29( + obj, + sel, + path, + baseURL, + ); + } + + late final __objc_msgSend_29Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initFileURLWithPath_isDirectory_1 = + _registerName1("initFileURLWithPath:isDirectory:"); + instancetype _objc_msgSend_30( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ) { + return __objc_msgSend_30( + obj, + sel, + path, + isDir, + ); + } + + late final __objc_msgSend_30Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_30 = __objc_msgSend_30Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_initFileURLWithPath_1 = + _registerName1("initFileURLWithPath:"); + instancetype _objc_msgSend_31( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_31( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_31Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_31 = __objc_msgSend_31Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_fileURLWithPath_isDirectory_relativeToURL_1 = + _registerName1("fileURLWithPath:isDirectory:relativeToURL:"); + ffi.Pointer _objc_msgSend_32( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_32( + obj, + sel, + path, + isDir, + baseURL, + ); + } + + late final __objc_msgSend_32Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); + + late final _sel_fileURLWithPath_relativeToURL_1 = + _registerName1("fileURLWithPath:relativeToURL:"); + ffi.Pointer _objc_msgSend_33( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_33( + obj, + sel, + path, + baseURL, + ); + } + + late final __objc_msgSend_33Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_33 = __objc_msgSend_33Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_fileURLWithPath_isDirectory_1 = + _registerName1("fileURLWithPath:isDirectory:"); + ffi.Pointer _objc_msgSend_34( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ) { + return __objc_msgSend_34( + obj, + sel, + path, + isDir, + ); + } + + late final __objc_msgSend_34Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_34 = __objc_msgSend_34Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); + ffi.Pointer _objc_msgSend_35( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_35( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_35Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_35 = __objc_msgSend_35Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = + _registerName1( + "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); + instancetype _objc_msgSend_36( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_36( + obj, + sel, + path, + isDir, + baseURL, + ); + } + + late final __objc_msgSend_36Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool, ffi.Pointer)>(); + + late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = + _registerName1( + "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); + ffi.Pointer _objc_msgSend_37( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_37( + obj, + sel, + path, + isDir, + baseURL, + ); + } + + late final __objc_msgSend_37Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_37 = __objc_msgSend_37Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); + + late final _sel_initWithString_1 = _registerName1("initWithString:"); + instancetype _objc_msgSend_38( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URLString, + ) { + return __objc_msgSend_38( + obj, + sel, + URLString, + ); + } + + late final __objc_msgSend_38Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_38 = __objc_msgSend_38Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithString_relativeToURL_1 = + _registerName1("initWithString:relativeToURL:"); + instancetype _objc_msgSend_39( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URLString, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_39( + obj, + sel, + URLString, + baseURL, + ); + } + + late final __objc_msgSend_39Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_39 = __objc_msgSend_39Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_URLWithString_1 = _registerName1("URLWithString:"); + late final _sel_URLWithString_relativeToURL_1 = + _registerName1("URLWithString:relativeToURL:"); + late final _sel_initWithDataRepresentation_relativeToURL_1 = + _registerName1("initWithDataRepresentation:relativeToURL:"); + instancetype _objc_msgSend_40( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_40( + obj, + sel, + data, + baseURL, + ); + } + + late final __objc_msgSend_40Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_40 = __objc_msgSend_40Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_URLWithDataRepresentation_relativeToURL_1 = + _registerName1("URLWithDataRepresentation:relativeToURL:"); + ffi.Pointer _objc_msgSend_41( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_41( + obj, + sel, + data, + baseURL, + ); + } + + late final __objc_msgSend_41Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_41 = __objc_msgSend_41Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1 = + _registerName1("initAbsoluteURLWithDataRepresentation:relativeToURL:"); + late final _sel_absoluteURLWithDataRepresentation_relativeToURL_1 = + _registerName1("absoluteURLWithDataRepresentation:relativeToURL:"); + late final _sel_dataRepresentation1 = _registerName1("dataRepresentation"); + ffi.Pointer _objc_msgSend_42( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_42( + obj, + sel, + ); + } + + late final __objc_msgSend_42Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_42 = __objc_msgSend_42Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_absoluteString1 = _registerName1("absoluteString"); + ffi.Pointer _objc_msgSend_43( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_43( + obj, + sel, + ); + } + + late final __objc_msgSend_43Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_43 = __objc_msgSend_43Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_relativeString1 = _registerName1("relativeString"); + late final _sel_baseURL1 = _registerName1("baseURL"); + ffi.Pointer _objc_msgSend_44( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_44( + obj, + sel, + ); + } + + late final __objc_msgSend_44Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_44 = __objc_msgSend_44Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_absoluteURL1 = _registerName1("absoluteURL"); + late final _sel_scheme1 = _registerName1("scheme"); + late final _sel_resourceSpecifier1 = _registerName1("resourceSpecifier"); + late final _sel_host1 = _registerName1("host"); + late final _class_NSNumber1 = _getClass1("NSNumber"); + late final _class_NSValue1 = _getClass1("NSValue"); + late final _sel_getValue_size_1 = _registerName1("getValue:size:"); + late final _sel_objCType1 = _registerName1("objCType"); + late final _sel_initWithBytes_objCType_1 = + _registerName1("initWithBytes:objCType:"); + instancetype _objc_msgSend_45( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer type, + ) { + return __objc_msgSend_45( + obj, + sel, + value, + type, + ); + } + + late final __objc_msgSend_45Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_45 = __objc_msgSend_45Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithCoder_1 = _registerName1("initWithCoder:"); + instancetype _objc_msgSend_46( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer coder, + ) { + return __objc_msgSend_46( + obj, + sel, + coder, + ); + } + + late final __objc_msgSend_46Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_valueWithBytes_objCType_1 = + _registerName1("valueWithBytes:objCType:"); + ffi.Pointer _objc_msgSend_47( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer type, + ) { + return __objc_msgSend_47( + obj, + sel, + value, + type, + ); + } + + late final __objc_msgSend_47Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_47 = __objc_msgSend_47Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_value_withObjCType_1 = _registerName1("value:withObjCType:"); + late final _sel_valueWithNonretainedObject_1 = + _registerName1("valueWithNonretainedObject:"); + ffi.Pointer _objc_msgSend_48( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ) { + return __objc_msgSend_48( + obj, + sel, + anObject, + ); + } + + late final __objc_msgSend_48Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_48 = __objc_msgSend_48Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_nonretainedObjectValue1 = + _registerName1("nonretainedObjectValue"); + late final _sel_valueWithPointer_1 = _registerName1("valueWithPointer:"); + ffi.Pointer _objc_msgSend_49( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer pointer, + ) { + return __objc_msgSend_49( + obj, + sel, + pointer, + ); + } + + late final __objc_msgSend_49Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_pointerValue1 = _registerName1("pointerValue"); + late final _sel_isEqualToValue_1 = _registerName1("isEqualToValue:"); + bool _objc_msgSend_50( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_50( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_50Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_50 = __objc_msgSend_50Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_getValue_1 = _registerName1("getValue:"); + void _objc_msgSend_51( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_51( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_51Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_valueWithRange_1 = _registerName1("valueWithRange:"); + ffi.Pointer _objc_msgSend_52( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_52( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_52Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, _NSRange)>(); + + late final _sel_rangeValue1 = _registerName1("rangeValue"); + late final _objc_msgSend_useVariants1 = ffi.Abi.current() == ffi.Abi.iosX64 || + ffi.Abi.current() == ffi.Abi.macosX64; + _NSRange _objc_msgSend_53( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_53( + obj, + sel, + ); + } + + late final __objc_msgSend_53Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_53_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_53_stret( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_53_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_53_stret = __objc_msgSend_53_stretPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_valueWithPoint_1 = _registerName1("valueWithPoint:"); + ffi.Pointer _objc_msgSend_54( + ffi.Pointer obj, + ffi.Pointer sel, + CGPoint point, + ) { + return __objc_msgSend_54( + obj, + sel, + point, + ); + } + + late final __objc_msgSend_54Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGPoint)>>('objc_msgSend'); + late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, CGPoint)>(); + + late final _sel_valueWithSize_1 = _registerName1("valueWithSize:"); + ffi.Pointer _objc_msgSend_55( + ffi.Pointer obj, + ffi.Pointer sel, + CGSize size, + ) { + return __objc_msgSend_55( + obj, + sel, + size, + ); + } + + late final __objc_msgSend_55Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGSize)>>('objc_msgSend'); + late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, CGSize)>(); + + late final _sel_valueWithRect_1 = _registerName1("valueWithRect:"); + ffi.Pointer _objc_msgSend_56( + ffi.Pointer obj, + ffi.Pointer sel, + CGRect rect, + ) { + return __objc_msgSend_56( + obj, + sel, + rect, + ); + } + + late final __objc_msgSend_56Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, CGRect)>>('objc_msgSend'); + late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, CGRect)>(); + + late final _sel_valueWithEdgeInsets_1 = + _registerName1("valueWithEdgeInsets:"); + ffi.Pointer _objc_msgSend_57( + ffi.Pointer obj, + ffi.Pointer sel, + NSEdgeInsets insets, + ) { + return __objc_msgSend_57( + obj, + sel, + insets, + ); + } + + late final __objc_msgSend_57Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSEdgeInsets)>>('objc_msgSend'); + late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSEdgeInsets)>(); + + late final _sel_pointValue1 = _registerName1("pointValue"); + CGPoint _objc_msgSend_58( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_58( + obj, + sel, + ); + } + + late final __objc_msgSend_58Ptr = _lookup< + ffi.NativeFunction< + CGPoint Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< + CGPoint Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_58_stret( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_58_stret( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_58_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_58_stret = __objc_msgSend_58_stretPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_sizeValue1 = _registerName1("sizeValue"); + CGSize _objc_msgSend_59( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_59( + obj, + sel, + ); + } + + late final __objc_msgSend_59Ptr = _lookup< + ffi.NativeFunction< + CGSize Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< + CGSize Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_59_stret( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_59_stret( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_59_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_59_stret = __objc_msgSend_59_stretPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_rectValue1 = _registerName1("rectValue"); + CGRect _objc_msgSend_60( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_60( + obj, + sel, + ); + } + + late final __objc_msgSend_60Ptr = _lookup< + ffi.NativeFunction< + CGRect Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< + CGRect Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_60_stret( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_60_stret( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_60_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_60_stret = __objc_msgSend_60_stretPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_edgeInsetsValue1 = _registerName1("edgeInsetsValue"); + NSEdgeInsets _objc_msgSend_61( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_61( + obj, + sel, + ); + } + + late final __objc_msgSend_61Ptr = _lookup< + ffi.NativeFunction< + NSEdgeInsets Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< + NSEdgeInsets Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_61_stret( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_61_stret( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_61_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_61_stret = __objc_msgSend_61_stretPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_keyPathsForValuesAffectingValueForKey_1 = + _registerName1("keyPathsForValuesAffectingValueForKey:"); + ffi.Pointer _objc_msgSend_62( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_62( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_62Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_automaticallyNotifiesObserversForKey_1 = + _registerName1("automaticallyNotifiesObserversForKey:"); + bool _objc_msgSend_63( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_63( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_63Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSArray1 = _getClass1("NSArray"); + late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); + ffi.Pointer _objc_msgSend_64( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_64( + obj, + sel, + index, + ); + } + + late final __objc_msgSend_64Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithObjects_count_1 = + _registerName1("initWithObjects:count:"); + instancetype _objc_msgSend_65( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + int cnt, + ) { + return __objc_msgSend_65( + obj, + sel, + objects, + cnt, + ); + } + + late final __objc_msgSend_65Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, int)>(); + + late final _sel_arrayByAddingObject_1 = + _registerName1("arrayByAddingObject:"); + ffi.Pointer _objc_msgSend_66( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ) { + return __objc_msgSend_66( + obj, + sel, + anObject, + ); + } + + late final __objc_msgSend_66Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_arrayByAddingObjectsFromArray_1 = + _registerName1("arrayByAddingObjectsFromArray:"); + ffi.Pointer _objc_msgSend_67( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherArray, + ) { + return __objc_msgSend_67( + obj, + sel, + otherArray, + ); + } + + late final __objc_msgSend_67Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_componentsJoinedByString_1 = + _registerName1("componentsJoinedByString:"); + ffi.Pointer _objc_msgSend_68( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer separator, + ) { + return __objc_msgSend_68( + obj, + sel, + separator, + ); + } + + late final __objc_msgSend_68Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_containsObject_1 = _registerName1("containsObject:"); + late final _sel_descriptionWithLocale_1 = + _registerName1("descriptionWithLocale:"); + ffi.Pointer _objc_msgSend_69( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer locale, + ) { + return __objc_msgSend_69( + obj, + sel, + locale, + ); + } + + late final __objc_msgSend_69Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_descriptionWithLocale_indent_1 = + _registerName1("descriptionWithLocale:indent:"); + ffi.Pointer _objc_msgSend_70( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer locale, + int level, + ) { + return __objc_msgSend_70( + obj, + sel, + locale, + level, + ); + } + + late final __objc_msgSend_70Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_firstObjectCommonWithArray_1 = + _registerName1("firstObjectCommonWithArray:"); + ffi.Pointer _objc_msgSend_71( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherArray, + ) { + return __objc_msgSend_71( + obj, + sel, + otherArray, + ); + } + + late final __objc_msgSend_71Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); + void _objc_msgSend_72( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + _NSRange range, + ) { + return __objc_msgSend_72( + obj, + sel, + objects, + range, + ); + } + + late final __objc_msgSend_72Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, _NSRange)>(); + + late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); + int _objc_msgSend_73( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ) { + return __objc_msgSend_73( + obj, + sel, + anObject, + ); + } + + late final __objc_msgSend_73Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_indexOfObject_inRange_1 = + _registerName1("indexOfObject:inRange:"); + int _objc_msgSend_74( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + _NSRange range, + ) { + return __objc_msgSend_74( + obj, + sel, + anObject, + range, + ); + } + + late final __objc_msgSend_74Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>(); + + late final _sel_indexOfObjectIdenticalTo_1 = + _registerName1("indexOfObjectIdenticalTo:"); + late final _sel_indexOfObjectIdenticalTo_inRange_1 = + _registerName1("indexOfObjectIdenticalTo:inRange:"); + late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); + bool _objc_msgSend_75( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherArray, + ) { + return __objc_msgSend_75( + obj, + sel, + otherArray, + ); + } + + late final __objc_msgSend_75Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_firstObject1 = _registerName1("firstObject"); + late final _sel_lastObject1 = _registerName1("lastObject"); + late final _sel_objectEnumerator1 = _registerName1("objectEnumerator"); + ffi.Pointer _objc_msgSend_76( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_76( + obj, + sel, + ); + } + + late final __objc_msgSend_76Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_reverseObjectEnumerator1 = + _registerName1("reverseObjectEnumerator"); + late final _sel_sortedArrayHint1 = _registerName1("sortedArrayHint"); + late final _sel_sortedArrayUsingFunction_context_1 = + _registerName1("sortedArrayUsingFunction:context:"); + ffi.Pointer _objc_msgSend_77( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + ) { + return __objc_msgSend_77( + obj, + sel, + comparator, + context, + ); + } + + late final __objc_msgSend_77Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); + + late final _sel_sortedArrayUsingFunction_context_hint_1 = + _registerName1("sortedArrayUsingFunction:context:hint:"); + ffi.Pointer _objc_msgSend_78( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + ffi.Pointer hint, + ) { + return __objc_msgSend_78( + obj, + sel, + comparator, + context, + hint, + ); + } + + late final __objc_msgSend_78Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_sortedArrayUsingSelector_1 = + _registerName1("sortedArrayUsingSelector:"); + ffi.Pointer _objc_msgSend_79( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer comparator, + ) { + return __objc_msgSend_79( + obj, + sel, + comparator, + ); + } + + late final __objc_msgSend_79Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); + ffi.Pointer _objc_msgSend_80( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_80( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_80Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, _NSRange)>(); + + late final _class_NSError1 = _getClass1("NSError"); + late final _sel_initWithDomain_code_userInfo_1 = + _registerName1("initWithDomain:code:userInfo:"); + instancetype _objc_msgSend_81( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer domain, + int code, + ffi.Pointer dict, + ) { + return __objc_msgSend_81( + obj, + sel, + domain, + code, + dict, + ); + } + + late final __objc_msgSend_81Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); + + late final _sel_errorWithDomain_code_userInfo_1 = + _registerName1("errorWithDomain:code:userInfo:"); + late final _sel_domain1 = _registerName1("domain"); + late final _sel_code1 = _registerName1("code"); + int _objc_msgSend_82( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_82( + obj, + sel, + ); + } + + late final __objc_msgSend_82Ptr = _lookup< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_userInfo1 = _registerName1("userInfo"); + late final _sel_localizedDescription1 = + _registerName1("localizedDescription"); + late final _sel_localizedFailureReason1 = + _registerName1("localizedFailureReason"); + late final _sel_localizedRecoverySuggestion1 = + _registerName1("localizedRecoverySuggestion"); + late final _sel_localizedRecoveryOptions1 = + _registerName1("localizedRecoveryOptions"); + ffi.Pointer _objc_msgSend_83( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_83( + obj, + sel, + ); + } + + late final __objc_msgSend_83Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_83 = __objc_msgSend_83Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); + late final _sel_helpAnchor1 = _registerName1("helpAnchor"); + late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); + ffi.Pointer _objc_msgSend_84( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_84( + obj, + sel, + ); + } + + late final __objc_msgSend_84Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer<_ObjCBlockDesc> _newBlockDesc1() { + final d = + pkg_ffi.calloc.allocate<_ObjCBlockDesc>(ffi.sizeOf<_ObjCBlockDesc>()); + d.ref.reserved = 0; + d.ref.size = ffi.sizeOf<_ObjCBlock>(); + d.ref.copy_helper = ffi.nullptr; + d.ref.dispose_helper = ffi.nullptr; + d.ref.signature = ffi.nullptr; + return d; + } + + late final _objc_block_desc1 = _newBlockDesc1(); + late final _objc_concrete_global_block1 = + _lookup('_NSConcreteGlobalBlock'); + ffi.Pointer<_ObjCBlock> _newBlock1( + ffi.Pointer invoke, ffi.Pointer target) { + final b = pkg_ffi.calloc.allocate<_ObjCBlock>(ffi.sizeOf<_ObjCBlock>()); + b.ref.isa = _objc_concrete_global_block1; + b.ref.flags = 0; + b.ref.reserved = 0; + b.ref.invoke = invoke; + b.ref.target = target; + b.ref.descriptor = _objc_block_desc1; + final copy = _Block_copy(b.cast()).cast<_ObjCBlock>(); + pkg_ffi.calloc.free(b); + return copy; + } + + ffi.Pointer _Block_copy( + ffi.Pointer value, + ) { + return __Block_copy( + value, + ); + } + + late final __Block_copyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('_Block_copy'); + late final __Block_copy = __Block_copyPtr + .asFunction Function(ffi.Pointer)>(); + + void _Block_release( + ffi.Pointer value, + ) { + return __Block_release( + value, + ); + } + + late final __Block_releasePtr = + _lookup)>>( + '_Block_release'); + late final __Block_release = + __Block_releasePtr.asFunction)>(); + + late final _objc_releaseFinalizer11 = + ffi.NativeFinalizer(__Block_releasePtr.cast()); + late final _sel_setUserInfoValueProviderForDomain_provider_1 = + _registerName1("setUserInfoValueProviderForDomain:provider:"); + void _objc_msgSend_85( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer errorDomain, + ffi.Pointer<_ObjCBlock> provider, + ) { + return __objc_msgSend_85( + obj, + sel, + errorDomain, + provider, + ); + } + + late final __objc_msgSend_85Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_userInfoValueProviderForDomain_1 = + _registerName1("userInfoValueProviderForDomain:"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_86( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer err, + ffi.Pointer userInfoKey, + ffi.Pointer errorDomain, + ) { + return __objc_msgSend_86( + obj, + sel, + err, + userInfoKey, + errorDomain, + ); + } + + late final __objc_msgSend_86Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setKeys_triggerChangeNotificationsForDependentKey_1 = + _registerName1("setKeys:triggerChangeNotificationsForDependentKey:"); + void _objc_msgSend_87( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer dependentKey, + ) { + return __objc_msgSend_87( + obj, + sel, + keys, + dependentKey, + ); + } + + late final __objc_msgSend_87Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_classFallbacksForKeyedArchiver1 = + _registerName1("classFallbacksForKeyedArchiver"); + late final _sel_classForKeyedUnarchiver1 = + _registerName1("classForKeyedUnarchiver"); + late final _sel_writeToURL_error_1 = _registerName1("writeToURL:error:"); + bool _objc_msgSend_88( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer> error, + ) { + return __objc_msgSend_88( + obj, + sel, + url, + error, + ); + } + + late final __objc_msgSend_88Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); + + late final _sel_makeObjectsPerformSelector_1 = + _registerName1("makeObjectsPerformSelector:"); + late final _sel_makeObjectsPerformSelector_withObject_1 = + _registerName1("makeObjectsPerformSelector:withObject:"); + void _objc_msgSend_89( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ffi.Pointer argument, + ) { + return __objc_msgSend_89( + obj, + sel, + aSelector, + argument, + ); + } + + late final __objc_msgSend_89Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSIndexSet1 = _getClass1("NSIndexSet"); + late final _sel_indexSet1 = _registerName1("indexSet"); + late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); + late final _sel_indexSetWithIndexesInRange_1 = + _registerName1("indexSetWithIndexesInRange:"); + instancetype _objc_msgSend_90( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_90( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_90Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, _NSRange)>(); + + late final _sel_initWithIndexesInRange_1 = + _registerName1("initWithIndexesInRange:"); + late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); + instancetype _objc_msgSend_91( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexSet, + ) { + return __objc_msgSend_91( + obj, + sel, + indexSet, + ); + } + + late final __objc_msgSend_91Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); + late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); + bool _objc_msgSend_92( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexSet, + ) { + return __objc_msgSend_92( + obj, + sel, + indexSet, + ); + } + + late final __objc_msgSend_92Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_firstIndex1 = _registerName1("firstIndex"); + late final _sel_lastIndex1 = _registerName1("lastIndex"); + late final _sel_indexGreaterThanIndex_1 = + _registerName1("indexGreaterThanIndex:"); + int _objc_msgSend_93( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_93( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_93Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); + late final _sel_indexGreaterThanOrEqualToIndex_1 = + _registerName1("indexGreaterThanOrEqualToIndex:"); + late final _sel_indexLessThanOrEqualToIndex_1 = + _registerName1("indexLessThanOrEqualToIndex:"); + late final _sel_getIndexes_maxCount_inIndexRange_1 = + _registerName1("getIndexes:maxCount:inIndexRange:"); + int _objc_msgSend_94( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexBuffer, + int bufferSize, + ffi.Pointer<_NSRange> range, + ) { + return __objc_msgSend_94( + obj, + sel, + indexBuffer, + bufferSize, + range, + ); + } + + late final __objc_msgSend_94Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>)>>('objc_msgSend'); + late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_NSRange>)>(); + + late final _sel_countOfIndexesInRange_1 = + _registerName1("countOfIndexesInRange:"); + int _objc_msgSend_95( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_95( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_95Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, _NSRange)>(); + + late final _sel_containsIndex_1 = _registerName1("containsIndex:"); + bool _objc_msgSend_96( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_96( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_96Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_containsIndexesInRange_1 = + _registerName1("containsIndexesInRange:"); + bool _objc_msgSend_97( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_97( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_97Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, _NSRange)>(); + + late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); + late final _sel_intersectsIndexesInRange_1 = + _registerName1("intersectsIndexesInRange:"); + late final _sel_enumerateIndexesUsingBlock_1 = + _registerName1("enumerateIndexesUsingBlock:"); + void _objc_msgSend_98( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_98( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_98Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateIndexesWithOptions_usingBlock_1 = + _registerName1("enumerateIndexesWithOptions:usingBlock:"); + void _objc_msgSend_99( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_99( + obj, + sel, + opts, + block, + ); + } + + late final __objc_msgSend_99Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateIndexesInRange_options_usingBlock_1 = + _registerName1("enumerateIndexesInRange:options:usingBlock:"); + void _objc_msgSend_100( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_100( + obj, + sel, + range, + opts, + block, + ); + } + + late final __objc_msgSend_100Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, _NSRange, + int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); + int _objc_msgSend_101( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_101( + obj, + sel, + predicate, + ); + } + + late final __objc_msgSend_101Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexWithOptions_passingTest_1 = + _registerName1("indexWithOptions:passingTest:"); + int _objc_msgSend_102( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_102( + obj, + sel, + opts, + predicate, + ); + } + + late final __objc_msgSend_102Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexInRange_options_passingTest_1 = + _registerName1("indexInRange:options:passingTest:"); + int _objc_msgSend_103( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_103( + obj, + sel, + range, + opts, + predicate, + ); + } + + late final __objc_msgSend_103Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, _NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); + ffi.Pointer _objc_msgSend_104( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_104( + obj, + sel, + predicate, + ); + } + + late final __objc_msgSend_104Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexesWithOptions_passingTest_1 = + _registerName1("indexesWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_105( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_105( + obj, + sel, + opts, + predicate, + ); + } + + late final __objc_msgSend_105Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexesInRange_options_passingTest_1 = + _registerName1("indexesInRange:options:passingTest:"); + ffi.Pointer _objc_msgSend_106( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_106( + obj, + sel, + range, + opts, + predicate, + ); + } + + late final __objc_msgSend_106Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateRangesUsingBlock_1 = + _registerName1("enumerateRangesUsingBlock:"); + void _objc_msgSend_107( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_107( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_107Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateRangesWithOptions_usingBlock_1 = + _registerName1("enumerateRangesWithOptions:usingBlock:"); + void _objc_msgSend_108( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_108( + obj, + sel, + opts, + block, + ); + } + + late final __objc_msgSend_108Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateRangesInRange_options_usingBlock_1 = + _registerName1("enumerateRangesInRange:options:usingBlock:"); + void _objc_msgSend_109( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_109( + obj, + sel, + range, + opts, + block, + ); + } + + late final __objc_msgSend_109Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, _NSRange, + int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_objectsAtIndexes_1 = _registerName1("objectsAtIndexes:"); + ffi.Pointer _objc_msgSend_110( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexes, + ) { + return __objc_msgSend_110( + obj, + sel, + indexes, + ); + } + + late final __objc_msgSend_110Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_objectAtIndexedSubscript_1 = + _registerName1("objectAtIndexedSubscript:"); + late final _sel_enumerateObjectsUsingBlock_1 = + _registerName1("enumerateObjectsUsingBlock:"); + void _objc_msgSend_111( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_111( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_111Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateObjectsWithOptions_usingBlock_1 = + _registerName1("enumerateObjectsWithOptions:usingBlock:"); + void _objc_msgSend_112( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_112( + obj, + sel, + opts, + block, + ); + } + + late final __objc_msgSend_112Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateObjectsAtIndexes_options_usingBlock_1 = + _registerName1("enumerateObjectsAtIndexes:options:usingBlock:"); + void _objc_msgSend_113( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_113( + obj, + sel, + s, + opts, + block, + ); + } + + late final __objc_msgSend_113Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexOfObjectPassingTest_1 = + _registerName1("indexOfObjectPassingTest:"); + int _objc_msgSend_114( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_114( + obj, + sel, + predicate, + ); + } + + late final __objc_msgSend_114Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexOfObjectWithOptions_passingTest_1 = + _registerName1("indexOfObjectWithOptions:passingTest:"); + int _objc_msgSend_115( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_115( + obj, + sel, + opts, + predicate, + ); + } + + late final __objc_msgSend_115Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexOfObjectAtIndexes_options_passingTest_1 = + _registerName1("indexOfObjectAtIndexes:options:passingTest:"); + int _objc_msgSend_116( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_116( + obj, + sel, + s, + opts, + predicate, + ); + } + + late final __objc_msgSend_116Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexesOfObjectsPassingTest_1 = + _registerName1("indexesOfObjectsPassingTest:"); + ffi.Pointer _objc_msgSend_117( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_117( + obj, + sel, + predicate, + ); + } + + late final __objc_msgSend_117Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexesOfObjectsWithOptions_passingTest_1 = + _registerName1("indexesOfObjectsWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_118( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_118( + obj, + sel, + opts, + predicate, + ); + } + + late final __objc_msgSend_118Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexesOfObjectsAtIndexes_options_passingTest_1 = + _registerName1("indexesOfObjectsAtIndexes:options:passingTest:"); + ffi.Pointer _objc_msgSend_119( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_119( + obj, + sel, + s, + opts, + predicate, + ); + } + + late final __objc_msgSend_119Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_sortedArrayUsingComparator_1 = + _registerName1("sortedArrayUsingComparator:"); + ffi.Pointer _objc_msgSend_120( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> cmptr, + ) { + return __objc_msgSend_120( + obj, + sel, + cmptr, + ); + } + + late final __objc_msgSend_120Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_sortedArrayWithOptions_usingComparator_1 = + _registerName1("sortedArrayWithOptions:usingComparator:"); + ffi.Pointer _objc_msgSend_121( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> cmptr, + ) { + return __objc_msgSend_121( + obj, + sel, + opts, + cmptr, + ); + } + + late final __objc_msgSend_121Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexOfObject_inSortedRange_options_usingComparator_1 = + _registerName1("indexOfObject:inSortedRange:options:usingComparator:"); + int _objc_msgSend_122( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer obj1, + _NSRange r, + int opts, + ffi.Pointer<_ObjCBlock> cmp, + ) { + return __objc_msgSend_122( + obj, + sel, + obj1, + r, + opts, + cmp, + ); + } + + late final __objc_msgSend_122Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_array1 = _registerName1("array"); + late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); + instancetype _objc_msgSend_123( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ) { + return __objc_msgSend_123( + obj, + sel, + anObject, + ); + } + + late final __objc_msgSend_123Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_arrayWithObjects_count_1 = + _registerName1("arrayWithObjects:count:"); + late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); + late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); + instancetype _objc_msgSend_124( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer array, + ) { + return __objc_msgSend_124( + obj, + sel, + array, + ); + } + + late final __objc_msgSend_124Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); + late final _sel_initWithArray_1 = _registerName1("initWithArray:"); + late final _sel_initWithArray_copyItems_1 = + _registerName1("initWithArray:copyItems:"); + instancetype _objc_msgSend_125( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer array, + bool flag, + ) { + return __objc_msgSend_125( + obj, + sel, + array, + flag, + ); + } + + late final __objc_msgSend_125Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_initWithContentsOfURL_error_1 = + _registerName1("initWithContentsOfURL:error:"); + ffi.Pointer _objc_msgSend_126( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer> error, + ) { + return __objc_msgSend_126( + obj, + sel, + url, + error, + ); + } + + late final __objc_msgSend_126Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_arrayWithContentsOfURL_error_1 = + _registerName1("arrayWithContentsOfURL:error:"); + late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_1 = + _registerName1("differenceFromArray:withOptions:usingEquivalenceTest:"); + ffi.Pointer _objc_msgSend_127( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + int options, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_127( + obj, + sel, + other, + options, + block, + ); + } + + late final __objc_msgSend_127Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_differenceFromArray_withOptions_1 = + _registerName1("differenceFromArray:withOptions:"); + ffi.Pointer _objc_msgSend_128( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + int options, + ) { + return __objc_msgSend_128( + obj, + sel, + other, + options, + ); + } + + late final __objc_msgSend_128Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_differenceFromArray_1 = + _registerName1("differenceFromArray:"); + late final _sel_arrayByApplyingDifference_1 = + _registerName1("arrayByApplyingDifference:"); + ffi.Pointer _objc_msgSend_129( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer difference, + ) { + return __objc_msgSend_129( + obj, + sel, + difference, + ); + } + + late final __objc_msgSend_129Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_getObjects_1 = _registerName1("getObjects:"); + void _objc_msgSend_130( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + ) { + return __objc_msgSend_130( + obj, + sel, + objects, + ); + } + + late final __objc_msgSend_130Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_arrayWithContentsOfFile_1 = + _registerName1("arrayWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_131( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_131( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_131Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_arrayWithContentsOfURL_1 = + _registerName1("arrayWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_132( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_132( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_132Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithContentsOfFile_1 = + _registerName1("initWithContentsOfFile:"); + late final _sel_initWithContentsOfURL_1 = + _registerName1("initWithContentsOfURL:"); + late final _sel_writeToURL_atomically_1 = + _registerName1("writeToURL:atomically:"); + bool _objc_msgSend_133( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + bool atomically, + ) { + return __objc_msgSend_133( + obj, + sel, + url, + atomically, + ); + } + + late final __objc_msgSend_133Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_pathsMatchingExtensions_1 = + _registerName1("pathsMatchingExtensions:"); + late final _sel_valueForKey_1 = _registerName1("valueForKey:"); + late final _sel_setValue_forKey_1 = _registerName1("setValue:forKey:"); + void _objc_msgSend_134( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer key, + ) { + return __objc_msgSend_134( + obj, + sel, + value, + key, + ); + } + + late final __objc_msgSend_134Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_1 = + _registerName1( + "addObserver:toObjectsAtIndexes:forKeyPath:options:context:"); + void _objc_msgSend_135( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer observer, + ffi.Pointer indexes, + ffi.Pointer keyPath, + int options, + ffi.Pointer context, + ) { + return __objc_msgSend_135( + obj, + sel, + observer, + indexes, + keyPath, + options, + context, + ); + } + + late final __objc_msgSend_135Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + + late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_1 = + _registerName1("removeObserver:fromObjectsAtIndexes:forKeyPath:context:"); + void _objc_msgSend_136( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer observer, + ffi.Pointer indexes, + ffi.Pointer keyPath, + ffi.Pointer context, + ) { + return __objc_msgSend_136( + obj, + sel, + observer, + indexes, + keyPath, + context, + ); + } + + late final __objc_msgSend_136Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_1 = + _registerName1("removeObserver:fromObjectsAtIndexes:forKeyPath:"); + void _objc_msgSend_137( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer observer, + ffi.Pointer indexes, + ffi.Pointer keyPath, + ) { + return __objc_msgSend_137( + obj, + sel, + observer, + indexes, + keyPath, + ); + } + + late final __objc_msgSend_137Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_addObserver_forKeyPath_options_context_1 = + _registerName1("addObserver:forKeyPath:options:context:"); + void _objc_msgSend_138( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer observer, + ffi.Pointer keyPath, + int options, + ffi.Pointer context, + ) { + return __objc_msgSend_138( + obj, + sel, + observer, + keyPath, + options, + context, + ); + } + + late final __objc_msgSend_138Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + + late final _sel_removeObserver_forKeyPath_context_1 = + _registerName1("removeObserver:forKeyPath:context:"); + void _objc_msgSend_139( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer observer, + ffi.Pointer keyPath, + ffi.Pointer context, + ) { + return __objc_msgSend_139( + obj, + sel, + observer, + keyPath, + context, + ); + } + + late final __objc_msgSend_139Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeObserver_forKeyPath_1 = + _registerName1("removeObserver:forKeyPath:"); + void _objc_msgSend_140( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer observer, + ffi.Pointer keyPath, + ) { + return __objc_msgSend_140( + obj, + sel, + observer, + keyPath, + ); + } + + late final __objc_msgSend_140Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_sortedArrayUsingDescriptors_1 = + _registerName1("sortedArrayUsingDescriptors:"); + late final _class_NSPredicate1 = _getClass1("NSPredicate"); + late final _sel_predicateWithFormat_argumentArray_1 = + _registerName1("predicateWithFormat:argumentArray:"); + ffi.Pointer _objc_msgSend_141( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer predicateFormat, + ffi.Pointer arguments, + ) { + return __objc_msgSend_141( + obj, + sel, + predicateFormat, + arguments, + ); + } + + late final __objc_msgSend_141Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_predicateWithFormat_1 = + _registerName1("predicateWithFormat:"); + ffi.Pointer _objc_msgSend_142( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer predicateFormat, + ) { + return __objc_msgSend_142( + obj, + sel, + predicateFormat, + ); + } + + late final __objc_msgSend_142Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_predicateWithFormat_arguments_1 = + _registerName1("predicateWithFormat:arguments:"); + ffi.Pointer _objc_msgSend_143( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer predicateFormat, + ffi.Pointer argList, + ) { + return __objc_msgSend_143( + obj, + sel, + predicateFormat, + argList, + ); + } + + late final __objc_msgSend_143Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_predicateFromMetadataQueryString_1 = + _registerName1("predicateFromMetadataQueryString:"); + ffi.Pointer _objc_msgSend_144( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer queryString, + ) { + return __objc_msgSend_144( + obj, + sel, + queryString, + ); + } + + late final __objc_msgSend_144Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_predicateWithValue_1 = _registerName1("predicateWithValue:"); + ffi.Pointer _objc_msgSend_145( + ffi.Pointer obj, + ffi.Pointer sel, + bool value, + ) { + return __objc_msgSend_145( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_145Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_145 = __objc_msgSend_145Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _class_NSDictionary1 = _getClass1("NSDictionary"); + late final _sel_objectForKey_1 = _registerName1("objectForKey:"); + late final _sel_keyEnumerator1 = _registerName1("keyEnumerator"); + late final _sel_initWithObjects_forKeys_count_1 = + _registerName1("initWithObjects:forKeys:count:"); + instancetype _objc_msgSend_146( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt, + ) { + return __objc_msgSend_146( + obj, + sel, + objects, + keys, + cnt, + ); + } + + late final __objc_msgSend_146Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); + + late final _sel_allKeys1 = _registerName1("allKeys"); + late final _sel_allKeysForObject_1 = _registerName1("allKeysForObject:"); + late final _sel_allValues1 = _registerName1("allValues"); + late final _sel_descriptionInStringsFileFormat1 = + _registerName1("descriptionInStringsFileFormat"); + late final _sel_isEqualToDictionary_1 = + _registerName1("isEqualToDictionary:"); + bool _objc_msgSend_147( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDictionary, + ) { + return __objc_msgSend_147( + obj, + sel, + otherDictionary, + ); + } + + late final __objc_msgSend_147Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_objectsForKeys_notFoundMarker_1 = + _registerName1("objectsForKeys:notFoundMarker:"); + ffi.Pointer _objc_msgSend_148( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer marker, + ) { + return __objc_msgSend_148( + obj, + sel, + keys, + marker, + ); + } + + late final __objc_msgSend_148Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_keysSortedByValueUsingSelector_1 = + _registerName1("keysSortedByValueUsingSelector:"); + late final _sel_getObjects_andKeys_count_1 = + _registerName1("getObjects:andKeys:count:"); + void _objc_msgSend_149( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + ffi.Pointer> keys, + int count, + ) { + return __objc_msgSend_149( + obj, + sel, + objects, + keys, + count, + ); + } + + late final __objc_msgSend_149Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); + + late final _sel_objectForKeyedSubscript_1 = + _registerName1("objectForKeyedSubscript:"); + late final _sel_enumerateKeysAndObjectsUsingBlock_1 = + _registerName1("enumerateKeysAndObjectsUsingBlock:"); + void _objc_msgSend_150( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_150( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_150Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_1 = + _registerName1("enumerateKeysAndObjectsWithOptions:usingBlock:"); + void _objc_msgSend_151( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_151( + obj, + sel, + opts, + block, + ); + } + + late final __objc_msgSend_151Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_keysSortedByValueUsingComparator_1 = + _registerName1("keysSortedByValueUsingComparator:"); + late final _sel_keysSortedByValueWithOptions_usingComparator_1 = + _registerName1("keysSortedByValueWithOptions:usingComparator:"); + late final _sel_keysOfEntriesPassingTest_1 = + _registerName1("keysOfEntriesPassingTest:"); + ffi.Pointer _objc_msgSend_152( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_152( + obj, + sel, + predicate, + ); + } + + late final __objc_msgSend_152Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_keysOfEntriesWithOptions_passingTest_1 = + _registerName1("keysOfEntriesWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_153( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_153( + obj, + sel, + opts, + predicate, + ); + } + + late final __objc_msgSend_153Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_153 = __objc_msgSend_153Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); + void _objc_msgSend_154( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + ffi.Pointer> keys, + ) { + return __objc_msgSend_154( + obj, + sel, + objects, + keys, + ); + } + + late final __objc_msgSend_154Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _sel_dictionaryWithContentsOfFile_1 = + _registerName1("dictionaryWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_155( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_155( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_155Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dictionaryWithContentsOfURL_1 = + _registerName1("dictionaryWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_156( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_156( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_156Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_156 = __objc_msgSend_156Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dictionary1 = _registerName1("dictionary"); + late final _sel_dictionaryWithObject_forKey_1 = + _registerName1("dictionaryWithObject:forKey:"); + instancetype _objc_msgSend_157( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + ffi.Pointer key, + ) { + return __objc_msgSend_157( + obj, + sel, + object, + key, + ); + } + + late final __objc_msgSend_157Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dictionaryWithObjects_forKeys_count_1 = + _registerName1("dictionaryWithObjects:forKeys:count:"); + late final _sel_dictionaryWithObjectsAndKeys_1 = + _registerName1("dictionaryWithObjectsAndKeys:"); + late final _sel_dictionaryWithDictionary_1 = + _registerName1("dictionaryWithDictionary:"); + instancetype _objc_msgSend_158( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dict, + ) { + return __objc_msgSend_158( + obj, + sel, + dict, + ); + } + + late final __objc_msgSend_158Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_dictionaryWithObjects_forKeys_1 = + _registerName1("dictionaryWithObjects:forKeys:"); + instancetype _objc_msgSend_159( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer objects, + ffi.Pointer keys, + ) { + return __objc_msgSend_159( + obj, + sel, + objects, + keys, + ); + } + + late final __objc_msgSend_159Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithObjectsAndKeys_1 = + _registerName1("initWithObjectsAndKeys:"); + late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); + late final _sel_initWithDictionary_copyItems_1 = + _registerName1("initWithDictionary:copyItems:"); + instancetype _objc_msgSend_160( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDictionary, + bool flag, + ) { + return __objc_msgSend_160( + obj, + sel, + otherDictionary, + flag, + ); + } + + late final __objc_msgSend_160Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_initWithObjects_forKeys_1 = + _registerName1("initWithObjects:forKeys:"); + ffi.Pointer _objc_msgSend_161( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer> error, + ) { + return __objc_msgSend_161( + obj, + sel, + url, + error, + ); + } + + late final __objc_msgSend_161Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_dictionaryWithContentsOfURL_error_1 = + _registerName1("dictionaryWithContentsOfURL:error:"); + late final _sel_sharedKeySetForKeys_1 = + _registerName1("sharedKeySetForKeys:"); + late final _sel_countByEnumeratingWithState_objects_count_1 = + _registerName1("countByEnumeratingWithState:objects:count:"); + int _objc_msgSend_162( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer state, + ffi.Pointer> buffer, + int len, + ) { + return __objc_msgSend_162( + obj, + sel, + state, + buffer, + len, + ); + } + + late final __objc_msgSend_162Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_162 = __objc_msgSend_162Ptr.asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); + + late final _sel_fileSize1 = _registerName1("fileSize"); + int _objc_msgSend_163( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_163( + obj, + sel, + ); + } + + late final __objc_msgSend_163Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLongLong Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSDate1 = _getClass1("NSDate"); + late final _sel_timeIntervalSinceReferenceDate1 = + _registerName1("timeIntervalSinceReferenceDate"); + double _objc_msgSend_164( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_164( + obj, + sel, + ); + } + + late final __objc_msgSend_164Ptr = _lookup< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); + + double _objc_msgSend_164_fpret( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_164_fpret( + obj, + sel, + ); + } + + late final __objc_msgSend_164_fpretPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_164_fpret = __objc_msgSend_164_fpretPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithTimeIntervalSinceReferenceDate_1 = + _registerName1("initWithTimeIntervalSinceReferenceDate:"); + instancetype _objc_msgSend_165( + ffi.Pointer obj, + ffi.Pointer sel, + double ti, + ) { + return __objc_msgSend_165( + obj, + sel, + ti, + ); + } + + late final __objc_msgSend_165Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_timeIntervalSinceDate_1 = + _registerName1("timeIntervalSinceDate:"); + double _objc_msgSend_166( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, + ) { + return __objc_msgSend_166( + obj, + sel, + anotherDate, + ); + } + + late final __objc_msgSend_166Ptr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + double _objc_msgSend_166_fpret( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, + ) { + return __objc_msgSend_166_fpret( + obj, + sel, + anotherDate, + ); + } + + late final __objc_msgSend_166_fpretPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_166_fpret = __objc_msgSend_166_fpretPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_timeIntervalSinceNow1 = + _registerName1("timeIntervalSinceNow"); + late final _sel_timeIntervalSince19701 = + _registerName1("timeIntervalSince1970"); + late final _sel_addTimeInterval_1 = _registerName1("addTimeInterval:"); + late final _sel_dateByAddingTimeInterval_1 = + _registerName1("dateByAddingTimeInterval:"); + late final _sel_earlierDate_1 = _registerName1("earlierDate:"); + ffi.Pointer _objc_msgSend_167( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, + ) { + return __objc_msgSend_167( + obj, + sel, + anotherDate, + ); + } + + late final __objc_msgSend_167Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_laterDate_1 = _registerName1("laterDate:"); + late final _sel_compare_1 = _registerName1("compare:"); + int _objc_msgSend_168( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + ) { + return __objc_msgSend_168( + obj, + sel, + other, + ); + } + + late final __objc_msgSend_168Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); + bool _objc_msgSend_169( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDate, + ) { + return __objc_msgSend_169( + obj, + sel, + otherDate, + ); + } + + late final __objc_msgSend_169Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_date1 = _registerName1("date"); + late final _sel_dateWithTimeIntervalSinceNow_1 = + _registerName1("dateWithTimeIntervalSinceNow:"); + late final _sel_dateWithTimeIntervalSinceReferenceDate_1 = + _registerName1("dateWithTimeIntervalSinceReferenceDate:"); + late final _sel_dateWithTimeIntervalSince1970_1 = + _registerName1("dateWithTimeIntervalSince1970:"); + late final _sel_dateWithTimeInterval_sinceDate_1 = + _registerName1("dateWithTimeInterval:sinceDate:"); + instancetype _objc_msgSend_170( + ffi.Pointer obj, + ffi.Pointer sel, + double secsToBeAdded, + ffi.Pointer date, + ) { + return __objc_msgSend_170( + obj, + sel, + secsToBeAdded, + date, + ); + } + + late final __objc_msgSend_170Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Double, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + double, ffi.Pointer)>(); + + late final _sel_distantFuture1 = _registerName1("distantFuture"); + ffi.Pointer _objc_msgSend_171( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_171( + obj, + sel, + ); + } + + late final __objc_msgSend_171Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_distantPast1 = _registerName1("distantPast"); + late final _sel_now1 = _registerName1("now"); + late final _sel_initWithTimeIntervalSinceNow_1 = + _registerName1("initWithTimeIntervalSinceNow:"); + late final _sel_initWithTimeIntervalSince1970_1 = + _registerName1("initWithTimeIntervalSince1970:"); + late final _sel_initWithTimeInterval_sinceDate_1 = + _registerName1("initWithTimeInterval:sinceDate:"); + late final _sel_dateWithNaturalLanguageString_locale_1 = + _registerName1("dateWithNaturalLanguageString:locale:"); + ffi.Pointer _objc_msgSend_172( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + ffi.Pointer locale, + ) { + return __objc_msgSend_172( + obj, + sel, + string, + locale, + ); + } + + late final __objc_msgSend_172Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_dateWithNaturalLanguageString_1 = + _registerName1("dateWithNaturalLanguageString:"); + late final _sel_dateWithString_1 = _registerName1("dateWithString:"); + late final _class_NSCalendarDate1 = _getClass1("NSCalendarDate"); + late final _sel_calendarDate1 = _registerName1("calendarDate"); + late final _sel_dateWithString_calendarFormat_locale_1 = + _registerName1("dateWithString:calendarFormat:locale:"); + ffi.Pointer _objc_msgSend_173( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer description, + ffi.Pointer format, + ffi.Pointer locale, + ) { + return __objc_msgSend_173( + obj, + sel, + description, + format, + locale, + ); + } + + late final __objc_msgSend_173Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_dateWithString_calendarFormat_1 = + _registerName1("dateWithString:calendarFormat:"); + ffi.Pointer _objc_msgSend_174( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer description, + ffi.Pointer format, + ) { + return __objc_msgSend_174( + obj, + sel, + description, + format, + ); + } + + late final __objc_msgSend_174Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSTimeZone1 = _getClass1("NSTimeZone"); + late final _sel_name1 = _registerName1("name"); + late final _sel_data1 = _registerName1("data"); + late final _sel_secondsFromGMTForDate_1 = + _registerName1("secondsFromGMTForDate:"); + int _objc_msgSend_175( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aDate, + ) { + return __objc_msgSend_175( + obj, + sel, + aDate, + ); + } + + late final __objc_msgSend_175Ptr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_abbreviationForDate_1 = + _registerName1("abbreviationForDate:"); + ffi.Pointer _objc_msgSend_176( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aDate, + ) { + return __objc_msgSend_176( + obj, + sel, + aDate, + ); + } + + late final __objc_msgSend_176Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_isDaylightSavingTimeForDate_1 = + _registerName1("isDaylightSavingTimeForDate:"); + late final _sel_daylightSavingTimeOffsetForDate_1 = + _registerName1("daylightSavingTimeOffsetForDate:"); + late final _sel_nextDaylightSavingTimeTransitionAfterDate_1 = + _registerName1("nextDaylightSavingTimeTransitionAfterDate:"); + ffi.Pointer _objc_msgSend_177( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aDate, + ) { + return __objc_msgSend_177( + obj, + sel, + aDate, + ); + } + + late final __objc_msgSend_177Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_177 = __objc_msgSend_177Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_systemTimeZone1 = _registerName1("systemTimeZone"); + ffi.Pointer _objc_msgSend_178( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_178( + obj, + sel, + ); + } + + late final __objc_msgSend_178Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_resetSystemTimeZone1 = _registerName1("resetSystemTimeZone"); + late final _sel_defaultTimeZone1 = _registerName1("defaultTimeZone"); + late final _sel_setDefaultTimeZone_1 = _registerName1("setDefaultTimeZone:"); + void _objc_msgSend_179( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_179( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_179Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_localTimeZone1 = _registerName1("localTimeZone"); + late final _sel_knownTimeZoneNames1 = _registerName1("knownTimeZoneNames"); + late final _sel_abbreviationDictionary1 = + _registerName1("abbreviationDictionary"); + ffi.Pointer _objc_msgSend_180( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_180( + obj, + sel, + ); + } + + late final __objc_msgSend_180Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setAbbreviationDictionary_1 = + _registerName1("setAbbreviationDictionary:"); + void _objc_msgSend_181( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_181( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_181Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_timeZoneDataVersion1 = _registerName1("timeZoneDataVersion"); + late final _sel_secondsFromGMT1 = _registerName1("secondsFromGMT"); + late final _sel_abbreviation1 = _registerName1("abbreviation"); + late final _sel_isDaylightSavingTime1 = + _registerName1("isDaylightSavingTime"); + late final _sel_daylightSavingTimeOffset1 = + _registerName1("daylightSavingTimeOffset"); + late final _sel_nextDaylightSavingTimeTransition1 = + _registerName1("nextDaylightSavingTimeTransition"); + ffi.Pointer _objc_msgSend_182( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_182( + obj, + sel, + ); + } + + late final __objc_msgSend_182Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_isEqualToTimeZone_1 = _registerName1("isEqualToTimeZone:"); + bool _objc_msgSend_183( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aTimeZone, + ) { + return __objc_msgSend_183( + obj, + sel, + aTimeZone, + ); + } + + late final __objc_msgSend_183Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSLocale1 = _getClass1("NSLocale"); + late final _sel_displayNameForKey_value_1 = + _registerName1("displayNameForKey:value:"); + ffi.Pointer _objc_msgSend_184( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ffi.Pointer value, + ) { + return __objc_msgSend_184( + obj, + sel, + key, + value, + ); + } + + late final __objc_msgSend_184Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithLocaleIdentifier_1 = + _registerName1("initWithLocaleIdentifier:"); + late final _sel_localeIdentifier1 = _registerName1("localeIdentifier"); + late final _sel_localizedStringForLocaleIdentifier_1 = + _registerName1("localizedStringForLocaleIdentifier:"); + late final _sel_languageCode1 = _registerName1("languageCode"); + late final _sel_localizedStringForLanguageCode_1 = + _registerName1("localizedStringForLanguageCode:"); + ffi.Pointer _objc_msgSend_185( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer languageCode, + ) { + return __objc_msgSend_185( + obj, + sel, + languageCode, + ); + } + + late final __objc_msgSend_185Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_countryCode1 = _registerName1("countryCode"); + late final _sel_localizedStringForCountryCode_1 = + _registerName1("localizedStringForCountryCode:"); + late final _sel_scriptCode1 = _registerName1("scriptCode"); + late final _sel_localizedStringForScriptCode_1 = + _registerName1("localizedStringForScriptCode:"); + late final _sel_variantCode1 = _registerName1("variantCode"); + late final _sel_localizedStringForVariantCode_1 = + _registerName1("localizedStringForVariantCode:"); + late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); + late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); + ffi.Pointer _objc_msgSend_186( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_186( + obj, + sel, + ); + } + + late final __objc_msgSend_186Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_whitespaceCharacterSet1 = + _registerName1("whitespaceCharacterSet"); + late final _sel_whitespaceAndNewlineCharacterSet1 = + _registerName1("whitespaceAndNewlineCharacterSet"); + late final _sel_decimalDigitCharacterSet1 = + _registerName1("decimalDigitCharacterSet"); + late final _sel_letterCharacterSet1 = _registerName1("letterCharacterSet"); + late final _sel_lowercaseLetterCharacterSet1 = + _registerName1("lowercaseLetterCharacterSet"); + late final _sel_uppercaseLetterCharacterSet1 = + _registerName1("uppercaseLetterCharacterSet"); + late final _sel_nonBaseCharacterSet1 = _registerName1("nonBaseCharacterSet"); + late final _sel_alphanumericCharacterSet1 = + _registerName1("alphanumericCharacterSet"); + late final _sel_decomposableCharacterSet1 = + _registerName1("decomposableCharacterSet"); + late final _sel_illegalCharacterSet1 = _registerName1("illegalCharacterSet"); + late final _sel_punctuationCharacterSet1 = + _registerName1("punctuationCharacterSet"); + late final _sel_capitalizedLetterCharacterSet1 = + _registerName1("capitalizedLetterCharacterSet"); + late final _sel_symbolCharacterSet1 = _registerName1("symbolCharacterSet"); + late final _sel_newlineCharacterSet1 = _registerName1("newlineCharacterSet"); + late final _sel_characterSetWithRange_1 = + _registerName1("characterSetWithRange:"); + ffi.Pointer _objc_msgSend_187( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange aRange, + ) { + return __objc_msgSend_187( + obj, + sel, + aRange, + ); + } + + late final __objc_msgSend_187Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, _NSRange)>(); + + late final _sel_characterSetWithCharactersInString_1 = + _registerName1("characterSetWithCharactersInString:"); + ffi.Pointer _objc_msgSend_188( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, + ) { + return __objc_msgSend_188( + obj, + sel, + aString, + ); + } + + late final __objc_msgSend_188Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_characterSetWithBitmapRepresentation_1 = + _registerName1("characterSetWithBitmapRepresentation:"); + ffi.Pointer _objc_msgSend_189( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_189( + obj, + sel, + data, + ); + } + + late final __objc_msgSend_189Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_characterSetWithContentsOfFile_1 = + _registerName1("characterSetWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_190( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer fName, + ) { + return __objc_msgSend_190( + obj, + sel, + fName, + ); + } + + late final __objc_msgSend_190Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + instancetype _objc_msgSend_191( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer coder, + ) { + return __objc_msgSend_191( + obj, + sel, + coder, + ); + } + + late final __objc_msgSend_191Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); + bool _objc_msgSend_192( + ffi.Pointer obj, + ffi.Pointer sel, + int aCharacter, + ) { + return __objc_msgSend_192( + obj, + sel, + aCharacter, + ); + } + + late final __objc_msgSend_192Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedShort)>>('objc_msgSend'); + late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_bitmapRepresentation1 = + _registerName1("bitmapRepresentation"); + late final _sel_invertedSet1 = _registerName1("invertedSet"); + late final _sel_longCharacterIsMember_1 = + _registerName1("longCharacterIsMember:"); + bool _objc_msgSend_193( + ffi.Pointer obj, + ffi.Pointer sel, + int theLongChar, + ) { + return __objc_msgSend_193( + obj, + sel, + theLongChar, + ); + } + + late final __objc_msgSend_193Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedInt)>>('objc_msgSend'); + late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); + bool _objc_msgSend_194( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer theOtherSet, + ) { + return __objc_msgSend_194( + obj, + sel, + theOtherSet, + ); + } + + late final __objc_msgSend_194Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); + bool _objc_msgSend_195( + ffi.Pointer obj, + ffi.Pointer sel, + int thePlane, + ) { + return __objc_msgSend_195( + obj, + sel, + thePlane, + ); + } + + late final __objc_msgSend_195Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Uint8)>>('objc_msgSend'); + late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_URLUserAllowedCharacterSet1 = + _registerName1("URLUserAllowedCharacterSet"); + late final _sel_URLPasswordAllowedCharacterSet1 = + _registerName1("URLPasswordAllowedCharacterSet"); + late final _sel_URLHostAllowedCharacterSet1 = + _registerName1("URLHostAllowedCharacterSet"); + late final _sel_URLPathAllowedCharacterSet1 = + _registerName1("URLPathAllowedCharacterSet"); + late final _sel_URLQueryAllowedCharacterSet1 = + _registerName1("URLQueryAllowedCharacterSet"); + late final _sel_URLFragmentAllowedCharacterSet1 = + _registerName1("URLFragmentAllowedCharacterSet"); + late final _sel_exemplarCharacterSet1 = + _registerName1("exemplarCharacterSet"); + late final _sel_calendarIdentifier1 = _registerName1("calendarIdentifier"); + late final _sel_localizedStringForCalendarIdentifier_1 = + _registerName1("localizedStringForCalendarIdentifier:"); + late final _sel_collationIdentifier1 = _registerName1("collationIdentifier"); + late final _sel_localizedStringForCollationIdentifier_1 = + _registerName1("localizedStringForCollationIdentifier:"); + late final _sel_usesMetricSystem1 = _registerName1("usesMetricSystem"); + late final _sel_decimalSeparator1 = _registerName1("decimalSeparator"); + late final _sel_groupingSeparator1 = _registerName1("groupingSeparator"); + late final _sel_currencySymbol1 = _registerName1("currencySymbol"); + late final _sel_currencyCode1 = _registerName1("currencyCode"); + late final _sel_localizedStringForCurrencyCode_1 = + _registerName1("localizedStringForCurrencyCode:"); + late final _sel_collatorIdentifier1 = _registerName1("collatorIdentifier"); + late final _sel_localizedStringForCollatorIdentifier_1 = + _registerName1("localizedStringForCollatorIdentifier:"); + late final _sel_quotationBeginDelimiter1 = + _registerName1("quotationBeginDelimiter"); + late final _sel_quotationEndDelimiter1 = + _registerName1("quotationEndDelimiter"); + late final _sel_alternateQuotationBeginDelimiter1 = + _registerName1("alternateQuotationBeginDelimiter"); + late final _sel_alternateQuotationEndDelimiter1 = + _registerName1("alternateQuotationEndDelimiter"); + late final _sel_autoupdatingCurrentLocale1 = + _registerName1("autoupdatingCurrentLocale"); + ffi.Pointer _objc_msgSend_196( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_196( + obj, + sel, + ); + } + + late final __objc_msgSend_196Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_currentLocale1 = _registerName1("currentLocale"); + late final _sel_systemLocale1 = _registerName1("systemLocale"); + late final _sel_localeWithLocaleIdentifier_1 = + _registerName1("localeWithLocaleIdentifier:"); + late final _sel_availableLocaleIdentifiers1 = + _registerName1("availableLocaleIdentifiers"); + late final _sel_ISOLanguageCodes1 = _registerName1("ISOLanguageCodes"); + late final _sel_ISOCountryCodes1 = _registerName1("ISOCountryCodes"); + late final _sel_ISOCurrencyCodes1 = _registerName1("ISOCurrencyCodes"); + late final _sel_commonISOCurrencyCodes1 = + _registerName1("commonISOCurrencyCodes"); + late final _sel_preferredLanguages1 = _registerName1("preferredLanguages"); + late final _sel_componentsFromLocaleIdentifier_1 = + _registerName1("componentsFromLocaleIdentifier:"); + ffi.Pointer _objc_msgSend_197( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + ) { + return __objc_msgSend_197( + obj, + sel, + string, + ); + } + + late final __objc_msgSend_197Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_localeIdentifierFromComponents_1 = + _registerName1("localeIdentifierFromComponents:"); + ffi.Pointer _objc_msgSend_198( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dict, + ) { + return __objc_msgSend_198( + obj, + sel, + dict, + ); + } + + late final __objc_msgSend_198Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_canonicalLocaleIdentifierFromString_1 = + _registerName1("canonicalLocaleIdentifierFromString:"); + late final _sel_canonicalLanguageIdentifierFromString_1 = + _registerName1("canonicalLanguageIdentifierFromString:"); + late final _sel_localeIdentifierFromWindowsLocaleCode_1 = + _registerName1("localeIdentifierFromWindowsLocaleCode:"); + ffi.Pointer _objc_msgSend_199( + ffi.Pointer obj, + ffi.Pointer sel, + int lcid, + ) { + return __objc_msgSend_199( + obj, + sel, + lcid, + ); + } + + late final __objc_msgSend_199Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Uint32)>>('objc_msgSend'); + late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_windowsLocaleCodeFromLocaleIdentifier_1 = + _registerName1("windowsLocaleCodeFromLocaleIdentifier:"); + int _objc_msgSend_200( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer localeIdentifier, + ) { + return __objc_msgSend_200( + obj, + sel, + localeIdentifier, + ); + } + + late final __objc_msgSend_200Ptr = _lookup< + ffi.NativeFunction< + ffi.Uint32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_characterDirectionForLanguage_1 = + _registerName1("characterDirectionForLanguage:"); + int _objc_msgSend_201( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer isoLangCode, + ) { + return __objc_msgSend_201( + obj, + sel, + isoLangCode, + ); + } + + late final __objc_msgSend_201Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_lineDirectionForLanguage_1 = + _registerName1("lineDirectionForLanguage:"); + late final _sel_localizedName_locale_1 = + _registerName1("localizedName:locale:"); + ffi.Pointer _objc_msgSend_202( + ffi.Pointer obj, + ffi.Pointer sel, + int style, + ffi.Pointer locale, + ) { + return __objc_msgSend_202( + obj, + sel, + style, + locale, + ); + } + + late final __objc_msgSend_202Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); + + late final _sel_timeZoneWithName_1 = _registerName1("timeZoneWithName:"); + late final _sel_timeZoneWithName_data_1 = + _registerName1("timeZoneWithName:data:"); + instancetype _objc_msgSend_203( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer tzName, + ffi.Pointer aData, + ) { + return __objc_msgSend_203( + obj, + sel, + tzName, + aData, + ); + } + + late final __objc_msgSend_203Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithName_1 = _registerName1("initWithName:"); + late final _sel_initWithName_data_1 = _registerName1("initWithName:data:"); + late final _sel_timeZoneForSecondsFromGMT_1 = + _registerName1("timeZoneForSecondsFromGMT:"); + instancetype _objc_msgSend_204( + ffi.Pointer obj, + ffi.Pointer sel, + int seconds, + ) { + return __objc_msgSend_204( + obj, + sel, + seconds, + ); + } + + late final __objc_msgSend_204Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_timeZoneWithAbbreviation_1 = + _registerName1("timeZoneWithAbbreviation:"); + late final _sel_dateWithYear_month_day_hour_minute_second_timeZone_1 = + _registerName1("dateWithYear:month:day:hour:minute:second:timeZone:"); + ffi.Pointer _objc_msgSend_205( + ffi.Pointer obj, + ffi.Pointer sel, + int year, + int month, + int day, + int hour, + int minute, + int second, + ffi.Pointer aTimeZone, + ) { + return __objc_msgSend_205( + obj, + sel, + year, + month, + day, + hour, + minute, + second, + aTimeZone, + ); + } + + late final __objc_msgSend_205Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + int, + int, + int, + ffi.Pointer)>(); + + late final _sel_dateByAddingYears_months_days_hours_minutes_seconds_1 = + _registerName1("dateByAddingYears:months:days:hours:minutes:seconds:"); + ffi.Pointer _objc_msgSend_206( + ffi.Pointer obj, + ffi.Pointer sel, + int year, + int month, + int day, + int hour, + int minute, + int second, + ) { + return __objc_msgSend_206( + obj, + sel, + year, + month, + day, + hour, + minute, + second, + ); + } + + late final __objc_msgSend_206Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, int, int, int, int, int)>(); + + late final _sel_dayOfCommonEra1 = _registerName1("dayOfCommonEra"); + late final _sel_dayOfMonth1 = _registerName1("dayOfMonth"); + late final _sel_dayOfWeek1 = _registerName1("dayOfWeek"); + late final _sel_dayOfYear1 = _registerName1("dayOfYear"); + late final _sel_hourOfDay1 = _registerName1("hourOfDay"); + late final _sel_minuteOfHour1 = _registerName1("minuteOfHour"); + late final _sel_monthOfYear1 = _registerName1("monthOfYear"); + late final _sel_secondOfMinute1 = _registerName1("secondOfMinute"); + late final _sel_yearOfCommonEra1 = _registerName1("yearOfCommonEra"); + late final _sel_calendarFormat1 = _registerName1("calendarFormat"); + late final _sel_descriptionWithCalendarFormat_locale_1 = + _registerName1("descriptionWithCalendarFormat:locale:"); + ffi.Pointer _objc_msgSend_207( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer locale, + ) { + return __objc_msgSend_207( + obj, + sel, + format, + locale, + ); + } + + late final __objc_msgSend_207Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_descriptionWithCalendarFormat_1 = + _registerName1("descriptionWithCalendarFormat:"); + late final _sel_timeZone1 = _registerName1("timeZone"); + late final _sel_initWithString_calendarFormat_locale_1 = + _registerName1("initWithString:calendarFormat:locale:"); + late final _sel_initWithString_calendarFormat_1 = + _registerName1("initWithString:calendarFormat:"); + late final _sel_initWithYear_month_day_hour_minute_second_timeZone_1 = + _registerName1("initWithYear:month:day:hour:minute:second:timeZone:"); + late final _sel_setCalendarFormat_1 = _registerName1("setCalendarFormat:"); + void _objc_msgSend_208( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + ) { + return __objc_msgSend_208( + obj, + sel, + format, + ); + } + + late final __objc_msgSend_208Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setTimeZone_1 = _registerName1("setTimeZone:"); + void _objc_msgSend_209( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aTimeZone, + ) { + return __objc_msgSend_209( + obj, + sel, + aTimeZone, + ); + } + + late final __objc_msgSend_209Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_years_months_days_hours_minutes_seconds_sinceDate_1 = + _registerName1("years:months:days:hours:minutes:seconds:sinceDate:"); + void _objc_msgSend_210( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer yp, + ffi.Pointer mop, + ffi.Pointer dp, + ffi.Pointer hp, + ffi.Pointer mip, + ffi.Pointer sp, + ffi.Pointer date, + ) { + return __objc_msgSend_210( + obj, + sel, + yp, + mop, + dp, + hp, + mip, + sp, + date, + ); + } + + late final __objc_msgSend_210Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_dateWithCalendarFormat_timeZone_1 = + _registerName1("dateWithCalendarFormat:timeZone:"); + ffi.Pointer _objc_msgSend_211( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer aTimeZone, + ) { + return __objc_msgSend_211( + obj, + sel, + format, + aTimeZone, + ); + } + + late final __objc_msgSend_211Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_descriptionWithCalendarFormat_timeZone_locale_1 = + _registerName1("descriptionWithCalendarFormat:timeZone:locale:"); + ffi.Pointer _objc_msgSend_212( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer aTimeZone, + ffi.Pointer locale, + ) { + return __objc_msgSend_212( + obj, + sel, + format, + aTimeZone, + locale, + ); + } + + late final __objc_msgSend_212Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_fileModificationDate1 = + _registerName1("fileModificationDate"); + late final _sel_fileType1 = _registerName1("fileType"); + late final _sel_filePosixPermissions1 = + _registerName1("filePosixPermissions"); + late final _sel_fileOwnerAccountName1 = + _registerName1("fileOwnerAccountName"); + late final _sel_fileGroupOwnerAccountName1 = + _registerName1("fileGroupOwnerAccountName"); + late final _sel_fileSystemNumber1 = _registerName1("fileSystemNumber"); + late final _sel_fileSystemFileNumber1 = + _registerName1("fileSystemFileNumber"); + late final _sel_fileExtensionHidden1 = _registerName1("fileExtensionHidden"); + late final _sel_fileHFSCreatorCode1 = _registerName1("fileHFSCreatorCode"); + int _objc_msgSend_213( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_213( + obj, + sel, + ); + } + + late final __objc_msgSend_213Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_fileHFSTypeCode1 = _registerName1("fileHFSTypeCode"); + late final _sel_fileIsImmutable1 = _registerName1("fileIsImmutable"); + late final _sel_fileIsAppendOnly1 = _registerName1("fileIsAppendOnly"); + late final _sel_fileCreationDate1 = _registerName1("fileCreationDate"); + late final _sel_fileOwnerAccountID1 = _registerName1("fileOwnerAccountID"); + ffi.Pointer _objc_msgSend_214( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_214( + obj, + sel, + ); + } + + late final __objc_msgSend_214Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_fileGroupOwnerAccountID1 = + _registerName1("fileGroupOwnerAccountID"); + late final _sel_predicateWithBlock_1 = _registerName1("predicateWithBlock:"); + ffi.Pointer _objc_msgSend_215( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_215( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_215Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_predicateFormat1 = _registerName1("predicateFormat"); + late final _sel_predicateWithSubstitutionVariables_1 = + _registerName1("predicateWithSubstitutionVariables:"); + late final _sel_evaluateWithObject_1 = _registerName1("evaluateWithObject:"); + bool _objc_msgSend_216( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + ) { + return __objc_msgSend_216( + obj, + sel, + object, + ); + } + + late final __objc_msgSend_216Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_evaluateWithObject_substitutionVariables_1 = + _registerName1("evaluateWithObject:substitutionVariables:"); + bool _objc_msgSend_217( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + ffi.Pointer bindings, + ) { + return __objc_msgSend_217( + obj, + sel, + object, + bindings, + ); + } + + late final __objc_msgSend_217Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_allowEvaluation1 = _registerName1("allowEvaluation"); + late final _sel_filteredArrayUsingPredicate_1 = + _registerName1("filteredArrayUsingPredicate:"); + ffi.Pointer _objc_msgSend_218( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer predicate, + ) { + return __objc_msgSend_218( + obj, + sel, + predicate, + ); + } + + late final __objc_msgSend_218Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithChar_1 = _registerName1("initWithChar:"); + ffi.Pointer _objc_msgSend_219( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_219( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_219Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Char)>>('objc_msgSend'); + late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithUnsignedChar_1 = + _registerName1("initWithUnsignedChar:"); + ffi.Pointer _objc_msgSend_220( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_220( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_220Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); + late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithShort_1 = _registerName1("initWithShort:"); + ffi.Pointer _objc_msgSend_221( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_221( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_221Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Short)>>('objc_msgSend'); + late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithUnsignedShort_1 = + _registerName1("initWithUnsignedShort:"); + ffi.Pointer _objc_msgSend_222( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_222( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_222Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedShort)>>('objc_msgSend'); + late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithInt_1 = _registerName1("initWithInt:"); + ffi.Pointer _objc_msgSend_223( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_223( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_223Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>('objc_msgSend'); + late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithUnsignedInt_1 = + _registerName1("initWithUnsignedInt:"); + ffi.Pointer _objc_msgSend_224( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_224( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_224Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); + late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithLong_1 = _registerName1("initWithLong:"); + ffi.Pointer _objc_msgSend_225( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_225( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_225Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithUnsignedLong_1 = + _registerName1("initWithUnsignedLong:"); + ffi.Pointer _objc_msgSend_226( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_226( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_226Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); + ffi.Pointer _objc_msgSend_227( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_227( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_227Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.LongLong)>>('objc_msgSend'); + late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithUnsignedLongLong_1 = + _registerName1("initWithUnsignedLongLong:"); + ffi.Pointer _objc_msgSend_228( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_228( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_228Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLongLong)>>('objc_msgSend'); + late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); + ffi.Pointer _objc_msgSend_229( + ffi.Pointer obj, + ffi.Pointer sel, + double value, + ) { + return __objc_msgSend_229( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_229Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>('objc_msgSend'); + late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); + ffi.Pointer _objc_msgSend_230( + ffi.Pointer obj, + ffi.Pointer sel, + double value, + ) { + return __objc_msgSend_230( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_230Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_initWithBool_1 = _registerName1("initWithBool:"); + ffi.Pointer _objc_msgSend_231( + ffi.Pointer obj, + ffi.Pointer sel, + bool value, + ) { + return __objc_msgSend_231( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_231Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_initWithInteger_1 = _registerName1("initWithInteger:"); + late final _sel_initWithUnsignedInteger_1 = + _registerName1("initWithUnsignedInteger:"); + late final _sel_charValue1 = _registerName1("charValue"); + int _objc_msgSend_232( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_232( + obj, + sel, + ); + } + + late final __objc_msgSend_232Ptr = _lookup< + ffi.NativeFunction< + ffi.Char Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); + int _objc_msgSend_233( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_233( + obj, + sel, + ); + } + + late final __objc_msgSend_233Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedChar Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_shortValue1 = _registerName1("shortValue"); + int _objc_msgSend_234( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_234( + obj, + sel, + ); + } + + late final __objc_msgSend_234Ptr = _lookup< + ffi.NativeFunction< + ffi.Short Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); + int _objc_msgSend_235( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_235( + obj, + sel, + ); + } + + late final __objc_msgSend_235Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedShort Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_intValue1 = _registerName1("intValue"); + int _objc_msgSend_236( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_236( + obj, + sel, + ); + } + + late final __objc_msgSend_236Ptr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); + late final _sel_longValue1 = _registerName1("longValue"); + late final _sel_unsignedLongValue1 = _registerName1("unsignedLongValue"); + late final _sel_longLongValue1 = _registerName1("longLongValue"); + int _objc_msgSend_237( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_237( + obj, + sel, + ); + } + + late final __objc_msgSend_237Ptr = _lookup< + ffi.NativeFunction< + ffi.LongLong Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_unsignedLongLongValue1 = + _registerName1("unsignedLongLongValue"); + late final _sel_floatValue1 = _registerName1("floatValue"); + double _objc_msgSend_238( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_238( + obj, + sel, + ); + } + + late final __objc_msgSend_238Ptr = _lookup< + ffi.NativeFunction< + ffi.Float Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); + + double _objc_msgSend_238_fpret( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_238_fpret( + obj, + sel, + ); + } + + late final __objc_msgSend_238_fpretPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_238_fpret = __objc_msgSend_238_fpretPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_doubleValue1 = _registerName1("doubleValue"); + late final _sel_boolValue1 = _registerName1("boolValue"); + late final _sel_integerValue1 = _registerName1("integerValue"); + late final _sel_unsignedIntegerValue1 = + _registerName1("unsignedIntegerValue"); + late final _sel_stringValue1 = _registerName1("stringValue"); + int _objc_msgSend_239( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherNumber, + ) { + return __objc_msgSend_239( + obj, + sel, + otherNumber, + ); + } + + late final __objc_msgSend_239Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); + bool _objc_msgSend_240( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer number, + ) { + return __objc_msgSend_240( + obj, + sel, + number, + ); + } + + late final __objc_msgSend_240Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_numberWithChar_1 = _registerName1("numberWithChar:"); + late final _sel_numberWithUnsignedChar_1 = + _registerName1("numberWithUnsignedChar:"); + late final _sel_numberWithShort_1 = _registerName1("numberWithShort:"); + late final _sel_numberWithUnsignedShort_1 = + _registerName1("numberWithUnsignedShort:"); + late final _sel_numberWithInt_1 = _registerName1("numberWithInt:"); + late final _sel_numberWithUnsignedInt_1 = + _registerName1("numberWithUnsignedInt:"); + late final _sel_numberWithLong_1 = _registerName1("numberWithLong:"); + late final _sel_numberWithUnsignedLong_1 = + _registerName1("numberWithUnsignedLong:"); + late final _sel_numberWithLongLong_1 = _registerName1("numberWithLongLong:"); + late final _sel_numberWithUnsignedLongLong_1 = + _registerName1("numberWithUnsignedLongLong:"); + late final _sel_numberWithFloat_1 = _registerName1("numberWithFloat:"); + late final _sel_numberWithDouble_1 = _registerName1("numberWithDouble:"); + late final _sel_numberWithBool_1 = _registerName1("numberWithBool:"); + late final _sel_numberWithInteger_1 = _registerName1("numberWithInteger:"); + late final _sel_numberWithUnsignedInteger_1 = + _registerName1("numberWithUnsignedInteger:"); + late final _sel_port1 = _registerName1("port"); + late final _sel_user1 = _registerName1("user"); + late final _sel_password1 = _registerName1("password"); + late final _sel_path1 = _registerName1("path"); + late final _sel_fragment1 = _registerName1("fragment"); + late final _sel_parameterString1 = _registerName1("parameterString"); + late final _sel_query1 = _registerName1("query"); + late final _sel_relativePath1 = _registerName1("relativePath"); + late final _sel_hasDirectoryPath1 = _registerName1("hasDirectoryPath"); + late final _sel_getFileSystemRepresentation_maxLength_1 = + _registerName1("getFileSystemRepresentation:maxLength:"); + bool _objc_msgSend_241( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + int maxBufferLength, + ) { + return __objc_msgSend_241( + obj, + sel, + buffer, + maxBufferLength, + ); + } + + late final __objc_msgSend_241Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_fileSystemRepresentation1 = + _registerName1("fileSystemRepresentation"); + late final _sel_isFileURL1 = _registerName1("isFileURL"); + late final _sel_standardizedURL1 = _registerName1("standardizedURL"); + late final _sel_checkResourceIsReachableAndReturnError_1 = + _registerName1("checkResourceIsReachableAndReturnError:"); + bool _objc_msgSend_242( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> error, + ) { + return __objc_msgSend_242( + obj, + sel, + error, + ); + } + + late final __objc_msgSend_242Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); + late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); + late final _sel_filePathURL1 = _registerName1("filePathURL"); + late final _sel_getResourceValue_forKey_error_1 = + _registerName1("getResourceValue:forKey:error:"); + bool _objc_msgSend_243( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> value, + ffi.Pointer key, + ffi.Pointer> error, + ) { + return __objc_msgSend_243( + obj, + sel, + value, + key, + error, + ); + } + + late final __objc_msgSend_243Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_resourceValuesForKeys_error_1 = + _registerName1("resourceValuesForKeys:error:"); + ffi.Pointer _objc_msgSend_244( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer> error, + ) { + return __objc_msgSend_244( + obj, + sel, + keys, + error, + ); + } + + late final __objc_msgSend_244Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_setResourceValue_forKey_error_1 = + _registerName1("setResourceValue:forKey:error:"); + bool _objc_msgSend_245( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer key, + ffi.Pointer> error, + ) { + return __objc_msgSend_245( + obj, + sel, + value, + key, + error, + ); + } + + late final __objc_msgSend_245Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_setResourceValues_error_1 = + _registerName1("setResourceValues:error:"); + bool _objc_msgSend_246( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keyedValues, + ffi.Pointer> error, + ) { + return __objc_msgSend_246( + obj, + sel, + keyedValues, + error, + ); + } + + late final __objc_msgSend_246Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); + + late final _sel_removeCachedResourceValueForKey_1 = + _registerName1("removeCachedResourceValueForKey:"); + void _objc_msgSend_247( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_247( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_247Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeAllCachedResourceValues1 = + _registerName1("removeAllCachedResourceValues"); + late final _sel_setTemporaryResourceValue_forKey_1 = + _registerName1("setTemporaryResourceValue:forKey:"); + late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = + _registerName1( + "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); + ffi.Pointer _objc_msgSend_248( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ffi.Pointer keys, + ffi.Pointer relativeURL, + ffi.Pointer> error, + ) { + return __objc_msgSend_248( + obj, + sel, + options, + keys, + relativeURL, + error, + ); + } + + late final __objc_msgSend_248Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = + _registerName1( + "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); + instancetype _objc_msgSend_249( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bookmarkData, + int options, + ffi.Pointer relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error, + ) { + return __objc_msgSend_249( + obj, + sel, + bookmarkData, + options, + relativeURL, + isStale, + error, + ); + } + + late final __objc_msgSend_249Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = + _registerName1( + "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); + late final _sel_resourceValuesForKeys_fromBookmarkData_1 = + _registerName1("resourceValuesForKeys:fromBookmarkData:"); + ffi.Pointer _objc_msgSend_250( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer bookmarkData, + ) { + return __objc_msgSend_250( + obj, + sel, + keys, + bookmarkData, + ); + } + + late final __objc_msgSend_250Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_writeBookmarkData_toURL_options_error_1 = + _registerName1("writeBookmarkData:toURL:options:error:"); + bool _objc_msgSend_251( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bookmarkData, + ffi.Pointer bookmarkFileURL, + int options, + ffi.Pointer> error, + ) { + return __objc_msgSend_251( + obj, + sel, + bookmarkData, + bookmarkFileURL, + options, + error, + ); + } + + late final __objc_msgSend_251Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_bookmarkDataWithContentsOfURL_error_1 = + _registerName1("bookmarkDataWithContentsOfURL:error:"); + ffi.Pointer _objc_msgSend_252( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bookmarkFileURL, + ffi.Pointer> error, + ) { + return __objc_msgSend_252( + obj, + sel, + bookmarkFileURL, + error, + ); + } + + late final __objc_msgSend_252Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = + _registerName1("URLByResolvingAliasFileAtURL:options:error:"); + instancetype _objc_msgSend_253( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int options, + ffi.Pointer> error, + ) { + return __objc_msgSend_253( + obj, + sel, + url, + options, + error, + ); + } + + late final __objc_msgSend_253Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_startAccessingSecurityScopedResource1 = + _registerName1("startAccessingSecurityScopedResource"); + late final _sel_stopAccessingSecurityScopedResource1 = + _registerName1("stopAccessingSecurityScopedResource"); + late final _sel_getPromisedItemResourceValue_forKey_error_1 = + _registerName1("getPromisedItemResourceValue:forKey:error:"); + late final _sel_promisedItemResourceValuesForKeys_error_1 = + _registerName1("promisedItemResourceValuesForKeys:error:"); + ffi.Pointer _objc_msgSend_254( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer> error, + ) { + return __objc_msgSend_254( + obj, + sel, + keys, + error, + ); + } + + late final __objc_msgSend_254Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_checkPromisedItemIsReachableAndReturnError_1 = + _registerName1("checkPromisedItemIsReachableAndReturnError:"); + late final _sel_fileURLWithPathComponents_1 = + _registerName1("fileURLWithPathComponents:"); + ffi.Pointer _objc_msgSend_255( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer components, + ) { + return __objc_msgSend_255( + obj, + sel, + components, + ); + } + + late final __objc_msgSend_255Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_pathComponents1 = _registerName1("pathComponents"); + late final _sel_lastPathComponent1 = _registerName1("lastPathComponent"); + late final _sel_pathExtension1 = _registerName1("pathExtension"); + late final _sel_URLByAppendingPathComponent_1 = + _registerName1("URLByAppendingPathComponent:"); + ffi.Pointer _objc_msgSend_256( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer pathComponent, + ) { + return __objc_msgSend_256( + obj, + sel, + pathComponent, + ); + } + + late final __objc_msgSend_256Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_URLByAppendingPathComponent_isDirectory_1 = + _registerName1("URLByAppendingPathComponent:isDirectory:"); + ffi.Pointer _objc_msgSend_257( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer pathComponent, + bool isDirectory, + ) { + return __objc_msgSend_257( + obj, + sel, + pathComponent, + isDirectory, + ); + } + + late final __objc_msgSend_257Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_URLByDeletingLastPathComponent1 = + _registerName1("URLByDeletingLastPathComponent"); + late final _sel_URLByAppendingPathExtension_1 = + _registerName1("URLByAppendingPathExtension:"); + late final _sel_URLByDeletingPathExtension1 = + _registerName1("URLByDeletingPathExtension"); + late final _sel_URLByStandardizingPath1 = + _registerName1("URLByStandardizingPath"); + late final _sel_URLByResolvingSymlinksInPath1 = + _registerName1("URLByResolvingSymlinksInPath"); + late final _sel_resourceDataUsingCache_1 = + _registerName1("resourceDataUsingCache:"); + ffi.Pointer _objc_msgSend_258( + ffi.Pointer obj, + ffi.Pointer sel, + bool shouldUseCache, + ) { + return __objc_msgSend_258( + obj, + sel, + shouldUseCache, + ); + } + + late final __objc_msgSend_258Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_loadResourceDataNotifyingClient_usingCache_1 = + _registerName1("loadResourceDataNotifyingClient:usingCache:"); + void _objc_msgSend_259( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer client, + bool shouldUseCache, + ) { + return __objc_msgSend_259( + obj, + sel, + client, + shouldUseCache, + ); + } + + late final __objc_msgSend_259Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); + late final _sel_setResourceData_1 = _registerName1("setResourceData:"); + late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); + bool _objc_msgSend_260( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer property, + ffi.Pointer propertyKey, + ) { + return __objc_msgSend_260( + obj, + sel, + property, + propertyKey, + ); + } + + late final __objc_msgSend_260Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); + late final _sel_registerURLHandleClass_1 = + _registerName1("registerURLHandleClass:"); + late final _sel_URLHandleClassForURL_1 = + _registerName1("URLHandleClassForURL:"); + ffi.Pointer _objc_msgSend_261( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, + ) { + return __objc_msgSend_261( + obj, + sel, + anURL, + ); + } + + late final __objc_msgSend_261Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_status1 = _registerName1("status"); + int _objc_msgSend_262( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_262( + obj, + sel, + ); + } + + late final __objc_msgSend_262Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_failureReason1 = _registerName1("failureReason"); + late final _sel_addClient_1 = _registerName1("addClient:"); + late final _sel_removeClient_1 = _registerName1("removeClient:"); + late final _sel_loadInBackground1 = _registerName1("loadInBackground"); + late final _sel_cancelLoadInBackground1 = + _registerName1("cancelLoadInBackground"); + late final _sel_resourceData1 = _registerName1("resourceData"); + late final _sel_availableResourceData1 = + _registerName1("availableResourceData"); + late final _sel_expectedResourceDataSize1 = + _registerName1("expectedResourceDataSize"); + late final _sel_flushCachedData1 = _registerName1("flushCachedData"); + late final _sel_backgroundLoadDidFailWithReason_1 = + _registerName1("backgroundLoadDidFailWithReason:"); + late final _sel_didLoadBytes_loadComplete_1 = + _registerName1("didLoadBytes:loadComplete:"); + void _objc_msgSend_263( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer newBytes, + bool yorn, + ) { + return __objc_msgSend_263( + obj, + sel, + newBytes, + yorn, + ); + } + + late final __objc_msgSend_263Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_263 = __objc_msgSend_263Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); + bool _objc_msgSend_264( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, + ) { + return __objc_msgSend_264( + obj, + sel, + anURL, + ); + } + + late final __objc_msgSend_264Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); + ffi.Pointer _objc_msgSend_265( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, + ) { + return __objc_msgSend_265( + obj, + sel, + anURL, + ); + } + + late final __objc_msgSend_265Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); + ffi.Pointer _objc_msgSend_266( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, + bool willCache, + ) { + return __objc_msgSend_266( + obj, + sel, + anURL, + willCache, + ); + } + + late final __objc_msgSend_266Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_propertyForKeyIfAvailable_1 = + _registerName1("propertyForKeyIfAvailable:"); + late final _sel_writeProperty_forKey_1 = + _registerName1("writeProperty:forKey:"); + late final _sel_writeData_1 = _registerName1("writeData:"); + late final _sel_loadInForeground1 = _registerName1("loadInForeground"); + late final _sel_beginLoadInBackground1 = + _registerName1("beginLoadInBackground"); + late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); + late final _sel_URLHandleUsingCache_1 = + _registerName1("URLHandleUsingCache:"); + ffi.Pointer _objc_msgSend_267( + ffi.Pointer obj, + ffi.Pointer sel, + bool shouldUseCache, + ) { + return __objc_msgSend_267( + obj, + sel, + shouldUseCache, + ); + } + + late final __objc_msgSend_267Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_writeToFile_options_error_1 = + _registerName1("writeToFile:options:error:"); + bool _objc_msgSend_268( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + int writeOptionsMask, + ffi.Pointer> errorPtr, + ) { + return __objc_msgSend_268( + obj, + sel, + path, + writeOptionsMask, + errorPtr, + ); + } + + late final __objc_msgSend_268Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_writeToURL_options_error_1 = + _registerName1("writeToURL:options:error:"); + bool _objc_msgSend_269( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int writeOptionsMask, + ffi.Pointer> errorPtr, + ) { + return __objc_msgSend_269( + obj, + sel, + url, + writeOptionsMask, + errorPtr, + ); + } + + late final __objc_msgSend_269Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_rangeOfData_options_range_1 = + _registerName1("rangeOfData:options:range:"); + _NSRange _objc_msgSend_270( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dataToFind, + int mask, + _NSRange searchRange, + ) { + return __objc_msgSend_270( + obj, + sel, + dataToFind, + mask, + searchRange, + ); + } + + late final __objc_msgSend_270Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + void _objc_msgSend_270_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dataToFind, + int mask, + _NSRange searchRange, + ) { + return __objc_msgSend_270_stret( + stret, + obj, + sel, + dataToFind, + mask, + searchRange, + ); + } + + late final __objc_msgSend_270_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_270_stret = __objc_msgSend_270_stretPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + + late final _sel_enumerateByteRangesUsingBlock_1 = + _registerName1("enumerateByteRangesUsingBlock:"); + void _objc_msgSend_271( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_271( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_271Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_dataWithBytes_length_1 = + _registerName1("dataWithBytes:length:"); + instancetype _objc_msgSend_272( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, + ) { + return __objc_msgSend_272( + obj, + sel, + bytes, + length, + ); + } + + late final __objc_msgSend_272Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_dataWithBytesNoCopy_length_1 = + _registerName1("dataWithBytesNoCopy:length:"); + late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = + _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); + instancetype _objc_msgSend_273( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, + bool b, + ) { + return __objc_msgSend_273( + obj, + sel, + bytes, + length, + b, + ); + } + + late final __objc_msgSend_273Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, bool)>(); + + late final _sel_dataWithContentsOfFile_options_error_1 = + _registerName1("dataWithContentsOfFile:options:error:"); + instancetype _objc_msgSend_274( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + int readOptionsMask, + ffi.Pointer> errorPtr, + ) { + return __objc_msgSend_274( + obj, + sel, + path, + readOptionsMask, + errorPtr, + ); + } + + late final __objc_msgSend_274Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_dataWithContentsOfURL_options_error_1 = + _registerName1("dataWithContentsOfURL:options:error:"); + instancetype _objc_msgSend_275( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int readOptionsMask, + ffi.Pointer> errorPtr, + ) { + return __objc_msgSend_275( + obj, + sel, + url, + readOptionsMask, + errorPtr, + ); + } + + late final __objc_msgSend_275Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_dataWithContentsOfFile_1 = + _registerName1("dataWithContentsOfFile:"); + late final _sel_dataWithContentsOfURL_1 = + _registerName1("dataWithContentsOfURL:"); + instancetype _objc_msgSend_276( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_276( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_276Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithBytes_length_1 = + _registerName1("initWithBytes:length:"); + late final _sel_initWithBytesNoCopy_length_1 = + _registerName1("initWithBytesNoCopy:length:"); + late final _sel_initWithBytesNoCopy_length_freeWhenDone_1 = + _registerName1("initWithBytesNoCopy:length:freeWhenDone:"); + late final _sel_initWithBytesNoCopy_length_deallocator_1 = + _registerName1("initWithBytesNoCopy:length:deallocator:"); + instancetype _objc_msgSend_277( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, + ffi.Pointer<_ObjCBlock> deallocator, + ) { + return __objc_msgSend_277( + obj, + sel, + bytes, + length, + deallocator, + ); + } + + late final __objc_msgSend_277Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_initWithContentsOfFile_options_error_1 = + _registerName1("initWithContentsOfFile:options:error:"); + late final _sel_initWithContentsOfURL_options_error_1 = + _registerName1("initWithContentsOfURL:options:error:"); + late final _sel_initWithData_1 = _registerName1("initWithData:"); + instancetype _objc_msgSend_278( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_278( + obj, + sel, + data, + ); + } + + late final __objc_msgSend_278Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_dataWithData_1 = _registerName1("dataWithData:"); + late final _sel_initWithBase64EncodedString_options_1 = + _registerName1("initWithBase64EncodedString:options:"); + instancetype _objc_msgSend_279( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer base64String, + int options, + ) { + return __objc_msgSend_279( + obj, + sel, + base64String, + options, + ); + } + + late final __objc_msgSend_279Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_base64EncodedStringWithOptions_1 = + _registerName1("base64EncodedStringWithOptions:"); + ffi.Pointer _objc_msgSend_280( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ) { + return __objc_msgSend_280( + obj, + sel, + options, + ); + } + + late final __objc_msgSend_280Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithBase64EncodedData_options_1 = + _registerName1("initWithBase64EncodedData:options:"); + instancetype _objc_msgSend_281( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer base64Data, + int options, + ) { + return __objc_msgSend_281( + obj, + sel, + base64Data, + options, + ); + } + + late final __objc_msgSend_281Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_base64EncodedDataWithOptions_1 = + _registerName1("base64EncodedDataWithOptions:"); + ffi.Pointer _objc_msgSend_282( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ) { + return __objc_msgSend_282( + obj, + sel, + options, + ); + } + + late final __objc_msgSend_282Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_decompressedDataUsingAlgorithm_error_1 = + _registerName1("decompressedDataUsingAlgorithm:error:"); + instancetype _objc_msgSend_283( + ffi.Pointer obj, + ffi.Pointer sel, + int algorithm, + ffi.Pointer> error, + ) { + return __objc_msgSend_283( + obj, + sel, + algorithm, + error, + ); + } + + late final __objc_msgSend_283Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer>)>(); + + late final _sel_compressedDataUsingAlgorithm_error_1 = + _registerName1("compressedDataUsingAlgorithm:error:"); + late final _sel_getBytes_1 = _registerName1("getBytes:"); + late final _sel_dataWithContentsOfMappedFile_1 = + _registerName1("dataWithContentsOfMappedFile:"); + late final _sel_initWithContentsOfMappedFile_1 = + _registerName1("initWithContentsOfMappedFile:"); + late final _sel_initWithBase64Encoding_1 = + _registerName1("initWithBase64Encoding:"); + late final _sel_base64Encoding1 = _registerName1("base64Encoding"); + late final _sel_encodeDataObject_1 = _registerName1("encodeDataObject:"); + void _objc_msgSend_284( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_284( + obj, + sel, + data, + ); + } + + late final __objc_msgSend_284Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodeDataObject1 = _registerName1("decodeDataObject"); + ffi.Pointer _objc_msgSend_285( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_285( + obj, + sel, + ); + } + + late final __objc_msgSend_285Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_decodeValueOfObjCType_at_size_1 = + _registerName1("decodeValueOfObjCType:at:size:"); + void _objc_msgSend_286( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer type, + ffi.Pointer data, + int size, + ) { + return __objc_msgSend_286( + obj, + sel, + type, + data, + size, + ); + } + + late final __objc_msgSend_286Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_versionForClassName_1 = + _registerName1("versionForClassName:"); + int _objc_msgSend_287( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer className, + ) { + return __objc_msgSend_287( + obj, + sel, + className, + ); + } + + late final __objc_msgSend_287Ptr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_encodeObject_1 = _registerName1("encodeObject:"); + void _objc_msgSend_288( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + ) { + return __objc_msgSend_288( + obj, + sel, + object, + ); + } + + late final __objc_msgSend_288Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_encodeRootObject_1 = _registerName1("encodeRootObject:"); + late final _sel_encodeBycopyObject_1 = _registerName1("encodeBycopyObject:"); + late final _sel_encodeByrefObject_1 = _registerName1("encodeByrefObject:"); + late final _sel_encodeConditionalObject_1 = + _registerName1("encodeConditionalObject:"); + late final _sel_encodeValuesOfObjCTypes_1 = + _registerName1("encodeValuesOfObjCTypes:"); + void _objc_msgSend_289( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer types, + ) { + return __objc_msgSend_289( + obj, + sel, + types, + ); + } + + late final __objc_msgSend_289Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_encodeArrayOfObjCType_count_at_1 = + _registerName1("encodeArrayOfObjCType:count:at:"); + void _objc_msgSend_290( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer type, + int count, + ffi.Pointer array, + ) { + return __objc_msgSend_290( + obj, + sel, + type, + count, + array, + ); + } + + late final __objc_msgSend_290Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); + + late final _sel_encodeBytes_length_1 = _registerName1("encodeBytes:length:"); + late final _sel_decodeObject1 = _registerName1("decodeObject"); + late final _sel_decodeTopLevelObjectAndReturnError_1 = + _registerName1("decodeTopLevelObjectAndReturnError:"); + ffi.Pointer _objc_msgSend_291( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> error, + ) { + return __objc_msgSend_291( + obj, + sel, + error, + ); + } + + late final __objc_msgSend_291Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); + + late final _sel_decodeValuesOfObjCTypes_1 = + _registerName1("decodeValuesOfObjCTypes:"); + late final _sel_decodeArrayOfObjCType_count_at_1 = + _registerName1("decodeArrayOfObjCType:count:at:"); + late final _sel_decodeBytesWithReturnedLength_1 = + _registerName1("decodeBytesWithReturnedLength:"); + ffi.Pointer _objc_msgSend_292( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer lengthp, + ) { + return __objc_msgSend_292( + obj, + sel, + lengthp, + ); + } + + late final __objc_msgSend_292Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_encodePropertyList_1 = _registerName1("encodePropertyList:"); + late final _sel_decodePropertyList1 = _registerName1("decodePropertyList"); + late final _sel_setObjectZone_1 = _registerName1("setObjectZone:"); + void _objc_msgSend_293( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_NSZone> zone, + ) { + return __objc_msgSend_293( + obj, + sel, + zone, + ); + } + + late final __objc_msgSend_293Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_NSZone>)>>('objc_msgSend'); + late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_NSZone>)>(); + + late final _sel_objectZone1 = _registerName1("objectZone"); + ffi.Pointer<_NSZone> _objc_msgSend_294( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_294( + obj, + sel, + ); + } + + late final __objc_msgSend_294Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_systemVersion1 = _registerName1("systemVersion"); + late final _sel_allowsKeyedCoding1 = _registerName1("allowsKeyedCoding"); + late final _sel_encodeObject_forKey_1 = + _registerName1("encodeObject:forKey:"); + late final _sel_encodeConditionalObject_forKey_1 = + _registerName1("encodeConditionalObject:forKey:"); + late final _sel_encodeBool_forKey_1 = _registerName1("encodeBool:forKey:"); + void _objc_msgSend_295( + ffi.Pointer obj, + ffi.Pointer sel, + bool value, + ffi.Pointer key, + ) { + return __objc_msgSend_295( + obj, + sel, + value, + key, + ); + } + + late final __objc_msgSend_295Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Bool, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, bool, + ffi.Pointer)>(); + + late final _sel_encodeInt_forKey_1 = _registerName1("encodeInt:forKey:"); + void _objc_msgSend_296( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ffi.Pointer key, + ) { + return __objc_msgSend_296( + obj, + sel, + value, + key, + ); + } + + late final __objc_msgSend_296Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _sel_encodeInt32_forKey_1 = _registerName1("encodeInt32:forKey:"); + void _objc_msgSend_297( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ffi.Pointer key, + ) { + return __objc_msgSend_297( + obj, + sel, + value, + key, + ); + } + + late final __objc_msgSend_297Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _sel_encodeInt64_forKey_1 = _registerName1("encodeInt64:forKey:"); + void _objc_msgSend_298( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ffi.Pointer key, + ) { + return __objc_msgSend_298( + obj, + sel, + value, + key, + ); + } + + late final __objc_msgSend_298Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _sel_encodeFloat_forKey_1 = _registerName1("encodeFloat:forKey:"); + void _objc_msgSend_299( + ffi.Pointer obj, + ffi.Pointer sel, + double value, + ffi.Pointer key, + ) { + return __objc_msgSend_299( + obj, + sel, + value, + key, + ); + } + + late final __objc_msgSend_299Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Float, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double, + ffi.Pointer)>(); + + late final _sel_encodeDouble_forKey_1 = + _registerName1("encodeDouble:forKey:"); + void _objc_msgSend_300( + ffi.Pointer obj, + ffi.Pointer sel, + double value, + ffi.Pointer key, + ) { + return __objc_msgSend_300( + obj, + sel, + value, + key, + ); + } + + late final __objc_msgSend_300Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Double, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double, + ffi.Pointer)>(); + + late final _sel_encodeBytes_length_forKey_1 = + _registerName1("encodeBytes:length:forKey:"); + void _objc_msgSend_301( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, + ffi.Pointer key, + ) { + return __objc_msgSend_301( + obj, + sel, + bytes, + length, + key, + ); + } + + late final __objc_msgSend_301Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); + + late final _sel_containsValueForKey_1 = + _registerName1("containsValueForKey:"); + late final _sel_decodeObjectForKey_1 = _registerName1("decodeObjectForKey:"); + late final _sel_decodeTopLevelObjectForKey_error_1 = + _registerName1("decodeTopLevelObjectForKey:error:"); + ffi.Pointer _objc_msgSend_302( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ffi.Pointer> error, + ) { + return __objc_msgSend_302( + obj, + sel, + key, + error, + ); + } + + late final __objc_msgSend_302Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_decodeBoolForKey_1 = _registerName1("decodeBoolForKey:"); + late final _sel_decodeIntForKey_1 = _registerName1("decodeIntForKey:"); + int _objc_msgSend_303( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_303( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_303Ptr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodeInt32ForKey_1 = _registerName1("decodeInt32ForKey:"); + int _objc_msgSend_304( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_304( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_304Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodeInt64ForKey_1 = _registerName1("decodeInt64ForKey:"); + int _objc_msgSend_305( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_305( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_305Ptr = _lookup< + ffi.NativeFunction< + ffi.Int64 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodeFloatForKey_1 = _registerName1("decodeFloatForKey:"); + double _objc_msgSend_306( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_306( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_306Ptr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + double _objc_msgSend_306_fpret( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_306_fpret( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_306_fpretPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_306_fpret = __objc_msgSend_306_fpretPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodeDoubleForKey_1 = _registerName1("decodeDoubleForKey:"); + double _objc_msgSend_307( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_307( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_307Ptr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + double _objc_msgSend_307_fpret( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_307_fpret( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_307_fpretPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_307_fpret = __objc_msgSend_307_fpretPtr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodeBytesForKey_returnedLength_1 = + _registerName1("decodeBytesForKey:returnedLength:"); + ffi.Pointer _objc_msgSend_308( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ffi.Pointer lengthp, + ) { + return __objc_msgSend_308( + obj, + sel, + key, + lengthp, + ); + } + + late final __objc_msgSend_308Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_encodeInteger_forKey_1 = + _registerName1("encodeInteger:forKey:"); + void _objc_msgSend_309( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ffi.Pointer key, + ) { + return __objc_msgSend_309( + obj, + sel, + value, + key, + ); + } + + late final __objc_msgSend_309Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Long, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _sel_decodeIntegerForKey_1 = + _registerName1("decodeIntegerForKey:"); + late final _sel_requiresSecureCoding1 = + _registerName1("requiresSecureCoding"); + late final _sel_decodeObjectOfClass_forKey_1 = + _registerName1("decodeObjectOfClass:forKey:"); + ffi.Pointer _objc_msgSend_310( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + ffi.Pointer key, + ) { + return __objc_msgSend_310( + obj, + sel, + aClass, + key, + ); + } + + late final __objc_msgSend_310Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodeTopLevelObjectOfClass_forKey_error_1 = + _registerName1("decodeTopLevelObjectOfClass:forKey:error:"); + ffi.Pointer _objc_msgSend_311( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + ffi.Pointer key, + ffi.Pointer> error, + ) { + return __objc_msgSend_311( + obj, + sel, + aClass, + key, + error, + ); + } + + late final __objc_msgSend_311Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_decodeArrayOfObjectsOfClass_forKey_1 = + _registerName1("decodeArrayOfObjectsOfClass:forKey:"); + ffi.Pointer _objc_msgSend_312( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cls, + ffi.Pointer key, + ) { + return __objc_msgSend_312( + obj, + sel, + cls, + key, + ); + } + + late final __objc_msgSend_312Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_312 = __objc_msgSend_312Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_1 = + _registerName1("decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:"); + ffi.Pointer _objc_msgSend_313( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keyCls, + ffi.Pointer objectCls, + ffi.Pointer key, + ) { + return __objc_msgSend_313( + obj, + sel, + keyCls, + objectCls, + key, + ); + } + + late final __objc_msgSend_313Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_313 = __objc_msgSend_313Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodeObjectOfClasses_forKey_1 = + _registerName1("decodeObjectOfClasses:forKey:"); + ffi.Pointer _objc_msgSend_314( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer classes, + ffi.Pointer key, + ) { + return __objc_msgSend_314( + obj, + sel, + classes, + key, + ); + } + + late final __objc_msgSend_314Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_314 = __objc_msgSend_314Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodeTopLevelObjectOfClasses_forKey_error_1 = + _registerName1("decodeTopLevelObjectOfClasses:forKey:error:"); + ffi.Pointer _objc_msgSend_315( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer classes, + ffi.Pointer key, + ffi.Pointer> error, + ) { + return __objc_msgSend_315( + obj, + sel, + classes, + key, + error, + ); + } + + late final __objc_msgSend_315Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_decodeArrayOfObjectsOfClasses_forKey_1 = + _registerName1("decodeArrayOfObjectsOfClasses:forKey:"); + ffi.Pointer _objc_msgSend_316( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer classes, + ffi.Pointer key, + ) { + return __objc_msgSend_316( + obj, + sel, + classes, + key, + ); + } + + late final __objc_msgSend_316Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_1 = + _registerName1( + "decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:"); + ffi.Pointer _objc_msgSend_317( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keyClasses, + ffi.Pointer objectClasses, + ffi.Pointer key, + ) { + return __objc_msgSend_317( + obj, + sel, + keyClasses, + objectClasses, + key, + ); + } + + late final __objc_msgSend_317Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodePropertyListForKey_1 = + _registerName1("decodePropertyListForKey:"); + late final _sel_allowedClasses1 = _registerName1("allowedClasses"); + ffi.Pointer _objc_msgSend_318( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_318( + obj, + sel, + ); + } + + late final __objc_msgSend_318Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_failWithError_1 = _registerName1("failWithError:"); + void _objc_msgSend_319( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer error, + ) { + return __objc_msgSend_319( + obj, + sel, + error, + ); + } + + late final __objc_msgSend_319Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodingFailurePolicy1 = + _registerName1("decodingFailurePolicy"); + int _objc_msgSend_320( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_320( + obj, + sel, + ); + } + + late final __objc_msgSend_320Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_error1 = _registerName1("error"); + ffi.Pointer _objc_msgSend_321( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_321( + obj, + sel, + ); + } + + late final __objc_msgSend_321Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_encodeNXObject_1 = _registerName1("encodeNXObject:"); + late final _sel_decodeNXObject1 = _registerName1("decodeNXObject"); + late final _sel_decodeValueOfObjCType_at_1 = + _registerName1("decodeValueOfObjCType:at:"); + late final _sel_encodePoint_1 = _registerName1("encodePoint:"); + void _objc_msgSend_322( + ffi.Pointer obj, + ffi.Pointer sel, + CGPoint point, + ) { + return __objc_msgSend_322( + obj, + sel, + point, + ); + } + + late final __objc_msgSend_322Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + CGPoint)>>('objc_msgSend'); + late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, CGPoint)>(); + + late final _sel_decodePoint1 = _registerName1("decodePoint"); + late final _sel_encodeSize_1 = _registerName1("encodeSize:"); + void _objc_msgSend_323( + ffi.Pointer obj, + ffi.Pointer sel, + CGSize size, + ) { + return __objc_msgSend_323( + obj, + sel, + size, + ); + } + + late final __objc_msgSend_323Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + CGSize)>>('objc_msgSend'); + late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, CGSize)>(); + + late final _sel_decodeSize1 = _registerName1("decodeSize"); + late final _sel_encodeRect_1 = _registerName1("encodeRect:"); + void _objc_msgSend_324( + ffi.Pointer obj, + ffi.Pointer sel, + CGRect rect, + ) { + return __objc_msgSend_324( + obj, + sel, + rect, + ); + } + + late final __objc_msgSend_324Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + CGRect)>>('objc_msgSend'); + late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, CGRect)>(); + + late final _sel_decodeRect1 = _registerName1("decodeRect"); + late final _sel_encodePoint_forKey_1 = _registerName1("encodePoint:forKey:"); + void _objc_msgSend_325( + ffi.Pointer obj, + ffi.Pointer sel, + CGPoint point, + ffi.Pointer key, + ) { + return __objc_msgSend_325( + obj, + sel, + point, + key, + ); + } + + late final __objc_msgSend_325Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + CGPoint, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, CGPoint, + ffi.Pointer)>(); + + late final _sel_encodeSize_forKey_1 = _registerName1("encodeSize:forKey:"); + void _objc_msgSend_326( + ffi.Pointer obj, + ffi.Pointer sel, + CGSize size, + ffi.Pointer key, + ) { + return __objc_msgSend_326( + obj, + sel, + size, + key, + ); + } + + late final __objc_msgSend_326Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + CGSize, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, CGSize, + ffi.Pointer)>(); + + late final _sel_encodeRect_forKey_1 = _registerName1("encodeRect:forKey:"); + void _objc_msgSend_327( + ffi.Pointer obj, + ffi.Pointer sel, + CGRect rect, + ffi.Pointer key, + ) { + return __objc_msgSend_327( + obj, + sel, + rect, + key, + ); + } + + late final __objc_msgSend_327Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + CGRect, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, CGRect, + ffi.Pointer)>(); + + late final _sel_decodePointForKey_1 = _registerName1("decodePointForKey:"); + CGPoint _objc_msgSend_328( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_328( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_328Ptr = _lookup< + ffi.NativeFunction< + CGPoint Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< + CGPoint Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_328_stret( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_328_stret( + stret, + obj, + sel, + key, + ); + } + + late final __objc_msgSend_328_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_328_stret = __objc_msgSend_328_stretPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_decodeSizeForKey_1 = _registerName1("decodeSizeForKey:"); + CGSize _objc_msgSend_329( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_329( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_329Ptr = _lookup< + ffi.NativeFunction< + CGSize Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< + CGSize Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_329_stret( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_329_stret( + stret, + obj, + sel, + key, + ); + } + + late final __objc_msgSend_329_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_329_stret = __objc_msgSend_329_stretPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_decodeRectForKey_1 = _registerName1("decodeRectForKey:"); + CGRect _objc_msgSend_330( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_330( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_330Ptr = _lookup< + ffi.NativeFunction< + CGRect Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< + CGRect Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_330_stret( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_330_stret( + stret, + obj, + sel, + key, + ); + } + + late final __objc_msgSend_330_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_330_stret = __objc_msgSend_330_stretPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); + ffi.Pointer _objc_msgSend_331( + ffi.Pointer obj, + ffi.Pointer sel, + int from, + ) { + return __objc_msgSend_331( + obj, + sel, + from, + ); + } + + late final __objc_msgSend_331Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_substringToIndex_1 = _registerName1("substringToIndex:"); + late final _sel_substringWithRange_1 = _registerName1("substringWithRange:"); + ffi.Pointer _objc_msgSend_332( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_332( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_332Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, _NSRange)>(); + + late final _sel_getCharacters_range_1 = + _registerName1("getCharacters:range:"); + void _objc_msgSend_333( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + _NSRange range, + ) { + return __objc_msgSend_333( + obj, + sel, + buffer, + range, + ); + } + + late final __objc_msgSend_333Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>(); + + int _objc_msgSend_334( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + ) { + return __objc_msgSend_334( + obj, + sel, + string, + ); + } + + late final __objc_msgSend_334Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_compare_options_1 = _registerName1("compare:options:"); + int _objc_msgSend_335( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int mask, + ) { + return __objc_msgSend_335( + obj, + sel, + string, + mask, + ); + } + + late final __objc_msgSend_335Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_compare_options_range_1 = + _registerName1("compare:options:range:"); + int _objc_msgSend_336( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int mask, + _NSRange rangeOfReceiverToCompare, + ) { + return __objc_msgSend_336( + obj, + sel, + string, + mask, + rangeOfReceiverToCompare, + ); + } + + late final __objc_msgSend_336Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + late final _sel_compare_options_range_locale_1 = + _registerName1("compare:options:range:locale:"); + int _objc_msgSend_337( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int mask, + _NSRange rangeOfReceiverToCompare, + ffi.Pointer locale, + ) { + return __objc_msgSend_337( + obj, + sel, + string, + mask, + rangeOfReceiverToCompare, + locale, + ); + } + + late final __objc_msgSend_337Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange, ffi.Pointer)>(); + + late final _sel_caseInsensitiveCompare_1 = + _registerName1("caseInsensitiveCompare:"); + late final _sel_localizedCompare_1 = _registerName1("localizedCompare:"); + late final _sel_localizedCaseInsensitiveCompare_1 = + _registerName1("localizedCaseInsensitiveCompare:"); + late final _sel_localizedStandardCompare_1 = + _registerName1("localizedStandardCompare:"); + late final _sel_isEqualToString_1 = _registerName1("isEqualToString:"); + late final _sel_hasPrefix_1 = _registerName1("hasPrefix:"); + late final _sel_hasSuffix_1 = _registerName1("hasSuffix:"); + late final _sel_commonPrefixWithString_options_1 = + _registerName1("commonPrefixWithString:options:"); + ffi.Pointer _objc_msgSend_338( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer str, + int mask, + ) { + return __objc_msgSend_338( + obj, + sel, + str, + mask, + ); + } + + late final __objc_msgSend_338Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_containsString_1 = _registerName1("containsString:"); + late final _sel_localizedCaseInsensitiveContainsString_1 = + _registerName1("localizedCaseInsensitiveContainsString:"); + late final _sel_localizedStandardContainsString_1 = + _registerName1("localizedStandardContainsString:"); + late final _sel_localizedStandardRangeOfString_1 = + _registerName1("localizedStandardRangeOfString:"); + _NSRange _objc_msgSend_339( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer str, + ) { + return __objc_msgSend_339( + obj, + sel, + str, + ); + } + + late final __objc_msgSend_339Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_339_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer str, + ) { + return __objc_msgSend_339_stret( + stret, + obj, + sel, + str, + ); + } + + late final __objc_msgSend_339_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_339_stret = __objc_msgSend_339_stretPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_rangeOfString_1 = _registerName1("rangeOfString:"); + late final _sel_rangeOfString_options_1 = + _registerName1("rangeOfString:options:"); + _NSRange _objc_msgSend_340( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + ) { + return __objc_msgSend_340( + obj, + sel, + searchString, + mask, + ); + } + + late final __objc_msgSend_340Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + void _objc_msgSend_340_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + ) { + return __objc_msgSend_340_stret( + stret, + obj, + sel, + searchString, + mask, + ); + } + + late final __objc_msgSend_340_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend_stret'); + late final __objc_msgSend_340_stret = __objc_msgSend_340_stretPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_rangeOfString_options_range_1 = + _registerName1("rangeOfString:options:range:"); + _NSRange _objc_msgSend_341( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + _NSRange rangeOfReceiverToSearch, + ) { + return __objc_msgSend_341( + obj, + sel, + searchString, + mask, + rangeOfReceiverToSearch, + ); + } + + late final __objc_msgSend_341Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + void _objc_msgSend_341_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + _NSRange rangeOfReceiverToSearch, + ) { + return __objc_msgSend_341_stret( + stret, + obj, + sel, + searchString, + mask, + rangeOfReceiverToSearch, + ); + } + + late final __objc_msgSend_341_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_341_stret = __objc_msgSend_341_stretPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + + late final _sel_rangeOfString_options_range_locale_1 = + _registerName1("rangeOfString:options:range:locale:"); + _NSRange _objc_msgSend_342( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + _NSRange rangeOfReceiverToSearch, + ffi.Pointer locale, + ) { + return __objc_msgSend_342( + obj, + sel, + searchString, + mask, + rangeOfReceiverToSearch, + locale, + ); + } + + late final __objc_msgSend_342Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange, ffi.Pointer)>(); + + void _objc_msgSend_342_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + _NSRange rangeOfReceiverToSearch, + ffi.Pointer locale, + ) { + return __objc_msgSend_342_stret( + stret, + obj, + sel, + searchString, + mask, + rangeOfReceiverToSearch, + locale, + ); + } + + late final __objc_msgSend_342_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_342_stret = __objc_msgSend_342_stretPtr.asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); + + late final _sel_rangeOfCharacterFromSet_1 = + _registerName1("rangeOfCharacterFromSet:"); + _NSRange _objc_msgSend_343( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchSet, + ) { + return __objc_msgSend_343( + obj, + sel, + searchSet, + ); + } + + late final __objc_msgSend_343Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + void _objc_msgSend_343_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchSet, + ) { + return __objc_msgSend_343_stret( + stret, + obj, + sel, + searchSet, + ); + } + + late final __objc_msgSend_343_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_343_stret = __objc_msgSend_343_stretPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_rangeOfCharacterFromSet_options_1 = + _registerName1("rangeOfCharacterFromSet:options:"); + _NSRange _objc_msgSend_344( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchSet, + int mask, + ) { + return __objc_msgSend_344( + obj, + sel, + searchSet, + mask, + ); + } + + late final __objc_msgSend_344Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + void _objc_msgSend_344_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchSet, + int mask, + ) { + return __objc_msgSend_344_stret( + stret, + obj, + sel, + searchSet, + mask, + ); + } + + late final __objc_msgSend_344_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend_stret'); + late final __objc_msgSend_344_stret = __objc_msgSend_344_stretPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_rangeOfCharacterFromSet_options_range_1 = + _registerName1("rangeOfCharacterFromSet:options:range:"); + _NSRange _objc_msgSend_345( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchSet, + int mask, + _NSRange rangeOfReceiverToSearch, + ) { + return __objc_msgSend_345( + obj, + sel, + searchSet, + mask, + rangeOfReceiverToSearch, + ); + } + + late final __objc_msgSend_345Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + void _objc_msgSend_345_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchSet, + int mask, + _NSRange rangeOfReceiverToSearch, + ) { + return __objc_msgSend_345_stret( + stret, + obj, + sel, + searchSet, + mask, + rangeOfReceiverToSearch, + ); + } + + late final __objc_msgSend_345_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_345_stret = __objc_msgSend_345_stretPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + + late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = + _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); + _NSRange _objc_msgSend_346( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_346( + obj, + sel, + index, + ); + } + + late final __objc_msgSend_346Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); + + void _objc_msgSend_346_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_346_stret( + stret, + obj, + sel, + index, + ); + } + + late final __objc_msgSend_346_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend_stret'); + late final __objc_msgSend_346_stret = __objc_msgSend_346_stretPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_rangeOfComposedCharacterSequencesForRange_1 = + _registerName1("rangeOfComposedCharacterSequencesForRange:"); + _NSRange _objc_msgSend_347( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_347( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_347Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< + _NSRange Function( + ffi.Pointer, ffi.Pointer, _NSRange)>(); + + void _objc_msgSend_347_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_347_stret( + stret, + obj, + sel, + range, + ); + } + + late final __objc_msgSend_347_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_347_stret = __objc_msgSend_347_stretPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, _NSRange)>(); + + late final _sel_stringByAppendingString_1 = + _registerName1("stringByAppendingString:"); + late final _sel_stringByAppendingFormat_1 = + _registerName1("stringByAppendingFormat:"); + late final _sel_uppercaseString1 = _registerName1("uppercaseString"); + late final _sel_lowercaseString1 = _registerName1("lowercaseString"); + late final _sel_capitalizedString1 = _registerName1("capitalizedString"); + late final _sel_localizedUppercaseString1 = + _registerName1("localizedUppercaseString"); + late final _sel_localizedLowercaseString1 = + _registerName1("localizedLowercaseString"); + late final _sel_localizedCapitalizedString1 = + _registerName1("localizedCapitalizedString"); + late final _sel_uppercaseStringWithLocale_1 = + _registerName1("uppercaseStringWithLocale:"); + ffi.Pointer _objc_msgSend_348( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer locale, + ) { + return __objc_msgSend_348( + obj, + sel, + locale, + ); + } + + late final __objc_msgSend_348Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_lowercaseStringWithLocale_1 = + _registerName1("lowercaseStringWithLocale:"); + late final _sel_capitalizedStringWithLocale_1 = + _registerName1("capitalizedStringWithLocale:"); + late final _sel_getLineStart_end_contentsEnd_forRange_1 = + _registerName1("getLineStart:end:contentsEnd:forRange:"); + void _objc_msgSend_349( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + _NSRange range, + ) { + return __objc_msgSend_349( + obj, + sel, + startPtr, + lineEndPtr, + contentsEndPtr, + range, + ); + } + + late final __objc_msgSend_349Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); + + late final _sel_lineRangeForRange_1 = _registerName1("lineRangeForRange:"); + late final _sel_getParagraphStart_end_contentsEnd_forRange_1 = + _registerName1("getParagraphStart:end:contentsEnd:forRange:"); + late final _sel_paragraphRangeForRange_1 = + _registerName1("paragraphRangeForRange:"); + late final _sel_enumerateSubstringsInRange_options_usingBlock_1 = + _registerName1("enumerateSubstringsInRange:options:usingBlock:"); + void _objc_msgSend_350( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_350( + obj, + sel, + range, + opts, + block, + ); + } + + late final __objc_msgSend_350Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, _NSRange, + int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateLinesUsingBlock_1 = + _registerName1("enumerateLinesUsingBlock:"); + void _objc_msgSend_351( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_351( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_351Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_UTF8String1 = _registerName1("UTF8String"); + late final _sel_fastestEncoding1 = _registerName1("fastestEncoding"); + late final _sel_smallestEncoding1 = _registerName1("smallestEncoding"); + late final _sel_dataUsingEncoding_allowLossyConversion_1 = + _registerName1("dataUsingEncoding:allowLossyConversion:"); + ffi.Pointer _objc_msgSend_352( + ffi.Pointer obj, + ffi.Pointer sel, + int encoding, + bool lossy, + ) { + return __objc_msgSend_352( + obj, + sel, + encoding, + lossy, + ); + } + + late final __objc_msgSend_352Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, bool)>(); + + late final _sel_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); + ffi.Pointer _objc_msgSend_353( + ffi.Pointer obj, + ffi.Pointer sel, + int encoding, + ) { + return __objc_msgSend_353( + obj, + sel, + encoding, + ); + } + + late final __objc_msgSend_353Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_canBeConvertedToEncoding_1 = + _registerName1("canBeConvertedToEncoding:"); + late final _sel_cStringUsingEncoding_1 = + _registerName1("cStringUsingEncoding:"); + late final _sel_getCString_maxLength_encoding_1 = + _registerName1("getCString:maxLength:encoding:"); + bool _objc_msgSend_354( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + int maxBufferCount, + int encoding, + ) { + return __objc_msgSend_354( + obj, + sel, + buffer, + maxBufferCount, + encoding, + ); + } + + late final __objc_msgSend_354Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); + + late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1 = + _registerName1( + "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); + bool _objc_msgSend_355( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + int maxBufferCount, + ffi.Pointer usedBufferCount, + int encoding, + int options, + _NSRange range, + ffi.Pointer<_NSRange> leftover, + ) { + return __objc_msgSend_355( + obj, + sel, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options, + range, + leftover, + ); + } + + late final __objc_msgSend_355Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Int32, + _NSRange, + ffi.Pointer<_NSRange>)>>('objc_msgSend'); + late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + int, + int, + _NSRange, + ffi.Pointer<_NSRange>)>(); + + late final _sel_maximumLengthOfBytesUsingEncoding_1 = + _registerName1("maximumLengthOfBytesUsingEncoding:"); + late final _sel_lengthOfBytesUsingEncoding_1 = + _registerName1("lengthOfBytesUsingEncoding:"); + late final _sel_availableStringEncodings1 = + _registerName1("availableStringEncodings"); + ffi.Pointer _objc_msgSend_356( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_356( + obj, + sel, + ); + } + + late final __objc_msgSend_356Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_localizedNameOfStringEncoding_1 = + _registerName1("localizedNameOfStringEncoding:"); + late final _sel_defaultCStringEncoding1 = + _registerName1("defaultCStringEncoding"); + late final _sel_decomposedStringWithCanonicalMapping1 = + _registerName1("decomposedStringWithCanonicalMapping"); + late final _sel_precomposedStringWithCanonicalMapping1 = + _registerName1("precomposedStringWithCanonicalMapping"); + late final _sel_decomposedStringWithCompatibilityMapping1 = + _registerName1("decomposedStringWithCompatibilityMapping"); + late final _sel_precomposedStringWithCompatibilityMapping1 = + _registerName1("precomposedStringWithCompatibilityMapping"); + late final _sel_componentsSeparatedByString_1 = + _registerName1("componentsSeparatedByString:"); + ffi.Pointer _objc_msgSend_357( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer separator, + ) { + return __objc_msgSend_357( + obj, + sel, + separator, + ); + } + + late final __objc_msgSend_357Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_componentsSeparatedByCharactersInSet_1 = + _registerName1("componentsSeparatedByCharactersInSet:"); + ffi.Pointer _objc_msgSend_358( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer separator, + ) { + return __objc_msgSend_358( + obj, + sel, + separator, + ); + } + + late final __objc_msgSend_358Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_stringByTrimmingCharactersInSet_1 = + _registerName1("stringByTrimmingCharactersInSet:"); + ffi.Pointer _objc_msgSend_359( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer set1, + ) { + return __objc_msgSend_359( + obj, + sel, + set1, + ); + } + + late final __objc_msgSend_359Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_stringByPaddingToLength_withString_startingAtIndex_1 = + _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); + ffi.Pointer _objc_msgSend_360( + ffi.Pointer obj, + ffi.Pointer sel, + int newLength, + ffi.Pointer padString, + int padIndex, + ) { + return __objc_msgSend_360( + obj, + sel, + newLength, + padString, + padIndex, + ); + } + + late final __objc_msgSend_360Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); + + late final _sel_stringByFoldingWithOptions_locale_1 = + _registerName1("stringByFoldingWithOptions:locale:"); + ffi.Pointer _objc_msgSend_361( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ffi.Pointer locale, + ) { + return __objc_msgSend_361( + obj, + sel, + options, + locale, + ); + } + + late final __objc_msgSend_361Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); + + late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_1 = + _registerName1( + "stringByReplacingOccurrencesOfString:withString:options:range:"); + ffi.Pointer _objc_msgSend_362( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer replacement, + int options, + _NSRange searchRange, + ) { + return __objc_msgSend_362( + obj, + sel, + target, + replacement, + options, + searchRange, + ); + } + + late final __objc_msgSend_362Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); + + late final _sel_stringByReplacingOccurrencesOfString_withString_1 = + _registerName1("stringByReplacingOccurrencesOfString:withString:"); + ffi.Pointer _objc_msgSend_363( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer replacement, + ) { + return __objc_msgSend_363( + obj, + sel, + target, + replacement, + ); + } + + late final __objc_msgSend_363Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_stringByReplacingCharactersInRange_withString_1 = + _registerName1("stringByReplacingCharactersInRange:withString:"); + ffi.Pointer _objc_msgSend_364( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer replacement, + ) { + return __objc_msgSend_364( + obj, + sel, + range, + replacement, + ); + } + + late final __objc_msgSend_364Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange, ffi.Pointer)>(); + + late final _sel_stringByApplyingTransform_reverse_1 = + _registerName1("stringByApplyingTransform:reverse:"); + ffi.Pointer _objc_msgSend_365( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer transform, + bool reverse, + ) { + return __objc_msgSend_365( + obj, + sel, + transform, + reverse, + ); + } + + late final __objc_msgSend_365Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_writeToURL_atomically_encoding_error_1 = + _registerName1("writeToURL:atomically:encoding:error:"); + bool _objc_msgSend_366( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error, + ) { + return __objc_msgSend_366( + obj, + sel, + url, + useAuxiliaryFile, + enc, + error, + ); + } + + late final __objc_msgSend_366Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.UnsignedLong, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + int, + ffi.Pointer>)>(); + + late final _sel_writeToFile_atomically_encoding_error_1 = + _registerName1("writeToFile:atomically:encoding:error:"); + bool _objc_msgSend_367( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error, + ) { + return __objc_msgSend_367( + obj, + sel, + path, + useAuxiliaryFile, + enc, + error, + ); + } + + late final __objc_msgSend_367Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.UnsignedLong, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + int, + ffi.Pointer>)>(); + + late final _sel_hash1 = _registerName1("hash"); + late final _sel_initWithCharactersNoCopy_length_freeWhenDone_1 = + _registerName1("initWithCharactersNoCopy:length:freeWhenDone:"); + instancetype _objc_msgSend_368( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer characters, + int length, + bool freeBuffer, + ) { + return __objc_msgSend_368( + obj, + sel, + characters, + length, + freeBuffer, + ); + } + + late final __objc_msgSend_368Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, bool)>(); + + late final _sel_initWithCharactersNoCopy_length_deallocator_1 = + _registerName1("initWithCharactersNoCopy:length:deallocator:"); + instancetype _objc_msgSend_369( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer chars, + int len, + ffi.Pointer<_ObjCBlock> deallocator, + ) { + return __objc_msgSend_369( + obj, + sel, + chars, + len, + deallocator, + ); + } + + late final __objc_msgSend_369Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_initWithCharacters_length_1 = + _registerName1("initWithCharacters:length:"); + instancetype _objc_msgSend_370( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer characters, + int length, + ) { + return __objc_msgSend_370( + obj, + sel, + characters, + length, + ); + } + + late final __objc_msgSend_370Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_initWithUTF8String_1 = _registerName1("initWithUTF8String:"); + instancetype _objc_msgSend_371( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer nullTerminatedCString, + ) { + return __objc_msgSend_371( + obj, + sel, + nullTerminatedCString, + ); + } + + late final __objc_msgSend_371Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithFormat_1 = _registerName1("initWithFormat:"); + late final _sel_initWithFormat_arguments_1 = + _registerName1("initWithFormat:arguments:"); + instancetype _objc_msgSend_372( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer argList, + ) { + return __objc_msgSend_372( + obj, + sel, + format, + argList, + ); + } + + late final __objc_msgSend_372Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithFormat_locale_1 = + _registerName1("initWithFormat:locale:"); + instancetype _objc_msgSend_373( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer locale, + ) { + return __objc_msgSend_373( + obj, + sel, + format, + locale, + ); + } + + late final __objc_msgSend_373Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithFormat_locale_arguments_1 = + _registerName1("initWithFormat:locale:arguments:"); + instancetype _objc_msgSend_374( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer locale, + ffi.Pointer argList, + ) { + return __objc_msgSend_374( + obj, + sel, + format, + locale, + argList, + ); + } + + late final __objc_msgSend_374Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_1 = + _registerName1("initWithValidatedFormat:validFormatSpecifiers:error:"); + instancetype _objc_msgSend_375( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + ffi.Pointer> error, + ) { + return __objc_msgSend_375( + obj, + sel, + format, + validFormatSpecifiers, + error, + ); + } + + late final __objc_msgSend_375Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1 = + _registerName1( + "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); + instancetype _objc_msgSend_376( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + ffi.Pointer locale, + ffi.Pointer> error, + ) { + return __objc_msgSend_376( + obj, + sel, + format, + validFormatSpecifiers, + locale, + error, + ); + } + + late final __objc_msgSend_376Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1 = + _registerName1( + "initWithValidatedFormat:validFormatSpecifiers:arguments:error:"); + instancetype _objc_msgSend_377( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + ffi.Pointer argList, + ffi.Pointer> error, + ) { + return __objc_msgSend_377( + obj, + sel, + format, + validFormatSpecifiers, + argList, + error, + ); + } + + late final __objc_msgSend_377Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1 = + _registerName1( + "initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error:"); + instancetype _objc_msgSend_378( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + ffi.Pointer locale, + ffi.Pointer argList, + ffi.Pointer> error, + ) { + return __objc_msgSend_378( + obj, + sel, + format, + validFormatSpecifiers, + locale, + argList, + error, + ); + } + + late final __objc_msgSend_378Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_initWithData_encoding_1 = + _registerName1("initWithData:encoding:"); + instancetype _objc_msgSend_379( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + int encoding, + ) { + return __objc_msgSend_379( + obj, + sel, + data, + encoding, + ); + } + + late final __objc_msgSend_379Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_initWithBytes_length_encoding_1 = + _registerName1("initWithBytes:length:encoding:"); + instancetype _objc_msgSend_380( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int len, + int encoding, + ) { + return __objc_msgSend_380( + obj, + sel, + bytes, + len, + encoding, + ); + } + + late final __objc_msgSend_380Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); + + late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1 = + _registerName1("initWithBytesNoCopy:length:encoding:freeWhenDone:"); + instancetype _objc_msgSend_381( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int len, + int encoding, + bool freeBuffer, + ) { + return __objc_msgSend_381( + obj, + sel, + bytes, + len, + encoding, + freeBuffer, + ); + } + + late final __objc_msgSend_381Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, bool)>(); + + late final _sel_initWithBytesNoCopy_length_encoding_deallocator_1 = + _registerName1("initWithBytesNoCopy:length:encoding:deallocator:"); + instancetype _objc_msgSend_382( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int len, + int encoding, + ffi.Pointer<_ObjCBlock> deallocator, + ) { + return __objc_msgSend_382( + obj, + sel, + bytes, + len, + encoding, + deallocator, + ); + } + + late final __objc_msgSend_382Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_string1 = _registerName1("string"); + late final _sel_stringWithString_1 = _registerName1("stringWithString:"); + late final _sel_stringWithCharacters_length_1 = + _registerName1("stringWithCharacters:length:"); + late final _sel_stringWithUTF8String_1 = + _registerName1("stringWithUTF8String:"); + late final _sel_stringWithFormat_1 = _registerName1("stringWithFormat:"); + late final _sel_localizedStringWithFormat_1 = + _registerName1("localizedStringWithFormat:"); + late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_1 = + _registerName1("stringWithValidatedFormat:validFormatSpecifiers:error:"); + late final _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1 = + _registerName1( + "localizedStringWithValidatedFormat:validFormatSpecifiers:error:"); + late final _sel_initWithCString_encoding_1 = + _registerName1("initWithCString:encoding:"); + instancetype _objc_msgSend_383( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer nullTerminatedCString, + int encoding, + ) { + return __objc_msgSend_383( + obj, + sel, + nullTerminatedCString, + encoding, + ); + } + + late final __objc_msgSend_383Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_stringWithCString_encoding_1 = + _registerName1("stringWithCString:encoding:"); + late final _sel_initWithContentsOfURL_encoding_error_1 = + _registerName1("initWithContentsOfURL:encoding:error:"); + instancetype _objc_msgSend_384( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int enc, + ffi.Pointer> error, + ) { + return __objc_msgSend_384( + obj, + sel, + url, + enc, + error, + ); + } + + late final __objc_msgSend_384Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_initWithContentsOfFile_encoding_error_1 = + _registerName1("initWithContentsOfFile:encoding:error:"); + instancetype _objc_msgSend_385( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + int enc, + ffi.Pointer> error, + ) { + return __objc_msgSend_385( + obj, + sel, + path, + enc, + error, + ); + } + + late final __objc_msgSend_385Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_stringWithContentsOfURL_encoding_error_1 = + _registerName1("stringWithContentsOfURL:encoding:error:"); + late final _sel_stringWithContentsOfFile_encoding_error_1 = + _registerName1("stringWithContentsOfFile:encoding:error:"); + late final _sel_initWithContentsOfURL_usedEncoding_error_1 = + _registerName1("initWithContentsOfURL:usedEncoding:error:"); + instancetype _objc_msgSend_386( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer enc, + ffi.Pointer> error, + ) { + return __objc_msgSend_386( + obj, + sel, + url, + enc, + error, + ); + } + + late final __objc_msgSend_386Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_initWithContentsOfFile_usedEncoding_error_1 = + _registerName1("initWithContentsOfFile:usedEncoding:error:"); + instancetype _objc_msgSend_387( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer enc, + ffi.Pointer> error, + ) { + return __objc_msgSend_387( + obj, + sel, + path, + enc, + error, + ); + } + + late final __objc_msgSend_387Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_stringWithContentsOfURL_usedEncoding_error_1 = + _registerName1("stringWithContentsOfURL:usedEncoding:error:"); + late final _sel_stringWithContentsOfFile_usedEncoding_error_1 = + _registerName1("stringWithContentsOfFile:usedEncoding:error:"); + late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1 = + _registerName1( + "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); + int _objc_msgSend_388( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ffi.Pointer opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion, + ) { + return __objc_msgSend_388( + obj, + sel, + data, + opts, + string, + usedLossyConversion, + ); + } + + late final __objc_msgSend_388Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); + + late final _sel_propertyList1 = _registerName1("propertyList"); + late final _sel_propertyListFromStringsFileFormat1 = + _registerName1("propertyListFromStringsFileFormat"); + ffi.Pointer _objc_msgSend_389( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_389( + obj, + sel, + ); + } + + late final __objc_msgSend_389Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_cString1 = _registerName1("cString"); + late final _sel_lossyCString1 = _registerName1("lossyCString"); + late final _sel_cStringLength1 = _registerName1("cStringLength"); + late final _sel_getCString_1 = _registerName1("getCString:"); + late final _sel_getCString_maxLength_1 = + _registerName1("getCString:maxLength:"); + void _objc_msgSend_390( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int maxLength, + ) { + return __objc_msgSend_390( + obj, + sel, + bytes, + maxLength, + ); + } + + late final __objc_msgSend_390Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_getCString_maxLength_range_remainingRange_1 = + _registerName1("getCString:maxLength:range:remainingRange:"); + void _objc_msgSend_391( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int maxLength, + _NSRange aRange, + ffi.Pointer<_NSRange> leftoverRange, + ) { + return __objc_msgSend_391( + obj, + sel, + bytes, + maxLength, + aRange, + leftoverRange, + ); + } + + late final __objc_msgSend_391Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + _NSRange, + ffi.Pointer<_NSRange>)>>('objc_msgSend'); + late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange, ffi.Pointer<_NSRange>)>(); + + late final _sel_stringWithContentsOfFile_1 = + _registerName1("stringWithContentsOfFile:"); + late final _sel_stringWithContentsOfURL_1 = + _registerName1("stringWithContentsOfURL:"); + late final _sel_initWithCStringNoCopy_length_freeWhenDone_1 = + _registerName1("initWithCStringNoCopy:length:freeWhenDone:"); + ffi.Pointer _objc_msgSend_392( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, + bool freeBuffer, + ) { + return __objc_msgSend_392( + obj, + sel, + bytes, + length, + freeBuffer, + ); + } + + late final __objc_msgSend_392Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, bool)>(); + + late final _sel_initWithCString_length_1 = + _registerName1("initWithCString:length:"); + late final _sel_initWithCString_1 = _registerName1("initWithCString:"); + late final _sel_stringWithCString_length_1 = + _registerName1("stringWithCString:length:"); + late final _sel_stringWithCString_1 = _registerName1("stringWithCString:"); + late final _sel_getCharacters_1 = _registerName1("getCharacters:"); + void _objc_msgSend_393( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + ) { + return __objc_msgSend_393( + obj, + sel, + buffer, + ); + } + + late final __objc_msgSend_393Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_variantFittingPresentationWidth_1 = + _registerName1("variantFittingPresentationWidth:"); + ffi.Pointer _objc_msgSend_394( + ffi.Pointer obj, + ffi.Pointer sel, + int width, + ) { + return __objc_msgSend_394( + obj, + sel, + width, + ); + } + + late final __objc_msgSend_394Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_pathWithComponents_1 = _registerName1("pathWithComponents:"); + ffi.Pointer _objc_msgSend_395( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer components, + ) { + return __objc_msgSend_395( + obj, + sel, + components, + ); + } + + late final __objc_msgSend_395Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_isAbsolutePath1 = _registerName1("isAbsolutePath"); + late final _sel_stringByDeletingLastPathComponent1 = + _registerName1("stringByDeletingLastPathComponent"); + late final _sel_stringByAppendingPathComponent_1 = + _registerName1("stringByAppendingPathComponent:"); + late final _sel_stringByDeletingPathExtension1 = + _registerName1("stringByDeletingPathExtension"); + late final _sel_stringByAppendingPathExtension_1 = + _registerName1("stringByAppendingPathExtension:"); + late final _sel_stringByAbbreviatingWithTildeInPath1 = + _registerName1("stringByAbbreviatingWithTildeInPath"); + late final _sel_stringByExpandingTildeInPath1 = + _registerName1("stringByExpandingTildeInPath"); + late final _sel_stringByStandardizingPath1 = + _registerName1("stringByStandardizingPath"); + late final _sel_stringByResolvingSymlinksInPath1 = + _registerName1("stringByResolvingSymlinksInPath"); + late final _sel_stringsByAppendingPaths_1 = + _registerName1("stringsByAppendingPaths:"); + late final _sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_1 = + _registerName1( + "completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:"); + int _objc_msgSend_396( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> outputName, + bool flag, + ffi.Pointer> outputArray, + ffi.Pointer filterTypes, + ) { + return __objc_msgSend_396( + obj, + sel, + outputName, + flag, + outputArray, + filterTypes, + ); + } + + late final __objc_msgSend_396Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Bool, + ffi.Pointer>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + bool, + ffi.Pointer>, + ffi.Pointer)>(); + + late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = + _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); + ffi.Pointer _objc_msgSend_397( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer allowedCharacters, + ) { + return __objc_msgSend_397( + obj, + sel, + allowedCharacters, + ); + } + + late final __objc_msgSend_397Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_stringByRemovingPercentEncoding1 = + _registerName1("stringByRemovingPercentEncoding"); + late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = + _registerName1("stringByAddingPercentEscapesUsingEncoding:"); + ffi.Pointer _objc_msgSend_398( + ffi.Pointer obj, + ffi.Pointer sel, + int enc, + ) { + return __objc_msgSend_398( + obj, + sel, + enc, + ); + } + + late final __objc_msgSend_398Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = + _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); + late final _class_NSOrthography1 = _getClass1("NSOrthography"); + late final _sel_dominantScript1 = _registerName1("dominantScript"); + late final _sel_languageMap1 = _registerName1("languageMap"); + late final _sel_initWithDominantScript_languageMap_1 = + _registerName1("initWithDominantScript:languageMap:"); + instancetype _objc_msgSend_399( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer script, + ffi.Pointer map, + ) { + return __objc_msgSend_399( + obj, + sel, + script, + map, + ); + } + + late final __objc_msgSend_399Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_languagesForScript_1 = _registerName1("languagesForScript:"); + late final _sel_dominantLanguageForScript_1 = + _registerName1("dominantLanguageForScript:"); + late final _sel_dominantLanguage1 = _registerName1("dominantLanguage"); + late final _sel_allScripts1 = _registerName1("allScripts"); + late final _sel_allLanguages1 = _registerName1("allLanguages"); + late final _sel_defaultOrthographyForLanguage_1 = + _registerName1("defaultOrthographyForLanguage:"); + late final _sel_orthographyWithDominantScript_languageMap_1 = + _registerName1("orthographyWithDominantScript:languageMap:"); + late final _sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_1 = + _registerName1( + "linguisticTagsInRange:scheme:options:orthography:tokenRanges:"); + ffi.Pointer _objc_msgSend_400( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer scheme, + int options, + ffi.Pointer orthography, + ffi.Pointer> tokenRanges, + ) { + return __objc_msgSend_400( + obj, + sel, + range, + scheme, + options, + orthography, + tokenRanges, + ); + } + + late final __objc_msgSend_400Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_1 = + _registerName1( + "enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock:"); + void _objc_msgSend_401( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer scheme, + int options, + ffi.Pointer orthography, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_401( + obj, + sel, + range, + scheme, + options, + orthography, + block, + ); + } + + late final __objc_msgSend_401Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_anyObject1 = _registerName1("anyObject"); + late final _sel_intersectsSet_1 = _registerName1("intersectsSet:"); + bool _objc_msgSend_402( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherSet, + ) { + return __objc_msgSend_402( + obj, + sel, + otherSet, + ); + } + + late final __objc_msgSend_402Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_isEqualToSet_1 = _registerName1("isEqualToSet:"); + late final _sel_isSubsetOfSet_1 = _registerName1("isSubsetOfSet:"); + late final _sel_setByAddingObject_1 = _registerName1("setByAddingObject:"); + ffi.Pointer _objc_msgSend_403( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ) { + return __objc_msgSend_403( + obj, + sel, + anObject, + ); + } + + late final __objc_msgSend_403Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setByAddingObjectsFromSet_1 = + _registerName1("setByAddingObjectsFromSet:"); + ffi.Pointer _objc_msgSend_404( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + ) { + return __objc_msgSend_404( + obj, + sel, + other, + ); + } + + late final __objc_msgSend_404Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setByAddingObjectsFromArray_1 = + _registerName1("setByAddingObjectsFromArray:"); + ffi.Pointer _objc_msgSend_405( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + ) { + return __objc_msgSend_405( + obj, + sel, + other, + ); + } + + late final __objc_msgSend_405Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_406( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_406( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_406Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + void _objc_msgSend_407( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_407( + obj, + sel, + opts, + block, + ); + } + + late final __objc_msgSend_407Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_objectsPassingTest_1 = _registerName1("objectsPassingTest:"); + ffi.Pointer _objc_msgSend_408( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_408( + obj, + sel, + predicate, + ); + } + + late final __objc_msgSend_408Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_objectsWithOptions_passingTest_1 = + _registerName1("objectsWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_409( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_409( + obj, + sel, + opts, + predicate, + ); + } + + late final __objc_msgSend_409Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_set1 = _registerName1("set"); + late final _sel_setWithObject_1 = _registerName1("setWithObject:"); + late final _sel_setWithObjects_count_1 = + _registerName1("setWithObjects:count:"); + late final _sel_setWithObjects_1 = _registerName1("setWithObjects:"); + late final _sel_setWithSet_1 = _registerName1("setWithSet:"); + instancetype _objc_msgSend_410( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer set1, + ) { + return __objc_msgSend_410( + obj, + sel, + set1, + ); + } + + late final __objc_msgSend_410Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setWithArray_1 = _registerName1("setWithArray:"); + late final _sel_initWithSet_1 = _registerName1("initWithSet:"); + late final _sel_initWithSet_copyItems_1 = + _registerName1("initWithSet:copyItems:"); + instancetype _objc_msgSend_411( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer set1, + bool flag, + ) { + return __objc_msgSend_411( + obj, + sel, + set1, + flag, + ); + } + + late final __objc_msgSend_411Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_filteredSetUsingPredicate_1 = + _registerName1("filteredSetUsingPredicate:"); + ffi.Pointer _objc_msgSend_412( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer predicate, + ) { + return __objc_msgSend_412( + obj, + sel, + predicate, + ); + } + + late final __objc_msgSend_412Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_invocationWithMethodSignature_1 = + _registerName1("invocationWithMethodSignature:"); + ffi.Pointer _objc_msgSend_413( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer sig, + ) { + return __objc_msgSend_413( + obj, + sel, + sig, + ); + } + + late final __objc_msgSend_413Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_methodSignature1 = _registerName1("methodSignature"); + ffi.Pointer _objc_msgSend_414( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_414( + obj, + sel, + ); + } + + late final __objc_msgSend_414Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_retainArguments1 = _registerName1("retainArguments"); + late final _sel_argumentsRetained1 = _registerName1("argumentsRetained"); + late final _sel_target1 = _registerName1("target"); + late final _sel_setTarget_1 = _registerName1("setTarget:"); + void _objc_msgSend_415( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_415( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_415Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_selector1 = _registerName1("selector"); + ffi.Pointer _objc_msgSend_416( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_416( + obj, + sel, + ); + } + + late final __objc_msgSend_416Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setSelector_1 = _registerName1("setSelector:"); + void _objc_msgSend_417( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_417( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_417Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_getReturnValue_1 = _registerName1("getReturnValue:"); + late final _sel_setReturnValue_1 = _registerName1("setReturnValue:"); + late final _sel_getArgument_atIndex_1 = + _registerName1("getArgument:atIndex:"); + void _objc_msgSend_418( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer argumentLocation, + int idx, + ) { + return __objc_msgSend_418( + obj, + sel, + argumentLocation, + idx, + ); + } + + late final __objc_msgSend_418Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_setArgument_atIndex_1 = + _registerName1("setArgument:atIndex:"); + late final _sel_invoke1 = _registerName1("invoke"); + late final _sel_invokeWithTarget_1 = _registerName1("invokeWithTarget:"); + late final _sel_invokeUsingIMP_1 = _registerName1("invokeUsingIMP:"); + void _objc_msgSend_419( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> imp, + ) { + return __objc_msgSend_419( + obj, + sel, + imp, + ); + } + + late final __objc_msgSend_419Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>( + 'objc_msgSend'); + late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_forwardInvocation_1 = _registerName1("forwardInvocation:"); + void _objc_msgSend_420( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anInvocation, + ) { + return __objc_msgSend_420( + obj, + sel, + anInvocation, + ); + } + + late final __objc_msgSend_420Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_methodSignatureForSelector_1 = + _registerName1("methodSignatureForSelector:"); + ffi.Pointer _objc_msgSend_421( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ) { + return __objc_msgSend_421( + obj, + sel, + aSelector, + ); + } + + late final __objc_msgSend_421Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_instanceMethodSignatureForSelector_1 = + _registerName1("instanceMethodSignatureForSelector:"); + late final _sel_allowsWeakReference1 = _registerName1("allowsWeakReference"); + late final _sel_retainWeakReference1 = _registerName1("retainWeakReference"); + late final _sel_isSubclassOfClass_1 = _registerName1("isSubclassOfClass:"); + late final _sel_resolveClassMethod_1 = _registerName1("resolveClassMethod:"); + late final _sel_resolveInstanceMethod_1 = + _registerName1("resolveInstanceMethod:"); + late final _sel_superclass1 = _registerName1("superclass"); + late final _sel_class1 = _registerName1("class"); + late final _sel_debugDescription1 = _registerName1("debugDescription"); + late final _sel_version1 = _registerName1("version"); + late final _sel_setVersion_1 = _registerName1("setVersion:"); + void _objc_msgSend_422( + ffi.Pointer obj, + ffi.Pointer sel, + int aVersion, + ) { + return __objc_msgSend_422( + obj, + sel, + aVersion, + ); + } + + late final __objc_msgSend_422Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_classForCoder1 = _registerName1("classForCoder"); + late final _sel_replacementObjectForCoder_1 = + _registerName1("replacementObjectForCoder:"); + late final _sel_awakeAfterUsingCoder_1 = + _registerName1("awakeAfterUsingCoder:"); + late final _sel_poseAsClass_1 = _registerName1("poseAsClass:"); + late final _sel_autoContentAccessingProxy1 = + _registerName1("autoContentAccessingProxy"); + late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = + _registerName1( + "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); + void _objc_msgSend_423( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer error, + int recoveryOptionIndex, + ffi.Pointer delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo, + ) { + return __objc_msgSend_423( + obj, + sel, + error, + recoveryOptionIndex, + delegate, + didRecoverSelector, + contextInfo, + ); + } + + late final __objc_msgSend_423Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_attemptRecoveryFromError_optionIndex_1 = + _registerName1("attemptRecoveryFromError:optionIndex:"); + bool _objc_msgSend_424( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer error, + int recoveryOptionIndex, + ) { + return __objc_msgSend_424( + obj, + sel, + error, + recoveryOptionIndex, + ); + } + + late final __objc_msgSend_424Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_performSelector_withObject_afterDelay_inModes_1 = + _registerName1("performSelector:withObject:afterDelay:inModes:"); + void _objc_msgSend_425( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ffi.Pointer anArgument, + double delay, + ffi.Pointer modes, + ) { + return __objc_msgSend_425( + obj, + sel, + aSelector, + anArgument, + delay, + modes, + ); + } + + late final __objc_msgSend_425Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer)>(); + + late final _sel_performSelector_withObject_afterDelay_1 = + _registerName1("performSelector:withObject:afterDelay:"); + void _objc_msgSend_426( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ffi.Pointer anArgument, + double delay, + ) { + return __objc_msgSend_426( + obj, + sel, + aSelector, + anArgument, + delay, + ); + } + + late final __objc_msgSend_426Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_URL_resourceDataDidBecomeAvailable_1 = + _registerName1("URL:resourceDataDidBecomeAvailable:"); + void _objc_msgSend_427( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer sender, + ffi.Pointer newBytes, + ) { + return __objc_msgSend_427( + obj, + sel, + sender, + newBytes, + ); + } + + late final __objc_msgSend_427Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_URLResourceDidFinishLoading_1 = + _registerName1("URLResourceDidFinishLoading:"); + void _objc_msgSend_428( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer sender, + ) { + return __objc_msgSend_428( + obj, + sel, + sender, + ); + } + + late final __objc_msgSend_428Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_URLResourceDidCancelLoading_1 = + _registerName1("URLResourceDidCancelLoading:"); + late final _sel_URL_resourceDidFailLoadingWithReason_1 = + _registerName1("URL:resourceDidFailLoadingWithReason:"); + void _objc_msgSend_429( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer sender, + ffi.Pointer reason, + ) { + return __objc_msgSend_429( + obj, + sel, + sender, + reason, + ); + } + + late final __objc_msgSend_429Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSFileManager1 = _getClass1("NSFileManager"); + late final _sel_defaultManager1 = _registerName1("defaultManager"); + ffi.Pointer _objc_msgSend_430( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_430( + obj, + sel, + ); + } + + late final __objc_msgSend_430Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_1 = + _registerName1( + "mountedVolumeURLsIncludingResourceValuesForKeys:options:"); + ffi.Pointer _objc_msgSend_431( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer propertyKeys, + int options, + ) { + return __objc_msgSend_431( + obj, + sel, + propertyKeys, + options, + ); + } + + late final __objc_msgSend_431Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_unmountVolumeAtURL_options_completionHandler_1 = + _registerName1("unmountVolumeAtURL:options:completionHandler:"); + void _objc_msgSend_432( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int mask, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_432( + obj, + sel, + url, + mask, + completionHandler, + ); + } + + late final __objc_msgSend_432Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_1 = + _registerName1( + "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:"); + ffi.Pointer _objc_msgSend_433( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer keys, + int mask, + ffi.Pointer> error, + ) { + return __objc_msgSend_433( + obj, + sel, + url, + keys, + mask, + error, + ); + } + + late final __objc_msgSend_433Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_URLsForDirectory_inDomains_1 = + _registerName1("URLsForDirectory:inDomains:"); + ffi.Pointer _objc_msgSend_434( + ffi.Pointer obj, + ffi.Pointer sel, + int directory, + int domainMask, + ) { + return __objc_msgSend_434( + obj, + sel, + directory, + domainMask, + ); + } + + late final __objc_msgSend_434Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, int)>(); + + late final _sel_URLForDirectory_inDomain_appropriateForURL_create_error_1 = + _registerName1( + "URLForDirectory:inDomain:appropriateForURL:create:error:"); + ffi.Pointer _objc_msgSend_435( + ffi.Pointer obj, + ffi.Pointer sel, + int directory, + int domain, + ffi.Pointer url, + bool shouldCreate, + ffi.Pointer> error, + ) { + return __objc_msgSend_435( + obj, + sel, + directory, + domain, + url, + shouldCreate, + error, + ); + } + + late final __objc_msgSend_435Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer, + ffi.Bool, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + bool, + ffi.Pointer>)>(); + + late final _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_1 = + _registerName1("getRelationship:ofDirectoryAtURL:toItemAtURL:error:"); + bool _objc_msgSend_436( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer outRelationship, + ffi.Pointer directoryURL, + ffi.Pointer otherURL, + ffi.Pointer> error, + ) { + return __objc_msgSend_436( + obj, + sel, + outRelationship, + directoryURL, + otherURL, + error, + ); + } + + late final __objc_msgSend_436Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_1 = + _registerName1("getRelationship:ofDirectory:inDomain:toItemAtURL:error:"); + bool _objc_msgSend_437( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer outRelationship, + int directory, + int domainMask, + ffi.Pointer url, + ffi.Pointer> error, + ) { + return __objc_msgSend_437( + obj, + sel, + outRelationship, + directory, + domainMask, + url, + error, + ); + } + + late final __objc_msgSend_437Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_1 = + _registerName1( + "createDirectoryAtURL:withIntermediateDirectories:attributes:error:"); + bool _objc_msgSend_438( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + bool createIntermediates, + ffi.Pointer attributes, + ffi.Pointer> error, + ) { + return __objc_msgSend_438( + obj, + sel, + url, + createIntermediates, + attributes, + error, + ); + } + + late final __objc_msgSend_438Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_createSymbolicLinkAtURL_withDestinationURL_error_1 = + _registerName1("createSymbolicLinkAtURL:withDestinationURL:error:"); + bool _objc_msgSend_439( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer destURL, + ffi.Pointer> error, + ) { + return __objc_msgSend_439( + obj, + sel, + url, + destURL, + error, + ); + } + + late final __objc_msgSend_439Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_delegate1 = _registerName1("delegate"); + late final _sel_setDelegate_1 = _registerName1("setDelegate:"); + late final _sel_setAttributes_ofItemAtPath_error_1 = + _registerName1("setAttributes:ofItemAtPath:error:"); + bool _objc_msgSend_440( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer attributes, + ffi.Pointer path, + ffi.Pointer> error, + ) { + return __objc_msgSend_440( + obj, + sel, + attributes, + path, + error, + ); + } + + late final __objc_msgSend_440Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_1 = + _registerName1( + "createDirectoryAtPath:withIntermediateDirectories:attributes:error:"); + bool _objc_msgSend_441( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool createIntermediates, + ffi.Pointer attributes, + ffi.Pointer> error, + ) { + return __objc_msgSend_441( + obj, + sel, + path, + createIntermediates, + attributes, + error, + ); + } + + late final __objc_msgSend_441Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_contentsOfDirectoryAtPath_error_1 = + _registerName1("contentsOfDirectoryAtPath:error:"); + ffi.Pointer _objc_msgSend_442( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer> error, + ) { + return __objc_msgSend_442( + obj, + sel, + path, + error, + ); + } + + late final __objc_msgSend_442Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_subpathsOfDirectoryAtPath_error_1 = + _registerName1("subpathsOfDirectoryAtPath:error:"); + late final _sel_attributesOfItemAtPath_error_1 = + _registerName1("attributesOfItemAtPath:error:"); + ffi.Pointer _objc_msgSend_443( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer> error, + ) { + return __objc_msgSend_443( + obj, + sel, + path, + error, + ); + } + + late final __objc_msgSend_443Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_attributesOfFileSystemForPath_error_1 = + _registerName1("attributesOfFileSystemForPath:error:"); + late final _sel_createSymbolicLinkAtPath_withDestinationPath_error_1 = + _registerName1("createSymbolicLinkAtPath:withDestinationPath:error:"); + bool _objc_msgSend_444( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer destPath, + ffi.Pointer> error, + ) { + return __objc_msgSend_444( + obj, + sel, + path, + destPath, + error, + ); + } + + late final __objc_msgSend_444Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_destinationOfSymbolicLinkAtPath_error_1 = + _registerName1("destinationOfSymbolicLinkAtPath:error:"); + ffi.Pointer _objc_msgSend_445( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer> error, + ) { + return __objc_msgSend_445( + obj, + sel, + path, + error, + ); + } + + late final __objc_msgSend_445Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_copyItemAtPath_toPath_error_1 = + _registerName1("copyItemAtPath:toPath:error:"); + late final _sel_moveItemAtPath_toPath_error_1 = + _registerName1("moveItemAtPath:toPath:error:"); + late final _sel_linkItemAtPath_toPath_error_1 = + _registerName1("linkItemAtPath:toPath:error:"); + late final _sel_removeItemAtPath_error_1 = + _registerName1("removeItemAtPath:error:"); + bool _objc_msgSend_446( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer> error, + ) { + return __objc_msgSend_446( + obj, + sel, + path, + error, + ); + } + + late final __objc_msgSend_446Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); + + late final _sel_copyItemAtURL_toURL_error_1 = + _registerName1("copyItemAtURL:toURL:error:"); + late final _sel_moveItemAtURL_toURL_error_1 = + _registerName1("moveItemAtURL:toURL:error:"); + late final _sel_linkItemAtURL_toURL_error_1 = + _registerName1("linkItemAtURL:toURL:error:"); + late final _sel_removeItemAtURL_error_1 = + _registerName1("removeItemAtURL:error:"); + late final _sel_trashItemAtURL_resultingItemURL_error_1 = + _registerName1("trashItemAtURL:resultingItemURL:error:"); + bool _objc_msgSend_447( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer> outResultingURL, + ffi.Pointer> error, + ) { + return __objc_msgSend_447( + obj, + sel, + url, + outResultingURL, + error, + ); + } + + late final __objc_msgSend_447Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _sel_fileAttributesAtPath_traverseLink_1 = + _registerName1("fileAttributesAtPath:traverseLink:"); + ffi.Pointer _objc_msgSend_448( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool yorn, + ) { + return __objc_msgSend_448( + obj, + sel, + path, + yorn, + ); + } + + late final __objc_msgSend_448Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_changeFileAttributes_atPath_1 = + _registerName1("changeFileAttributes:atPath:"); + bool _objc_msgSend_449( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer attributes, + ffi.Pointer path, + ) { + return __objc_msgSend_449( + obj, + sel, + attributes, + path, + ); + } + + late final __objc_msgSend_449Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_directoryContentsAtPath_1 = + _registerName1("directoryContentsAtPath:"); + late final _sel_fileSystemAttributesAtPath_1 = + _registerName1("fileSystemAttributesAtPath:"); + late final _sel_pathContentOfSymbolicLinkAtPath_1 = + _registerName1("pathContentOfSymbolicLinkAtPath:"); + late final _sel_createSymbolicLinkAtPath_pathContent_1 = + _registerName1("createSymbolicLinkAtPath:pathContent:"); + bool _objc_msgSend_450( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer otherpath, + ) { + return __objc_msgSend_450( + obj, + sel, + path, + otherpath, + ); + } + + late final __objc_msgSend_450Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_createDirectoryAtPath_attributes_1 = + _registerName1("createDirectoryAtPath:attributes:"); + bool _objc_msgSend_451( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer attributes, + ) { + return __objc_msgSend_451( + obj, + sel, + path, + attributes, + ); + } + + late final __objc_msgSend_451Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_linkPath_toPath_handler_1 = + _registerName1("linkPath:toPath:handler:"); + bool _objc_msgSend_452( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer src, + ffi.Pointer dest, + ffi.Pointer handler, + ) { + return __objc_msgSend_452( + obj, + sel, + src, + dest, + handler, + ); + } + + late final __objc_msgSend_452Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_copyPath_toPath_handler_1 = + _registerName1("copyPath:toPath:handler:"); + late final _sel_movePath_toPath_handler_1 = + _registerName1("movePath:toPath:handler:"); + late final _sel_removeFileAtPath_handler_1 = + _registerName1("removeFileAtPath:handler:"); + bool _objc_msgSend_453( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer handler, + ) { + return __objc_msgSend_453( + obj, + sel, + path, + handler, + ); + } + + late final __objc_msgSend_453Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_currentDirectoryPath1 = + _registerName1("currentDirectoryPath"); + late final _sel_changeCurrentDirectoryPath_1 = + _registerName1("changeCurrentDirectoryPath:"); + late final _sel_fileExistsAtPath_1 = _registerName1("fileExistsAtPath:"); + late final _sel_fileExistsAtPath_isDirectory_1 = + _registerName1("fileExistsAtPath:isDirectory:"); + bool _objc_msgSend_454( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer isDirectory, + ) { + return __objc_msgSend_454( + obj, + sel, + path, + isDirectory, + ); + } + + late final __objc_msgSend_454Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_isReadableFileAtPath_1 = + _registerName1("isReadableFileAtPath:"); + late final _sel_isWritableFileAtPath_1 = + _registerName1("isWritableFileAtPath:"); + late final _sel_isExecutableFileAtPath_1 = + _registerName1("isExecutableFileAtPath:"); + late final _sel_isDeletableFileAtPath_1 = + _registerName1("isDeletableFileAtPath:"); + late final _sel_contentsEqualAtPath_andPath_1 = + _registerName1("contentsEqualAtPath:andPath:"); + late final _sel_displayNameAtPath_1 = _registerName1("displayNameAtPath:"); + late final _sel_componentsToDisplayForPath_1 = + _registerName1("componentsToDisplayForPath:"); + late final _sel_enumeratorAtPath_1 = _registerName1("enumeratorAtPath:"); + late final _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_1 = + _registerName1( + "enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:"); + ffi.Pointer _objc_msgSend_455( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer keys, + int mask, + ffi.Pointer<_ObjCBlock> handler, + ) { + return __objc_msgSend_455( + obj, + sel, + url, + keys, + mask, + handler, + ); + } + + late final __objc_msgSend_455Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_subpathsAtPath_1 = _registerName1("subpathsAtPath:"); + late final _sel_contentsAtPath_1 = _registerName1("contentsAtPath:"); + ffi.Pointer _objc_msgSend_456( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_456( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_456Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_createFileAtPath_contents_attributes_1 = + _registerName1("createFileAtPath:contents:attributes:"); + bool _objc_msgSend_457( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer data, + ffi.Pointer attr, + ) { + return __objc_msgSend_457( + obj, + sel, + path, + data, + attr, + ); + } + + late final __objc_msgSend_457Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_fileSystemRepresentationWithPath_1 = + _registerName1("fileSystemRepresentationWithPath:"); + ffi.Pointer _objc_msgSend_458( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_458( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_458Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_stringWithFileSystemRepresentation_length_1 = + _registerName1("stringWithFileSystemRepresentation:length:"); + ffi.Pointer _objc_msgSend_459( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer str, + int len, + ) { + return __objc_msgSend_459( + obj, + sel, + str, + len, + ); + } + + late final __objc_msgSend_459Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_1 = + _registerName1( + "replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:"); + bool _objc_msgSend_460( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer originalItemURL, + ffi.Pointer newItemURL, + ffi.Pointer backupItemName, + int options, + ffi.Pointer> resultingURL, + ffi.Pointer> error, + ) { + return __objc_msgSend_460( + obj, + sel, + originalItemURL, + newItemURL, + backupItemName, + options, + resultingURL, + error, + ); + } + + late final __objc_msgSend_460Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _sel_setUbiquitous_itemAtURL_destinationURL_error_1 = + _registerName1("setUbiquitous:itemAtURL:destinationURL:error:"); + bool _objc_msgSend_461( + ffi.Pointer obj, + ffi.Pointer sel, + bool flag, + ffi.Pointer url, + ffi.Pointer destinationURL, + ffi.Pointer> error, + ) { + return __objc_msgSend_461( + obj, + sel, + flag, + url, + destinationURL, + error, + ); + } + + late final __objc_msgSend_461Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_isUbiquitousItemAtURL_1 = + _registerName1("isUbiquitousItemAtURL:"); + late final _sel_startDownloadingUbiquitousItemAtURL_error_1 = + _registerName1("startDownloadingUbiquitousItemAtURL:error:"); + late final _sel_evictUbiquitousItemAtURL_error_1 = + _registerName1("evictUbiquitousItemAtURL:error:"); + late final _sel_URLForUbiquityContainerIdentifier_1 = + _registerName1("URLForUbiquityContainerIdentifier:"); + ffi.Pointer _objc_msgSend_462( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer containerIdentifier, + ) { + return __objc_msgSend_462( + obj, + sel, + containerIdentifier, + ); + } + + late final __objc_msgSend_462Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_1 = + _registerName1( + "URLForPublishingUbiquitousItemAtURL:expirationDate:error:"); + ffi.Pointer _objc_msgSend_463( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer> outDate, + ffi.Pointer> error, + ) { + return __objc_msgSend_463( + obj, + sel, + url, + outDate, + error, + ); + } + + late final __objc_msgSend_463Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _sel_ubiquityIdentityToken1 = + _registerName1("ubiquityIdentityToken"); + late final _sel_getFileProviderServicesForItemAtURL_completionHandler_1 = + _registerName1("getFileProviderServicesForItemAtURL:completionHandler:"); + void _objc_msgSend_464( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_464( + obj, + sel, + url, + completionHandler, + ); + } + + late final __objc_msgSend_464Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_containerURLForSecurityApplicationGroupIdentifier_1 = + _registerName1("containerURLForSecurityApplicationGroupIdentifier:"); + late final _sel_homeDirectoryForCurrentUser1 = + _registerName1("homeDirectoryForCurrentUser"); + ffi.Pointer _objc_msgSend_465( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_465( + obj, + sel, + ); + } + + late final __objc_msgSend_465Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_temporaryDirectory1 = _registerName1("temporaryDirectory"); + late final _sel_homeDirectoryForUser_1 = + _registerName1("homeDirectoryForUser:"); + late final _sel_fileManager_shouldProceedAfterError_1 = + _registerName1("fileManager:shouldProceedAfterError:"); + bool _objc_msgSend_466( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer fm, + ffi.Pointer errorInfo, + ) { + return __objc_msgSend_466( + obj, + sel, + fm, + errorInfo, + ); + } + + late final __objc_msgSend_466Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_fileManager_willProcessPath_1 = + _registerName1("fileManager:willProcessPath:"); + void _objc_msgSend_467( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer fm, + ffi.Pointer path, + ) { + return __objc_msgSend_467( + obj, + sel, + fm, + path, + ); + } + + late final __objc_msgSend_467Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_validateValue_forKey_error_1 = + _registerName1("validateValue:forKey:error:"); + late final _class_NSMutableArray1 = _getClass1("NSMutableArray"); + late final _sel_addObject_1 = _registerName1("addObject:"); + late final _sel_insertObject_atIndex_1 = + _registerName1("insertObject:atIndex:"); + void _objc_msgSend_468( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + int index, + ) { + return __objc_msgSend_468( + obj, + sel, + anObject, + index, + ); + } + + late final __objc_msgSend_468Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_removeLastObject1 = _registerName1("removeLastObject"); + late final _sel_removeObjectAtIndex_1 = + _registerName1("removeObjectAtIndex:"); + void _objc_msgSend_469( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_469( + obj, + sel, + index, + ); + } + + late final __objc_msgSend_469Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_replaceObjectAtIndex_withObject_1 = + _registerName1("replaceObjectAtIndex:withObject:"); + void _objc_msgSend_470( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ffi.Pointer anObject, + ) { + return __objc_msgSend_470( + obj, + sel, + index, + anObject, + ); + } + + late final __objc_msgSend_470Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); + late final _sel_addObjectsFromArray_1 = + _registerName1("addObjectsFromArray:"); + void _objc_msgSend_471( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherArray, + ) { + return __objc_msgSend_471( + obj, + sel, + otherArray, + ); + } + + late final __objc_msgSend_471Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = + _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); + void _objc_msgSend_472( + ffi.Pointer obj, + ffi.Pointer sel, + int idx1, + int idx2, + ) { + return __objc_msgSend_472( + obj, + sel, + idx1, + idx2, + ); + } + + late final __objc_msgSend_472Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); + + late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); + late final _sel_removeObject_inRange_1 = + _registerName1("removeObject:inRange:"); + void _objc_msgSend_473( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + _NSRange range, + ) { + return __objc_msgSend_473( + obj, + sel, + anObject, + range, + ); + } + + late final __objc_msgSend_473Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>(); + + late final _sel_removeObject_1 = _registerName1("removeObject:"); + late final _sel_removeObjectIdenticalTo_inRange_1 = + _registerName1("removeObjectIdenticalTo:inRange:"); + late final _sel_removeObjectIdenticalTo_1 = + _registerName1("removeObjectIdenticalTo:"); + late final _sel_removeObjectsFromIndices_numIndices_1 = + _registerName1("removeObjectsFromIndices:numIndices:"); + void _objc_msgSend_474( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indices, + int cnt, + ) { + return __objc_msgSend_474( + obj, + sel, + indices, + cnt, + ); + } + + late final __objc_msgSend_474Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_removeObjectsInArray_1 = + _registerName1("removeObjectsInArray:"); + late final _sel_removeObjectsInRange_1 = + _registerName1("removeObjectsInRange:"); + void _objc_msgSend_475( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_475( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_475Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, _NSRange)>(); + + late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = + _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); + void _objc_msgSend_476( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer otherArray, + _NSRange otherRange, + ) { + return __objc_msgSend_476( + obj, + sel, + range, + otherArray, + otherRange, + ); + } + + late final __objc_msgSend_476Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, _NSRange, + ffi.Pointer, _NSRange)>(); + + late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = + _registerName1("replaceObjectsInRange:withObjectsFromArray:"); + void _objc_msgSend_477( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer otherArray, + ) { + return __objc_msgSend_477( + obj, + sel, + range, + otherArray, + ); + } + + late final __objc_msgSend_477Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, _NSRange, + ffi.Pointer)>(); + + late final _sel_setArray_1 = _registerName1("setArray:"); + late final _sel_sortUsingFunction_context_1 = + _registerName1("sortUsingFunction:context:"); + void _objc_msgSend_478( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context, + ) { + return __objc_msgSend_478( + obj, + sel, + compare, + context, + ); + } + + late final __objc_msgSend_478Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); + + late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); + late final _sel_insertObjects_atIndexes_1 = + _registerName1("insertObjects:atIndexes:"); + void _objc_msgSend_479( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer objects, + ffi.Pointer indexes, + ) { + return __objc_msgSend_479( + obj, + sel, + objects, + indexes, + ); + } + + late final __objc_msgSend_479Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_removeObjectsAtIndexes_1 = + _registerName1("removeObjectsAtIndexes:"); + void _objc_msgSend_480( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexes, + ) { + return __objc_msgSend_480( + obj, + sel, + indexes, + ); + } + + late final __objc_msgSend_480Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_replaceObjectsAtIndexes_withObjects_1 = + _registerName1("replaceObjectsAtIndexes:withObjects:"); + void _objc_msgSend_481( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexes, + ffi.Pointer objects, + ) { + return __objc_msgSend_481( + obj, + sel, + indexes, + objects, + ); + } + + late final __objc_msgSend_481Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setObject_atIndexedSubscript_1 = + _registerName1("setObject:atIndexedSubscript:"); + late final _sel_sortUsingComparator_1 = + _registerName1("sortUsingComparator:"); + void _objc_msgSend_482( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> cmptr, + ) { + return __objc_msgSend_482( + obj, + sel, + cmptr, + ); + } + + late final __objc_msgSend_482Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_sortWithOptions_usingComparator_1 = + _registerName1("sortWithOptions:usingComparator:"); + void _objc_msgSend_483( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> cmptr, + ) { + return __objc_msgSend_483( + obj, + sel, + opts, + cmptr, + ); + } + + late final __objc_msgSend_483Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); + ffi.Pointer _objc_msgSend_484( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_484( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_484Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_485( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_485( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_485Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_applyDifference_1 = _registerName1("applyDifference:"); + late final _sel_sortUsingDescriptors_1 = + _registerName1("sortUsingDescriptors:"); + late final _sel_filterUsingPredicate_1 = + _registerName1("filterUsingPredicate:"); + void _objc_msgSend_486( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer predicate, + ) { + return __objc_msgSend_486( + obj, + sel, + predicate, + ); + } + + late final __objc_msgSend_486Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_mutableArrayValueForKey_1 = + _registerName1("mutableArrayValueForKey:"); + ffi.Pointer _objc_msgSend_487( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_487( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_487Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSMutableOrderedSet1 = _getClass1("NSMutableOrderedSet"); + late final _class_NSOrderedSet1 = _getClass1("NSOrderedSet"); + late final _sel_isEqualToOrderedSet_1 = + _registerName1("isEqualToOrderedSet:"); + bool _objc_msgSend_488( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + ) { + return __objc_msgSend_488( + obj, + sel, + other, + ); + } + + late final __objc_msgSend_488Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_intersectsOrderedSet_1 = + _registerName1("intersectsOrderedSet:"); + late final _sel_isSubsetOfOrderedSet_1 = + _registerName1("isSubsetOfOrderedSet:"); + late final _sel_reversedOrderedSet1 = _registerName1("reversedOrderedSet"); + ffi.Pointer _objc_msgSend_489( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_489( + obj, + sel, + ); + } + + late final __objc_msgSend_489Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_489 = __objc_msgSend_489Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_490( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_490( + obj, + sel, + ); + } + + late final __objc_msgSend_490Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_490 = __objc_msgSend_490Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_orderedSet1 = _registerName1("orderedSet"); + late final _sel_orderedSetWithObject_1 = + _registerName1("orderedSetWithObject:"); + late final _sel_orderedSetWithObjects_count_1 = + _registerName1("orderedSetWithObjects:count:"); + late final _sel_orderedSetWithObjects_1 = + _registerName1("orderedSetWithObjects:"); + late final _sel_orderedSetWithOrderedSet_1 = + _registerName1("orderedSetWithOrderedSet:"); + instancetype _objc_msgSend_491( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer set1, + ) { + return __objc_msgSend_491( + obj, + sel, + set1, + ); + } + + late final __objc_msgSend_491Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_491 = __objc_msgSend_491Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_orderedSetWithOrderedSet_range_copyItems_1 = + _registerName1("orderedSetWithOrderedSet:range:copyItems:"); + instancetype _objc_msgSend_492( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer set1, + _NSRange range, + bool flag, + ) { + return __objc_msgSend_492( + obj, + sel, + set1, + range, + flag, + ); + } + + late final __objc_msgSend_492Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_492 = __objc_msgSend_492Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange, bool)>(); + + late final _sel_orderedSetWithArray_1 = + _registerName1("orderedSetWithArray:"); + late final _sel_orderedSetWithArray_range_copyItems_1 = + _registerName1("orderedSetWithArray:range:copyItems:"); + instancetype _objc_msgSend_493( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer array, + _NSRange range, + bool flag, + ) { + return __objc_msgSend_493( + obj, + sel, + array, + range, + flag, + ); + } + + late final __objc_msgSend_493Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_493 = __objc_msgSend_493Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange, bool)>(); + + late final _sel_orderedSetWithSet_1 = _registerName1("orderedSetWithSet:"); + late final _sel_orderedSetWithSet_copyItems_1 = + _registerName1("orderedSetWithSet:copyItems:"); + late final _sel_initWithObject_1 = _registerName1("initWithObject:"); + late final _sel_initWithOrderedSet_1 = _registerName1("initWithOrderedSet:"); + late final _sel_initWithOrderedSet_copyItems_1 = + _registerName1("initWithOrderedSet:copyItems:"); + instancetype _objc_msgSend_494( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer set1, + bool flag, + ) { + return __objc_msgSend_494( + obj, + sel, + set1, + flag, + ); + } + + late final __objc_msgSend_494Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_494 = __objc_msgSend_494Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_initWithOrderedSet_range_copyItems_1 = + _registerName1("initWithOrderedSet:range:copyItems:"); + late final _sel_initWithArray_range_copyItems_1 = + _registerName1("initWithArray:range:copyItems:"); + late final _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_1 = + _registerName1( + "differenceFromOrderedSet:withOptions:usingEquivalenceTest:"); + ffi.Pointer _objc_msgSend_495( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + int options, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_495( + obj, + sel, + other, + options, + block, + ); + } + + late final __objc_msgSend_495Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_495 = __objc_msgSend_495Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_differenceFromOrderedSet_withOptions_1 = + _registerName1("differenceFromOrderedSet:withOptions:"); + ffi.Pointer _objc_msgSend_496( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + int options, + ) { + return __objc_msgSend_496( + obj, + sel, + other, + options, + ); + } + + late final __objc_msgSend_496Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_496 = __objc_msgSend_496Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_differenceFromOrderedSet_1 = + _registerName1("differenceFromOrderedSet:"); + late final _sel_orderedSetByApplyingDifference_1 = + _registerName1("orderedSetByApplyingDifference:"); + ffi.Pointer _objc_msgSend_497( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer difference, + ) { + return __objc_msgSend_497( + obj, + sel, + difference, + ); + } + + late final __objc_msgSend_497Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_497 = __objc_msgSend_497Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_filteredOrderedSetUsingPredicate_1 = + _registerName1("filteredOrderedSetUsingPredicate:"); + ffi.Pointer _objc_msgSend_498( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer p, + ) { + return __objc_msgSend_498( + obj, + sel, + p, + ); + } + + late final __objc_msgSend_498Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_498 = __objc_msgSend_498Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_addObjects_count_1 = _registerName1("addObjects:count:"); + void _objc_msgSend_499( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + int count, + ) { + return __objc_msgSend_499( + obj, + sel, + objects, + count, + ); + } + + late final __objc_msgSend_499Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_499 = __objc_msgSend_499Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, int)>(); + + late final _sel_moveObjectsAtIndexes_toIndex_1 = + _registerName1("moveObjectsAtIndexes:toIndex:"); + void _objc_msgSend_500( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexes, + int idx, + ) { + return __objc_msgSend_500( + obj, + sel, + indexes, + idx, + ); + } + + late final __objc_msgSend_500Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_500 = __objc_msgSend_500Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_setObject_atIndex_1 = _registerName1("setObject:atIndex:"); + late final _sel_replaceObjectsInRange_withObjects_count_1 = + _registerName1("replaceObjectsInRange:withObjects:count:"); + void _objc_msgSend_501( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer> objects, + int count, + ) { + return __objc_msgSend_501( + obj, + sel, + range, + objects, + count, + ); + } + + late final __objc_msgSend_501Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer>, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_501 = __objc_msgSend_501Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, _NSRange, + ffi.Pointer>, int)>(); + + late final _sel_intersectOrderedSet_1 = + _registerName1("intersectOrderedSet:"); + void _objc_msgSend_502( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + ) { + return __objc_msgSend_502( + obj, + sel, + other, + ); + } + + late final __objc_msgSend_502Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_502 = __objc_msgSend_502Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_minusOrderedSet_1 = _registerName1("minusOrderedSet:"); + late final _sel_unionOrderedSet_1 = _registerName1("unionOrderedSet:"); + late final _sel_intersectSet_1 = _registerName1("intersectSet:"); + void _objc_msgSend_503( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + ) { + return __objc_msgSend_503( + obj, + sel, + other, + ); + } + + late final __objc_msgSend_503Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_503 = __objc_msgSend_503Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_minusSet_1 = _registerName1("minusSet:"); + late final _sel_unionSet_1 = _registerName1("unionSet:"); + late final _sel_sortRange_options_usingComparator_1 = + _registerName1("sortRange:options:usingComparator:"); + void _objc_msgSend_504( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> cmptr, + ) { + return __objc_msgSend_504( + obj, + sel, + range, + opts, + cmptr, + ); + } + + late final __objc_msgSend_504Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_504 = __objc_msgSend_504Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, _NSRange, + int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_orderedSetWithCapacity_1 = + _registerName1("orderedSetWithCapacity:"); + late final _sel_mutableOrderedSetValueForKey_1 = + _registerName1("mutableOrderedSetValueForKey:"); + ffi.Pointer _objc_msgSend_505( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_505( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_505Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_505 = __objc_msgSend_505Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSMutableSet1 = _getClass1("NSMutableSet"); + late final _sel_setSet_1 = _registerName1("setSet:"); + late final _sel_setWithCapacity_1 = _registerName1("setWithCapacity:"); + late final _sel_mutableSetValueForKey_1 = + _registerName1("mutableSetValueForKey:"); + ffi.Pointer _objc_msgSend_506( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_506( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_506Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_506 = __objc_msgSend_506Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_valueForKeyPath_1 = _registerName1("valueForKeyPath:"); + late final _sel_setValue_forKeyPath_1 = + _registerName1("setValue:forKeyPath:"); + late final _sel_validateValue_forKeyPath_error_1 = + _registerName1("validateValue:forKeyPath:error:"); + late final _sel_mutableArrayValueForKeyPath_1 = + _registerName1("mutableArrayValueForKeyPath:"); + late final _sel_mutableOrderedSetValueForKeyPath_1 = + _registerName1("mutableOrderedSetValueForKeyPath:"); + late final _sel_mutableSetValueForKeyPath_1 = + _registerName1("mutableSetValueForKeyPath:"); + late final _sel_valueForUndefinedKey_1 = + _registerName1("valueForUndefinedKey:"); + late final _sel_setValue_forUndefinedKey_1 = + _registerName1("setValue:forUndefinedKey:"); + late final _sel_setNilValueForKey_1 = _registerName1("setNilValueForKey:"); + late final _sel_dictionaryWithValuesForKeys_1 = + _registerName1("dictionaryWithValuesForKeys:"); + ffi.Pointer _objc_msgSend_507( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ) { + return __objc_msgSend_507( + obj, + sel, + keys, + ); + } + + late final __objc_msgSend_507Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_507 = __objc_msgSend_507Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setValuesForKeysWithDictionary_1 = + _registerName1("setValuesForKeysWithDictionary:"); + void _objc_msgSend_508( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keyedValues, + ) { + return __objc_msgSend_508( + obj, + sel, + keyedValues, + ); + } + + late final __objc_msgSend_508Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_508 = __objc_msgSend_508Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_storedValueForKey_1 = _registerName1("storedValueForKey:"); + late final _sel_takeStoredValue_forKey_1 = + _registerName1("takeStoredValue:forKey:"); + late final _sel_takeValue_forKey_1 = _registerName1("takeValue:forKey:"); + late final _sel_takeValue_forKeyPath_1 = + _registerName1("takeValue:forKeyPath:"); + late final _sel_handleQueryWithUnboundKey_1 = + _registerName1("handleQueryWithUnboundKey:"); + late final _sel_handleTakeValue_forUnboundKey_1 = + _registerName1("handleTakeValue:forUnboundKey:"); + late final _sel_unableToSetNilForKey_1 = + _registerName1("unableToSetNilForKey:"); + late final _sel_valuesForKeys_1 = _registerName1("valuesForKeys:"); + late final _sel_takeValuesFromDictionary_1 = + _registerName1("takeValuesFromDictionary:"); + late final _sel_observeValueForKeyPath_ofObject_change_context_1 = + _registerName1("observeValueForKeyPath:ofObject:change:context:"); + void _objc_msgSend_509( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keyPath, + ffi.Pointer object, + ffi.Pointer change, + ffi.Pointer context, + ) { + return __objc_msgSend_509( + obj, + sel, + keyPath, + object, + change, + context, + ); + } + + late final __objc_msgSend_509Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_509 = __objc_msgSend_509Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_willChangeValueForKey_1 = + _registerName1("willChangeValueForKey:"); + late final _sel_didChangeValueForKey_1 = + _registerName1("didChangeValueForKey:"); + late final _sel_willChange_valuesAtIndexes_forKey_1 = + _registerName1("willChange:valuesAtIndexes:forKey:"); + void _objc_msgSend_510( + ffi.Pointer obj, + ffi.Pointer sel, + int changeKind, + ffi.Pointer indexes, + ffi.Pointer key, + ) { + return __objc_msgSend_510( + obj, + sel, + changeKind, + indexes, + key, + ); + } + + late final __objc_msgSend_510Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_510 = __objc_msgSend_510Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_didChange_valuesAtIndexes_forKey_1 = + _registerName1("didChange:valuesAtIndexes:forKey:"); + late final _sel_willChangeValueForKey_withSetMutation_usingObjects_1 = + _registerName1("willChangeValueForKey:withSetMutation:usingObjects:"); + void _objc_msgSend_511( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + int mutationKind, + ffi.Pointer objects, + ) { + return __objc_msgSend_511( + obj, + sel, + key, + mutationKind, + objects, + ); + } + + late final __objc_msgSend_511Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_511 = __objc_msgSend_511Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); + + late final _sel_didChangeValueForKey_withSetMutation_usingObjects_1 = + _registerName1("didChangeValueForKey:withSetMutation:usingObjects:"); + late final _sel_observationInfo1 = _registerName1("observationInfo"); + late final _sel_setObservationInfo_1 = _registerName1("setObservationInfo:"); + void _objc_msgSend_512( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_512( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_512Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_512 = __objc_msgSend_512Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_classForKeyedArchiver1 = + _registerName1("classForKeyedArchiver"); + late final _class_NSKeyedArchiver1 = _getClass1("NSKeyedArchiver"); + late final _sel_initRequiringSecureCoding_1 = + _registerName1("initRequiringSecureCoding:"); + instancetype _objc_msgSend_513( + ffi.Pointer obj, + ffi.Pointer sel, + bool requiresSecureCoding, + ) { + return __objc_msgSend_513( + obj, + sel, + requiresSecureCoding, + ); + } + + late final __objc_msgSend_513Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_513 = __objc_msgSend_513Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_archivedDataWithRootObject_requiringSecureCoding_error_1 = + _registerName1("archivedDataWithRootObject:requiringSecureCoding:error:"); + ffi.Pointer _objc_msgSend_514( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + bool requiresSecureCoding, + ffi.Pointer> error, + ) { + return __objc_msgSend_514( + obj, + sel, + object, + requiresSecureCoding, + error, + ); + } + + late final __objc_msgSend_514Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_514 = __objc_msgSend_514Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer>)>(); + + late final _class_NSMutableData1 = _getClass1("NSMutableData"); + late final _sel_mutableBytes1 = _registerName1("mutableBytes"); + late final _sel_setLength_1 = _registerName1("setLength:"); + void _objc_msgSend_515( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_515( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_515Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_515 = __objc_msgSend_515Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); + late final _sel_appendData_1 = _registerName1("appendData:"); + late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); + late final _sel_replaceBytesInRange_withBytes_1 = + _registerName1("replaceBytesInRange:withBytes:"); + void _objc_msgSend_516( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer bytes, + ) { + return __objc_msgSend_516( + obj, + sel, + range, + bytes, + ); + } + + late final __objc_msgSend_516Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_516 = __objc_msgSend_516Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, _NSRange, + ffi.Pointer)>(); + + late final _sel_resetBytesInRange_1 = _registerName1("resetBytesInRange:"); + late final _sel_setData_1 = _registerName1("setData:"); + late final _sel_replaceBytesInRange_withBytes_length_1 = + _registerName1("replaceBytesInRange:withBytes:length:"); + void _objc_msgSend_517( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer replacementBytes, + int replacementLength, + ) { + return __objc_msgSend_517( + obj, + sel, + range, + replacementBytes, + replacementLength, + ); + } + + late final __objc_msgSend_517Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_517 = __objc_msgSend_517Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, _NSRange, + ffi.Pointer, int)>(); + + late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); + instancetype _objc_msgSend_518( + ffi.Pointer obj, + ffi.Pointer sel, + int aNumItems, + ) { + return __objc_msgSend_518( + obj, + sel, + aNumItems, + ); + } + + late final __objc_msgSend_518Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_518 = __objc_msgSend_518Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); + late final _sel_initWithLength_1 = _registerName1("initWithLength:"); + late final _sel_decompressUsingAlgorithm_error_1 = + _registerName1("decompressUsingAlgorithm:error:"); + bool _objc_msgSend_519( + ffi.Pointer obj, + ffi.Pointer sel, + int algorithm, + ffi.Pointer> error, + ) { + return __objc_msgSend_519( + obj, + sel, + algorithm, + error, + ); + } + + late final __objc_msgSend_519Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_519 = __objc_msgSend_519Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer>)>(); + + late final _sel_compressUsingAlgorithm_error_1 = + _registerName1("compressUsingAlgorithm:error:"); + late final _sel_initForWritingWithMutableData_1 = + _registerName1("initForWritingWithMutableData:"); + instancetype _objc_msgSend_520( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_520( + obj, + sel, + data, + ); + } + + late final __objc_msgSend_520Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_520 = __objc_msgSend_520Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_archivedDataWithRootObject_1 = + _registerName1("archivedDataWithRootObject:"); + ffi.Pointer _objc_msgSend_521( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer rootObject, + ) { + return __objc_msgSend_521( + obj, + sel, + rootObject, + ); + } + + late final __objc_msgSend_521Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_521 = __objc_msgSend_521Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_archiveRootObject_toFile_1 = + _registerName1("archiveRootObject:toFile:"); + late final _sel_outputFormat1 = _registerName1("outputFormat"); + int _objc_msgSend_522( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_522( + obj, + sel, + ); + } + + late final __objc_msgSend_522Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_522 = __objc_msgSend_522Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setOutputFormat_1 = _registerName1("setOutputFormat:"); + void _objc_msgSend_523( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_523( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_523Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_523 = __objc_msgSend_523Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_encodedData1 = _registerName1("encodedData"); + late final _sel_finishEncoding1 = _registerName1("finishEncoding"); + late final _sel_setClassName_forClass_1 = + _registerName1("setClassName:forClass:"); + void _objc_msgSend_524( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer codedName, + ffi.Pointer cls, + ) { + return __objc_msgSend_524( + obj, + sel, + codedName, + cls, + ); + } + + late final __objc_msgSend_524Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_524 = __objc_msgSend_524Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_classNameForClass_1 = _registerName1("classNameForClass:"); + ffi.Pointer _objc_msgSend_525( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cls, + ) { + return __objc_msgSend_525( + obj, + sel, + cls, + ); + } + + late final __objc_msgSend_525Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_525 = __objc_msgSend_525Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setRequiresSecureCoding_1 = + _registerName1("setRequiresSecureCoding:"); + void _objc_msgSend_526( + ffi.Pointer obj, + ffi.Pointer sel, + bool value, + ) { + return __objc_msgSend_526( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_526Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_526 = __objc_msgSend_526Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_replacementObjectForKeyedArchiver_1 = + _registerName1("replacementObjectForKeyedArchiver:"); + ffi.Pointer _objc_msgSend_527( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer archiver, + ) { + return __objc_msgSend_527( + obj, + sel, + archiver, + ); + } + + late final __objc_msgSend_527Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_527 = __objc_msgSend_527Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_performSelectorOnMainThread_withObject_waitUntilDone_modes_1 = + _registerName1( + "performSelectorOnMainThread:withObject:waitUntilDone:modes:"); + void _objc_msgSend_528( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ffi.Pointer arg, + bool wait, + ffi.Pointer array, + ) { + return __objc_msgSend_528( + obj, + sel, + aSelector, + arg, + wait, + array, + ); + } + + late final __objc_msgSend_528Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_528 = __objc_msgSend_528Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); + + late final _sel_performSelectorOnMainThread_withObject_waitUntilDone_1 = + _registerName1("performSelectorOnMainThread:withObject:waitUntilDone:"); + void _objc_msgSend_529( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ffi.Pointer arg, + bool wait, + ) { + return __objc_msgSend_529( + obj, + sel, + aSelector, + arg, + wait, + ); + } + + late final __objc_msgSend_529Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_529 = __objc_msgSend_529Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _class_NSThread1 = _getClass1("NSThread"); + late final _sel_currentThread1 = _registerName1("currentThread"); + ffi.Pointer _objc_msgSend_530( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_530( + obj, + sel, + ); + } + + late final __objc_msgSend_530Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_530 = __objc_msgSend_530Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_detachNewThreadWithBlock_1 = + _registerName1("detachNewThreadWithBlock:"); + void _objc_msgSend_531( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_531( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_531Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_531 = __objc_msgSend_531Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_detachNewThreadSelector_toTarget_withObject_1 = + _registerName1("detachNewThreadSelector:toTarget:withObject:"); + void _objc_msgSend_532( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer selector, + ffi.Pointer target, + ffi.Pointer argument, + ) { + return __objc_msgSend_532( + obj, + sel, + selector, + target, + argument, + ); + } + + late final __objc_msgSend_532Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_532 = __objc_msgSend_532Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_isMultiThreaded1 = _registerName1("isMultiThreaded"); + late final _class_NSMutableDictionary1 = _getClass1("NSMutableDictionary"); + late final _sel_removeObjectForKey_1 = _registerName1("removeObjectForKey:"); + late final _sel_setObject_forKey_1 = _registerName1("setObject:forKey:"); + void _objc_msgSend_533( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ffi.Pointer aKey, + ) { + return __objc_msgSend_533( + obj, + sel, + anObject, + aKey, + ); + } + + late final __objc_msgSend_533Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_533 = __objc_msgSend_533Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_addEntriesFromDictionary_1 = + _registerName1("addEntriesFromDictionary:"); + late final _sel_removeObjectsForKeys_1 = + _registerName1("removeObjectsForKeys:"); + late final _sel_setDictionary_1 = _registerName1("setDictionary:"); + late final _sel_setObject_forKeyedSubscript_1 = + _registerName1("setObject:forKeyedSubscript:"); + void _objc_msgSend_534( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer obj1, + ffi.Pointer key, + ) { + return __objc_msgSend_534( + obj, + sel, + obj1, + key, + ); + } + + late final __objc_msgSend_534Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_534 = __objc_msgSend_534Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dictionaryWithCapacity_1 = + _registerName1("dictionaryWithCapacity:"); + ffi.Pointer _objc_msgSend_535( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_535( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_535Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_535 = __objc_msgSend_535Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_536( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_536( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_536Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_536 = __objc_msgSend_536Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dictionaryWithSharedKeySet_1 = + _registerName1("dictionaryWithSharedKeySet:"); + ffi.Pointer _objc_msgSend_537( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keyset, + ) { + return __objc_msgSend_537( + obj, + sel, + keyset, + ); + } + + late final __objc_msgSend_537Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_537 = __objc_msgSend_537Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_threadDictionary1 = _registerName1("threadDictionary"); + ffi.Pointer _objc_msgSend_538( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_538( + obj, + sel, + ); + } + + late final __objc_msgSend_538Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_538 = __objc_msgSend_538Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_sleepUntilDate_1 = _registerName1("sleepUntilDate:"); + void _objc_msgSend_539( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, + ) { + return __objc_msgSend_539( + obj, + sel, + date, + ); + } + + late final __objc_msgSend_539Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_539 = __objc_msgSend_539Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_sleepForTimeInterval_1 = + _registerName1("sleepForTimeInterval:"); + void _objc_msgSend_540( + ffi.Pointer obj, + ffi.Pointer sel, + double ti, + ) { + return __objc_msgSend_540( + obj, + sel, + ti, + ); + } + + late final __objc_msgSend_540Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_540 = __objc_msgSend_540Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_exit1 = _registerName1("exit"); + late final _sel_threadPriority1 = _registerName1("threadPriority"); + late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); + void _objc_msgSend_541( + ffi.Pointer obj, + ffi.Pointer sel, + double value, + ) { + return __objc_msgSend_541( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_541Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_541 = __objc_msgSend_541Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_qualityOfService1 = _registerName1("qualityOfService"); + int _objc_msgSend_542( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_542( + obj, + sel, + ); + } + + late final __objc_msgSend_542Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_542 = __objc_msgSend_542Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setQualityOfService_1 = + _registerName1("setQualityOfService:"); + void _objc_msgSend_543( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_543( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_543Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_543 = __objc_msgSend_543Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_callStackReturnAddresses1 = + _registerName1("callStackReturnAddresses"); + late final _sel_callStackSymbols1 = _registerName1("callStackSymbols"); + late final _sel_setName_1 = _registerName1("setName:"); + void _objc_msgSend_544( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_544( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_544Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_544 = __objc_msgSend_544Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_stackSize1 = _registerName1("stackSize"); + late final _sel_setStackSize_1 = _registerName1("setStackSize:"); + late final _sel_isMainThread1 = _registerName1("isMainThread"); + late final _sel_mainThread1 = _registerName1("mainThread"); + late final _sel_initWithTarget_selector_object_1 = + _registerName1("initWithTarget:selector:object:"); + instancetype _objc_msgSend_545( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer selector, + ffi.Pointer argument, + ) { + return __objc_msgSend_545( + obj, + sel, + target, + selector, + argument, + ); + } + + late final __objc_msgSend_545Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_545 = __objc_msgSend_545Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithBlock_1 = _registerName1("initWithBlock:"); + instancetype _objc_msgSend_546( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_546( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_546Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_546 = __objc_msgSend_546Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_isExecuting1 = _registerName1("isExecuting"); + late final _sel_isFinished1 = _registerName1("isFinished"); + late final _sel_isCancelled1 = _registerName1("isCancelled"); + late final _sel_cancel1 = _registerName1("cancel"); + late final _sel_start1 = _registerName1("start"); + late final _sel_main1 = _registerName1("main"); + late final _sel_performSelector_onThread_withObject_waitUntilDone_modes_1 = + _registerName1( + "performSelector:onThread:withObject:waitUntilDone:modes:"); + void _objc_msgSend_547( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ffi.Pointer thr, + ffi.Pointer arg, + bool wait, + ffi.Pointer array, + ) { + return __objc_msgSend_547( + obj, + sel, + aSelector, + thr, + arg, + wait, + array, + ); + } + + late final __objc_msgSend_547Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_547 = __objc_msgSend_547Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); + + late final _sel_performSelector_onThread_withObject_waitUntilDone_1 = + _registerName1("performSelector:onThread:withObject:waitUntilDone:"); + void _objc_msgSend_548( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ffi.Pointer thr, + ffi.Pointer arg, + bool wait, + ) { + return __objc_msgSend_548( + obj, + sel, + aSelector, + thr, + arg, + wait, + ); + } + + late final __objc_msgSend_548Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_548 = __objc_msgSend_548Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); + + late final _sel_performSelectorInBackground_withObject_1 = + _registerName1("performSelectorInBackground:withObject:"); + late final _sel_classForArchiver1 = _registerName1("classForArchiver"); + late final _class_NSArchiver1 = _getClass1("NSArchiver"); + late final _sel_archiverData1 = _registerName1("archiverData"); + ffi.Pointer _objc_msgSend_549( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_549( + obj, + sel, + ); + } + + late final __objc_msgSend_549Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_549 = __objc_msgSend_549Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_encodeClassName_intoClassName_1 = + _registerName1("encodeClassName:intoClassName:"); + void _objc_msgSend_550( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer trueName, + ffi.Pointer inArchiveName, + ) { + return __objc_msgSend_550( + obj, + sel, + trueName, + inArchiveName, + ); + } + + late final __objc_msgSend_550Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_550 = __objc_msgSend_550Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_classNameEncodedForTrueClassName_1 = + _registerName1("classNameEncodedForTrueClassName:"); + late final _sel_replaceObject_withObject_1 = + _registerName1("replaceObject:withObject:"); + late final _sel_replacementObjectForArchiver_1 = + _registerName1("replacementObjectForArchiver:"); + ffi.Pointer _objc_msgSend_551( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer archiver, + ) { + return __objc_msgSend_551( + obj, + sel, + archiver, + ); + } + + late final __objc_msgSend_551Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_551 = __objc_msgSend_551Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_classForPortCoder1 = _registerName1("classForPortCoder"); + late final _class_NSPortCoder1 = _getClass1("NSPortCoder"); + late final _sel_isBycopy1 = _registerName1("isBycopy"); + late final _sel_isByref1 = _registerName1("isByref"); + late final _class_NSPort1 = _getClass1("NSPort"); + ffi.Pointer _objc_msgSend_552( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_552( + obj, + sel, + ); + } + + late final __objc_msgSend_552Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_552 = __objc_msgSend_552Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_invalidate1 = _registerName1("invalidate"); + late final _sel_isValid1 = _registerName1("isValid"); + late final _class_NSRunLoop1 = _getClass1("NSRunLoop"); + late final _sel_currentRunLoop1 = _registerName1("currentRunLoop"); + ffi.Pointer _objc_msgSend_553( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_553( + obj, + sel, + ); + } + + late final __objc_msgSend_553Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_553 = __objc_msgSend_553Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_mainRunLoop1 = _registerName1("mainRunLoop"); + late final _sel_currentMode1 = _registerName1("currentMode"); + late final _sel_getCFRunLoop1 = _registerName1("getCFRunLoop"); + ffi.Pointer<__CFRunLoop> _objc_msgSend_554( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_554( + obj, + sel, + ); + } + + late final __objc_msgSend_554Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<__CFRunLoop> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_554 = __objc_msgSend_554Ptr.asFunction< + ffi.Pointer<__CFRunLoop> Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSTimer1 = _getClass1("NSTimer"); + late final _sel_timerWithTimeInterval_invocation_repeats_1 = + _registerName1("timerWithTimeInterval:invocation:repeats:"); + ffi.Pointer _objc_msgSend_555( + ffi.Pointer obj, + ffi.Pointer sel, + double ti, + ffi.Pointer invocation, + bool yesOrNo, + ) { + return __objc_msgSend_555( + obj, + sel, + ti, + invocation, + yesOrNo, + ); + } + + late final __objc_msgSend_555Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_555 = __objc_msgSend_555Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, double, ffi.Pointer, bool)>(); + + late final _sel_scheduledTimerWithTimeInterval_invocation_repeats_1 = + _registerName1("scheduledTimerWithTimeInterval:invocation:repeats:"); + late final _sel_timerWithTimeInterval_target_selector_userInfo_repeats_1 = + _registerName1("timerWithTimeInterval:target:selector:userInfo:repeats:"); + ffi.Pointer _objc_msgSend_556( + ffi.Pointer obj, + ffi.Pointer sel, + double ti, + ffi.Pointer aTarget, + ffi.Pointer aSelector, + ffi.Pointer userInfo, + bool yesOrNo, + ) { + return __objc_msgSend_556( + obj, + sel, + ti, + aTarget, + aSelector, + userInfo, + yesOrNo, + ); + } + + late final __objc_msgSend_556Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_556 = __objc_msgSend_556Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); + + late final _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_1 = + _registerName1( + "scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:"); + late final _sel_timerWithTimeInterval_repeats_block_1 = + _registerName1("timerWithTimeInterval:repeats:block:"); + ffi.Pointer _objc_msgSend_557( + ffi.Pointer obj, + ffi.Pointer sel, + double interval, + bool repeats, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_557( + obj, + sel, + interval, + repeats, + block, + ); + } + + late final __objc_msgSend_557Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Bool, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_557 = __objc_msgSend_557Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, double, bool, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_scheduledTimerWithTimeInterval_repeats_block_1 = + _registerName1("scheduledTimerWithTimeInterval:repeats:block:"); + late final _sel_initWithFireDate_interval_repeats_block_1 = + _registerName1("initWithFireDate:interval:repeats:block:"); + instancetype _objc_msgSend_558( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, + double interval, + bool repeats, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_558( + obj, + sel, + date, + interval, + repeats, + block, + ); + } + + late final __objc_msgSend_558Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Bool, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_558 = __objc_msgSend_558Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, double, bool, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_initWithFireDate_interval_target_selector_userInfo_repeats_1 = + _registerName1( + "initWithFireDate:interval:target:selector:userInfo:repeats:"); + instancetype _objc_msgSend_559( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, + double ti, + ffi.Pointer t, + ffi.Pointer s, + ffi.Pointer ui, + bool rep, + ) { + return __objc_msgSend_559( + obj, + sel, + date, + ti, + t, + s, + ui, + rep, + ); + } + + late final __objc_msgSend_559Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_559 = __objc_msgSend_559Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); + + late final _sel_fire1 = _registerName1("fire"); + late final _sel_fireDate1 = _registerName1("fireDate"); + late final _sel_setFireDate_1 = _registerName1("setFireDate:"); + void _objc_msgSend_560( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_560( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_560Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_560 = __objc_msgSend_560Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_timeInterval1 = _registerName1("timeInterval"); + late final _sel_tolerance1 = _registerName1("tolerance"); + late final _sel_setTolerance_1 = _registerName1("setTolerance:"); + late final _sel_addTimer_forMode_1 = _registerName1("addTimer:forMode:"); + void _objc_msgSend_561( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer timer, + ffi.Pointer mode, + ) { + return __objc_msgSend_561( + obj, + sel, + timer, + mode, + ); + } + + late final __objc_msgSend_561Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_561 = __objc_msgSend_561Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_addPort_forMode_1 = _registerName1("addPort:forMode:"); + void _objc_msgSend_562( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aPort, + ffi.Pointer mode, + ) { + return __objc_msgSend_562( + obj, + sel, + aPort, + mode, + ); + } + + late final __objc_msgSend_562Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_562 = __objc_msgSend_562Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_removePort_forMode_1 = _registerName1("removePort:forMode:"); + late final _sel_limitDateForMode_1 = _registerName1("limitDateForMode:"); + ffi.Pointer _objc_msgSend_563( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer mode, + ) { + return __objc_msgSend_563( + obj, + sel, + mode, + ); + } + + late final __objc_msgSend_563Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_563 = __objc_msgSend_563Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_acceptInputForMode_beforeDate_1 = + _registerName1("acceptInputForMode:beforeDate:"); + void _objc_msgSend_564( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer mode, + ffi.Pointer limitDate, + ) { + return __objc_msgSend_564( + obj, + sel, + mode, + limitDate, + ); + } + + late final __objc_msgSend_564Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_564 = __objc_msgSend_564Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_run1 = _registerName1("run"); + late final _sel_runUntilDate_1 = _registerName1("runUntilDate:"); + late final _sel_runMode_beforeDate_1 = _registerName1("runMode:beforeDate:"); + bool _objc_msgSend_565( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer mode, + ffi.Pointer limitDate, + ) { + return __objc_msgSend_565( + obj, + sel, + mode, + limitDate, + ); + } + + late final __objc_msgSend_565Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_565 = __objc_msgSend_565Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_configureAsServer1 = _registerName1("configureAsServer"); + late final _sel_performInModes_block_1 = + _registerName1("performInModes:block:"); + void _objc_msgSend_566( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer modes, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_566( + obj, + sel, + modes, + block, + ); + } + + late final __objc_msgSend_566Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_566 = __objc_msgSend_566Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_performBlock_1 = _registerName1("performBlock:"); + late final _sel_performSelector_target_argument_order_modes_1 = + _registerName1("performSelector:target:argument:order:modes:"); + void _objc_msgSend_567( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ffi.Pointer target, + ffi.Pointer arg, + int order, + ffi.Pointer modes, + ) { + return __objc_msgSend_567( + obj, + sel, + aSelector, + target, + arg, + order, + modes, + ); + } + + late final __objc_msgSend_567Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_567 = __objc_msgSend_567Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + + late final _sel_cancelPerformSelector_target_argument_1 = + _registerName1("cancelPerformSelector:target:argument:"); + late final _sel_cancelPerformSelectorsWithTarget_1 = + _registerName1("cancelPerformSelectorsWithTarget:"); + late final _sel_scheduleInRunLoop_forMode_1 = + _registerName1("scheduleInRunLoop:forMode:"); + void _objc_msgSend_568( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer runLoop, + ffi.Pointer mode, + ) { + return __objc_msgSend_568( + obj, + sel, + runLoop, + mode, + ); + } + + late final __objc_msgSend_568Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_568 = __objc_msgSend_568Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_removeFromRunLoop_forMode_1 = + _registerName1("removeFromRunLoop:forMode:"); + late final _sel_reservedSpaceLength1 = _registerName1("reservedSpaceLength"); + late final _sel_sendBeforeDate_components_from_reserved_1 = + _registerName1("sendBeforeDate:components:from:reserved:"); + bool _objc_msgSend_569( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer limitDate, + ffi.Pointer components, + ffi.Pointer receivePort, + int headerSpaceReserved, + ) { + return __objc_msgSend_569( + obj, + sel, + limitDate, + components, + receivePort, + headerSpaceReserved, + ); + } + + late final __objc_msgSend_569Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_569 = __objc_msgSend_569Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + + late final _sel_sendBeforeDate_msgid_components_from_reserved_1 = + _registerName1("sendBeforeDate:msgid:components:from:reserved:"); + bool _objc_msgSend_570( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer limitDate, + int msgID, + ffi.Pointer components, + ffi.Pointer receivePort, + int headerSpaceReserved, + ) { + return __objc_msgSend_570( + obj, + sel, + limitDate, + msgID, + components, + receivePort, + headerSpaceReserved, + ); + } + + late final __objc_msgSend_570Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_570 = __objc_msgSend_570Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + int)>(); + + late final _class_NSConnection1 = _getClass1("NSConnection"); + late final _sel_statistics1 = _registerName1("statistics"); + late final _sel_allConnections1 = _registerName1("allConnections"); + late final _sel_defaultConnection1 = _registerName1("defaultConnection"); + ffi.Pointer _objc_msgSend_571( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_571( + obj, + sel, + ); + } + + late final __objc_msgSend_571Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_571 = __objc_msgSend_571Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_connectionWithRegisteredName_host_1 = + _registerName1("connectionWithRegisteredName:host:"); + instancetype _objc_msgSend_572( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer hostName, + ) { + return __objc_msgSend_572( + obj, + sel, + name, + hostName, + ); + } + + late final __objc_msgSend_572Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_572 = __objc_msgSend_572Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSPortNameServer1 = _getClass1("NSPortNameServer"); + late final _sel_systemDefaultPortNameServer1 = + _registerName1("systemDefaultPortNameServer"); + ffi.Pointer _objc_msgSend_573( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_573( + obj, + sel, + ); + } + + late final __objc_msgSend_573Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_573 = __objc_msgSend_573Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_portForName_1 = _registerName1("portForName:"); + ffi.Pointer _objc_msgSend_574( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ) { + return __objc_msgSend_574( + obj, + sel, + name, + ); + } + + late final __objc_msgSend_574Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_574 = __objc_msgSend_574Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_portForName_host_1 = _registerName1("portForName:host:"); + ffi.Pointer _objc_msgSend_575( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer host, + ) { + return __objc_msgSend_575( + obj, + sel, + name, + host, + ); + } + + late final __objc_msgSend_575Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_575 = __objc_msgSend_575Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_registerPort_name_1 = _registerName1("registerPort:name:"); + bool _objc_msgSend_576( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer port, + ffi.Pointer name, + ) { + return __objc_msgSend_576( + obj, + sel, + port, + name, + ); + } + + late final __objc_msgSend_576Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_576 = __objc_msgSend_576Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_removePortForName_1 = _registerName1("removePortForName:"); + late final _sel_connectionWithRegisteredName_host_usingNameServer_1 = + _registerName1("connectionWithRegisteredName:host:usingNameServer:"); + instancetype _objc_msgSend_577( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer hostName, + ffi.Pointer server, + ) { + return __objc_msgSend_577( + obj, + sel, + name, + hostName, + server, + ); + } + + late final __objc_msgSend_577Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_577 = __objc_msgSend_577Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSDistantObject1 = _getClass1("NSDistantObject"); + late final _class_NSProxy1 = _getClass1("NSProxy"); + ffi.Pointer _objc_msgSend_578( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer sel1, + ) { + return __objc_msgSend_578( + obj, + sel, + sel1, + ); + } + + late final __objc_msgSend_578Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_578 = __objc_msgSend_578Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_respondsToSelector_1 = _registerName1("respondsToSelector:"); + late final _sel_proxyWithTarget_connection_1 = + _registerName1("proxyWithTarget:connection:"); + ffi.Pointer _objc_msgSend_579( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer connection, + ) { + return __objc_msgSend_579( + obj, + sel, + target, + connection, + ); + } + + late final __objc_msgSend_579Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_579 = __objc_msgSend_579Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithTarget_connection_1 = + _registerName1("initWithTarget:connection:"); + late final _sel_proxyWithLocal_connection_1 = + _registerName1("proxyWithLocal:connection:"); + ffi.Pointer _objc_msgSend_580( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer connection, + ) { + return __objc_msgSend_580( + obj, + sel, + target, + connection, + ); + } + + late final __objc_msgSend_580Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_580 = __objc_msgSend_580Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithLocal_connection_1 = + _registerName1("initWithLocal:connection:"); + late final _sel_setProtocolForProxy_1 = + _registerName1("setProtocolForProxy:"); + void _objc_msgSend_581( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer proto, + ) { + return __objc_msgSend_581( + obj, + sel, + proto, + ); + } + + late final __objc_msgSend_581Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_581 = __objc_msgSend_581Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_connectionForProxy1 = _registerName1("connectionForProxy"); + late final _sel_rootProxyForConnectionWithRegisteredName_host_1 = + _registerName1("rootProxyForConnectionWithRegisteredName:host:"); + ffi.Pointer _objc_msgSend_582( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer hostName, + ) { + return __objc_msgSend_582( + obj, + sel, + name, + hostName, + ); + } + + late final __objc_msgSend_582Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_582 = __objc_msgSend_582Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_1 = + _registerName1( + "rootProxyForConnectionWithRegisteredName:host:usingNameServer:"); + ffi.Pointer _objc_msgSend_583( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer hostName, + ffi.Pointer server, + ) { + return __objc_msgSend_583( + obj, + sel, + name, + hostName, + server, + ); + } + + late final __objc_msgSend_583Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_583 = __objc_msgSend_583Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_serviceConnectionWithName_rootObject_usingNameServer_1 = + _registerName1("serviceConnectionWithName:rootObject:usingNameServer:"); + instancetype _objc_msgSend_584( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer root, + ffi.Pointer server, + ) { + return __objc_msgSend_584( + obj, + sel, + name, + root, + server, + ); + } + + late final __objc_msgSend_584Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_584 = __objc_msgSend_584Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_serviceConnectionWithName_rootObject_1 = + _registerName1("serviceConnectionWithName:rootObject:"); + instancetype _objc_msgSend_585( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer root, + ) { + return __objc_msgSend_585( + obj, + sel, + name, + root, + ); + } + + late final __objc_msgSend_585Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_585 = __objc_msgSend_585Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_requestTimeout1 = _registerName1("requestTimeout"); + late final _sel_setRequestTimeout_1 = _registerName1("setRequestTimeout:"); + late final _sel_replyTimeout1 = _registerName1("replyTimeout"); + late final _sel_setReplyTimeout_1 = _registerName1("setReplyTimeout:"); + late final _sel_rootObject1 = _registerName1("rootObject"); + late final _sel_setRootObject_1 = _registerName1("setRootObject:"); + late final _sel_independentConversationQueueing1 = + _registerName1("independentConversationQueueing"); + late final _sel_setIndependentConversationQueueing_1 = + _registerName1("setIndependentConversationQueueing:"); + late final _sel_rootProxy1 = _registerName1("rootProxy"); + ffi.Pointer _objc_msgSend_586( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_586( + obj, + sel, + ); + } + + late final __objc_msgSend_586Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_586 = __objc_msgSend_586Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_addRequestMode_1 = _registerName1("addRequestMode:"); + late final _sel_removeRequestMode_1 = _registerName1("removeRequestMode:"); + late final _sel_requestModes1 = _registerName1("requestModes"); + late final _sel_registerName_1 = _registerName1("registerName:"); + bool _objc_msgSend_587( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ) { + return __objc_msgSend_587( + obj, + sel, + name, + ); + } + + late final __objc_msgSend_587Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_587 = __objc_msgSend_587Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_registerName_withNameServer_1 = + _registerName1("registerName:withNameServer:"); + bool _objc_msgSend_588( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer server, + ) { + return __objc_msgSend_588( + obj, + sel, + name, + server, + ); + } + + late final __objc_msgSend_588Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_588 = __objc_msgSend_588Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_connectionWithReceivePort_sendPort_1 = + _registerName1("connectionWithReceivePort:sendPort:"); + instancetype _objc_msgSend_589( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer receivePort, + ffi.Pointer sendPort, + ) { + return __objc_msgSend_589( + obj, + sel, + receivePort, + sendPort, + ); + } + + late final __objc_msgSend_589Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_589 = __objc_msgSend_589Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_currentConversation1 = _registerName1("currentConversation"); + late final _sel_initWithReceivePort_sendPort_1 = + _registerName1("initWithReceivePort:sendPort:"); + late final _sel_sendPort1 = _registerName1("sendPort"); + late final _sel_receivePort1 = _registerName1("receivePort"); + late final _sel_enableMultipleThreads1 = + _registerName1("enableMultipleThreads"); + late final _sel_multipleThreadsEnabled1 = + _registerName1("multipleThreadsEnabled"); + late final _sel_addRunLoop_1 = _registerName1("addRunLoop:"); + void _objc_msgSend_590( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer runloop, + ) { + return __objc_msgSend_590( + obj, + sel, + runloop, + ); + } + + late final __objc_msgSend_590Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_590 = __objc_msgSend_590Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeRunLoop_1 = _registerName1("removeRunLoop:"); + late final _sel_runInNewThread1 = _registerName1("runInNewThread"); + late final _sel_remoteObjects1 = _registerName1("remoteObjects"); + late final _sel_localObjects1 = _registerName1("localObjects"); + late final _sel_dispatchWithComponents_1 = + _registerName1("dispatchWithComponents:"); + late final _sel_addConnection_toRunLoop_forMode_1 = + _registerName1("addConnection:toRunLoop:forMode:"); + void _objc_msgSend_591( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer conn, + ffi.Pointer runLoop, + ffi.Pointer mode, + ) { + return __objc_msgSend_591( + obj, + sel, + conn, + runLoop, + mode, + ); + } + + late final __objc_msgSend_591Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_591 = __objc_msgSend_591Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeConnection_fromRunLoop_forMode_1 = + _registerName1("removeConnection:fromRunLoop:forMode:"); + late final _sel_encodePortObject_1 = _registerName1("encodePortObject:"); + void _objc_msgSend_592( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aport, + ) { + return __objc_msgSend_592( + obj, + sel, + aport, + ); + } + + late final __objc_msgSend_592Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_592 = __objc_msgSend_592Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_decodePortObject1 = _registerName1("decodePortObject"); + ffi.Pointer _objc_msgSend_593( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_593( + obj, + sel, + ); + } + + late final __objc_msgSend_593Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_593 = __objc_msgSend_593Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_connection1 = _registerName1("connection"); + ffi.Pointer _objc_msgSend_594( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_594( + obj, + sel, + ); + } + + late final __objc_msgSend_594Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_594 = __objc_msgSend_594Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_portCoderWithReceivePort_sendPort_components_1 = + _registerName1("portCoderWithReceivePort:sendPort:components:"); + ffi.Pointer _objc_msgSend_595( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer rcvPort, + ffi.Pointer sndPort, + ffi.Pointer comps, + ) { + return __objc_msgSend_595( + obj, + sel, + rcvPort, + sndPort, + comps, + ); + } + + late final __objc_msgSend_595Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_595 = __objc_msgSend_595Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithReceivePort_sendPort_components_1 = + _registerName1("initWithReceivePort:sendPort:components:"); + late final _sel_dispatch1 = _registerName1("dispatch"); + late final _sel_replacementObjectForPortCoder_1 = + _registerName1("replacementObjectForPortCoder:"); + ffi.Pointer _objc_msgSend_596( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer coder, + ) { + return __objc_msgSend_596( + obj, + sel, + coder, + ); + } + + late final __objc_msgSend_596Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_596 = __objc_msgSend_596Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSClassDescription1 = _getClass1("NSClassDescription"); + late final _sel_registerClassDescription_forClass_1 = + _registerName1("registerClassDescription:forClass:"); + void _objc_msgSend_597( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer description, + ffi.Pointer aClass, + ) { + return __objc_msgSend_597( + obj, + sel, + description, + aClass, + ); + } + + late final __objc_msgSend_597Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_597 = __objc_msgSend_597Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_invalidateClassDescriptionCache1 = + _registerName1("invalidateClassDescriptionCache"); + late final _sel_classDescriptionForClass_1 = + _registerName1("classDescriptionForClass:"); + ffi.Pointer _objc_msgSend_598( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + ) { + return __objc_msgSend_598( + obj, + sel, + aClass, + ); + } + + late final __objc_msgSend_598Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_598 = __objc_msgSend_598Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_attributeKeys1 = _registerName1("attributeKeys"); + late final _sel_toOneRelationshipKeys1 = + _registerName1("toOneRelationshipKeys"); + late final _sel_toManyRelationshipKeys1 = + _registerName1("toManyRelationshipKeys"); + late final _sel_inverseForRelationshipKey_1 = + _registerName1("inverseForRelationshipKey:"); + late final _sel_classDescription1 = _registerName1("classDescription"); + ffi.Pointer _objc_msgSend_599( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_599( + obj, + sel, + ); + } + + late final __objc_msgSend_599Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_599 = __objc_msgSend_599Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSScriptObjectSpecifier1 = + _getClass1("NSScriptObjectSpecifier"); + late final _class_NSAppleEventDescriptor1 = + _getClass1("NSAppleEventDescriptor"); + late final _sel_nullDescriptor1 = _registerName1("nullDescriptor"); + ffi.Pointer _objc_msgSend_600( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_600( + obj, + sel, + ); + } + + late final __objc_msgSend_600Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_600 = __objc_msgSend_600Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_descriptorWithDescriptorType_bytes_length_1 = + _registerName1("descriptorWithDescriptorType:bytes:length:"); + ffi.Pointer _objc_msgSend_601( + ffi.Pointer obj, + ffi.Pointer sel, + int descriptorType, + ffi.Pointer bytes, + int byteCount, + ) { + return __objc_msgSend_601( + obj, + sel, + descriptorType, + bytes, + byteCount, + ); + } + + late final __objc_msgSend_601Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_601 = __objc_msgSend_601Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); + + late final _sel_descriptorWithDescriptorType_data_1 = + _registerName1("descriptorWithDescriptorType:data:"); + ffi.Pointer _objc_msgSend_602( + ffi.Pointer obj, + ffi.Pointer sel, + int descriptorType, + ffi.Pointer data, + ) { + return __objc_msgSend_602( + obj, + sel, + descriptorType, + data, + ); + } + + late final __objc_msgSend_602Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_602 = __objc_msgSend_602Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); + + late final _sel_descriptorWithBoolean_1 = + _registerName1("descriptorWithBoolean:"); + ffi.Pointer _objc_msgSend_603( + ffi.Pointer obj, + ffi.Pointer sel, + int boolean, + ) { + return __objc_msgSend_603( + obj, + sel, + boolean, + ); + } + + late final __objc_msgSend_603Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); + late final __objc_msgSend_603 = __objc_msgSend_603Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_descriptorWithEnumCode_1 = + _registerName1("descriptorWithEnumCode:"); + ffi.Pointer _objc_msgSend_604( + ffi.Pointer obj, + ffi.Pointer sel, + int enumerator, + ) { + return __objc_msgSend_604( + obj, + sel, + enumerator, + ); + } + + late final __objc_msgSend_604Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); + late final __objc_msgSend_604 = __objc_msgSend_604Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_descriptorWithInt32_1 = + _registerName1("descriptorWithInt32:"); + ffi.Pointer _objc_msgSend_605( + ffi.Pointer obj, + ffi.Pointer sel, + int signedInt, + ) { + return __objc_msgSend_605( + obj, + sel, + signedInt, + ); + } + + late final __objc_msgSend_605Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>('objc_msgSend'); + late final __objc_msgSend_605 = __objc_msgSend_605Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_descriptorWithDouble_1 = + _registerName1("descriptorWithDouble:"); + ffi.Pointer _objc_msgSend_606( + ffi.Pointer obj, + ffi.Pointer sel, + double doubleValue, + ) { + return __objc_msgSend_606( + obj, + sel, + doubleValue, + ); + } + + late final __objc_msgSend_606Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_606 = __objc_msgSend_606Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_descriptorWithTypeCode_1 = + _registerName1("descriptorWithTypeCode:"); + late final _sel_descriptorWithString_1 = + _registerName1("descriptorWithString:"); + ffi.Pointer _objc_msgSend_607( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + ) { + return __objc_msgSend_607( + obj, + sel, + string, + ); + } + + late final __objc_msgSend_607Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_607 = __objc_msgSend_607Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_descriptorWithDate_1 = _registerName1("descriptorWithDate:"); + ffi.Pointer _objc_msgSend_608( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, + ) { + return __objc_msgSend_608( + obj, + sel, + date, + ); + } + + late final __objc_msgSend_608Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_608 = __objc_msgSend_608Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_descriptorWithFileURL_1 = + _registerName1("descriptorWithFileURL:"); + ffi.Pointer _objc_msgSend_609( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer fileURL, + ) { + return __objc_msgSend_609( + obj, + sel, + fileURL, + ); + } + + late final __objc_msgSend_609Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_609 = __objc_msgSend_609Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_1 = + _registerName1( + "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); + ffi.Pointer _objc_msgSend_610( + ffi.Pointer obj, + ffi.Pointer sel, + int eventClass, + int eventID, + ffi.Pointer targetDescriptor, + int returnID, + int transactionID, + ) { + return __objc_msgSend_610( + obj, + sel, + eventClass, + eventID, + targetDescriptor, + returnID, + transactionID, + ); + } + + late final __objc_msgSend_610Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Short, + ffi.Int)>>('objc_msgSend'); + late final __objc_msgSend_610 = __objc_msgSend_610Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer, int, int)>(); + + late final _sel_listDescriptor1 = _registerName1("listDescriptor"); + late final _sel_recordDescriptor1 = _registerName1("recordDescriptor"); + late final _sel_currentProcessDescriptor1 = + _registerName1("currentProcessDescriptor"); + late final _sel_descriptorWithProcessIdentifier_1 = + _registerName1("descriptorWithProcessIdentifier:"); + late final _sel_descriptorWithBundleIdentifier_1 = + _registerName1("descriptorWithBundleIdentifier:"); + late final _sel_descriptorWithApplicationURL_1 = + _registerName1("descriptorWithApplicationURL:"); + late final _sel_initWithAEDescNoCopy_1 = + _registerName1("initWithAEDescNoCopy:"); + instancetype _objc_msgSend_611( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aeDesc, + ) { + return __objc_msgSend_611( + obj, + sel, + aeDesc, + ); + } + + late final __objc_msgSend_611Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_611 = __objc_msgSend_611Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithDescriptorType_bytes_length_1 = + _registerName1("initWithDescriptorType:bytes:length:"); + instancetype _objc_msgSend_612( + ffi.Pointer obj, + ffi.Pointer sel, + int descriptorType, + ffi.Pointer bytes, + int byteCount, + ) { + return __objc_msgSend_612( + obj, + sel, + descriptorType, + bytes, + byteCount, + ); + } + + late final __objc_msgSend_612Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_612 = __objc_msgSend_612Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer, int)>(); + + late final _sel_initWithDescriptorType_data_1 = + _registerName1("initWithDescriptorType:data:"); + instancetype _objc_msgSend_613( + ffi.Pointer obj, + ffi.Pointer sel, + int descriptorType, + ffi.Pointer data, + ) { + return __objc_msgSend_613( + obj, + sel, + descriptorType, + data, + ); + } + + late final __objc_msgSend_613Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedInt, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_613 = __objc_msgSend_613Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_1 = + _registerName1( + "initWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); + instancetype _objc_msgSend_614( + ffi.Pointer obj, + ffi.Pointer sel, + int eventClass, + int eventID, + ffi.Pointer targetDescriptor, + int returnID, + int transactionID, + ) { + return __objc_msgSend_614( + obj, + sel, + eventClass, + eventID, + targetDescriptor, + returnID, + transactionID, + ); + } + + late final __objc_msgSend_614Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Short, + ffi.Int)>>('objc_msgSend'); + late final __objc_msgSend_614 = __objc_msgSend_614Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, + int, ffi.Pointer, int, int)>(); + + late final _sel_initListDescriptor1 = _registerName1("initListDescriptor"); + late final _sel_initRecordDescriptor1 = + _registerName1("initRecordDescriptor"); + late final _sel_aeDesc1 = _registerName1("aeDesc"); + ffi.Pointer _objc_msgSend_615( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_615( + obj, + sel, + ); + } + + late final __objc_msgSend_615Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_615 = __objc_msgSend_615Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_descriptorType1 = _registerName1("descriptorType"); + late final _sel_booleanValue1 = _registerName1("booleanValue"); + late final _sel_enumCodeValue1 = _registerName1("enumCodeValue"); + late final _sel_int32Value1 = _registerName1("int32Value"); + late final _sel_typeCodeValue1 = _registerName1("typeCodeValue"); + late final _sel_dateValue1 = _registerName1("dateValue"); + late final _sel_fileURLValue1 = _registerName1("fileURLValue"); + late final _sel_eventClass1 = _registerName1("eventClass"); + late final _sel_eventID1 = _registerName1("eventID"); + late final _sel_returnID1 = _registerName1("returnID"); + late final _sel_transactionID1 = _registerName1("transactionID"); + late final _sel_setParamDescriptor_forKeyword_1 = + _registerName1("setParamDescriptor:forKeyword:"); + void _objc_msgSend_616( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer descriptor, + int keyword, + ) { + return __objc_msgSend_616( + obj, + sel, + descriptor, + keyword, + ); + } + + late final __objc_msgSend_616Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); + late final __objc_msgSend_616 = __objc_msgSend_616Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_paramDescriptorForKeyword_1 = + _registerName1("paramDescriptorForKeyword:"); + ffi.Pointer _objc_msgSend_617( + ffi.Pointer obj, + ffi.Pointer sel, + int keyword, + ) { + return __objc_msgSend_617( + obj, + sel, + keyword, + ); + } + + late final __objc_msgSend_617Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); + late final __objc_msgSend_617 = __objc_msgSend_617Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_removeParamDescriptorWithKeyword_1 = + _registerName1("removeParamDescriptorWithKeyword:"); + void _objc_msgSend_618( + ffi.Pointer obj, + ffi.Pointer sel, + int keyword, + ) { + return __objc_msgSend_618( + obj, + sel, + keyword, + ); + } + + late final __objc_msgSend_618Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedInt)>>('objc_msgSend'); + late final __objc_msgSend_618 = __objc_msgSend_618Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_setAttributeDescriptor_forKeyword_1 = + _registerName1("setAttributeDescriptor:forKeyword:"); + late final _sel_attributeDescriptorForKeyword_1 = + _registerName1("attributeDescriptorForKeyword:"); + late final _sel_sendEventWithOptions_timeout_error_1 = + _registerName1("sendEventWithOptions:timeout:error:"); + ffi.Pointer _objc_msgSend_619( + ffi.Pointer obj, + ffi.Pointer sel, + int sendOptions, + double timeoutInSeconds, + ffi.Pointer> error, + ) { + return __objc_msgSend_619( + obj, + sel, + sendOptions, + timeoutInSeconds, + error, + ); + } + + late final __objc_msgSend_619Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Double, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_619 = __objc_msgSend_619Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + double, + ffi.Pointer>)>(); + + late final _sel_isRecordDescriptor1 = _registerName1("isRecordDescriptor"); + late final _sel_numberOfItems1 = _registerName1("numberOfItems"); + late final _sel_insertDescriptor_atIndex_1 = + _registerName1("insertDescriptor:atIndex:"); + void _objc_msgSend_620( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer descriptor, + int index, + ) { + return __objc_msgSend_620( + obj, + sel, + descriptor, + index, + ); + } + + late final __objc_msgSend_620Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_620 = __objc_msgSend_620Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_descriptorAtIndex_1 = _registerName1("descriptorAtIndex:"); + ffi.Pointer _objc_msgSend_621( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_621( + obj, + sel, + index, + ); + } + + late final __objc_msgSend_621Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_621 = __objc_msgSend_621Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_removeDescriptorAtIndex_1 = + _registerName1("removeDescriptorAtIndex:"); + late final _sel_setDescriptor_forKeyword_1 = + _registerName1("setDescriptor:forKeyword:"); + late final _sel_descriptorForKeyword_1 = + _registerName1("descriptorForKeyword:"); + late final _sel_removeDescriptorWithKeyword_1 = + _registerName1("removeDescriptorWithKeyword:"); + late final _sel_keywordForDescriptorAtIndex_1 = + _registerName1("keywordForDescriptorAtIndex:"); + int _objc_msgSend_622( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_622( + obj, + sel, + index, + ); + } + + late final __objc_msgSend_622Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_622 = __objc_msgSend_622Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_coerceToDescriptorType_1 = + _registerName1("coerceToDescriptorType:"); + late final _sel_objectSpecifierWithDescriptor_1 = + _registerName1("objectSpecifierWithDescriptor:"); + ffi.Pointer _objc_msgSend_623( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer descriptor, + ) { + return __objc_msgSend_623( + obj, + sel, + descriptor, + ); + } + + late final __objc_msgSend_623Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_623 = __objc_msgSend_623Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithContainerSpecifier_key_1 = + _registerName1("initWithContainerSpecifier:key:"); + instancetype _objc_msgSend_624( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer container, + ffi.Pointer property, + ) { + return __objc_msgSend_624( + obj, + sel, + container, + property, + ); + } + + late final __objc_msgSend_624Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_624 = __objc_msgSend_624Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSScriptClassDescription1 = + _getClass1("NSScriptClassDescription"); + ffi.Pointer _objc_msgSend_625( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + ) { + return __objc_msgSend_625( + obj, + sel, + aClass, + ); + } + + late final __objc_msgSend_625Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_625 = __objc_msgSend_625Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithSuiteName_className_dictionary_1 = + _registerName1("initWithSuiteName:className:dictionary:"); + instancetype _objc_msgSend_626( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer suiteName, + ffi.Pointer className, + ffi.Pointer classDeclaration, + ) { + return __objc_msgSend_626( + obj, + sel, + suiteName, + className, + classDeclaration, + ); + } + + late final __objc_msgSend_626Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_626 = __objc_msgSend_626Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_suiteName1 = _registerName1("suiteName"); + late final _sel_className1 = _registerName1("className"); + late final _sel_implementationClassName1 = + _registerName1("implementationClassName"); + late final _sel_superclassDescription1 = + _registerName1("superclassDescription"); + ffi.Pointer _objc_msgSend_627( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_627( + obj, + sel, + ); + } + + late final __objc_msgSend_627Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_627 = __objc_msgSend_627Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_appleEventCode1 = _registerName1("appleEventCode"); + late final _sel_matchesAppleEventCode_1 = + _registerName1("matchesAppleEventCode:"); + late final _class_NSScriptCommandDescription1 = + _getClass1("NSScriptCommandDescription"); + late final _sel_initWithSuiteName_commandName_dictionary_1 = + _registerName1("initWithSuiteName:commandName:dictionary:"); + late final _sel_commandName1 = _registerName1("commandName"); + late final _sel_appleEventClassCode1 = _registerName1("appleEventClassCode"); + late final _sel_commandClassName1 = _registerName1("commandClassName"); + late final _sel_returnType1 = _registerName1("returnType"); + late final _sel_appleEventCodeForReturnType1 = + _registerName1("appleEventCodeForReturnType"); + late final _sel_argumentNames1 = _registerName1("argumentNames"); + late final _sel_typeForArgumentWithName_1 = + _registerName1("typeForArgumentWithName:"); + late final _sel_appleEventCodeForArgumentWithName_1 = + _registerName1("appleEventCodeForArgumentWithName:"); + int _objc_msgSend_628( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer argumentName, + ) { + return __objc_msgSend_628( + obj, + sel, + argumentName, + ); + } + + late final __objc_msgSend_628Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_628 = __objc_msgSend_628Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_isOptionalArgumentWithName_1 = + _registerName1("isOptionalArgumentWithName:"); + late final _class_NSScriptCommand1 = _getClass1("NSScriptCommand"); + late final _sel_initWithCommandDescription_1 = + _registerName1("initWithCommandDescription:"); + instancetype _objc_msgSend_629( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer commandDef, + ) { + return __objc_msgSend_629( + obj, + sel, + commandDef, + ); + } + + late final __objc_msgSend_629Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_629 = __objc_msgSend_629Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_commandDescription1 = _registerName1("commandDescription"); + ffi.Pointer _objc_msgSend_630( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_630( + obj, + sel, + ); + } + + late final __objc_msgSend_630Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_630 = __objc_msgSend_630Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_directParameter1 = _registerName1("directParameter"); + late final _sel_setDirectParameter_1 = _registerName1("setDirectParameter:"); + late final _sel_receiversSpecifier1 = _registerName1("receiversSpecifier"); + ffi.Pointer _objc_msgSend_631( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_631( + obj, + sel, + ); + } + + late final __objc_msgSend_631Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_631 = __objc_msgSend_631Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setReceiversSpecifier_1 = + _registerName1("setReceiversSpecifier:"); + void _objc_msgSend_632( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_632( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_632Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_632 = __objc_msgSend_632Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_evaluatedReceivers1 = _registerName1("evaluatedReceivers"); + late final _sel_arguments1 = _registerName1("arguments"); + late final _sel_setArguments_1 = _registerName1("setArguments:"); + void _objc_msgSend_633( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_633( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_633Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_633 = __objc_msgSend_633Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_evaluatedArguments1 = _registerName1("evaluatedArguments"); + late final _sel_isWellFormed1 = _registerName1("isWellFormed"); + late final _sel_performDefaultImplementation1 = + _registerName1("performDefaultImplementation"); + late final _sel_executeCommand1 = _registerName1("executeCommand"); + late final _sel_scriptErrorNumber1 = _registerName1("scriptErrorNumber"); + late final _sel_setScriptErrorNumber_1 = + _registerName1("setScriptErrorNumber:"); + void _objc_msgSend_634( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_634( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_634Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_634 = __objc_msgSend_634Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_scriptErrorOffendingObjectDescriptor1 = + _registerName1("scriptErrorOffendingObjectDescriptor"); + ffi.Pointer _objc_msgSend_635( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_635( + obj, + sel, + ); + } + + late final __objc_msgSend_635Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_635 = __objc_msgSend_635Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setScriptErrorOffendingObjectDescriptor_1 = + _registerName1("setScriptErrorOffendingObjectDescriptor:"); + void _objc_msgSend_636( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_636( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_636Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_636 = __objc_msgSend_636Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_scriptErrorExpectedTypeDescriptor1 = + _registerName1("scriptErrorExpectedTypeDescriptor"); + late final _sel_setScriptErrorExpectedTypeDescriptor_1 = + _registerName1("setScriptErrorExpectedTypeDescriptor:"); + late final _sel_scriptErrorString1 = _registerName1("scriptErrorString"); + late final _sel_setScriptErrorString_1 = + _registerName1("setScriptErrorString:"); + late final _sel_currentCommand1 = _registerName1("currentCommand"); + ffi.Pointer _objc_msgSend_637( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_637( + obj, + sel, + ); + } + + late final __objc_msgSend_637Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_637 = __objc_msgSend_637Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_appleEvent1 = _registerName1("appleEvent"); + late final _sel_suspendExecution1 = _registerName1("suspendExecution"); + late final _sel_resumeExecutionWithResult_1 = + _registerName1("resumeExecutionWithResult:"); + late final _sel_createCommandInstance1 = + _registerName1("createCommandInstance"); + ffi.Pointer _objc_msgSend_638( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_638( + obj, + sel, + ); + } + + late final __objc_msgSend_638Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_638 = __objc_msgSend_638Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_createCommandInstanceWithZone_1 = + _registerName1("createCommandInstanceWithZone:"); + ffi.Pointer _objc_msgSend_639( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_NSZone> zone, + ) { + return __objc_msgSend_639( + obj, + sel, + zone, + ); + } + + late final __objc_msgSend_639Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>>('objc_msgSend'); + late final __objc_msgSend_639 = __objc_msgSend_639Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>(); + + late final _sel_supportsCommand_1 = _registerName1("supportsCommand:"); + bool _objc_msgSend_640( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer commandDescription, + ) { + return __objc_msgSend_640( + obj, + sel, + commandDescription, + ); + } + + late final __objc_msgSend_640Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_640 = __objc_msgSend_640Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_selectorForCommand_1 = _registerName1("selectorForCommand:"); + ffi.Pointer _objc_msgSend_641( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer commandDescription, + ) { + return __objc_msgSend_641( + obj, + sel, + commandDescription, + ); + } + + late final __objc_msgSend_641Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_641 = __objc_msgSend_641Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_typeForKey_1 = _registerName1("typeForKey:"); + late final _sel_classDescriptionForKey_1 = + _registerName1("classDescriptionForKey:"); + ffi.Pointer _objc_msgSend_642( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ) { + return __objc_msgSend_642( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_642Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_642 = __objc_msgSend_642Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_appleEventCodeForKey_1 = + _registerName1("appleEventCodeForKey:"); + late final _sel_keyWithAppleEventCode_1 = + _registerName1("keyWithAppleEventCode:"); + ffi.Pointer _objc_msgSend_643( + ffi.Pointer obj, + ffi.Pointer sel, + int appleEventCode, + ) { + return __objc_msgSend_643( + obj, + sel, + appleEventCode, + ); + } + + late final __objc_msgSend_643Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); + late final __objc_msgSend_643 = __objc_msgSend_643Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_defaultSubcontainerAttributeKey1 = + _registerName1("defaultSubcontainerAttributeKey"); + late final _sel_isLocationRequiredToCreateForKey_1 = + _registerName1("isLocationRequiredToCreateForKey:"); + late final _sel_hasPropertyForKey_1 = _registerName1("hasPropertyForKey:"); + late final _sel_hasOrderedToManyRelationshipForKey_1 = + _registerName1("hasOrderedToManyRelationshipForKey:"); + late final _sel_hasReadablePropertyForKey_1 = + _registerName1("hasReadablePropertyForKey:"); + late final _sel_hasWritablePropertyForKey_1 = + _registerName1("hasWritablePropertyForKey:"); + late final _sel_isReadOnlyKey_1 = _registerName1("isReadOnlyKey:"); + late final _sel_initWithContainerClassDescription_containerSpecifier_key_1 = + _registerName1( + "initWithContainerClassDescription:containerSpecifier:key:"); + instancetype _objc_msgSend_644( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer classDesc, + ffi.Pointer container, + ffi.Pointer property, + ) { + return __objc_msgSend_644( + obj, + sel, + classDesc, + container, + property, + ); + } + + late final __objc_msgSend_644Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_644 = __objc_msgSend_644Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_childSpecifier1 = _registerName1("childSpecifier"); + late final _sel_setChildSpecifier_1 = _registerName1("setChildSpecifier:"); + late final _sel_containerSpecifier1 = _registerName1("containerSpecifier"); + late final _sel_setContainerSpecifier_1 = + _registerName1("setContainerSpecifier:"); + late final _sel_containerIsObjectBeingTested1 = + _registerName1("containerIsObjectBeingTested"); + late final _sel_setContainerIsObjectBeingTested_1 = + _registerName1("setContainerIsObjectBeingTested:"); + late final _sel_containerIsRangeContainerObject1 = + _registerName1("containerIsRangeContainerObject"); + late final _sel_setContainerIsRangeContainerObject_1 = + _registerName1("setContainerIsRangeContainerObject:"); + late final _sel_key1 = _registerName1("key"); + late final _sel_setKey_1 = _registerName1("setKey:"); + void _objc_msgSend_645( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_645( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_645Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_645 = __objc_msgSend_645Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_containerClassDescription1 = + _registerName1("containerClassDescription"); + late final _sel_setContainerClassDescription_1 = + _registerName1("setContainerClassDescription:"); + void _objc_msgSend_646( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_646( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_646Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_646 = __objc_msgSend_646Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_keyClassDescription1 = _registerName1("keyClassDescription"); + late final _sel_indicesOfObjectsByEvaluatingWithContainer_count_1 = + _registerName1("indicesOfObjectsByEvaluatingWithContainer:count:"); + ffi.Pointer _objc_msgSend_647( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer container, + ffi.Pointer count, + ) { + return __objc_msgSend_647( + obj, + sel, + container, + count, + ); + } + + late final __objc_msgSend_647Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_647 = __objc_msgSend_647Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_objectsByEvaluatingWithContainers_1 = + _registerName1("objectsByEvaluatingWithContainers:"); + late final _sel_objectsByEvaluatingSpecifier1 = + _registerName1("objectsByEvaluatingSpecifier"); + late final _sel_evaluationErrorNumber1 = + _registerName1("evaluationErrorNumber"); + late final _sel_setEvaluationErrorNumber_1 = + _registerName1("setEvaluationErrorNumber:"); + late final _sel_evaluationErrorSpecifier1 = + _registerName1("evaluationErrorSpecifier"); + late final _sel_descriptor1 = _registerName1("descriptor"); + late final _sel_scriptingValueForSpecifier_1 = + _registerName1("scriptingValueForSpecifier:"); + ffi.Pointer _objc_msgSend_648( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer objectSpecifier, + ) { + return __objc_msgSend_648( + obj, + sel, + objectSpecifier, + ); + } + + late final __objc_msgSend_648Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_648 = __objc_msgSend_648Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_scriptingProperties1 = _registerName1("scriptingProperties"); + late final _sel_setScriptingProperties_1 = + _registerName1("setScriptingProperties:"); + late final _sel_copyScriptingValue_forKey_withProperties_1 = + _registerName1("copyScriptingValue:forKey:withProperties:"); + ffi.Pointer _objc_msgSend_649( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer key, + ffi.Pointer properties, + ) { + return __objc_msgSend_649( + obj, + sel, + value, + key, + properties, + ); + } + + late final __objc_msgSend_649Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_649 = __objc_msgSend_649Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_1 = + _registerName1( + "newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:"); + ffi.Pointer _objc_msgSend_650( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer objectClass, + ffi.Pointer key, + ffi.Pointer contentsValue, + ffi.Pointer properties, + ) { + return __objc_msgSend_650( + obj, + sel, + objectClass, + key, + contentsValue, + properties, + ); + } + + late final __objc_msgSend_650Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_650 = __objc_msgSend_650Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_classCode1 = _registerName1("classCode"); + late final _sel_valueAtIndex_inPropertyWithKey_1 = + _registerName1("valueAtIndex:inPropertyWithKey:"); + ffi.Pointer _objc_msgSend_651( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ffi.Pointer key, + ) { + return __objc_msgSend_651( + obj, + sel, + index, + key, + ); + } + + late final __objc_msgSend_651Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_651 = __objc_msgSend_651Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); + + late final _sel_valueWithName_inPropertyWithKey_1 = + _registerName1("valueWithName:inPropertyWithKey:"); + late final _sel_valueWithUniqueID_inPropertyWithKey_1 = + _registerName1("valueWithUniqueID:inPropertyWithKey:"); + late final _sel_insertValue_atIndex_inPropertyWithKey_1 = + _registerName1("insertValue:atIndex:inPropertyWithKey:"); + void _objc_msgSend_652( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + int index, + ffi.Pointer key, + ) { + return __objc_msgSend_652( + obj, + sel, + value, + index, + key, + ); + } + + late final __objc_msgSend_652Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_652 = __objc_msgSend_652Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); + + late final _sel_removeValueAtIndex_fromPropertyWithKey_1 = + _registerName1("removeValueAtIndex:fromPropertyWithKey:"); + void _objc_msgSend_653( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ffi.Pointer key, + ) { + return __objc_msgSend_653( + obj, + sel, + index, + key, + ); + } + + late final __objc_msgSend_653Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_653 = __objc_msgSend_653Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _sel_replaceValueAtIndex_inPropertyWithKey_withValue_1 = + _registerName1("replaceValueAtIndex:inPropertyWithKey:withValue:"); + void _objc_msgSend_654( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ffi.Pointer key, + ffi.Pointer value, + ) { + return __objc_msgSend_654( + obj, + sel, + index, + key, + value, + ); + } + + late final __objc_msgSend_654Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_654 = __objc_msgSend_654Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_insertValue_inPropertyWithKey_1 = + _registerName1("insertValue:inPropertyWithKey:"); + void _objc_msgSend_655( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer key, + ) { + return __objc_msgSend_655( + obj, + sel, + value, + key, + ); + } + + late final __objc_msgSend_655Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_655 = __objc_msgSend_655Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_coerceValue_forKey_1 = _registerName1("coerceValue:forKey:"); + ffi.Pointer _objc_msgSend_656( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer key, + ) { + return __objc_msgSend_656( + obj, + sel, + value, + key, + ); + } + + late final __objc_msgSend_656Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_656 = __objc_msgSend_656Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_objectSpecifier1 = _registerName1("objectSpecifier"); + late final _sel_indicesOfObjectsByEvaluatingObjectSpecifier_1 = + _registerName1("indicesOfObjectsByEvaluatingObjectSpecifier:"); + ffi.Pointer _objc_msgSend_657( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer specifier, + ) { + return __objc_msgSend_657( + obj, + sel, + specifier, + ); + } + + late final __objc_msgSend_657Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_657 = __objc_msgSend_657Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_isEqualTo_1 = _registerName1("isEqualTo:"); + late final _sel_isLessThanOrEqualTo_1 = + _registerName1("isLessThanOrEqualTo:"); + late final _sel_isLessThan_1 = _registerName1("isLessThan:"); + late final _sel_isGreaterThanOrEqualTo_1 = + _registerName1("isGreaterThanOrEqualTo:"); + late final _sel_isGreaterThan_1 = _registerName1("isGreaterThan:"); + late final _sel_isNotEqualTo_1 = _registerName1("isNotEqualTo:"); + late final _sel_doesContain_1 = _registerName1("doesContain:"); + late final _sel_isLike_1 = _registerName1("isLike:"); + late final _sel_isCaseInsensitiveLike_1 = + _registerName1("isCaseInsensitiveLike:"); + late final _sel_scriptingIsEqualTo_1 = _registerName1("scriptingIsEqualTo:"); + late final _sel_scriptingIsLessThanOrEqualTo_1 = + _registerName1("scriptingIsLessThanOrEqualTo:"); + late final _sel_scriptingIsLessThan_1 = + _registerName1("scriptingIsLessThan:"); + late final _sel_scriptingIsGreaterThanOrEqualTo_1 = + _registerName1("scriptingIsGreaterThanOrEqualTo:"); + late final _sel_scriptingIsGreaterThan_1 = + _registerName1("scriptingIsGreaterThan:"); + late final _sel_scriptingBeginsWith_1 = + _registerName1("scriptingBeginsWith:"); + late final _sel_scriptingEndsWith_1 = _registerName1("scriptingEndsWith:"); + late final _sel_scriptingContains_1 = _registerName1("scriptingContains:"); + late final _class_NSItemProvider1 = _getClass1("NSItemProvider"); + late final _class_NSProgress1 = _getClass1("NSProgress"); + late final _sel_currentProgress1 = _registerName1("currentProgress"); + ffi.Pointer _objc_msgSend_658( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_658( + obj, + sel, + ); + } + + late final __objc_msgSend_658Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_658 = __objc_msgSend_658Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_progressWithTotalUnitCount_1 = + _registerName1("progressWithTotalUnitCount:"); + ffi.Pointer _objc_msgSend_659( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ) { + return __objc_msgSend_659( + obj, + sel, + unitCount, + ); + } + + late final __objc_msgSend_659Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_659 = __objc_msgSend_659Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_discreteProgressWithTotalUnitCount_1 = + _registerName1("discreteProgressWithTotalUnitCount:"); + late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = + _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); + ffi.Pointer _objc_msgSend_660( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ffi.Pointer parent, + int portionOfParentTotalUnitCount, + ) { + return __objc_msgSend_660( + obj, + sel, + unitCount, + parent, + portionOfParentTotalUnitCount, + ); + } + + late final __objc_msgSend_660Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_660 = __objc_msgSend_660Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); + + late final _sel_initWithParent_userInfo_1 = + _registerName1("initWithParent:userInfo:"); + instancetype _objc_msgSend_661( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer parentProgressOrNil, + ffi.Pointer userInfoOrNil, + ) { + return __objc_msgSend_661( + obj, + sel, + parentProgressOrNil, + userInfoOrNil, + ); + } + + late final __objc_msgSend_661Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_661 = __objc_msgSend_661Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_becomeCurrentWithPendingUnitCount_1 = + _registerName1("becomeCurrentWithPendingUnitCount:"); + void _objc_msgSend_662( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ) { + return __objc_msgSend_662( + obj, + sel, + unitCount, + ); + } + + late final __objc_msgSend_662Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_662 = __objc_msgSend_662Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = + _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); + void _objc_msgSend_663( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ffi.Pointer<_ObjCBlock> work, + ) { + return __objc_msgSend_663( + obj, + sel, + unitCount, + work, + ); + } + + late final __objc_msgSend_663Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_663 = __objc_msgSend_663Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_resignCurrent1 = _registerName1("resignCurrent"); + late final _sel_addChild_withPendingUnitCount_1 = + _registerName1("addChild:withPendingUnitCount:"); + void _objc_msgSend_664( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer child, + int inUnitCount, + ) { + return __objc_msgSend_664( + obj, + sel, + child, + inUnitCount, + ); + } + + late final __objc_msgSend_664Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_664 = __objc_msgSend_664Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); + int _objc_msgSend_665( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_665( + obj, + sel, + ); + } + + late final __objc_msgSend_665Ptr = _lookup< + ffi.NativeFunction< + ffi.Int64 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_665 = __objc_msgSend_665Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); + void _objc_msgSend_666( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_666( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_666Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_666 = __objc_msgSend_666Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); + late final _sel_setCompletedUnitCount_1 = + _registerName1("setCompletedUnitCount:"); + late final _sel_setLocalizedDescription_1 = + _registerName1("setLocalizedDescription:"); + late final _sel_localizedAdditionalDescription1 = + _registerName1("localizedAdditionalDescription"); + late final _sel_setLocalizedAdditionalDescription_1 = + _registerName1("setLocalizedAdditionalDescription:"); + late final _sel_isCancellable1 = _registerName1("isCancellable"); + late final _sel_setCancellable_1 = _registerName1("setCancellable:"); + late final _sel_isPausable1 = _registerName1("isPausable"); + late final _sel_setPausable_1 = _registerName1("setPausable:"); + late final _sel_isPaused1 = _registerName1("isPaused"); + late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_667( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_667( + obj, + sel, + ); + } + + late final __objc_msgSend_667Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_667 = __objc_msgSend_667Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setCancellationHandler_1 = + _registerName1("setCancellationHandler:"); + void _objc_msgSend_668( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> value, + ) { + return __objc_msgSend_668( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_668Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_668 = __objc_msgSend_668Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_pausingHandler1 = _registerName1("pausingHandler"); + late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); + late final _sel_resumingHandler1 = _registerName1("resumingHandler"); + late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); + late final _sel_setUserInfoObject_forKey_1 = + _registerName1("setUserInfoObject:forKey:"); + late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); + late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); + late final _sel_pause1 = _registerName1("pause"); + late final _sel_resume1 = _registerName1("resume"); + late final _sel_kind1 = _registerName1("kind"); + late final _sel_setKind_1 = _registerName1("setKind:"); + late final _sel_estimatedTimeRemaining1 = + _registerName1("estimatedTimeRemaining"); + late final _sel_setEstimatedTimeRemaining_1 = + _registerName1("setEstimatedTimeRemaining:"); + void _objc_msgSend_669( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_669( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_669Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_669 = __objc_msgSend_669Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_throughput1 = _registerName1("throughput"); + late final _sel_setThroughput_1 = _registerName1("setThroughput:"); + late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); + late final _sel_setFileOperationKind_1 = + _registerName1("setFileOperationKind:"); + late final _sel_fileURL1 = _registerName1("fileURL"); + late final _sel_setFileURL_1 = _registerName1("setFileURL:"); + void _objc_msgSend_670( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_670( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_670Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_670 = __objc_msgSend_670Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); + late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); + late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); + late final _sel_setFileCompletedCount_1 = + _registerName1("setFileCompletedCount:"); + late final _sel_publish1 = _registerName1("publish"); + late final _sel_unpublish1 = _registerName1("unpublish"); + late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = + _registerName1("addSubscriberForFileURL:withPublishingHandler:"); + ffi.Pointer _objc_msgSend_671( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> publishingHandler, + ) { + return __objc_msgSend_671( + obj, + sel, + url, + publishingHandler, + ); + } + + late final __objc_msgSend_671Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_671 = __objc_msgSend_671Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); + late final _sel_isOld1 = _registerName1("isOld"); + late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1 = + _registerName1( + "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); + void _objc_msgSend_672( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_672( + obj, + sel, + typeIdentifier, + visibility, + loadHandler, + ); + } + + late final __objc_msgSend_672Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_672 = __objc_msgSend_672Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = + _registerName1( + "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); + void _objc_msgSend_673( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int fileOptions, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_673( + obj, + sel, + typeIdentifier, + fileOptions, + visibility, + loadHandler, + ); + } + + late final __objc_msgSend_673Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_673 = __objc_msgSend_673Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_registeredTypeIdentifiers1 = + _registerName1("registeredTypeIdentifiers"); + late final _sel_registeredTypeIdentifiersWithFileOptions_1 = + _registerName1("registeredTypeIdentifiersWithFileOptions:"); + ffi.Pointer _objc_msgSend_674( + ffi.Pointer obj, + ffi.Pointer sel, + int fileOptions, + ) { + return __objc_msgSend_674( + obj, + sel, + fileOptions, + ); + } + + late final __objc_msgSend_674Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_674 = __objc_msgSend_674Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_hasItemConformingToTypeIdentifier_1 = + _registerName1("hasItemConformingToTypeIdentifier:"); + late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = + _registerName1( + "hasRepresentationConformingToTypeIdentifier:fileOptions:"); + bool _objc_msgSend_675( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int fileOptions, + ) { + return __objc_msgSend_675( + obj, + sel, + typeIdentifier, + fileOptions, + ); + } + + late final __objc_msgSend_675Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_675 = __objc_msgSend_675Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadDataRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_676( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_676( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } + + late final __objc_msgSend_676Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_676 = __objc_msgSend_676Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadFileRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_677( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_677( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } + + late final __objc_msgSend_677Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_677 = __objc_msgSend_677Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_678( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_678( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } + + late final __objc_msgSend_678Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_678 = __objc_msgSend_678Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_suggestedName1 = _registerName1("suggestedName"); + late final _sel_setSuggestedName_1 = _registerName1("setSuggestedName:"); + late final _sel_registerObject_visibility_1 = + _registerName1("registerObject:visibility:"); + void _objc_msgSend_679( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + int visibility, + ) { + return __objc_msgSend_679( + obj, + sel, + object, + visibility, + ); + } + + late final __objc_msgSend_679Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_679 = __objc_msgSend_679Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_registerObjectOfClass_visibility_loadHandler_1 = + _registerName1("registerObjectOfClass:visibility:loadHandler:"); + void _objc_msgSend_680( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_680( + obj, + sel, + aClass, + visibility, + loadHandler, + ); + } + + late final __objc_msgSend_680Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_680 = __objc_msgSend_680Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_canLoadObjectOfClass_1 = + _registerName1("canLoadObjectOfClass:"); + late final _sel_loadObjectOfClass_completionHandler_1 = + _registerName1("loadObjectOfClass:completionHandler:"); + ffi.Pointer _objc_msgSend_681( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_681( + obj, + sel, + aClass, + completionHandler, + ); + } + + late final __objc_msgSend_681Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_681 = __objc_msgSend_681Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_initWithItem_typeIdentifier_1 = + _registerName1("initWithItem:typeIdentifier:"); + instancetype _objc_msgSend_682( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer item, + ffi.Pointer typeIdentifier, + ) { + return __objc_msgSend_682( + obj, + sel, + item, + typeIdentifier, + ); + } + + late final __objc_msgSend_682Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_682 = __objc_msgSend_682Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_registerItemForTypeIdentifier_loadHandler_1 = + _registerName1("registerItemForTypeIdentifier:loadHandler:"); + void _objc_msgSend_683( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_683( + obj, + sel, + typeIdentifier, + loadHandler, + ); + } + + late final __objc_msgSend_683Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_683 = __objc_msgSend_683Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = + _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); + void _objc_msgSend_684( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer options, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_684( + obj, + sel, + typeIdentifier, + options, + completionHandler, + ); + } + + late final __objc_msgSend_684Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_684 = __objc_msgSend_684Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_685( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_685( + obj, + sel, + ); + } + + late final __objc_msgSend_685Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_685 = __objc_msgSend_685Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setPreviewImageHandler_1 = + _registerName1("setPreviewImageHandler:"); + void _objc_msgSend_686( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> value, + ) { + return __objc_msgSend_686( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_686Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_686 = __objc_msgSend_686Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_loadPreviewImageWithOptions_completionHandler_1 = + _registerName1("loadPreviewImageWithOptions:completionHandler:"); + void _objc_msgSend_687( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer options, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_687( + obj, + sel, + options, + completionHandler, + ); + } + + late final __objc_msgSend_687Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_687 = __objc_msgSend_687Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _class_NSMutableString1 = _getClass1("NSMutableString"); + late final _sel_replaceCharactersInRange_withString_1 = + _registerName1("replaceCharactersInRange:withString:"); + void _objc_msgSend_688( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer aString, + ) { + return __objc_msgSend_688( + obj, + sel, + range, + aString, + ); + } + + late final __objc_msgSend_688Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_688 = __objc_msgSend_688Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, _NSRange, + ffi.Pointer)>(); + + late final _sel_insertString_atIndex_1 = + _registerName1("insertString:atIndex:"); + void _objc_msgSend_689( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, + int loc, + ) { + return __objc_msgSend_689( + obj, + sel, + aString, + loc, + ); + } + + late final __objc_msgSend_689Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_689 = __objc_msgSend_689Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_deleteCharactersInRange_1 = + _registerName1("deleteCharactersInRange:"); + late final _sel_appendString_1 = _registerName1("appendString:"); + late final _sel_appendFormat_1 = _registerName1("appendFormat:"); + late final _sel_setString_1 = _registerName1("setString:"); + late final _sel_replaceOccurrencesOfString_withString_options_range_1 = + _registerName1("replaceOccurrencesOfString:withString:options:range:"); + int _objc_msgSend_690( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer replacement, + int options, + _NSRange searchRange, + ) { + return __objc_msgSend_690( + obj, + sel, + target, + replacement, + options, + searchRange, + ); + } + + late final __objc_msgSend_690Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_690 = __objc_msgSend_690Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + + late final _sel_applyTransform_reverse_range_updatedRange_1 = + _registerName1("applyTransform:reverse:range:updatedRange:"); + bool _objc_msgSend_691( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer transform, + bool reverse, + _NSRange range, + ffi.Pointer<_NSRange> resultingRange, + ) { + return __objc_msgSend_691( + obj, + sel, + transform, + reverse, + range, + resultingRange, + ); + } + + late final __objc_msgSend_691Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + _NSRange, + ffi.Pointer<_NSRange>)>>('objc_msgSend'); + late final __objc_msgSend_691 = __objc_msgSend_691Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool, _NSRange, ffi.Pointer<_NSRange>)>(); + + ffi.Pointer _objc_msgSend_692( + ffi.Pointer obj, + ffi.Pointer sel, + int capacity, + ) { + return __objc_msgSend_692( + obj, + sel, + capacity, + ); + } + + late final __objc_msgSend_692Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_692 = __objc_msgSend_692Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_stringWithCapacity_1 = _registerName1("stringWithCapacity:"); + late final _class_NSNotification1 = _getClass1("NSNotification"); + late final _sel_object1 = _registerName1("object"); + late final _sel_initWithName_object_userInfo_1 = + _registerName1("initWithName:object:userInfo:"); + instancetype _objc_msgSend_693( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer object, + ffi.Pointer userInfo, + ) { + return __objc_msgSend_693( + obj, + sel, + name, + object, + userInfo, + ); + } + + late final __objc_msgSend_693Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_693 = __objc_msgSend_693Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_notificationWithName_object_1 = + _registerName1("notificationWithName:object:"); + late final _sel_notificationWithName_object_userInfo_1 = + _registerName1("notificationWithName:object:userInfo:"); + late final _class_NSBundle1 = _getClass1("NSBundle"); + late final _sel_mainBundle1 = _registerName1("mainBundle"); + ffi.Pointer _objc_msgSend_694( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_694( + obj, + sel, + ); + } + + late final __objc_msgSend_694Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_694 = __objc_msgSend_694Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_bundleWithPath_1 = _registerName1("bundleWithPath:"); + late final _sel_initWithPath_1 = _registerName1("initWithPath:"); + late final _sel_bundleWithURL_1 = _registerName1("bundleWithURL:"); + late final _sel_initWithURL_1 = _registerName1("initWithURL:"); + late final _sel_bundleForClass_1 = _registerName1("bundleForClass:"); + ffi.Pointer _objc_msgSend_695( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + ) { + return __objc_msgSend_695( + obj, + sel, + aClass, + ); + } + + late final __objc_msgSend_695Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_695 = __objc_msgSend_695Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_bundleWithIdentifier_1 = + _registerName1("bundleWithIdentifier:"); + ffi.Pointer _objc_msgSend_696( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer identifier, + ) { + return __objc_msgSend_696( + obj, + sel, + identifier, + ); + } + + late final __objc_msgSend_696Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_696 = __objc_msgSend_696Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_allBundles1 = _registerName1("allBundles"); + late final _sel_allFrameworks1 = _registerName1("allFrameworks"); + late final _sel_isLoaded1 = _registerName1("isLoaded"); + late final _sel_unload1 = _registerName1("unload"); + late final _sel_preflightAndReturnError_1 = + _registerName1("preflightAndReturnError:"); + late final _sel_loadAndReturnError_1 = _registerName1("loadAndReturnError:"); + late final _sel_bundleURL1 = _registerName1("bundleURL"); + late final _sel_resourceURL1 = _registerName1("resourceURL"); + late final _sel_executableURL1 = _registerName1("executableURL"); + late final _sel_URLForAuxiliaryExecutable_1 = + _registerName1("URLForAuxiliaryExecutable:"); + late final _sel_privateFrameworksURL1 = + _registerName1("privateFrameworksURL"); + late final _sel_sharedFrameworksURL1 = _registerName1("sharedFrameworksURL"); + late final _sel_sharedSupportURL1 = _registerName1("sharedSupportURL"); + late final _sel_builtInPlugInsURL1 = _registerName1("builtInPlugInsURL"); + late final _sel_appStoreReceiptURL1 = _registerName1("appStoreReceiptURL"); + late final _sel_bundlePath1 = _registerName1("bundlePath"); + late final _sel_resourcePath1 = _registerName1("resourcePath"); + late final _sel_executablePath1 = _registerName1("executablePath"); + late final _sel_pathForAuxiliaryExecutable_1 = + _registerName1("pathForAuxiliaryExecutable:"); + late final _sel_privateFrameworksPath1 = + _registerName1("privateFrameworksPath"); + late final _sel_sharedFrameworksPath1 = + _registerName1("sharedFrameworksPath"); + late final _sel_sharedSupportPath1 = _registerName1("sharedSupportPath"); + late final _sel_builtInPlugInsPath1 = _registerName1("builtInPlugInsPath"); + late final _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_1 = + _registerName1( + "URLForResource:withExtension:subdirectory:inBundleWithURL:"); + ffi.Pointer _objc_msgSend_697( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer ext, + ffi.Pointer subpath, + ffi.Pointer bundleURL, + ) { + return __objc_msgSend_697( + obj, + sel, + name, + ext, + subpath, + bundleURL, + ); + } + + late final __objc_msgSend_697Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_697 = __objc_msgSend_697Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_1 = + _registerName1( + "URLsForResourcesWithExtension:subdirectory:inBundleWithURL:"); + ffi.Pointer _objc_msgSend_698( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer ext, + ffi.Pointer subpath, + ffi.Pointer bundleURL, + ) { + return __objc_msgSend_698( + obj, + sel, + ext, + subpath, + bundleURL, + ); + } + + late final __objc_msgSend_698Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_698 = __objc_msgSend_698Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_URLForResource_withExtension_1 = + _registerName1("URLForResource:withExtension:"); + ffi.Pointer _objc_msgSend_699( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer ext, + ) { + return __objc_msgSend_699( + obj, + sel, + name, + ext, + ); + } + + late final __objc_msgSend_699Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_699 = __objc_msgSend_699Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_URLForResource_withExtension_subdirectory_1 = + _registerName1("URLForResource:withExtension:subdirectory:"); + ffi.Pointer _objc_msgSend_700( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer ext, + ffi.Pointer subpath, + ) { + return __objc_msgSend_700( + obj, + sel, + name, + ext, + subpath, + ); + } + + late final __objc_msgSend_700Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_700 = __objc_msgSend_700Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_URLForResource_withExtension_subdirectory_localization_1 = + _registerName1("URLForResource:withExtension:subdirectory:localization:"); + ffi.Pointer _objc_msgSend_701( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer ext, + ffi.Pointer subpath, + ffi.Pointer localizationName, + ) { + return __objc_msgSend_701( + obj, + sel, + name, + ext, + subpath, + localizationName, + ); + } + + late final __objc_msgSend_701Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_701 = __objc_msgSend_701Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_URLsForResourcesWithExtension_subdirectory_1 = + _registerName1("URLsForResourcesWithExtension:subdirectory:"); + ffi.Pointer _objc_msgSend_702( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer ext, + ffi.Pointer subpath, + ) { + return __objc_msgSend_702( + obj, + sel, + ext, + subpath, + ); + } + + late final __objc_msgSend_702Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_702 = __objc_msgSend_702Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_URLsForResourcesWithExtension_subdirectory_localization_1 = + _registerName1( + "URLsForResourcesWithExtension:subdirectory:localization:"); + ffi.Pointer _objc_msgSend_703( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer ext, + ffi.Pointer subpath, + ffi.Pointer localizationName, + ) { + return __objc_msgSend_703( + obj, + sel, + ext, + subpath, + localizationName, + ); + } + + late final __objc_msgSend_703Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_703 = __objc_msgSend_703Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_pathForResource_ofType_inDirectory_1 = + _registerName1("pathForResource:ofType:inDirectory:"); + ffi.Pointer _objc_msgSend_704( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer ext, + ffi.Pointer bundlePath, + ) { + return __objc_msgSend_704( + obj, + sel, + name, + ext, + bundlePath, + ); + } + + late final __objc_msgSend_704Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_704 = __objc_msgSend_704Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_pathsForResourcesOfType_inDirectory_1 = + _registerName1("pathsForResourcesOfType:inDirectory:"); + ffi.Pointer _objc_msgSend_705( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer ext, + ffi.Pointer bundlePath, + ) { + return __objc_msgSend_705( + obj, + sel, + ext, + bundlePath, + ); + } + + late final __objc_msgSend_705Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_705 = __objc_msgSend_705Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_pathForResource_ofType_1 = + _registerName1("pathForResource:ofType:"); + ffi.Pointer _objc_msgSend_706( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer ext, + ) { + return __objc_msgSend_706( + obj, + sel, + name, + ext, + ); + } + + late final __objc_msgSend_706Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_706 = __objc_msgSend_706Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_pathForResource_ofType_inDirectory_forLocalization_1 = + _registerName1("pathForResource:ofType:inDirectory:forLocalization:"); + ffi.Pointer _objc_msgSend_707( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer ext, + ffi.Pointer subpath, + ffi.Pointer localizationName, + ) { + return __objc_msgSend_707( + obj, + sel, + name, + ext, + subpath, + localizationName, + ); + } + + late final __objc_msgSend_707Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_707 = __objc_msgSend_707Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_pathsForResourcesOfType_inDirectory_forLocalization_1 = + _registerName1("pathsForResourcesOfType:inDirectory:forLocalization:"); + ffi.Pointer _objc_msgSend_708( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer ext, + ffi.Pointer subpath, + ffi.Pointer localizationName, + ) { + return __objc_msgSend_708( + obj, + sel, + ext, + subpath, + localizationName, + ); + } + + late final __objc_msgSend_708Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_708 = __objc_msgSend_708Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_localizedStringForKey_value_table_1 = + _registerName1("localizedStringForKey:value:table:"); + ffi.Pointer _objc_msgSend_709( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ffi.Pointer value, + ffi.Pointer tableName, + ) { + return __objc_msgSend_709( + obj, + sel, + key, + value, + tableName, + ); + } + + late final __objc_msgSend_709Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_709 = __objc_msgSend_709Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSAttributedString1 = _getClass1("NSAttributedString"); + late final _sel_attributesAtIndex_effectiveRange_1 = + _registerName1("attributesAtIndex:effectiveRange:"); + ffi.Pointer _objc_msgSend_710( + ffi.Pointer obj, + ffi.Pointer sel, + int location, + ffi.Pointer<_NSRange> range, + ) { + return __objc_msgSend_710( + obj, + sel, + location, + range, + ); + } + + late final __objc_msgSend_710Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>)>>('objc_msgSend'); + late final __objc_msgSend_710 = __objc_msgSend_710Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_NSRange>)>(); + + late final _sel_attribute_atIndex_effectiveRange_1 = + _registerName1("attribute:atIndex:effectiveRange:"); + ffi.Pointer _objc_msgSend_711( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer attrName, + int location, + ffi.Pointer<_NSRange> range, + ) { + return __objc_msgSend_711( + obj, + sel, + attrName, + location, + range, + ); + } + + late final __objc_msgSend_711Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>)>>('objc_msgSend'); + late final __objc_msgSend_711 = __objc_msgSend_711Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>)>(); + + late final _sel_attributedSubstringFromRange_1 = + _registerName1("attributedSubstringFromRange:"); + ffi.Pointer _objc_msgSend_712( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_712( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_712Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_712 = __objc_msgSend_712Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, _NSRange)>(); + + late final _sel_attributesAtIndex_longestEffectiveRange_inRange_1 = + _registerName1("attributesAtIndex:longestEffectiveRange:inRange:"); + ffi.Pointer _objc_msgSend_713( + ffi.Pointer obj, + ffi.Pointer sel, + int location, + ffi.Pointer<_NSRange> range, + _NSRange rangeLimit, + ) { + return __objc_msgSend_713( + obj, + sel, + location, + range, + rangeLimit, + ); + } + + late final __objc_msgSend_713Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_713 = __objc_msgSend_713Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_NSRange>, _NSRange)>(); + + late final _sel_attribute_atIndex_longestEffectiveRange_inRange_1 = + _registerName1("attribute:atIndex:longestEffectiveRange:inRange:"); + ffi.Pointer _objc_msgSend_714( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer attrName, + int location, + ffi.Pointer<_NSRange> range, + _NSRange rangeLimit, + ) { + return __objc_msgSend_714( + obj, + sel, + attrName, + location, + range, + rangeLimit, + ); + } + + late final __objc_msgSend_714Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_714 = __objc_msgSend_714Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>, + _NSRange)>(); + + late final _sel_isEqualToAttributedString_1 = + _registerName1("isEqualToAttributedString:"); + bool _objc_msgSend_715( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + ) { + return __objc_msgSend_715( + obj, + sel, + other, + ); + } + + late final __objc_msgSend_715Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_715 = __objc_msgSend_715Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithString_attributes_1 = + _registerName1("initWithString:attributes:"); + instancetype _objc_msgSend_716( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer str, + ffi.Pointer attrs, + ) { + return __objc_msgSend_716( + obj, + sel, + str, + attrs, + ); + } + + late final __objc_msgSend_716Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_716 = __objc_msgSend_716Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithAttributedString_1 = + _registerName1("initWithAttributedString:"); + instancetype _objc_msgSend_717( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer attrStr, + ) { + return __objc_msgSend_717( + obj, + sel, + attrStr, + ); + } + + late final __objc_msgSend_717Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_717 = __objc_msgSend_717Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_enumerateAttributesInRange_options_usingBlock_1 = + _registerName1("enumerateAttributesInRange:options:usingBlock:"); + void _objc_msgSend_718( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange enumerationRange, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_718( + obj, + sel, + enumerationRange, + opts, + block, + ); + } + + late final __objc_msgSend_718Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_718 = __objc_msgSend_718Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, _NSRange, + int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateAttribute_inRange_options_usingBlock_1 = + _registerName1("enumerateAttribute:inRange:options:usingBlock:"); + void _objc_msgSend_719( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer attrName, + _NSRange enumerationRange, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_719( + obj, + sel, + attrName, + enumerationRange, + opts, + block, + ); + } + + late final __objc_msgSend_719Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_719 = __objc_msgSend_719Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _class_NSAttributedStringMarkdownParsingOptions1 = + _getClass1("NSAttributedStringMarkdownParsingOptions"); + late final _sel_allowsExtendedAttributes1 = + _registerName1("allowsExtendedAttributes"); + late final _sel_setAllowsExtendedAttributes_1 = + _registerName1("setAllowsExtendedAttributes:"); + late final _sel_interpretedSyntax1 = _registerName1("interpretedSyntax"); + int _objc_msgSend_720( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_720( + obj, + sel, + ); + } + + late final __objc_msgSend_720Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_720 = __objc_msgSend_720Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setInterpretedSyntax_1 = + _registerName1("setInterpretedSyntax:"); + void _objc_msgSend_721( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_721( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_721Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_721 = __objc_msgSend_721Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_failurePolicy1 = _registerName1("failurePolicy"); + int _objc_msgSend_722( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_722( + obj, + sel, + ); + } + + late final __objc_msgSend_722Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_722 = __objc_msgSend_722Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setFailurePolicy_1 = _registerName1("setFailurePolicy:"); + void _objc_msgSend_723( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_723( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_723Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_723 = __objc_msgSend_723Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_setLanguageCode_1 = _registerName1("setLanguageCode:"); + late final _sel_appliesSourcePositionAttributes1 = + _registerName1("appliesSourcePositionAttributes"); + late final _sel_setAppliesSourcePositionAttributes_1 = + _registerName1("setAppliesSourcePositionAttributes:"); + late final _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_1 = + _registerName1( + "initWithContentsOfMarkdownFileAtURL:options:baseURL:error:"); + instancetype _objc_msgSend_724( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer markdownFile, + ffi.Pointer options, + ffi.Pointer baseURL, + ffi.Pointer> error, + ) { + return __objc_msgSend_724( + obj, + sel, + markdownFile, + options, + baseURL, + error, + ); + } + + late final __objc_msgSend_724Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_724 = __objc_msgSend_724Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_initWithMarkdown_options_baseURL_error_1 = + _registerName1("initWithMarkdown:options:baseURL:error:"); + instancetype _objc_msgSend_725( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer markdown, + ffi.Pointer options, + ffi.Pointer baseURL, + ffi.Pointer> error, + ) { + return __objc_msgSend_725( + obj, + sel, + markdown, + options, + baseURL, + error, + ); + } + + late final __objc_msgSend_725Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_725 = __objc_msgSend_725Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_initWithMarkdownString_options_baseURL_error_1 = + _registerName1("initWithMarkdownString:options:baseURL:error:"); + instancetype _objc_msgSend_726( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer markdownString, + ffi.Pointer options, + ffi.Pointer baseURL, + ffi.Pointer> error, + ) { + return __objc_msgSend_726( + obj, + sel, + markdownString, + options, + baseURL, + error, + ); + } + + late final __objc_msgSend_726Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_726 = __objc_msgSend_726Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_initWithFormat_options_locale_1 = + _registerName1("initWithFormat:options:locale:"); + instancetype _objc_msgSend_727( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + int options, + ffi.Pointer locale, + ) { + return __objc_msgSend_727( + obj, + sel, + format, + options, + locale, + ); + } + + late final __objc_msgSend_727Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_727 = __objc_msgSend_727Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); + + late final _sel_initWithFormat_options_locale_arguments_1 = + _registerName1("initWithFormat:options:locale:arguments:"); + instancetype _objc_msgSend_728( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + int options, + ffi.Pointer locale, + ffi.Pointer arguments, + ) { + return __objc_msgSend_728( + obj, + sel, + format, + options, + locale, + arguments, + ); + } + + late final __objc_msgSend_728Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_728 = __objc_msgSend_728Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_localizedAttributedStringWithFormat_1 = + _registerName1("localizedAttributedStringWithFormat:"); + late final _sel_localizedAttributedStringWithFormat_options_1 = + _registerName1("localizedAttributedStringWithFormat:options:"); + instancetype _objc_msgSend_729( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer format, + int options, + ) { + return __objc_msgSend_729( + obj, + sel, + format, + options, + ); + } + + late final __objc_msgSend_729Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_729 = __objc_msgSend_729Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_attributedStringByInflectingString1 = + _registerName1("attributedStringByInflectingString"); + ffi.Pointer _objc_msgSend_730( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_730( + obj, + sel, + ); + } + + late final __objc_msgSend_730Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_730 = __objc_msgSend_730Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_localizedAttributedStringForKey_value_table_1 = + _registerName1("localizedAttributedStringForKey:value:table:"); + ffi.Pointer _objc_msgSend_731( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ffi.Pointer value, + ffi.Pointer tableName, + ) { + return __objc_msgSend_731( + obj, + sel, + key, + value, + tableName, + ); + } + + late final __objc_msgSend_731Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_731 = __objc_msgSend_731Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_bundleIdentifier1 = _registerName1("bundleIdentifier"); + late final _sel_infoDictionary1 = _registerName1("infoDictionary"); + late final _sel_localizedInfoDictionary1 = + _registerName1("localizedInfoDictionary"); + late final _sel_objectForInfoDictionaryKey_1 = + _registerName1("objectForInfoDictionaryKey:"); + late final _sel_classNamed_1 = _registerName1("classNamed:"); + late final _sel_principalClass1 = _registerName1("principalClass"); + late final _sel_preferredLocalizations1 = + _registerName1("preferredLocalizations"); + late final _sel_localizations1 = _registerName1("localizations"); + late final _sel_developmentLocalization1 = + _registerName1("developmentLocalization"); + late final _sel_preferredLocalizationsFromArray_1 = + _registerName1("preferredLocalizationsFromArray:"); + late final _sel_preferredLocalizationsFromArray_forPreferences_1 = + _registerName1("preferredLocalizationsFromArray:forPreferences:"); + ffi.Pointer _objc_msgSend_732( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer localizationsArray, + ffi.Pointer preferencesArray, + ) { + return __objc_msgSend_732( + obj, + sel, + localizationsArray, + preferencesArray, + ); + } + + late final __objc_msgSend_732Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_732 = __objc_msgSend_732Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_executableArchitectures1 = + _registerName1("executableArchitectures"); + late final _sel_setPreservationPriority_forTags_1 = + _registerName1("setPreservationPriority:forTags:"); + void _objc_msgSend_733( + ffi.Pointer obj, + ffi.Pointer sel, + double priority, + ffi.Pointer tags, + ) { + return __objc_msgSend_733( + obj, + sel, + priority, + tags, + ); + } + + late final __objc_msgSend_733Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Double, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_733 = __objc_msgSend_733Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double, + ffi.Pointer)>(); + + late final _sel_preservationPriorityForTag_1 = + _registerName1("preservationPriorityForTag:"); + late final _class_NSMutableAttributedString1 = + _getClass1("NSMutableAttributedString"); + late final _sel_setAttributes_range_1 = + _registerName1("setAttributes:range:"); + void _objc_msgSend_734( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer attrs, + _NSRange range, + ) { + return __objc_msgSend_734( + obj, + sel, + attrs, + range, + ); + } + + late final __objc_msgSend_734Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_734 = __objc_msgSend_734Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>(); + + late final _sel_mutableString1 = _registerName1("mutableString"); + ffi.Pointer _objc_msgSend_735( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_735( + obj, + sel, + ); + } + + late final __objc_msgSend_735Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_735 = __objc_msgSend_735Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_addAttribute_value_range_1 = + _registerName1("addAttribute:value:range:"); + void _objc_msgSend_736( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer value, + _NSRange range, + ) { + return __objc_msgSend_736( + obj, + sel, + name, + value, + range, + ); + } + + late final __objc_msgSend_736Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_736 = __objc_msgSend_736Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, _NSRange)>(); + + late final _sel_addAttributes_range_1 = + _registerName1("addAttributes:range:"); + void _objc_msgSend_737( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer attrs, + _NSRange range, + ) { + return __objc_msgSend_737( + obj, + sel, + attrs, + range, + ); + } + + late final __objc_msgSend_737Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_737 = __objc_msgSend_737Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>(); + + late final _sel_removeAttribute_range_1 = + _registerName1("removeAttribute:range:"); + void _objc_msgSend_738( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + _NSRange range, + ) { + return __objc_msgSend_738( + obj, + sel, + name, + range, + ); + } + + late final __objc_msgSend_738Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_738 = __objc_msgSend_738Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>(); + + late final _sel_replaceCharactersInRange_withAttributedString_1 = + _registerName1("replaceCharactersInRange:withAttributedString:"); + void _objc_msgSend_739( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer attrString, + ) { + return __objc_msgSend_739( + obj, + sel, + range, + attrString, + ); + } + + late final __objc_msgSend_739Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_739 = __objc_msgSend_739Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, _NSRange, + ffi.Pointer)>(); + + late final _sel_insertAttributedString_atIndex_1 = + _registerName1("insertAttributedString:atIndex:"); + void _objc_msgSend_740( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer attrString, + int loc, + ) { + return __objc_msgSend_740( + obj, + sel, + attrString, + loc, + ); + } + + late final __objc_msgSend_740Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_740 = __objc_msgSend_740Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_appendAttributedString_1 = + _registerName1("appendAttributedString:"); + void _objc_msgSend_741( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer attrString, + ) { + return __objc_msgSend_741( + obj, + sel, + attrString, + ); + } + + late final __objc_msgSend_741Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_741 = __objc_msgSend_741Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setAttributedString_1 = + _registerName1("setAttributedString:"); + late final _sel_beginEditing1 = _registerName1("beginEditing"); + late final _sel_endEditing1 = _registerName1("endEditing"); + late final _sel_appendLocalizedFormat_1 = + _registerName1("appendLocalizedFormat:"); + late final _class_NSDateFormatter1 = _getClass1("NSDateFormatter"); + late final _class_NSFormatter1 = _getClass1("NSFormatter"); + late final _sel_stringForObjectValue_1 = + _registerName1("stringForObjectValue:"); + ffi.Pointer _objc_msgSend_742( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer obj1, + ) { + return __objc_msgSend_742( + obj, + sel, + obj1, + ); + } + + late final __objc_msgSend_742Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_742 = __objc_msgSend_742Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_attributedStringForObjectValue_withDefaultAttributes_1 = + _registerName1("attributedStringForObjectValue:withDefaultAttributes:"); + ffi.Pointer _objc_msgSend_743( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer obj1, + ffi.Pointer attrs, + ) { + return __objc_msgSend_743( + obj, + sel, + obj1, + attrs, + ); + } + + late final __objc_msgSend_743Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_743 = __objc_msgSend_743Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_editingStringForObjectValue_1 = + _registerName1("editingStringForObjectValue:"); + late final _sel_getObjectValue_forString_errorDescription_1 = + _registerName1("getObjectValue:forString:errorDescription:"); + bool _objc_msgSend_744( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> obj1, + ffi.Pointer string, + ffi.Pointer> error, + ) { + return __objc_msgSend_744( + obj, + sel, + obj1, + string, + error, + ); + } + + late final __objc_msgSend_744Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_744 = __objc_msgSend_744Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_isPartialStringValid_newEditingString_errorDescription_1 = + _registerName1("isPartialStringValid:newEditingString:errorDescription:"); + bool _objc_msgSend_745( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer partialString, + ffi.Pointer> newString, + ffi.Pointer> error, + ) { + return __objc_msgSend_745( + obj, + sel, + partialString, + newString, + error, + ); + } + + late final __objc_msgSend_745Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_745 = __objc_msgSend_745Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_1 = + _registerName1( + "isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:"); + bool _objc_msgSend_746( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> partialStringPtr, + ffi.Pointer<_NSRange> proposedSelRangePtr, + ffi.Pointer origString, + _NSRange origSelRange, + ffi.Pointer> error, + ) { + return __objc_msgSend_746( + obj, + sel, + partialStringPtr, + proposedSelRangePtr, + origString, + origSelRange, + error, + ); + } + + late final __objc_msgSend_746Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer<_NSRange>, + ffi.Pointer, + _NSRange, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_746 = __objc_msgSend_746Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer<_NSRange>, + ffi.Pointer, + _NSRange, + ffi.Pointer>)>(); + + late final _sel_formattingContext1 = _registerName1("formattingContext"); + int _objc_msgSend_747( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_747( + obj, + sel, + ); + } + + late final __objc_msgSend_747Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_747 = __objc_msgSend_747Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setFormattingContext_1 = + _registerName1("setFormattingContext:"); + void _objc_msgSend_748( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_748( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_748Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_748 = __objc_msgSend_748Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_getObjectValue_forString_range_error_1 = + _registerName1("getObjectValue:forString:range:error:"); + bool _objc_msgSend_749( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> obj1, + ffi.Pointer string, + ffi.Pointer<_NSRange> rangep, + ffi.Pointer> error, + ) { + return __objc_msgSend_749( + obj, + sel, + obj1, + string, + rangep, + error, + ); + } + + late final __objc_msgSend_749Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer<_NSRange>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_749 = __objc_msgSend_749Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer<_NSRange>, + ffi.Pointer>)>(); + + late final _sel_stringFromDate_1 = _registerName1("stringFromDate:"); + ffi.Pointer _objc_msgSend_750( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, + ) { + return __objc_msgSend_750( + obj, + sel, + date, + ); + } + + late final __objc_msgSend_750Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_750 = __objc_msgSend_750Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dateFromString_1 = _registerName1("dateFromString:"); + late final _sel_localizedStringFromDate_dateStyle_timeStyle_1 = + _registerName1("localizedStringFromDate:dateStyle:timeStyle:"); + ffi.Pointer _objc_msgSend_751( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, + int dstyle, + int tstyle, + ) { + return __objc_msgSend_751( + obj, + sel, + date, + dstyle, + tstyle, + ); + } + + late final __objc_msgSend_751Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_751 = __objc_msgSend_751Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); + + late final _sel_dateFormatFromTemplate_options_locale_1 = + _registerName1("dateFormatFromTemplate:options:locale:"); + ffi.Pointer _objc_msgSend_752( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer tmplate, + int opts, + ffi.Pointer locale, + ) { + return __objc_msgSend_752( + obj, + sel, + tmplate, + opts, + locale, + ); + } + + late final __objc_msgSend_752Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_752 = __objc_msgSend_752Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + + late final _sel_defaultFormatterBehavior1 = + _registerName1("defaultFormatterBehavior"); + int _objc_msgSend_753( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_753( + obj, + sel, + ); + } + + late final __objc_msgSend_753Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_753 = __objc_msgSend_753Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setDefaultFormatterBehavior_1 = + _registerName1("setDefaultFormatterBehavior:"); + void _objc_msgSend_754( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_754( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_754Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_754 = __objc_msgSend_754Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_setLocalizedDateFormatFromTemplate_1 = + _registerName1("setLocalizedDateFormatFromTemplate:"); + late final _sel_dateFormat1 = _registerName1("dateFormat"); + late final _sel_setDateFormat_1 = _registerName1("setDateFormat:"); + late final _sel_dateStyle1 = _registerName1("dateStyle"); + int _objc_msgSend_755( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_755( + obj, + sel, + ); + } + + late final __objc_msgSend_755Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_755 = __objc_msgSend_755Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setDateStyle_1 = _registerName1("setDateStyle:"); + void _objc_msgSend_756( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_756( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_756Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_756 = __objc_msgSend_756Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_timeStyle1 = _registerName1("timeStyle"); + late final _sel_setTimeStyle_1 = _registerName1("setTimeStyle:"); + late final _sel_locale1 = _registerName1("locale"); + late final _sel_setLocale_1 = _registerName1("setLocale:"); + void _objc_msgSend_757( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_757( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_757Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_757 = __objc_msgSend_757Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_generatesCalendarDates1 = + _registerName1("generatesCalendarDates"); + late final _sel_setGeneratesCalendarDates_1 = + _registerName1("setGeneratesCalendarDates:"); + late final _sel_formatterBehavior1 = _registerName1("formatterBehavior"); + late final _sel_setFormatterBehavior_1 = + _registerName1("setFormatterBehavior:"); + late final _class_NSCalendar1 = _getClass1("NSCalendar"); + late final _sel_currentCalendar1 = _registerName1("currentCalendar"); + ffi.Pointer _objc_msgSend_758( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_758( + obj, + sel, + ); + } + + late final __objc_msgSend_758Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_758 = __objc_msgSend_758Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_autoupdatingCurrentCalendar1 = + _registerName1("autoupdatingCurrentCalendar"); + late final _sel_calendarWithIdentifier_1 = + _registerName1("calendarWithIdentifier:"); + ffi.Pointer _objc_msgSend_759( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer calendarIdentifierConstant, + ) { + return __objc_msgSend_759( + obj, + sel, + calendarIdentifierConstant, + ); + } + + late final __objc_msgSend_759Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_759 = __objc_msgSend_759Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithCalendarIdentifier_1 = + _registerName1("initWithCalendarIdentifier:"); + ffi.Pointer _objc_msgSend_760( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_760( + obj, + sel, + ); + } + + late final __objc_msgSend_760Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_760 = __objc_msgSend_760Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_761( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_761( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_761Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_761 = __objc_msgSend_761Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_firstWeekday1 = _registerName1("firstWeekday"); + late final _sel_setFirstWeekday_1 = _registerName1("setFirstWeekday:"); + late final _sel_minimumDaysInFirstWeek1 = + _registerName1("minimumDaysInFirstWeek"); + late final _sel_setMinimumDaysInFirstWeek_1 = + _registerName1("setMinimumDaysInFirstWeek:"); + late final _sel_eraSymbols1 = _registerName1("eraSymbols"); + late final _sel_longEraSymbols1 = _registerName1("longEraSymbols"); + late final _sel_monthSymbols1 = _registerName1("monthSymbols"); + late final _sel_shortMonthSymbols1 = _registerName1("shortMonthSymbols"); + late final _sel_veryShortMonthSymbols1 = + _registerName1("veryShortMonthSymbols"); + late final _sel_standaloneMonthSymbols1 = + _registerName1("standaloneMonthSymbols"); + late final _sel_shortStandaloneMonthSymbols1 = + _registerName1("shortStandaloneMonthSymbols"); + late final _sel_veryShortStandaloneMonthSymbols1 = + _registerName1("veryShortStandaloneMonthSymbols"); + late final _sel_weekdaySymbols1 = _registerName1("weekdaySymbols"); + late final _sel_shortWeekdaySymbols1 = _registerName1("shortWeekdaySymbols"); + late final _sel_veryShortWeekdaySymbols1 = + _registerName1("veryShortWeekdaySymbols"); + late final _sel_standaloneWeekdaySymbols1 = + _registerName1("standaloneWeekdaySymbols"); + late final _sel_shortStandaloneWeekdaySymbols1 = + _registerName1("shortStandaloneWeekdaySymbols"); + late final _sel_veryShortStandaloneWeekdaySymbols1 = + _registerName1("veryShortStandaloneWeekdaySymbols"); + late final _sel_quarterSymbols1 = _registerName1("quarterSymbols"); + late final _sel_shortQuarterSymbols1 = _registerName1("shortQuarterSymbols"); + late final _sel_standaloneQuarterSymbols1 = + _registerName1("standaloneQuarterSymbols"); + late final _sel_shortStandaloneQuarterSymbols1 = + _registerName1("shortStandaloneQuarterSymbols"); + late final _sel_AMSymbol1 = _registerName1("AMSymbol"); + late final _sel_PMSymbol1 = _registerName1("PMSymbol"); + late final _sel_minimumRangeOfUnit_1 = _registerName1("minimumRangeOfUnit:"); + _NSRange _objc_msgSend_762( + ffi.Pointer obj, + ffi.Pointer sel, + int unit, + ) { + return __objc_msgSend_762( + obj, + sel, + unit, + ); + } + + late final __objc_msgSend_762Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_762 = __objc_msgSend_762Ptr.asFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); + + void _objc_msgSend_762_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + int unit, + ) { + return __objc_msgSend_762_stret( + stret, + obj, + sel, + unit, + ); + } + + late final __objc_msgSend_762_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend_stret'); + late final __objc_msgSend_762_stret = __objc_msgSend_762_stretPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_maximumRangeOfUnit_1 = _registerName1("maximumRangeOfUnit:"); + late final _sel_rangeOfUnit_inUnit_forDate_1 = + _registerName1("rangeOfUnit:inUnit:forDate:"); + _NSRange _objc_msgSend_763( + ffi.Pointer obj, + ffi.Pointer sel, + int smaller, + int larger, + ffi.Pointer date, + ) { + return __objc_msgSend_763( + obj, + sel, + smaller, + larger, + date, + ); + } + + late final __objc_msgSend_763Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Int32, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_763 = __objc_msgSend_763Ptr.asFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, int, int, + ffi.Pointer)>(); + + void _objc_msgSend_763_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + int smaller, + int larger, + ffi.Pointer date, + ) { + return __objc_msgSend_763_stret( + stret, + obj, + sel, + smaller, + larger, + date, + ); + } + + late final __objc_msgSend_763_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_763_stret = __objc_msgSend_763_stretPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer)>(); + + late final _sel_ordinalityOfUnit_inUnit_forDate_1 = + _registerName1("ordinalityOfUnit:inUnit:forDate:"); + int _objc_msgSend_764( + ffi.Pointer obj, + ffi.Pointer sel, + int smaller, + int larger, + ffi.Pointer date, + ) { + return __objc_msgSend_764( + obj, + sel, + smaller, + larger, + date, + ); + } + + late final __objc_msgSend_764Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_764 = __objc_msgSend_764Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, int, + ffi.Pointer)>(); + + late final _sel_rangeOfUnit_startDate_interval_forDate_1 = + _registerName1("rangeOfUnit:startDate:interval:forDate:"); + bool _objc_msgSend_765( + ffi.Pointer obj, + ffi.Pointer sel, + int unit, + ffi.Pointer> datep, + ffi.Pointer tip, + ffi.Pointer date, + ) { + return __objc_msgSend_765( + obj, + sel, + unit, + datep, + tip, + date, + ); + } + + late final __objc_msgSend_765Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_765 = __objc_msgSend_765Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSDateComponents1 = _getClass1("NSDateComponents"); + late final _sel_calendar1 = _registerName1("calendar"); + ffi.Pointer _objc_msgSend_766( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_766( + obj, + sel, + ); + } + + late final __objc_msgSend_766Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_766 = __objc_msgSend_766Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setCalendar_1 = _registerName1("setCalendar:"); + void _objc_msgSend_767( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_767( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_767Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_767 = __objc_msgSend_767Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_768( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_768( + obj, + sel, + ); + } + + late final __objc_msgSend_768Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_768 = __objc_msgSend_768Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_769( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_769( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_769Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_769 = __objc_msgSend_769Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_era1 = _registerName1("era"); + late final _sel_setEra_1 = _registerName1("setEra:"); + late final _sel_year1 = _registerName1("year"); + late final _sel_setYear_1 = _registerName1("setYear:"); + late final _sel_month1 = _registerName1("month"); + late final _sel_setMonth_1 = _registerName1("setMonth:"); + late final _sel_day1 = _registerName1("day"); + late final _sel_setDay_1 = _registerName1("setDay:"); + late final _sel_hour1 = _registerName1("hour"); + late final _sel_setHour_1 = _registerName1("setHour:"); + late final _sel_minute1 = _registerName1("minute"); + late final _sel_setMinute_1 = _registerName1("setMinute:"); + late final _sel_second1 = _registerName1("second"); + late final _sel_setSecond_1 = _registerName1("setSecond:"); + late final _sel_nanosecond1 = _registerName1("nanosecond"); + late final _sel_setNanosecond_1 = _registerName1("setNanosecond:"); + late final _sel_weekday1 = _registerName1("weekday"); + late final _sel_setWeekday_1 = _registerName1("setWeekday:"); + late final _sel_weekdayOrdinal1 = _registerName1("weekdayOrdinal"); + late final _sel_setWeekdayOrdinal_1 = _registerName1("setWeekdayOrdinal:"); + late final _sel_quarter1 = _registerName1("quarter"); + late final _sel_setQuarter_1 = _registerName1("setQuarter:"); + late final _sel_weekOfMonth1 = _registerName1("weekOfMonth"); + late final _sel_setWeekOfMonth_1 = _registerName1("setWeekOfMonth:"); + late final _sel_weekOfYear1 = _registerName1("weekOfYear"); + late final _sel_setWeekOfYear_1 = _registerName1("setWeekOfYear:"); + late final _sel_yearForWeekOfYear1 = _registerName1("yearForWeekOfYear"); + late final _sel_setYearForWeekOfYear_1 = + _registerName1("setYearForWeekOfYear:"); + late final _sel_isLeapMonth1 = _registerName1("isLeapMonth"); + late final _sel_setLeapMonth_1 = _registerName1("setLeapMonth:"); + late final _sel_week1 = _registerName1("week"); + late final _sel_setWeek_1 = _registerName1("setWeek:"); + late final _sel_setValue_forComponent_1 = + _registerName1("setValue:forComponent:"); + void _objc_msgSend_770( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + int unit, + ) { + return __objc_msgSend_770( + obj, + sel, + value, + unit, + ); + } + + late final __objc_msgSend_770Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Long, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_770 = __objc_msgSend_770Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); + + late final _sel_valueForComponent_1 = _registerName1("valueForComponent:"); + int _objc_msgSend_771( + ffi.Pointer obj, + ffi.Pointer sel, + int unit, + ) { + return __objc_msgSend_771( + obj, + sel, + unit, + ); + } + + late final __objc_msgSend_771Ptr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_771 = __objc_msgSend_771Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_isValidDate1 = _registerName1("isValidDate"); + late final _sel_isValidDateInCalendar_1 = + _registerName1("isValidDateInCalendar:"); + bool _objc_msgSend_772( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer calendar, + ) { + return __objc_msgSend_772( + obj, + sel, + calendar, + ); + } + + late final __objc_msgSend_772Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_772 = __objc_msgSend_772Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_dateFromComponents_1 = _registerName1("dateFromComponents:"); + ffi.Pointer _objc_msgSend_773( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer comps, + ) { + return __objc_msgSend_773( + obj, + sel, + comps, + ); + } + + late final __objc_msgSend_773Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_773 = __objc_msgSend_773Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_components_fromDate_1 = + _registerName1("components:fromDate:"); + ffi.Pointer _objc_msgSend_774( + ffi.Pointer obj, + ffi.Pointer sel, + int unitFlags, + ffi.Pointer date, + ) { + return __objc_msgSend_774( + obj, + sel, + unitFlags, + date, + ); + } + + late final __objc_msgSend_774Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_774 = __objc_msgSend_774Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); + + late final _sel_dateByAddingComponents_toDate_options_1 = + _registerName1("dateByAddingComponents:toDate:options:"); + ffi.Pointer _objc_msgSend_775( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer comps, + ffi.Pointer date, + int opts, + ) { + return __objc_msgSend_775( + obj, + sel, + comps, + date, + opts, + ); + } + + late final __objc_msgSend_775Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_775 = __objc_msgSend_775Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + + late final _sel_components_fromDate_toDate_options_1 = + _registerName1("components:fromDate:toDate:options:"); + ffi.Pointer _objc_msgSend_776( + ffi.Pointer obj, + ffi.Pointer sel, + int unitFlags, + ffi.Pointer startingDate, + ffi.Pointer resultDate, + int opts, + ) { + return __objc_msgSend_776( + obj, + sel, + unitFlags, + startingDate, + resultDate, + opts, + ); + } + + late final __objc_msgSend_776Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_776 = __objc_msgSend_776Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + int)>(); + + late final _sel_getEra_year_month_day_fromDate_1 = + _registerName1("getEra:year:month:day:fromDate:"); + void _objc_msgSend_777( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer eraValuePointer, + ffi.Pointer yearValuePointer, + ffi.Pointer monthValuePointer, + ffi.Pointer dayValuePointer, + ffi.Pointer date, + ) { + return __objc_msgSend_777( + obj, + sel, + eraValuePointer, + yearValuePointer, + monthValuePointer, + dayValuePointer, + date, + ); + } + + late final __objc_msgSend_777Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_777 = __objc_msgSend_777Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_1 = + _registerName1("getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate:"); + late final _sel_getHour_minute_second_nanosecond_fromDate_1 = + _registerName1("getHour:minute:second:nanosecond:fromDate:"); + late final _sel_component_fromDate_1 = _registerName1("component:fromDate:"); + int _objc_msgSend_778( + ffi.Pointer obj, + ffi.Pointer sel, + int unit, + ffi.Pointer date, + ) { + return __objc_msgSend_778( + obj, + sel, + unit, + date, + ); + } + + late final __objc_msgSend_778Ptr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_778 = __objc_msgSend_778Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_1 = + _registerName1( + "dateWithEra:year:month:day:hour:minute:second:nanosecond:"); + ffi.Pointer _objc_msgSend_779( + ffi.Pointer obj, + ffi.Pointer sel, + int eraValue, + int yearValue, + int monthValue, + int dayValue, + int hourValue, + int minuteValue, + int secondValue, + int nanosecondValue, + ) { + return __objc_msgSend_779( + obj, + sel, + eraValue, + yearValue, + monthValue, + dayValue, + hourValue, + minuteValue, + secondValue, + nanosecondValue, + ); + } + + late final __objc_msgSend_779Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_779 = __objc_msgSend_779Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, int, int, int, int, int, int, int)>(); + + late final _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_1 = + _registerName1( + "dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:"); + late final _sel_startOfDayForDate_1 = _registerName1("startOfDayForDate:"); + late final _sel_componentsInTimeZone_fromDate_1 = + _registerName1("componentsInTimeZone:fromDate:"); + ffi.Pointer _objc_msgSend_780( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer timezone, + ffi.Pointer date, + ) { + return __objc_msgSend_780( + obj, + sel, + timezone, + date, + ); + } + + late final __objc_msgSend_780Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_780 = __objc_msgSend_780Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_compareDate_toDate_toUnitGranularity_1 = + _registerName1("compareDate:toDate:toUnitGranularity:"); + int _objc_msgSend_781( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date1, + ffi.Pointer date2, + int unit, + ) { + return __objc_msgSend_781( + obj, + sel, + date1, + date2, + unit, + ); + } + + late final __objc_msgSend_781Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_781 = __objc_msgSend_781Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_isDate_equalToDate_toUnitGranularity_1 = + _registerName1("isDate:equalToDate:toUnitGranularity:"); + bool _objc_msgSend_782( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date1, + ffi.Pointer date2, + int unit, + ) { + return __objc_msgSend_782( + obj, + sel, + date1, + date2, + unit, + ); + } + + late final __objc_msgSend_782Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_782 = __objc_msgSend_782Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_isDate_inSameDayAsDate_1 = + _registerName1("isDate:inSameDayAsDate:"); + bool _objc_msgSend_783( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date1, + ffi.Pointer date2, + ) { + return __objc_msgSend_783( + obj, + sel, + date1, + date2, + ); + } + + late final __objc_msgSend_783Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_783 = __objc_msgSend_783Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_isDateInToday_1 = _registerName1("isDateInToday:"); + late final _sel_isDateInYesterday_1 = _registerName1("isDateInYesterday:"); + late final _sel_isDateInTomorrow_1 = _registerName1("isDateInTomorrow:"); + late final _sel_isDateInWeekend_1 = _registerName1("isDateInWeekend:"); + late final _sel_rangeOfWeekendStartDate_interval_containingDate_1 = + _registerName1("rangeOfWeekendStartDate:interval:containingDate:"); + bool _objc_msgSend_784( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> datep, + ffi.Pointer tip, + ffi.Pointer date, + ) { + return __objc_msgSend_784( + obj, + sel, + datep, + tip, + date, + ); + } + + late final __objc_msgSend_784Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_784 = __objc_msgSend_784Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_nextWeekendStartDate_interval_options_afterDate_1 = + _registerName1("nextWeekendStartDate:interval:options:afterDate:"); + bool _objc_msgSend_785( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> datep, + ffi.Pointer tip, + int options, + ffi.Pointer date, + ) { + return __objc_msgSend_785( + obj, + sel, + datep, + tip, + options, + date, + ); + } + + late final __objc_msgSend_785Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_785 = __objc_msgSend_785Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + int, + ffi.Pointer)>(); + + late final _sel_components_fromDateComponents_toDateComponents_options_1 = + _registerName1("components:fromDateComponents:toDateComponents:options:"); + ffi.Pointer _objc_msgSend_786( + ffi.Pointer obj, + ffi.Pointer sel, + int unitFlags, + ffi.Pointer startingDateComp, + ffi.Pointer resultDateComp, + int options, + ) { + return __objc_msgSend_786( + obj, + sel, + unitFlags, + startingDateComp, + resultDateComp, + options, + ); + } + + late final __objc_msgSend_786Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_786 = __objc_msgSend_786Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + int)>(); + + late final _sel_dateByAddingUnit_value_toDate_options_1 = + _registerName1("dateByAddingUnit:value:toDate:options:"); + ffi.Pointer _objc_msgSend_787( + ffi.Pointer obj, + ffi.Pointer sel, + int unit, + int value, + ffi.Pointer date, + int options, + ) { + return __objc_msgSend_787( + obj, + sel, + unit, + value, + date, + options, + ); + } + + late final __objc_msgSend_787Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Long, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_787 = __objc_msgSend_787Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer, int)>(); + + late final _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_1 = + _registerName1( + "enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:"); + void _objc_msgSend_788( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer start, + ffi.Pointer comps, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_788( + obj, + sel, + start, + comps, + opts, + block, + ); + } + + late final __objc_msgSend_788Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_788 = __objc_msgSend_788Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_nextDateAfterDate_matchingComponents_options_1 = + _registerName1("nextDateAfterDate:matchingComponents:options:"); + ffi.Pointer _objc_msgSend_789( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, + ffi.Pointer comps, + int options, + ) { + return __objc_msgSend_789( + obj, + sel, + date, + comps, + options, + ); + } + + late final __objc_msgSend_789Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_789 = __objc_msgSend_789Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + + late final _sel_nextDateAfterDate_matchingUnit_value_options_1 = + _registerName1("nextDateAfterDate:matchingUnit:value:options:"); + ffi.Pointer _objc_msgSend_790( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, + int unit, + int value, + int options, + ) { + return __objc_msgSend_790( + obj, + sel, + date, + unit, + value, + options, + ); + } + + late final __objc_msgSend_790Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Long, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_790 = __objc_msgSend_790Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int, int)>(); + + late final _sel_nextDateAfterDate_matchingHour_minute_second_options_1 = + _registerName1("nextDateAfterDate:matchingHour:minute:second:options:"); + ffi.Pointer _objc_msgSend_791( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, + int hourValue, + int minuteValue, + int secondValue, + int options, + ) { + return __objc_msgSend_791( + obj, + sel, + date, + hourValue, + minuteValue, + secondValue, + options, + ); + } + + late final __objc_msgSend_791Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_791 = __objc_msgSend_791Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int, int, int)>(); + + late final _sel_dateBySettingUnit_value_ofDate_options_1 = + _registerName1("dateBySettingUnit:value:ofDate:options:"); + late final _sel_dateBySettingHour_minute_second_ofDate_options_1 = + _registerName1("dateBySettingHour:minute:second:ofDate:options:"); + ffi.Pointer _objc_msgSend_792( + ffi.Pointer obj, + ffi.Pointer sel, + int h, + int m, + int s, + ffi.Pointer date, + int opts, + ) { + return __objc_msgSend_792( + obj, + sel, + h, + m, + s, + date, + opts, + ); + } + + late final __objc_msgSend_792Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_792 = __objc_msgSend_792Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, int, int, ffi.Pointer, int)>(); + + late final _sel_date_matchesComponents_1 = + _registerName1("date:matchesComponents:"); + bool _objc_msgSend_793( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, + ffi.Pointer components, + ) { + return __objc_msgSend_793( + obj, + sel, + date, + components, + ); + } + + late final __objc_msgSend_793Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_793 = __objc_msgSend_793Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_794( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_794( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_794Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_794 = __objc_msgSend_794Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_isLenient1 = _registerName1("isLenient"); + late final _sel_setLenient_1 = _registerName1("setLenient:"); + late final _sel_twoDigitStartDate1 = _registerName1("twoDigitStartDate"); + late final _sel_setTwoDigitStartDate_1 = + _registerName1("setTwoDigitStartDate:"); + void _objc_msgSend_795( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_795( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_795Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_795 = __objc_msgSend_795Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_defaultDate1 = _registerName1("defaultDate"); + late final _sel_setDefaultDate_1 = _registerName1("setDefaultDate:"); + late final _sel_setEraSymbols_1 = _registerName1("setEraSymbols:"); + void _objc_msgSend_796( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_796( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_796Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_796 = __objc_msgSend_796Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setMonthSymbols_1 = _registerName1("setMonthSymbols:"); + late final _sel_setShortMonthSymbols_1 = + _registerName1("setShortMonthSymbols:"); + late final _sel_setWeekdaySymbols_1 = _registerName1("setWeekdaySymbols:"); + late final _sel_setShortWeekdaySymbols_1 = + _registerName1("setShortWeekdaySymbols:"); + late final _sel_setAMSymbol_1 = _registerName1("setAMSymbol:"); + late final _sel_setPMSymbol_1 = _registerName1("setPMSymbol:"); + late final _sel_setLongEraSymbols_1 = _registerName1("setLongEraSymbols:"); + late final _sel_setVeryShortMonthSymbols_1 = + _registerName1("setVeryShortMonthSymbols:"); + late final _sel_setStandaloneMonthSymbols_1 = + _registerName1("setStandaloneMonthSymbols:"); + late final _sel_setShortStandaloneMonthSymbols_1 = + _registerName1("setShortStandaloneMonthSymbols:"); + late final _sel_setVeryShortStandaloneMonthSymbols_1 = + _registerName1("setVeryShortStandaloneMonthSymbols:"); + late final _sel_setVeryShortWeekdaySymbols_1 = + _registerName1("setVeryShortWeekdaySymbols:"); + late final _sel_setStandaloneWeekdaySymbols_1 = + _registerName1("setStandaloneWeekdaySymbols:"); + late final _sel_setShortStandaloneWeekdaySymbols_1 = + _registerName1("setShortStandaloneWeekdaySymbols:"); + late final _sel_setVeryShortStandaloneWeekdaySymbols_1 = + _registerName1("setVeryShortStandaloneWeekdaySymbols:"); + late final _sel_setQuarterSymbols_1 = _registerName1("setQuarterSymbols:"); + late final _sel_setShortQuarterSymbols_1 = + _registerName1("setShortQuarterSymbols:"); + late final _sel_setStandaloneQuarterSymbols_1 = + _registerName1("setStandaloneQuarterSymbols:"); + late final _sel_setShortStandaloneQuarterSymbols_1 = + _registerName1("setShortStandaloneQuarterSymbols:"); + late final _sel_gregorianStartDate1 = _registerName1("gregorianStartDate"); + late final _sel_setGregorianStartDate_1 = + _registerName1("setGregorianStartDate:"); + late final _sel_doesRelativeDateFormatting1 = + _registerName1("doesRelativeDateFormatting"); + late final _sel_setDoesRelativeDateFormatting_1 = + _registerName1("setDoesRelativeDateFormatting:"); + late final _sel_initWithDateFormat_allowNaturalLanguage_1 = + _registerName1("initWithDateFormat:allowNaturalLanguage:"); + late final _sel_allowsNaturalLanguage1 = + _registerName1("allowsNaturalLanguage"); + late final _class_NSNumberFormatter1 = _getClass1("NSNumberFormatter"); + late final _sel_stringFromNumber_1 = _registerName1("stringFromNumber:"); + ffi.Pointer _objc_msgSend_797( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer number, + ) { + return __objc_msgSend_797( + obj, + sel, + number, + ); + } + + late final __objc_msgSend_797Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_797 = __objc_msgSend_797Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_numberFromString_1 = _registerName1("numberFromString:"); + ffi.Pointer _objc_msgSend_798( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + ) { + return __objc_msgSend_798( + obj, + sel, + string, + ); + } + + late final __objc_msgSend_798Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_798 = __objc_msgSend_798Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_localizedStringFromNumber_numberStyle_1 = + _registerName1("localizedStringFromNumber:numberStyle:"); + ffi.Pointer _objc_msgSend_799( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer num, + int nstyle, + ) { + return __objc_msgSend_799( + obj, + sel, + num, + nstyle, + ); + } + + late final __objc_msgSend_799Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_799 = __objc_msgSend_799Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + int _objc_msgSend_800( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_800( + obj, + sel, + ); + } + + late final __objc_msgSend_800Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_800 = __objc_msgSend_800Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_801( + ffi.Pointer obj, + ffi.Pointer sel, + int behavior, + ) { + return __objc_msgSend_801( + obj, + sel, + behavior, + ); + } + + late final __objc_msgSend_801Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_801 = __objc_msgSend_801Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_numberStyle1 = _registerName1("numberStyle"); + int _objc_msgSend_802( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_802( + obj, + sel, + ); + } + + late final __objc_msgSend_802Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_802 = __objc_msgSend_802Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setNumberStyle_1 = _registerName1("setNumberStyle:"); + void _objc_msgSend_803( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_803( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_803Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_803 = __objc_msgSend_803Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_generatesDecimalNumbers1 = + _registerName1("generatesDecimalNumbers"); + late final _sel_setGeneratesDecimalNumbers_1 = + _registerName1("setGeneratesDecimalNumbers:"); + void _objc_msgSend_804( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_804( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_804Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_804 = __objc_msgSend_804Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_negativeFormat1 = _registerName1("negativeFormat"); + late final _sel_setNegativeFormat_1 = _registerName1("setNegativeFormat:"); + late final _sel_textAttributesForNegativeValues1 = + _registerName1("textAttributesForNegativeValues"); + late final _sel_setTextAttributesForNegativeValues_1 = + _registerName1("setTextAttributesForNegativeValues:"); + late final _sel_positiveFormat1 = _registerName1("positiveFormat"); + late final _sel_setPositiveFormat_1 = _registerName1("setPositiveFormat:"); + late final _sel_textAttributesForPositiveValues1 = + _registerName1("textAttributesForPositiveValues"); + late final _sel_setTextAttributesForPositiveValues_1 = + _registerName1("setTextAttributesForPositiveValues:"); + late final _sel_allowsFloats1 = _registerName1("allowsFloats"); + late final _sel_setAllowsFloats_1 = _registerName1("setAllowsFloats:"); + late final _sel_setDecimalSeparator_1 = + _registerName1("setDecimalSeparator:"); + late final _sel_alwaysShowsDecimalSeparator1 = + _registerName1("alwaysShowsDecimalSeparator"); + late final _sel_setAlwaysShowsDecimalSeparator_1 = + _registerName1("setAlwaysShowsDecimalSeparator:"); + late final _sel_currencyDecimalSeparator1 = + _registerName1("currencyDecimalSeparator"); + late final _sel_setCurrencyDecimalSeparator_1 = + _registerName1("setCurrencyDecimalSeparator:"); + late final _sel_usesGroupingSeparator1 = + _registerName1("usesGroupingSeparator"); + late final _sel_setUsesGroupingSeparator_1 = + _registerName1("setUsesGroupingSeparator:"); + late final _sel_setGroupingSeparator_1 = + _registerName1("setGroupingSeparator:"); + late final _sel_zeroSymbol1 = _registerName1("zeroSymbol"); + late final _sel_setZeroSymbol_1 = _registerName1("setZeroSymbol:"); + late final _sel_textAttributesForZero1 = + _registerName1("textAttributesForZero"); + late final _sel_setTextAttributesForZero_1 = + _registerName1("setTextAttributesForZero:"); + late final _sel_nilSymbol1 = _registerName1("nilSymbol"); + late final _sel_setNilSymbol_1 = _registerName1("setNilSymbol:"); + late final _sel_textAttributesForNil1 = + _registerName1("textAttributesForNil"); + late final _sel_setTextAttributesForNil_1 = + _registerName1("setTextAttributesForNil:"); + late final _sel_notANumberSymbol1 = _registerName1("notANumberSymbol"); + late final _sel_setNotANumberSymbol_1 = + _registerName1("setNotANumberSymbol:"); + late final _sel_textAttributesForNotANumber1 = + _registerName1("textAttributesForNotANumber"); + late final _sel_setTextAttributesForNotANumber_1 = + _registerName1("setTextAttributesForNotANumber:"); + late final _sel_positiveInfinitySymbol1 = + _registerName1("positiveInfinitySymbol"); + late final _sel_setPositiveInfinitySymbol_1 = + _registerName1("setPositiveInfinitySymbol:"); + late final _sel_textAttributesForPositiveInfinity1 = + _registerName1("textAttributesForPositiveInfinity"); + late final _sel_setTextAttributesForPositiveInfinity_1 = + _registerName1("setTextAttributesForPositiveInfinity:"); + late final _sel_negativeInfinitySymbol1 = + _registerName1("negativeInfinitySymbol"); + late final _sel_setNegativeInfinitySymbol_1 = + _registerName1("setNegativeInfinitySymbol:"); + late final _sel_textAttributesForNegativeInfinity1 = + _registerName1("textAttributesForNegativeInfinity"); + late final _sel_setTextAttributesForNegativeInfinity_1 = + _registerName1("setTextAttributesForNegativeInfinity:"); + late final _sel_positivePrefix1 = _registerName1("positivePrefix"); + late final _sel_setPositivePrefix_1 = _registerName1("setPositivePrefix:"); + late final _sel_positiveSuffix1 = _registerName1("positiveSuffix"); + late final _sel_setPositiveSuffix_1 = _registerName1("setPositiveSuffix:"); + late final _sel_negativePrefix1 = _registerName1("negativePrefix"); + late final _sel_setNegativePrefix_1 = _registerName1("setNegativePrefix:"); + late final _sel_negativeSuffix1 = _registerName1("negativeSuffix"); + late final _sel_setNegativeSuffix_1 = _registerName1("setNegativeSuffix:"); + late final _sel_setCurrencyCode_1 = _registerName1("setCurrencyCode:"); + late final _sel_setCurrencySymbol_1 = _registerName1("setCurrencySymbol:"); + late final _sel_internationalCurrencySymbol1 = + _registerName1("internationalCurrencySymbol"); + late final _sel_setInternationalCurrencySymbol_1 = + _registerName1("setInternationalCurrencySymbol:"); + late final _sel_percentSymbol1 = _registerName1("percentSymbol"); + late final _sel_setPercentSymbol_1 = _registerName1("setPercentSymbol:"); + late final _sel_perMillSymbol1 = _registerName1("perMillSymbol"); + late final _sel_setPerMillSymbol_1 = _registerName1("setPerMillSymbol:"); + late final _sel_minusSign1 = _registerName1("minusSign"); + late final _sel_setMinusSign_1 = _registerName1("setMinusSign:"); + late final _sel_plusSign1 = _registerName1("plusSign"); + late final _sel_setPlusSign_1 = _registerName1("setPlusSign:"); + late final _sel_exponentSymbol1 = _registerName1("exponentSymbol"); + late final _sel_setExponentSymbol_1 = _registerName1("setExponentSymbol:"); + late final _sel_groupingSize1 = _registerName1("groupingSize"); + late final _sel_setGroupingSize_1 = _registerName1("setGroupingSize:"); + late final _sel_secondaryGroupingSize1 = + _registerName1("secondaryGroupingSize"); + late final _sel_setSecondaryGroupingSize_1 = + _registerName1("setSecondaryGroupingSize:"); + late final _sel_multiplier1 = _registerName1("multiplier"); + late final _sel_setMultiplier_1 = _registerName1("setMultiplier:"); + late final _sel_formatWidth1 = _registerName1("formatWidth"); + late final _sel_setFormatWidth_1 = _registerName1("setFormatWidth:"); + late final _sel_paddingCharacter1 = _registerName1("paddingCharacter"); + late final _sel_setPaddingCharacter_1 = + _registerName1("setPaddingCharacter:"); + late final _sel_paddingPosition1 = _registerName1("paddingPosition"); + int _objc_msgSend_805( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_805( + obj, + sel, + ); + } + + late final __objc_msgSend_805Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_805 = __objc_msgSend_805Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setPaddingPosition_1 = _registerName1("setPaddingPosition:"); + void _objc_msgSend_806( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_806( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_806Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_806 = __objc_msgSend_806Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_roundingMode1 = _registerName1("roundingMode"); + int _objc_msgSend_807( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_807( + obj, + sel, + ); + } + + late final __objc_msgSend_807Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_807 = __objc_msgSend_807Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setRoundingMode_1 = _registerName1("setRoundingMode:"); + void _objc_msgSend_808( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_808( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_808Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_808 = __objc_msgSend_808Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_roundingIncrement1 = _registerName1("roundingIncrement"); + ffi.Pointer _objc_msgSend_809( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_809( + obj, + sel, + ); + } + + late final __objc_msgSend_809Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_809 = __objc_msgSend_809Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setRoundingIncrement_1 = + _registerName1("setRoundingIncrement:"); + void _objc_msgSend_810( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_810( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_810Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_810 = __objc_msgSend_810Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_minimumIntegerDigits1 = + _registerName1("minimumIntegerDigits"); + late final _sel_setMinimumIntegerDigits_1 = + _registerName1("setMinimumIntegerDigits:"); + late final _sel_maximumIntegerDigits1 = + _registerName1("maximumIntegerDigits"); + late final _sel_setMaximumIntegerDigits_1 = + _registerName1("setMaximumIntegerDigits:"); + late final _sel_minimumFractionDigits1 = + _registerName1("minimumFractionDigits"); + late final _sel_setMinimumFractionDigits_1 = + _registerName1("setMinimumFractionDigits:"); + late final _sel_maximumFractionDigits1 = + _registerName1("maximumFractionDigits"); + late final _sel_setMaximumFractionDigits_1 = + _registerName1("setMaximumFractionDigits:"); + late final _sel_minimum1 = _registerName1("minimum"); + late final _sel_setMinimum_1 = _registerName1("setMinimum:"); + late final _sel_maximum1 = _registerName1("maximum"); + late final _sel_setMaximum_1 = _registerName1("setMaximum:"); + late final _sel_currencyGroupingSeparator1 = + _registerName1("currencyGroupingSeparator"); + late final _sel_setCurrencyGroupingSeparator_1 = + _registerName1("setCurrencyGroupingSeparator:"); + late final _sel_usesSignificantDigits1 = + _registerName1("usesSignificantDigits"); + late final _sel_setUsesSignificantDigits_1 = + _registerName1("setUsesSignificantDigits:"); + late final _sel_minimumSignificantDigits1 = + _registerName1("minimumSignificantDigits"); + late final _sel_setMinimumSignificantDigits_1 = + _registerName1("setMinimumSignificantDigits:"); + late final _sel_maximumSignificantDigits1 = + _registerName1("maximumSignificantDigits"); + late final _sel_setMaximumSignificantDigits_1 = + _registerName1("setMaximumSignificantDigits:"); + late final _sel_isPartialStringValidationEnabled1 = + _registerName1("isPartialStringValidationEnabled"); + late final _sel_setPartialStringValidationEnabled_1 = + _registerName1("setPartialStringValidationEnabled:"); + late final _sel_hasThousandSeparators1 = + _registerName1("hasThousandSeparators"); + late final _sel_setHasThousandSeparators_1 = + _registerName1("setHasThousandSeparators:"); + late final _sel_thousandSeparator1 = _registerName1("thousandSeparator"); + late final _sel_setThousandSeparator_1 = + _registerName1("setThousandSeparator:"); + late final _sel_localizesFormat1 = _registerName1("localizesFormat"); + late final _sel_setLocalizesFormat_1 = _registerName1("setLocalizesFormat:"); + late final _sel_format1 = _registerName1("format"); + late final _sel_setFormat_1 = _registerName1("setFormat:"); + late final _sel_attributedStringForZero1 = + _registerName1("attributedStringForZero"); + late final _sel_setAttributedStringForZero_1 = + _registerName1("setAttributedStringForZero:"); + void _objc_msgSend_811( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_811( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_811Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_811 = __objc_msgSend_811Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_attributedStringForNil1 = + _registerName1("attributedStringForNil"); + late final _sel_setAttributedStringForNil_1 = + _registerName1("setAttributedStringForNil:"); + late final _sel_attributedStringForNotANumber1 = + _registerName1("attributedStringForNotANumber"); + late final _sel_setAttributedStringForNotANumber_1 = + _registerName1("setAttributedStringForNotANumber:"); + late final _class_NSDecimalNumberHandler1 = + _getClass1("NSDecimalNumberHandler"); + late final _sel_defaultDecimalNumberHandler1 = + _registerName1("defaultDecimalNumberHandler"); + ffi.Pointer _objc_msgSend_812( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_812( + obj, + sel, + ); + } + + late final __objc_msgSend_812Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_812 = __objc_msgSend_812Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_1 = + _registerName1( + "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); + instancetype _objc_msgSend_813( + ffi.Pointer obj, + ffi.Pointer sel, + int roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero, + ) { + return __objc_msgSend_813( + obj, + sel, + roundingMode, + scale, + exact, + overflow, + underflow, + divideByZero, + ); + } + + late final __objc_msgSend_813Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Short, + ffi.Bool, + ffi.Bool, + ffi.Bool, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_813 = __objc_msgSend_813Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, + int, bool, bool, bool, bool)>(); + + late final _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_1 = + _registerName1( + "decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); + late final _sel_roundingBehavior1 = _registerName1("roundingBehavior"); + late final _sel_setRoundingBehavior_1 = + _registerName1("setRoundingBehavior:"); + void _objc_msgSend_814( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_814( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_814Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_814 = __objc_msgSend_814Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSScanner1 = _getClass1("NSScanner"); + late final _sel_scanLocation1 = _registerName1("scanLocation"); + late final _sel_setScanLocation_1 = _registerName1("setScanLocation:"); + late final _sel_charactersToBeSkipped1 = + _registerName1("charactersToBeSkipped"); + ffi.Pointer _objc_msgSend_815( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_815( + obj, + sel, + ); + } + + late final __objc_msgSend_815Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_815 = __objc_msgSend_815Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setCharactersToBeSkipped_1 = + _registerName1("setCharactersToBeSkipped:"); + void _objc_msgSend_816( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_816( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_816Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_816 = __objc_msgSend_816Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_caseSensitive1 = _registerName1("caseSensitive"); + late final _sel_setCaseSensitive_1 = _registerName1("setCaseSensitive:"); + late final _sel_scanInt_1 = _registerName1("scanInt:"); + bool _objc_msgSend_817( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer result, + ) { + return __objc_msgSend_817( + obj, + sel, + result, + ); + } + + late final __objc_msgSend_817Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_817 = __objc_msgSend_817Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_scanInteger_1 = _registerName1("scanInteger:"); + bool _objc_msgSend_818( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer result, + ) { + return __objc_msgSend_818( + obj, + sel, + result, + ); + } + + late final __objc_msgSend_818Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_818 = __objc_msgSend_818Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_scanLongLong_1 = _registerName1("scanLongLong:"); + bool _objc_msgSend_819( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer result, + ) { + return __objc_msgSend_819( + obj, + sel, + result, + ); + } + + late final __objc_msgSend_819Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_819 = __objc_msgSend_819Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_scanUnsignedLongLong_1 = + _registerName1("scanUnsignedLongLong:"); + bool _objc_msgSend_820( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer result, + ) { + return __objc_msgSend_820( + obj, + sel, + result, + ); + } + + late final __objc_msgSend_820Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_820 = __objc_msgSend_820Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_scanFloat_1 = _registerName1("scanFloat:"); + bool _objc_msgSend_821( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer result, + ) { + return __objc_msgSend_821( + obj, + sel, + result, + ); + } + + late final __objc_msgSend_821Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_821 = __objc_msgSend_821Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_scanDouble_1 = _registerName1("scanDouble:"); + bool _objc_msgSend_822( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer result, + ) { + return __objc_msgSend_822( + obj, + sel, + result, + ); + } + + late final __objc_msgSend_822Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_822 = __objc_msgSend_822Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_scanHexInt_1 = _registerName1("scanHexInt:"); + bool _objc_msgSend_823( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer result, + ) { + return __objc_msgSend_823( + obj, + sel, + result, + ); + } + + late final __objc_msgSend_823Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_823 = __objc_msgSend_823Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_scanHexLongLong_1 = _registerName1("scanHexLongLong:"); + late final _sel_scanHexFloat_1 = _registerName1("scanHexFloat:"); + late final _sel_scanHexDouble_1 = _registerName1("scanHexDouble:"); + late final _sel_scanString_intoString_1 = + _registerName1("scanString:intoString:"); + bool _objc_msgSend_824( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + ffi.Pointer> result, + ) { + return __objc_msgSend_824( + obj, + sel, + string, + result, + ); + } + + late final __objc_msgSend_824Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_824 = __objc_msgSend_824Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); + + late final _sel_scanCharactersFromSet_intoString_1 = + _registerName1("scanCharactersFromSet:intoString:"); + bool _objc_msgSend_825( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer set1, + ffi.Pointer> result, + ) { + return __objc_msgSend_825( + obj, + sel, + set1, + result, + ); + } + + late final __objc_msgSend_825Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_825 = __objc_msgSend_825Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); + + late final _sel_scanUpToString_intoString_1 = + _registerName1("scanUpToString:intoString:"); + late final _sel_scanUpToCharactersFromSet_intoString_1 = + _registerName1("scanUpToCharactersFromSet:intoString:"); + late final _sel_isAtEnd1 = _registerName1("isAtEnd"); + late final _sel_scannerWithString_1 = _registerName1("scannerWithString:"); + late final _sel_localizedScannerWithString_1 = + _registerName1("localizedScannerWithString:"); + late final _sel_scanDecimal_1 = _registerName1("scanDecimal:"); + bool _objc_msgSend_826( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dcm, + ) { + return __objc_msgSend_826( + obj, + sel, + dcm, + ); + } + + late final __objc_msgSend_826Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_826 = __objc_msgSend_826Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSException1 = _getClass1("NSException"); + late final _sel_exceptionWithName_reason_userInfo_1 = + _registerName1("exceptionWithName:reason:userInfo:"); + ffi.Pointer _objc_msgSend_827( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer reason, + ffi.Pointer userInfo, + ) { + return __objc_msgSend_827( + obj, + sel, + name, + reason, + userInfo, + ); + } + + late final __objc_msgSend_827Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_827 = __objc_msgSend_827Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithName_reason_userInfo_1 = + _registerName1("initWithName:reason:userInfo:"); + instancetype _objc_msgSend_828( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aName, + ffi.Pointer aReason, + ffi.Pointer aUserInfo, + ) { + return __objc_msgSend_828( + obj, + sel, + aName, + aReason, + aUserInfo, + ); + } + + late final __objc_msgSend_828Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_828 = __objc_msgSend_828Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_reason1 = _registerName1("reason"); + late final _sel_raise1 = _registerName1("raise"); + late final _sel_raise_format_1 = _registerName1("raise:format:"); + late final _sel_raise_format_arguments_1 = + _registerName1("raise:format:arguments:"); + void _objc_msgSend_829( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer format, + ffi.Pointer argList, + ) { + return __objc_msgSend_829( + obj, + sel, + name, + format, + argList, + ); + } + + late final __objc_msgSend_829Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_829 = __objc_msgSend_829Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSFileHandle1 = _getClass1("NSFileHandle"); + late final _sel_availableData1 = _registerName1("availableData"); + late final _sel_initWithFileDescriptor_closeOnDealloc_1 = + _registerName1("initWithFileDescriptor:closeOnDealloc:"); + instancetype _objc_msgSend_830( + ffi.Pointer obj, + ffi.Pointer sel, + int fd, + bool closeopt, + ) { + return __objc_msgSend_830( + obj, + sel, + fd, + closeopt, + ); + } + + late final __objc_msgSend_830Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Int, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_830 = __objc_msgSend_830Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, int, bool)>(); + + late final _sel_readDataToEndOfFileAndReturnError_1 = + _registerName1("readDataToEndOfFileAndReturnError:"); + ffi.Pointer _objc_msgSend_831( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> error, + ) { + return __objc_msgSend_831( + obj, + sel, + error, + ); + } + + late final __objc_msgSend_831Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_831 = __objc_msgSend_831Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); + + late final _sel_readDataUpToLength_error_1 = + _registerName1("readDataUpToLength:error:"); + ffi.Pointer _objc_msgSend_832( + ffi.Pointer obj, + ffi.Pointer sel, + int length, + ffi.Pointer> error, + ) { + return __objc_msgSend_832( + obj, + sel, + length, + error, + ); + } + + late final __objc_msgSend_832Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_832 = __objc_msgSend_832Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer>)>(); + + late final _sel_writeData_error_1 = _registerName1("writeData:error:"); + bool _objc_msgSend_833( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ffi.Pointer> error, + ) { + return __objc_msgSend_833( + obj, + sel, + data, + error, + ); + } + + late final __objc_msgSend_833Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_833 = __objc_msgSend_833Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); + + late final _sel_getOffset_error_1 = _registerName1("getOffset:error:"); + bool _objc_msgSend_834( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer offsetInFile, + ffi.Pointer> error, + ) { + return __objc_msgSend_834( + obj, + sel, + offsetInFile, + error, + ); + } + + late final __objc_msgSend_834Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_834 = __objc_msgSend_834Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_seekToEndReturningOffset_error_1 = + _registerName1("seekToEndReturningOffset:error:"); + late final _sel_seekToOffset_error_1 = _registerName1("seekToOffset:error:"); + bool _objc_msgSend_835( + ffi.Pointer obj, + ffi.Pointer sel, + int offset, + ffi.Pointer> error, + ) { + return __objc_msgSend_835( + obj, + sel, + offset, + error, + ); + } + + late final __objc_msgSend_835Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLongLong, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_835 = __objc_msgSend_835Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer>)>(); + + late final _sel_truncateAtOffset_error_1 = + _registerName1("truncateAtOffset:error:"); + late final _sel_synchronizeAndReturnError_1 = + _registerName1("synchronizeAndReturnError:"); + late final _sel_closeAndReturnError_1 = + _registerName1("closeAndReturnError:"); + late final _sel_fileHandleWithStandardInput1 = + _registerName1("fileHandleWithStandardInput"); + ffi.Pointer _objc_msgSend_836( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_836( + obj, + sel, + ); + } + + late final __objc_msgSend_836Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_836 = __objc_msgSend_836Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_fileHandleWithStandardOutput1 = + _registerName1("fileHandleWithStandardOutput"); + late final _sel_fileHandleWithStandardError1 = + _registerName1("fileHandleWithStandardError"); + late final _sel_fileHandleWithNullDevice1 = + _registerName1("fileHandleWithNullDevice"); + late final _sel_fileHandleForReadingAtPath_1 = + _registerName1("fileHandleForReadingAtPath:"); + late final _sel_fileHandleForWritingAtPath_1 = + _registerName1("fileHandleForWritingAtPath:"); + late final _sel_fileHandleForUpdatingAtPath_1 = + _registerName1("fileHandleForUpdatingAtPath:"); + late final _sel_fileHandleForReadingFromURL_error_1 = + _registerName1("fileHandleForReadingFromURL:error:"); + instancetype _objc_msgSend_837( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer> error, + ) { + return __objc_msgSend_837( + obj, + sel, + url, + error, + ); + } + + late final __objc_msgSend_837Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_837 = __objc_msgSend_837Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); + + late final _sel_fileHandleForWritingToURL_error_1 = + _registerName1("fileHandleForWritingToURL:error:"); + late final _sel_fileHandleForUpdatingURL_error_1 = + _registerName1("fileHandleForUpdatingURL:error:"); + late final _sel_readInBackgroundAndNotifyForModes_1 = + _registerName1("readInBackgroundAndNotifyForModes:"); + void _objc_msgSend_838( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer modes, + ) { + return __objc_msgSend_838( + obj, + sel, + modes, + ); + } + + late final __objc_msgSend_838Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_838 = __objc_msgSend_838Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_readInBackgroundAndNotify1 = + _registerName1("readInBackgroundAndNotify"); + late final _sel_readToEndOfFileInBackgroundAndNotifyForModes_1 = + _registerName1("readToEndOfFileInBackgroundAndNotifyForModes:"); + late final _sel_readToEndOfFileInBackgroundAndNotify1 = + _registerName1("readToEndOfFileInBackgroundAndNotify"); + late final _sel_acceptConnectionInBackgroundAndNotifyForModes_1 = + _registerName1("acceptConnectionInBackgroundAndNotifyForModes:"); + late final _sel_acceptConnectionInBackgroundAndNotify1 = + _registerName1("acceptConnectionInBackgroundAndNotify"); + late final _sel_waitForDataInBackgroundAndNotifyForModes_1 = + _registerName1("waitForDataInBackgroundAndNotifyForModes:"); + late final _sel_waitForDataInBackgroundAndNotify1 = + _registerName1("waitForDataInBackgroundAndNotify"); + late final _sel_readabilityHandler1 = _registerName1("readabilityHandler"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_839( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_839( + obj, + sel, + ); + } + + late final __objc_msgSend_839Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_839 = __objc_msgSend_839Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setReadabilityHandler_1 = + _registerName1("setReadabilityHandler:"); + void _objc_msgSend_840( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> value, + ) { + return __objc_msgSend_840( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_840Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_840 = __objc_msgSend_840Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_writeabilityHandler1 = _registerName1("writeabilityHandler"); + late final _sel_setWriteabilityHandler_1 = + _registerName1("setWriteabilityHandler:"); + late final _sel_initWithFileDescriptor_1 = + _registerName1("initWithFileDescriptor:"); + instancetype _objc_msgSend_841( + ffi.Pointer obj, + ffi.Pointer sel, + int fd, + ) { + return __objc_msgSend_841( + obj, + sel, + fd, + ); + } + + late final __objc_msgSend_841Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('objc_msgSend'); + late final __objc_msgSend_841 = __objc_msgSend_841Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_fileDescriptor1 = _registerName1("fileDescriptor"); + late final _sel_readDataToEndOfFile1 = _registerName1("readDataToEndOfFile"); + late final _sel_readDataOfLength_1 = _registerName1("readDataOfLength:"); + ffi.Pointer _objc_msgSend_842( + ffi.Pointer obj, + ffi.Pointer sel, + int length, + ) { + return __objc_msgSend_842( + obj, + sel, + length, + ); + } + + late final __objc_msgSend_842Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_842 = __objc_msgSend_842Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_offsetInFile1 = _registerName1("offsetInFile"); + late final _sel_seekToEndOfFile1 = _registerName1("seekToEndOfFile"); + late final _sel_seekToFileOffset_1 = _registerName1("seekToFileOffset:"); + void _objc_msgSend_843( + ffi.Pointer obj, + ffi.Pointer sel, + int offset, + ) { + return __objc_msgSend_843( + obj, + sel, + offset, + ); + } + + late final __objc_msgSend_843Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLongLong)>>('objc_msgSend'); + late final __objc_msgSend_843 = __objc_msgSend_843Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_truncateFileAtOffset_1 = + _registerName1("truncateFileAtOffset:"); + late final _sel_synchronizeFile1 = _registerName1("synchronizeFile"); + late final _sel_closeFile1 = _registerName1("closeFile"); + late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); + late final _sel_sharedHTTPCookieStorage1 = + _registerName1("sharedHTTPCookieStorage"); + ffi.Pointer _objc_msgSend_844( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_844( + obj, + sel, + ); + } + + late final __objc_msgSend_844Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_844 = __objc_msgSend_844Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = + _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); + ffi.Pointer _objc_msgSend_845( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer identifier, + ) { + return __objc_msgSend_845( + obj, + sel, + identifier, + ); + } + + late final __objc_msgSend_845Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_845 = __objc_msgSend_845Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_cookies1 = _registerName1("cookies"); + late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); + late final _sel_initWithProperties_1 = _registerName1("initWithProperties:"); + instancetype _objc_msgSend_846( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer properties, + ) { + return __objc_msgSend_846( + obj, + sel, + properties, + ); + } + + late final __objc_msgSend_846Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_846 = __objc_msgSend_846Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_cookieWithProperties_1 = + _registerName1("cookieWithProperties:"); + ffi.Pointer _objc_msgSend_847( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer properties, + ) { + return __objc_msgSend_847( + obj, + sel, + properties, + ); + } + + late final __objc_msgSend_847Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_847 = __objc_msgSend_847Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_requestHeaderFieldsWithCookies_1 = + _registerName1("requestHeaderFieldsWithCookies:"); + late final _sel_cookiesWithResponseHeaderFields_forURL_1 = + _registerName1("cookiesWithResponseHeaderFields:forURL:"); + ffi.Pointer _objc_msgSend_848( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer headerFields, + ffi.Pointer URL, + ) { + return __objc_msgSend_848( + obj, + sel, + headerFields, + URL, + ); + } + + late final __objc_msgSend_848Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_848 = __objc_msgSend_848Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_properties1 = _registerName1("properties"); + late final _sel_value1 = _registerName1("value"); + late final _sel_expiresDate1 = _registerName1("expiresDate"); + late final _sel_isSessionOnly1 = _registerName1("isSessionOnly"); + late final _sel_isSecure1 = _registerName1("isSecure"); + late final _sel_isHTTPOnly1 = _registerName1("isHTTPOnly"); + late final _sel_comment1 = _registerName1("comment"); + late final _sel_commentURL1 = _registerName1("commentURL"); + late final _sel_portList1 = _registerName1("portList"); + late final _sel_sameSitePolicy1 = _registerName1("sameSitePolicy"); + late final _sel_setCookie_1 = _registerName1("setCookie:"); + void _objc_msgSend_849( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookie, + ) { + return __objc_msgSend_849( + obj, + sel, + cookie, + ); + } + + late final __objc_msgSend_849Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_849 = __objc_msgSend_849Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); + late final _sel_removeCookiesSinceDate_1 = + _registerName1("removeCookiesSinceDate:"); + late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); + late final _sel_setCookies_forURL_mainDocumentURL_1 = + _registerName1("setCookies:forURL:mainDocumentURL:"); + void _objc_msgSend_850( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer URL, + ffi.Pointer mainDocumentURL, + ) { + return __objc_msgSend_850( + obj, + sel, + cookies, + URL, + mainDocumentURL, + ); + } + + late final __objc_msgSend_850Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_850 = __objc_msgSend_850Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); + int _objc_msgSend_851( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_851( + obj, + sel, + ); + } + + late final __objc_msgSend_851Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_851 = __objc_msgSend_851Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setCookieAcceptPolicy_1 = + _registerName1("setCookieAcceptPolicy:"); + void _objc_msgSend_852( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_852( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_852Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_852 = __objc_msgSend_852Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_sortedCookiesUsingDescriptors_1 = + _registerName1("sortedCookiesUsingDescriptors:"); + late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); + late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); + late final _class_NSURLRequest1 = _getClass1("NSURLRequest"); + late final _sel_requestWithURL_1 = _registerName1("requestWithURL:"); + late final _sel_supportsSecureCoding1 = + _registerName1("supportsSecureCoding"); + late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); + instancetype _objc_msgSend_853( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URL, + int cachePolicy, + double timeoutInterval, + ) { + return __objc_msgSend_853( + obj, + sel, + URL, + cachePolicy, + timeoutInterval, + ); + } + + late final __objc_msgSend_853Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_853 = __objc_msgSend_853Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, double)>(); + + late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("initWithURL:cachePolicy:timeoutInterval:"); + late final _sel_URL1 = _registerName1("URL"); + late final _sel_cachePolicy1 = _registerName1("cachePolicy"); + int _objc_msgSend_854( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_854( + obj, + sel, + ); + } + + late final __objc_msgSend_854Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_854 = __objc_msgSend_854Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); + late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); + late final _sel_networkServiceType1 = _registerName1("networkServiceType"); + int _objc_msgSend_855( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_855( + obj, + sel, + ); + } + + late final __objc_msgSend_855Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_855 = __objc_msgSend_855Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_allowsCellularAccess1 = + _registerName1("allowsCellularAccess"); + late final _sel_allowsExpensiveNetworkAccess1 = + _registerName1("allowsExpensiveNetworkAccess"); + late final _sel_allowsConstrainedNetworkAccess1 = + _registerName1("allowsConstrainedNetworkAccess"); + late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); + late final _sel_attribution1 = _registerName1("attribution"); + int _objc_msgSend_856( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_856( + obj, + sel, + ); + } + + late final __objc_msgSend_856Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_856 = __objc_msgSend_856Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_requiresDNSSECValidation1 = + _registerName1("requiresDNSSECValidation"); + late final _sel_HTTPMethod1 = _registerName1("HTTPMethod"); + late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); + late final _sel_valueForHTTPHeaderField_1 = + _registerName1("valueForHTTPHeaderField:"); + late final _sel_HTTPBody1 = _registerName1("HTTPBody"); + late final _class_NSInputStream1 = _getClass1("NSInputStream"); + late final _class_NSStream1 = _getClass1("NSStream"); + late final _sel_open1 = _registerName1("open"); + late final _sel_close1 = _registerName1("close"); + bool _objc_msgSend_857( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer property, + ffi.Pointer key, + ) { + return __objc_msgSend_857( + obj, + sel, + property, + key, + ); + } + + late final __objc_msgSend_857Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_857 = __objc_msgSend_857Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_streamStatus1 = _registerName1("streamStatus"); + int _objc_msgSend_858( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_858( + obj, + sel, + ); + } + + late final __objc_msgSend_858Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_858 = __objc_msgSend_858Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_streamError1 = _registerName1("streamError"); + late final _class_NSOutputStream1 = _getClass1("NSOutputStream"); + late final _sel_write_maxLength_1 = _registerName1("write:maxLength:"); + int _objc_msgSend_859( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + int len, + ) { + return __objc_msgSend_859( + obj, + sel, + buffer, + len, + ); + } + + late final __objc_msgSend_859Ptr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_859 = __objc_msgSend_859Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_hasSpaceAvailable1 = _registerName1("hasSpaceAvailable"); + late final _sel_initToMemory1 = _registerName1("initToMemory"); + late final _sel_initToBuffer_capacity_1 = + _registerName1("initToBuffer:capacity:"); + instancetype _objc_msgSend_860( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + int capacity, + ) { + return __objc_msgSend_860( + obj, + sel, + buffer, + capacity, + ); + } + + late final __objc_msgSend_860Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_860 = __objc_msgSend_860Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_initWithURL_append_1 = _registerName1("initWithURL:append:"); + instancetype _objc_msgSend_861( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + bool shouldAppend, + ) { + return __objc_msgSend_861( + obj, + sel, + url, + shouldAppend, + ); + } + + late final __objc_msgSend_861Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_861 = __objc_msgSend_861Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_initToFileAtPath_append_1 = + _registerName1("initToFileAtPath:append:"); + instancetype _objc_msgSend_862( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool shouldAppend, + ) { + return __objc_msgSend_862( + obj, + sel, + path, + shouldAppend, + ); + } + + late final __objc_msgSend_862Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_862 = __objc_msgSend_862Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_outputStreamToMemory1 = + _registerName1("outputStreamToMemory"); + late final _sel_outputStreamToBuffer_capacity_1 = + _registerName1("outputStreamToBuffer:capacity:"); + late final _sel_outputStreamToFileAtPath_append_1 = + _registerName1("outputStreamToFileAtPath:append:"); + late final _sel_outputStreamWithURL_append_1 = + _registerName1("outputStreamWithURL:append:"); + late final _sel_getStreamsToHostWithName_port_inputStream_outputStream_1 = + _registerName1("getStreamsToHostWithName:port:inputStream:outputStream:"); + void _objc_msgSend_863( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream, + ) { + return __objc_msgSend_863( + obj, + sel, + hostname, + port, + inputStream, + outputStream, + ); + } + + late final __objc_msgSend_863Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_863 = __objc_msgSend_863Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _class_NSHost1 = _getClass1("NSHost"); + late final _sel_currentHost1 = _registerName1("currentHost"); + late final _sel_hostWithName_1 = _registerName1("hostWithName:"); + instancetype _objc_msgSend_864( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ) { + return __objc_msgSend_864( + obj, + sel, + name, + ); + } + + late final __objc_msgSend_864Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_864 = __objc_msgSend_864Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_hostWithAddress_1 = _registerName1("hostWithAddress:"); + late final _sel_isEqualToHost_1 = _registerName1("isEqualToHost:"); + bool _objc_msgSend_865( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aHost, + ) { + return __objc_msgSend_865( + obj, + sel, + aHost, + ); + } + + late final __objc_msgSend_865Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_865 = __objc_msgSend_865Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_names1 = _registerName1("names"); + late final _sel_address1 = _registerName1("address"); + late final _sel_addresses1 = _registerName1("addresses"); + late final _sel_localizedName1 = _registerName1("localizedName"); + late final _sel_setHostCacheEnabled_1 = + _registerName1("setHostCacheEnabled:"); + void _objc_msgSend_866( + ffi.Pointer obj, + ffi.Pointer sel, + bool flag, + ) { + return __objc_msgSend_866( + obj, + sel, + flag, + ); + } + + late final __objc_msgSend_866Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_866 = __objc_msgSend_866Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_isHostCacheEnabled1 = _registerName1("isHostCacheEnabled"); + late final _sel_flushHostCache1 = _registerName1("flushHostCache"); + late final _sel_getStreamsToHost_port_inputStream_outputStream_1 = + _registerName1("getStreamsToHost:port:inputStream:outputStream:"); + void _objc_msgSend_867( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream, + ) { + return __objc_msgSend_867( + obj, + sel, + host, + port, + inputStream, + outputStream, + ); + } + + late final __objc_msgSend_867Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_867 = __objc_msgSend_867Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1 = + _registerName1("getBoundStreamsWithBufferSize:inputStream:outputStream:"); + void _objc_msgSend_868( + ffi.Pointer obj, + ffi.Pointer sel, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream, + ) { + return __objc_msgSend_868( + obj, + sel, + bufferSize, + inputStream, + outputStream, + ); + } + + late final __objc_msgSend_868Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_868 = __objc_msgSend_868Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _sel_read_maxLength_1 = _registerName1("read:maxLength:"); + late final _sel_getBuffer_length_1 = _registerName1("getBuffer:length:"); + bool _objc_msgSend_869( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> buffer, + ffi.Pointer len, + ) { + return __objc_msgSend_869( + obj, + sel, + buffer, + len, + ); + } + + late final __objc_msgSend_869Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_869 = __objc_msgSend_869Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); + + late final _sel_hasBytesAvailable1 = _registerName1("hasBytesAvailable"); + late final _sel_initWithFileAtPath_1 = _registerName1("initWithFileAtPath:"); + late final _sel_inputStreamWithData_1 = + _registerName1("inputStreamWithData:"); + instancetype _objc_msgSend_870( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_870( + obj, + sel, + data, + ); + } + + late final __objc_msgSend_870Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_870 = __objc_msgSend_870Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_inputStreamWithFileAtPath_1 = + _registerName1("inputStreamWithFileAtPath:"); + late final _sel_inputStreamWithURL_1 = _registerName1("inputStreamWithURL:"); + late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); + ffi.Pointer _objc_msgSend_871( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_871( + obj, + sel, + ); + } + + late final __objc_msgSend_871Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_871 = __objc_msgSend_871Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_HTTPShouldHandleCookies1 = + _registerName1("HTTPShouldHandleCookies"); + late final _sel_HTTPShouldUsePipelining1 = + _registerName1("HTTPShouldUsePipelining"); + late final _sel_originalRequest1 = _registerName1("originalRequest"); + ffi.Pointer _objc_msgSend_872( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_872( + obj, + sel, + ); + } + + late final __objc_msgSend_872Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_872 = __objc_msgSend_872Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_currentRequest1 = _registerName1("currentRequest"); + late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); + late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = + _registerName1( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); + instancetype _objc_msgSend_873( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URL, + ffi.Pointer MIMEType, + int length, + ffi.Pointer name, + ) { + return __objc_msgSend_873( + obj, + sel, + URL, + MIMEType, + length, + name, + ); + } + + late final __objc_msgSend_873Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_873 = __objc_msgSend_873Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + + late final _sel_MIMEType1 = _registerName1("MIMEType"); + late final _sel_expectedContentLength1 = + _registerName1("expectedContentLength"); + late final _sel_textEncodingName1 = _registerName1("textEncodingName"); + late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); + late final _sel_response1 = _registerName1("response"); + ffi.Pointer _objc_msgSend_874( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_874( + obj, + sel, + ); + } + + late final __objc_msgSend_874Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_874 = __objc_msgSend_874Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_progress1 = _registerName1("progress"); + ffi.Pointer _objc_msgSend_875( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_875( + obj, + sel, + ); + } + + late final __objc_msgSend_875Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_875 = __objc_msgSend_875Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); + late final _sel_setEarliestBeginDate_1 = + _registerName1("setEarliestBeginDate:"); + late final _sel_countOfBytesClientExpectsToSend1 = + _registerName1("countOfBytesClientExpectsToSend"); + late final _sel_setCountOfBytesClientExpectsToSend_1 = + _registerName1("setCountOfBytesClientExpectsToSend:"); + late final _sel_countOfBytesClientExpectsToReceive1 = + _registerName1("countOfBytesClientExpectsToReceive"); + late final _sel_setCountOfBytesClientExpectsToReceive_1 = + _registerName1("setCountOfBytesClientExpectsToReceive:"); + late final _sel_countOfBytesSent1 = _registerName1("countOfBytesSent"); + late final _sel_countOfBytesReceived1 = + _registerName1("countOfBytesReceived"); + late final _sel_countOfBytesExpectedToSend1 = + _registerName1("countOfBytesExpectedToSend"); + late final _sel_countOfBytesExpectedToReceive1 = + _registerName1("countOfBytesExpectedToReceive"); + late final _sel_taskDescription1 = _registerName1("taskDescription"); + late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); + late final _sel_state1 = _registerName1("state"); + int _objc_msgSend_876( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_876( + obj, + sel, + ); + } + + late final __objc_msgSend_876Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_876 = __objc_msgSend_876Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_suspend1 = _registerName1("suspend"); + late final _sel_priority1 = _registerName1("priority"); + late final _sel_setPriority_1 = _registerName1("setPriority:"); + void _objc_msgSend_877( + ffi.Pointer obj, + ffi.Pointer sel, + double value, + ) { + return __objc_msgSend_877( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_877Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Float)>>('objc_msgSend'); + late final __objc_msgSend_877 = __objc_msgSend_877Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_prefersIncrementalDelivery1 = + _registerName1("prefersIncrementalDelivery"); + late final _sel_setPrefersIncrementalDelivery_1 = + _registerName1("setPrefersIncrementalDelivery:"); + late final _sel_storeCookies_forTask_1 = + _registerName1("storeCookies:forTask:"); + void _objc_msgSend_878( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer task, + ) { + return __objc_msgSend_878( + obj, + sel, + cookies, + task, + ); + } + + late final __objc_msgSend_878Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_878 = __objc_msgSend_878Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_getCookiesForTask_completionHandler_1 = + _registerName1("getCookiesForTask:completionHandler:"); + void _objc_msgSend_879( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_879( + obj, + sel, + task, + completionHandler, + ); + } + + late final __objc_msgSend_879Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_879 = __objc_msgSend_879Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _class_NSIndexPath1 = _getClass1("NSIndexPath"); + late final _sel_indexPathWithIndex_1 = _registerName1("indexPathWithIndex:"); + late final _sel_indexPathWithIndexes_length_1 = + _registerName1("indexPathWithIndexes:length:"); + instancetype _objc_msgSend_880( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexes, + int length, + ) { + return __objc_msgSend_880( + obj, + sel, + indexes, + length, + ); + } + + late final __objc_msgSend_880Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_880 = __objc_msgSend_880Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_initWithIndexes_length_1 = + _registerName1("initWithIndexes:length:"); + late final _sel_indexPathByAddingIndex_1 = + _registerName1("indexPathByAddingIndex:"); + ffi.Pointer _objc_msgSend_881( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_881( + obj, + sel, + index, + ); + } + + late final __objc_msgSend_881Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_881 = __objc_msgSend_881Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_indexPathByRemovingLastIndex1 = + _registerName1("indexPathByRemovingLastIndex"); + ffi.Pointer _objc_msgSend_882( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_882( + obj, + sel, + ); + } + + late final __objc_msgSend_882Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_882 = __objc_msgSend_882Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_indexAtPosition_1 = _registerName1("indexAtPosition:"); + late final _sel_getIndexes_range_1 = _registerName1("getIndexes:range:"); + void _objc_msgSend_883( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexes, + _NSRange positionRange, + ) { + return __objc_msgSend_883( + obj, + sel, + indexes, + positionRange, + ); + } + + late final __objc_msgSend_883Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_883 = __objc_msgSend_883Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, _NSRange)>(); + + int _objc_msgSend_884( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherObject, + ) { + return __objc_msgSend_884( + obj, + sel, + otherObject, + ); + } + + late final __objc_msgSend_884Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_884 = __objc_msgSend_884Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_getIndexes_1 = _registerName1("getIndexes:"); + void _objc_msgSend_885( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexes, + ) { + return __objc_msgSend_885( + obj, + sel, + indexes, + ); + } + + late final __objc_msgSend_885Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_885 = __objc_msgSend_885Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSInflectionRule1 = _getClass1("NSInflectionRule"); + late final _sel_automaticRule1 = _registerName1("automaticRule"); + ffi.Pointer _objc_msgSend_886( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_886( + obj, + sel, + ); + } + + late final __objc_msgSend_886Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_886 = __objc_msgSend_886Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_canInflectLanguage_1 = _registerName1("canInflectLanguage:"); + late final _sel_canInflectPreferredLocalization1 = + _registerName1("canInflectPreferredLocalization"); + late final _class_NSMorphology1 = _getClass1("NSMorphology"); + late final _sel_grammaticalGender1 = _registerName1("grammaticalGender"); + int _objc_msgSend_887( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_887( + obj, + sel, + ); + } + + late final __objc_msgSend_887Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_887 = __objc_msgSend_887Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setGrammaticalGender_1 = + _registerName1("setGrammaticalGender:"); + void _objc_msgSend_888( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_888( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_888Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_888 = __objc_msgSend_888Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_partOfSpeech1 = _registerName1("partOfSpeech"); + int _objc_msgSend_889( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_889( + obj, + sel, + ); + } + + late final __objc_msgSend_889Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_889 = __objc_msgSend_889Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setPartOfSpeech_1 = _registerName1("setPartOfSpeech:"); + void _objc_msgSend_890( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_890( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_890Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_890 = __objc_msgSend_890Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_number1 = _registerName1("number"); + int _objc_msgSend_891( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_891( + obj, + sel, + ); + } + + late final __objc_msgSend_891Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_891 = __objc_msgSend_891Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setNumber_1 = _registerName1("setNumber:"); + void _objc_msgSend_892( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_892( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_892Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_892 = __objc_msgSend_892Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _class_NSMorphologyCustomPronoun1 = + _getClass1("NSMorphologyCustomPronoun"); + late final _sel_isSupportedForLanguage_1 = + _registerName1("isSupportedForLanguage:"); + late final _sel_requiredKeysForLanguage_1 = + _registerName1("requiredKeysForLanguage:"); + late final _sel_subjectForm1 = _registerName1("subjectForm"); + late final _sel_setSubjectForm_1 = _registerName1("setSubjectForm:"); + late final _sel_objectForm1 = _registerName1("objectForm"); + late final _sel_setObjectForm_1 = _registerName1("setObjectForm:"); + late final _sel_possessiveForm1 = _registerName1("possessiveForm"); + late final _sel_setPossessiveForm_1 = _registerName1("setPossessiveForm:"); + late final _sel_possessiveAdjectiveForm1 = + _registerName1("possessiveAdjectiveForm"); + late final _sel_setPossessiveAdjectiveForm_1 = + _registerName1("setPossessiveAdjectiveForm:"); + late final _sel_reflexiveForm1 = _registerName1("reflexiveForm"); + late final _sel_setReflexiveForm_1 = _registerName1("setReflexiveForm:"); + late final _sel_customPronounForLanguage_1 = + _registerName1("customPronounForLanguage:"); + ffi.Pointer _objc_msgSend_893( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer language, + ) { + return __objc_msgSend_893( + obj, + sel, + language, + ); + } + + late final __objc_msgSend_893Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_893 = __objc_msgSend_893Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setCustomPronoun_forLanguage_error_1 = + _registerName1("setCustomPronoun:forLanguage:error:"); + bool _objc_msgSend_894( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer features, + ffi.Pointer language, + ffi.Pointer> error, + ) { + return __objc_msgSend_894( + obj, + sel, + features, + language, + error, + ); + } + + late final __objc_msgSend_894Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_894 = __objc_msgSend_894Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_isUnspecified1 = _registerName1("isUnspecified"); + late final _sel_userMorphology1 = _registerName1("userMorphology"); + ffi.Pointer _objc_msgSend_895( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_895( + obj, + sel, + ); + } + + late final __objc_msgSend_895Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_895 = __objc_msgSend_895Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); + late final _class_NSOperation1 = _getClass1("NSOperation"); + late final _sel_isConcurrent1 = _registerName1("isConcurrent"); + late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); + late final _sel_isReady1 = _registerName1("isReady"); + late final _sel_addDependency_1 = _registerName1("addDependency:"); + void _objc_msgSend_896( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer op, + ) { + return __objc_msgSend_896( + obj, + sel, + op, + ); + } + + late final __objc_msgSend_896Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_896 = __objc_msgSend_896Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeDependency_1 = _registerName1("removeDependency:"); + late final _sel_dependencies1 = _registerName1("dependencies"); + late final _sel_queuePriority1 = _registerName1("queuePriority"); + int _objc_msgSend_897( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_897( + obj, + sel, + ); + } + + late final __objc_msgSend_897Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_897 = __objc_msgSend_897Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); + void _objc_msgSend_898( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_898( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_898Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_898 = __objc_msgSend_898Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_completionBlock1 = _registerName1("completionBlock"); + late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); + late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); + late final _sel_addOperation_1 = _registerName1("addOperation:"); + late final _sel_addOperations_waitUntilFinished_1 = + _registerName1("addOperations:waitUntilFinished:"); + void _objc_msgSend_899( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer ops, + bool wait, + ) { + return __objc_msgSend_899( + obj, + sel, + ops, + wait, + ); + } + + late final __objc_msgSend_899Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_899 = __objc_msgSend_899Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_addOperationWithBlock_1 = + _registerName1("addOperationWithBlock:"); + late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); + late final _sel_maxConcurrentOperationCount1 = + _registerName1("maxConcurrentOperationCount"); + late final _sel_setMaxConcurrentOperationCount_1 = + _registerName1("setMaxConcurrentOperationCount:"); + late final _sel_isSuspended1 = _registerName1("isSuspended"); + late final _sel_setSuspended_1 = _registerName1("setSuspended:"); + late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); + ffi.Pointer _objc_msgSend_900( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_900( + obj, + sel, + ); + } + + late final __objc_msgSend_900Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_900 = __objc_msgSend_900Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); + void _objc_msgSend_901( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_901( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_901Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_901 = __objc_msgSend_901Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); + late final _sel_waitUntilAllOperationsAreFinished1 = + _registerName1("waitUntilAllOperationsAreFinished"); + late final _sel_currentQueue1 = _registerName1("currentQueue"); + ffi.Pointer _objc_msgSend_902( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_902( + obj, + sel, + ); + } + + late final __objc_msgSend_902Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_902 = __objc_msgSend_902Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_mainQueue1 = _registerName1("mainQueue"); + ffi.Pointer _objc_msgSend_903( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_903( + obj, + sel, + ); + } + + late final __objc_msgSend_903Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_903 = __objc_msgSend_903Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_operations1 = _registerName1("operations"); + late final _sel_operationCount1 = _registerName1("operationCount"); + late final _class_NSPointerArray1 = _getClass1("NSPointerArray"); + late final _sel_initWithOptions_1 = _registerName1("initWithOptions:"); + instancetype _objc_msgSend_904( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ) { + return __objc_msgSend_904( + obj, + sel, + options, + ); + } + + late final __objc_msgSend_904Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_904 = __objc_msgSend_904Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _class_NSPointerFunctions1 = _getClass1("NSPointerFunctions"); + late final _sel_pointerFunctionsWithOptions_1 = + _registerName1("pointerFunctionsWithOptions:"); + ffi.Pointer _objc_msgSend_905( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ) { + return __objc_msgSend_905( + obj, + sel, + options, + ); + } + + late final __objc_msgSend_905Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_905 = __objc_msgSend_905Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_hashFunction1 = _registerName1("hashFunction"); + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + _objc_msgSend_906( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_906( + obj, + sel, + ); + } + + late final __objc_msgSend_906Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + Function(ffi.Pointer, ffi.Pointer)>>( + 'objc_msgSend'); + late final __objc_msgSend_906 = __objc_msgSend_906Ptr.asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setHashFunction_1 = _registerName1("setHashFunction:"); + void _objc_msgSend_907( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value, + ) { + return __objc_msgSend_907( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_907Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>>( + 'objc_msgSend'); + late final __objc_msgSend_907 = __objc_msgSend_907Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>(); + + late final _sel_isEqualFunction1 = _registerName1("isEqualFunction"); + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + _objc_msgSend_908( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_908( + obj, + sel, + ); + } + + late final __objc_msgSend_908Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + Function(ffi.Pointer, ffi.Pointer)>>( + 'objc_msgSend'); + late final __objc_msgSend_908 = __objc_msgSend_908Ptr.asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setIsEqualFunction_1 = _registerName1("setIsEqualFunction:"); + void _objc_msgSend_909( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value, + ) { + return __objc_msgSend_909( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_909Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>>( + 'objc_msgSend'); + late final __objc_msgSend_909 = __objc_msgSend_909Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>(); + + late final _sel_sizeFunction1 = _registerName1("sizeFunction"); + ffi.Pointer< + ffi.NativeFunction)>> + _objc_msgSend_910( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_910( + obj, + sel, + ); + } + + late final __objc_msgSend_910Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>> + Function(ffi.Pointer, ffi.Pointer)>>( + 'objc_msgSend'); + late final __objc_msgSend_910 = __objc_msgSend_910Ptr.asFunction< + ffi.Pointer< + ffi + .NativeFunction)>> + Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setSizeFunction_1 = _registerName1("setSizeFunction:"); + void _objc_msgSend_911( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi + .NativeFunction)>> + value, + ) { + return __objc_msgSend_911( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_911Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>('objc_msgSend'); + late final __objc_msgSend_911 = __objc_msgSend_911Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>(); + + late final _sel_descriptionFunction1 = _registerName1("descriptionFunction"); + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + _objc_msgSend_912( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_912( + obj, + sel, + ); + } + + late final __objc_msgSend_912Ptr = + _lookup< + ffi.NativeFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>> + Function(ffi.Pointer, ffi.Pointer)>>( + 'objc_msgSend'); + late final __objc_msgSend_912 = __objc_msgSend_912Ptr.asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setDescriptionFunction_1 = + _registerName1("setDescriptionFunction:"); + void _objc_msgSend_913( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + value, + ) { + return __objc_msgSend_913( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_913Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>)>>('objc_msgSend'); + late final __objc_msgSend_913 = __objc_msgSend_913Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>)>(); + + late final _sel_relinquishFunction1 = _registerName1("relinquishFunction"); + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + _objc_msgSend_914( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_914( + obj, + sel, + ); + } + + late final __objc_msgSend_914Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + Function(ffi.Pointer, ffi.Pointer)>>( + 'objc_msgSend'); + late final __objc_msgSend_914 = __objc_msgSend_914Ptr.asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setRelinquishFunction_1 = + _registerName1("setRelinquishFunction:"); + void _objc_msgSend_915( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value, + ) { + return __objc_msgSend_915( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_915Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>>( + 'objc_msgSend'); + late final __objc_msgSend_915 = __objc_msgSend_915Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>(); + + late final _sel_acquireFunction1 = _registerName1("acquireFunction"); + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>, + ffi.Bool)>> _objc_msgSend_916( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_916( + obj, + sel, + ); + } + + late final __objc_msgSend_916Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>, + ffi.Bool)>> + Function(ffi.Pointer, ffi.Pointer)>>( + 'objc_msgSend'); + late final __objc_msgSend_916 = __objc_msgSend_916Ptr.asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>, + ffi.Bool)>> + Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setAcquireFunction_1 = _registerName1("setAcquireFunction:"); + void _objc_msgSend_917( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>, + ffi.Bool)>> + value, + ) { + return __objc_msgSend_917( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_917Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>, + ffi.Bool)>>)>>('objc_msgSend'); + late final __objc_msgSend_917 = __objc_msgSend_917Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>, + ffi.Bool)>>)>(); + + late final _sel_usesStrongWriteBarrier1 = + _registerName1("usesStrongWriteBarrier"); + late final _sel_setUsesStrongWriteBarrier_1 = + _registerName1("setUsesStrongWriteBarrier:"); + late final _sel_usesWeakReadAndWriteBarriers1 = + _registerName1("usesWeakReadAndWriteBarriers"); + late final _sel_setUsesWeakReadAndWriteBarriers_1 = + _registerName1("setUsesWeakReadAndWriteBarriers:"); + late final _sel_initWithPointerFunctions_1 = + _registerName1("initWithPointerFunctions:"); + instancetype _objc_msgSend_918( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer functions, + ) { + return __objc_msgSend_918( + obj, + sel, + functions, + ); + } + + late final __objc_msgSend_918Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_918 = __objc_msgSend_918Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_pointerArrayWithOptions_1 = + _registerName1("pointerArrayWithOptions:"); + ffi.Pointer _objc_msgSend_919( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ) { + return __objc_msgSend_919( + obj, + sel, + options, + ); + } + + late final __objc_msgSend_919Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_919 = __objc_msgSend_919Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_pointerArrayWithPointerFunctions_1 = + _registerName1("pointerArrayWithPointerFunctions:"); + ffi.Pointer _objc_msgSend_920( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer functions, + ) { + return __objc_msgSend_920( + obj, + sel, + functions, + ); + } + + late final __objc_msgSend_920Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_920 = __objc_msgSend_920Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_pointerFunctions1 = _registerName1("pointerFunctions"); + ffi.Pointer _objc_msgSend_921( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_921( + obj, + sel, + ); + } + + late final __objc_msgSend_921Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_921 = __objc_msgSend_921Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_pointerAtIndex_1 = _registerName1("pointerAtIndex:"); + ffi.Pointer _objc_msgSend_922( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_922( + obj, + sel, + index, + ); + } + + late final __objc_msgSend_922Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_922 = __objc_msgSend_922Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_addPointer_1 = _registerName1("addPointer:"); + late final _sel_removePointerAtIndex_1 = + _registerName1("removePointerAtIndex:"); + late final _sel_insertPointer_atIndex_1 = + _registerName1("insertPointer:atIndex:"); + late final _sel_replacePointerAtIndex_withPointer_1 = + _registerName1("replacePointerAtIndex:withPointer:"); + void _objc_msgSend_923( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ffi.Pointer item, + ) { + return __objc_msgSend_923( + obj, + sel, + index, + item, + ); + } + + late final __objc_msgSend_923Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_923 = __objc_msgSend_923Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _sel_compact1 = _registerName1("compact"); + late final _sel_setCount_1 = _registerName1("setCount:"); + late final _sel_pointerArrayWithStrongObjects1 = + _registerName1("pointerArrayWithStrongObjects"); + late final _sel_pointerArrayWithWeakObjects1 = + _registerName1("pointerArrayWithWeakObjects"); + late final _sel_strongObjectsPointerArray1 = + _registerName1("strongObjectsPointerArray"); + ffi.Pointer _objc_msgSend_924( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_924( + obj, + sel, + ); + } + + late final __objc_msgSend_924Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_924 = __objc_msgSend_924Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_weakObjectsPointerArray1 = + _registerName1("weakObjectsPointerArray"); + late final _class_NSProcessInfo1 = _getClass1("NSProcessInfo"); + late final _sel_processInfo1 = _registerName1("processInfo"); + ffi.Pointer _objc_msgSend_925( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_925( + obj, + sel, + ); + } + + late final __objc_msgSend_925Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_925 = __objc_msgSend_925Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_environment1 = _registerName1("environment"); + late final _sel_hostName1 = _registerName1("hostName"); + late final _sel_processName1 = _registerName1("processName"); + late final _sel_setProcessName_1 = _registerName1("setProcessName:"); + late final _sel_processIdentifier1 = _registerName1("processIdentifier"); + late final _sel_globallyUniqueString1 = + _registerName1("globallyUniqueString"); + late final _sel_operatingSystem1 = _registerName1("operatingSystem"); + late final _sel_operatingSystemName1 = _registerName1("operatingSystemName"); + late final _sel_operatingSystemVersionString1 = + _registerName1("operatingSystemVersionString"); + late final _sel_operatingSystemVersion1 = + _registerName1("operatingSystemVersion"); + NSOperatingSystemVersion _objc_msgSend_926( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_926( + obj, + sel, + ); + } + + late final __objc_msgSend_926Ptr = _lookup< + ffi.NativeFunction< + NSOperatingSystemVersion Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_926 = __objc_msgSend_926Ptr.asFunction< + NSOperatingSystemVersion Function( + ffi.Pointer, ffi.Pointer)>(); + + void _objc_msgSend_926_stret( + ffi.Pointer stret, + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_926_stret( + stret, + obj, + sel, + ); + } + + late final __objc_msgSend_926_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_stret'); + late final __objc_msgSend_926_stret = __objc_msgSend_926_stretPtr.asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_processorCount1 = _registerName1("processorCount"); + late final _sel_activeProcessorCount1 = + _registerName1("activeProcessorCount"); + late final _sel_physicalMemory1 = _registerName1("physicalMemory"); + late final _sel_isOperatingSystemAtLeastVersion_1 = + _registerName1("isOperatingSystemAtLeastVersion:"); + bool _objc_msgSend_927( + ffi.Pointer obj, + ffi.Pointer sel, + NSOperatingSystemVersion version, + ) { + return __objc_msgSend_927( + obj, + sel, + version, + ); + } + + late final __objc_msgSend_927Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + NSOperatingSystemVersion)>>('objc_msgSend'); + late final __objc_msgSend_927 = __objc_msgSend_927Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + NSOperatingSystemVersion)>(); + + late final _sel_systemUptime1 = _registerName1("systemUptime"); + late final _sel_disableSuddenTermination1 = + _registerName1("disableSuddenTermination"); + late final _sel_enableSuddenTermination1 = + _registerName1("enableSuddenTermination"); + late final _sel_disableAutomaticTermination_1 = + _registerName1("disableAutomaticTermination:"); + late final _sel_enableAutomaticTermination_1 = + _registerName1("enableAutomaticTermination:"); + late final _sel_automaticTerminationSupportEnabled1 = + _registerName1("automaticTerminationSupportEnabled"); + late final _sel_setAutomaticTerminationSupportEnabled_1 = + _registerName1("setAutomaticTerminationSupportEnabled:"); + late final _sel_beginActivityWithOptions_reason_1 = + _registerName1("beginActivityWithOptions:reason:"); + ffi.Pointer _objc_msgSend_928( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ffi.Pointer reason, + ) { + return __objc_msgSend_928( + obj, + sel, + options, + reason, + ); + } + + late final __objc_msgSend_928Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_928 = __objc_msgSend_928Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); + + late final _sel_endActivity_1 = _registerName1("endActivity:"); + late final _sel_performActivityWithOptions_reason_usingBlock_1 = + _registerName1("performActivityWithOptions:reason:usingBlock:"); + void _objc_msgSend_929( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ffi.Pointer reason, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_929( + obj, + sel, + options, + reason, + block, + ); + } + + late final __objc_msgSend_929Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_929 = __objc_msgSend_929Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_performExpiringActivityWithReason_usingBlock_1 = + _registerName1("performExpiringActivityWithReason:usingBlock:"); + void _objc_msgSend_930( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer reason, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_930( + obj, + sel, + reason, + block, + ); + } + + late final __objc_msgSend_930Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_930 = __objc_msgSend_930Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_userName1 = _registerName1("userName"); + late final _sel_fullUserName1 = _registerName1("fullUserName"); + late final _sel_thermalState1 = _registerName1("thermalState"); + int _objc_msgSend_931( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_931( + obj, + sel, + ); + } + + late final __objc_msgSend_931Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_931 = __objc_msgSend_931Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_isLowPowerModeEnabled1 = + _registerName1("isLowPowerModeEnabled"); + late final _sel_isMacCatalystApp1 = _registerName1("isMacCatalystApp"); + late final _sel_isiOSAppOnMac1 = _registerName1("isiOSAppOnMac"); + late final _class_NSTextCheckingResult1 = _getClass1("NSTextCheckingResult"); + late final _sel_resultType1 = _registerName1("resultType"); + int _objc_msgSend_932( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_932( + obj, + sel, + ); + } + + late final __objc_msgSend_932Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_932 = __objc_msgSend_932Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_range1 = _registerName1("range"); + late final _sel_orthography1 = _registerName1("orthography"); + ffi.Pointer _objc_msgSend_933( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_933( + obj, + sel, + ); + } + + late final __objc_msgSend_933Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_933 = __objc_msgSend_933Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_grammarDetails1 = _registerName1("grammarDetails"); + late final _sel_duration1 = _registerName1("duration"); + late final _sel_components1 = _registerName1("components"); + late final _sel_replacementString1 = _registerName1("replacementString"); + late final _sel_alternativeStrings1 = _registerName1("alternativeStrings"); + late final _class_NSRegularExpression1 = _getClass1("NSRegularExpression"); + late final _sel_regularExpressionWithPattern_options_error_1 = + _registerName1("regularExpressionWithPattern:options:error:"); + ffi.Pointer _objc_msgSend_934( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer pattern, + int options, + ffi.Pointer> error, + ) { + return __objc_msgSend_934( + obj, + sel, + pattern, + options, + error, + ); + } + + late final __objc_msgSend_934Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_934 = __objc_msgSend_934Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_initWithPattern_options_error_1 = + _registerName1("initWithPattern:options:error:"); + instancetype _objc_msgSend_935( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer pattern, + int options, + ffi.Pointer> error, + ) { + return __objc_msgSend_935( + obj, + sel, + pattern, + options, + error, + ); + } + + late final __objc_msgSend_935Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_935 = __objc_msgSend_935Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_pattern1 = _registerName1("pattern"); + late final _sel_options1 = _registerName1("options"); + int _objc_msgSend_936( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_936( + obj, + sel, + ); + } + + late final __objc_msgSend_936Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_936 = __objc_msgSend_936Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_numberOfCaptureGroups1 = + _registerName1("numberOfCaptureGroups"); + late final _sel_escapedPatternForString_1 = + _registerName1("escapedPatternForString:"); + late final _sel_enumerateMatchesInString_options_range_usingBlock_1 = + _registerName1("enumerateMatchesInString:options:range:usingBlock:"); + void _objc_msgSend_937( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int options, + _NSRange range, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_937( + obj, + sel, + string, + options, + range, + block, + ); + } + + late final __objc_msgSend_937Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_937 = __objc_msgSend_937Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_matchesInString_options_range_1 = + _registerName1("matchesInString:options:range:"); + ffi.Pointer _objc_msgSend_938( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int options, + _NSRange range, + ) { + return __objc_msgSend_938( + obj, + sel, + string, + options, + range, + ); + } + + late final __objc_msgSend_938Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_938 = __objc_msgSend_938Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + + late final _sel_numberOfMatchesInString_options_range_1 = + _registerName1("numberOfMatchesInString:options:range:"); + int _objc_msgSend_939( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int options, + _NSRange range, + ) { + return __objc_msgSend_939( + obj, + sel, + string, + options, + range, + ); + } + + late final __objc_msgSend_939Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_939 = __objc_msgSend_939Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + late final _sel_firstMatchInString_options_range_1 = + _registerName1("firstMatchInString:options:range:"); + ffi.Pointer _objc_msgSend_940( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int options, + _NSRange range, + ) { + return __objc_msgSend_940( + obj, + sel, + string, + options, + range, + ); + } + + late final __objc_msgSend_940Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_940 = __objc_msgSend_940Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + + late final _sel_rangeOfFirstMatchInString_options_range_1 = + _registerName1("rangeOfFirstMatchInString:options:range:"); + _NSRange _objc_msgSend_941( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int options, + _NSRange range, + ) { + return __objc_msgSend_941( + obj, + sel, + string, + options, + range, + ); + } + + late final __objc_msgSend_941Ptr = _lookup< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_941 = __objc_msgSend_941Ptr.asFunction< + _NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange)>(); + + void _objc_msgSend_941_stret( + ffi.Pointer<_NSRange> stret, + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int options, + _NSRange range, + ) { + return __objc_msgSend_941_stret( + stret, + obj, + sel, + string, + options, + range, + ); + } + + late final __objc_msgSend_941_stretPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>('objc_msgSend_stret'); + late final __objc_msgSend_941_stret = __objc_msgSend_941_stretPtr.asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, _NSRange)>(); + + late final _sel_stringByReplacingMatchesInString_options_range_withTemplate_1 = + _registerName1( + "stringByReplacingMatchesInString:options:range:withTemplate:"); + ffi.Pointer _objc_msgSend_942( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int options, + _NSRange range, + ffi.Pointer templ, + ) { + return __objc_msgSend_942( + obj, + sel, + string, + options, + range, + templ, + ); + } + + late final __objc_msgSend_942Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_942 = __objc_msgSend_942Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); + + late final _sel_replaceMatchesInString_options_range_withTemplate_1 = + _registerName1("replaceMatchesInString:options:range:withTemplate:"); + int _objc_msgSend_943( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int options, + _NSRange range, + ffi.Pointer templ, + ) { + return __objc_msgSend_943( + obj, + sel, + string, + options, + range, + templ, + ); + } + + late final __objc_msgSend_943Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_943 = __objc_msgSend_943Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, _NSRange, ffi.Pointer)>(); + + late final _sel_replacementStringForResult_inString_offset_template_1 = + _registerName1("replacementStringForResult:inString:offset:template:"); + ffi.Pointer _objc_msgSend_944( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer result, + ffi.Pointer string, + int offset, + ffi.Pointer templ, + ) { + return __objc_msgSend_944( + obj, + sel, + result, + string, + offset, + templ, + ); + } + + late final __objc_msgSend_944Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_944 = __objc_msgSend_944Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + + late final _sel_escapedTemplateForString_1 = + _registerName1("escapedTemplateForString:"); + late final _sel_regularExpression1 = _registerName1("regularExpression"); + ffi.Pointer _objc_msgSend_945( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_945( + obj, + sel, + ); + } + + late final __objc_msgSend_945Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_945 = __objc_msgSend_945Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_phoneNumber1 = _registerName1("phoneNumber"); + late final _sel_numberOfRanges1 = _registerName1("numberOfRanges"); + late final _sel_rangeAtIndex_1 = _registerName1("rangeAtIndex:"); + late final _sel_rangeWithName_1 = _registerName1("rangeWithName:"); + late final _sel_resultByAdjustingRangesWithOffset_1 = + _registerName1("resultByAdjustingRangesWithOffset:"); + ffi.Pointer _objc_msgSend_946( + ffi.Pointer obj, + ffi.Pointer sel, + int offset, + ) { + return __objc_msgSend_946( + obj, + sel, + offset, + ); + } + + late final __objc_msgSend_946Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_946 = __objc_msgSend_946Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_addressComponents1 = _registerName1("addressComponents"); + late final _sel_orthographyCheckingResultWithRange_orthography_1 = + _registerName1("orthographyCheckingResultWithRange:orthography:"); + ffi.Pointer _objc_msgSend_947( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer orthography, + ) { + return __objc_msgSend_947( + obj, + sel, + range, + orthography, + ); + } + + late final __objc_msgSend_947Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_947 = __objc_msgSend_947Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange, ffi.Pointer)>(); + + late final _sel_spellCheckingResultWithRange_1 = + _registerName1("spellCheckingResultWithRange:"); + ffi.Pointer _objc_msgSend_948( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ) { + return __objc_msgSend_948( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_948Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>('objc_msgSend'); + late final __objc_msgSend_948 = __objc_msgSend_948Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, _NSRange)>(); + + late final _sel_grammarCheckingResultWithRange_details_1 = + _registerName1("grammarCheckingResultWithRange:details:"); + ffi.Pointer _objc_msgSend_949( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer details, + ) { + return __objc_msgSend_949( + obj, + sel, + range, + details, + ); + } + + late final __objc_msgSend_949Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_949 = __objc_msgSend_949Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange, ffi.Pointer)>(); + + late final _sel_dateCheckingResultWithRange_date_1 = + _registerName1("dateCheckingResultWithRange:date:"); + ffi.Pointer _objc_msgSend_950( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer date, + ) { + return __objc_msgSend_950( + obj, + sel, + range, + date, + ); + } + + late final __objc_msgSend_950Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_950 = __objc_msgSend_950Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange, ffi.Pointer)>(); + + late final _sel_dateCheckingResultWithRange_date_timeZone_duration_1 = + _registerName1("dateCheckingResultWithRange:date:timeZone:duration:"); + ffi.Pointer _objc_msgSend_951( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer date, + ffi.Pointer timeZone, + double duration, + ) { + return __objc_msgSend_951( + obj, + sel, + range, + date, + timeZone, + duration, + ); + } + + late final __objc_msgSend_951Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer, + ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_951 = __objc_msgSend_951Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer, + double)>(); + + late final _sel_addressCheckingResultWithRange_components_1 = + _registerName1("addressCheckingResultWithRange:components:"); + ffi.Pointer _objc_msgSend_952( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer components, + ) { + return __objc_msgSend_952( + obj, + sel, + range, + components, + ); + } + + late final __objc_msgSend_952Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_952 = __objc_msgSend_952Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange, ffi.Pointer)>(); + + late final _sel_linkCheckingResultWithRange_URL_1 = + _registerName1("linkCheckingResultWithRange:URL:"); + ffi.Pointer _objc_msgSend_953( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer url, + ) { + return __objc_msgSend_953( + obj, + sel, + range, + url, + ); + } + + late final __objc_msgSend_953Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_953 = __objc_msgSend_953Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange, ffi.Pointer)>(); + + late final _sel_quoteCheckingResultWithRange_replacementString_1 = + _registerName1("quoteCheckingResultWithRange:replacementString:"); + ffi.Pointer _objc_msgSend_954( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer replacementString, + ) { + return __objc_msgSend_954( + obj, + sel, + range, + replacementString, + ); + } + + late final __objc_msgSend_954Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_954 = __objc_msgSend_954Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange, ffi.Pointer)>(); + + late final _sel_dashCheckingResultWithRange_replacementString_1 = + _registerName1("dashCheckingResultWithRange:replacementString:"); + late final _sel_replacementCheckingResultWithRange_replacementString_1 = + _registerName1("replacementCheckingResultWithRange:replacementString:"); + late final _sel_correctionCheckingResultWithRange_replacementString_1 = + _registerName1("correctionCheckingResultWithRange:replacementString:"); + late final _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_1 = + _registerName1( + "correctionCheckingResultWithRange:replacementString:alternativeStrings:"); + ffi.Pointer _objc_msgSend_955( + ffi.Pointer obj, + ffi.Pointer sel, + _NSRange range, + ffi.Pointer replacementString, + ffi.Pointer alternativeStrings, + ) { + return __objc_msgSend_955( + obj, + sel, + range, + replacementString, + alternativeStrings, + ); + } + + late final __objc_msgSend_955Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_955 = __objc_msgSend_955Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_1 = + _registerName1( + "regularExpressionCheckingResultWithRanges:count:regularExpression:"); + ffi.Pointer _objc_msgSend_956( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_NSRange> ranges, + int count, + ffi.Pointer regularExpression, + ) { + return __objc_msgSend_956( + obj, + sel, + ranges, + count, + regularExpression, + ); + } + + late final __objc_msgSend_956Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSRange>, + ffi.UnsignedLong, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_956 = __objc_msgSend_956Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSRange>, + int, + ffi.Pointer)>(); + + late final _sel_phoneNumberCheckingResultWithRange_phoneNumber_1 = + _registerName1("phoneNumberCheckingResultWithRange:phoneNumber:"); + late final _sel_transitInformationCheckingResultWithRange_components_1 = + _registerName1("transitInformationCheckingResultWithRange:components:"); + late final _class_NSURLCache1 = _getClass1("NSURLCache"); + late final _sel_sharedURLCache1 = _registerName1("sharedURLCache"); + ffi.Pointer _objc_msgSend_957( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_957( + obj, + sel, + ); + } + + late final __objc_msgSend_957Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_957 = __objc_msgSend_957Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setSharedURLCache_1 = _registerName1("setSharedURLCache:"); + void _objc_msgSend_958( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_958( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_958Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_958 = __objc_msgSend_958Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_1 = + _registerName1("initWithMemoryCapacity:diskCapacity:diskPath:"); + instancetype _objc_msgSend_959( + ffi.Pointer obj, + ffi.Pointer sel, + int memoryCapacity, + int diskCapacity, + ffi.Pointer path, + ) { + return __objc_msgSend_959( + obj, + sel, + memoryCapacity, + diskCapacity, + path, + ); + } + + late final __objc_msgSend_959Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_959 = __objc_msgSend_959Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, + int, ffi.Pointer)>(); + + late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_1 = + _registerName1("initWithMemoryCapacity:diskCapacity:directoryURL:"); + instancetype _objc_msgSend_960( + ffi.Pointer obj, + ffi.Pointer sel, + int memoryCapacity, + int diskCapacity, + ffi.Pointer directoryURL, + ) { + return __objc_msgSend_960( + obj, + sel, + memoryCapacity, + diskCapacity, + directoryURL, + ); + } + + late final __objc_msgSend_960Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_960 = __objc_msgSend_960Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, + int, ffi.Pointer)>(); + + late final _class_NSCachedURLResponse1 = _getClass1("NSCachedURLResponse"); + late final _sel_initWithResponse_data_1 = + _registerName1("initWithResponse:data:"); + instancetype _objc_msgSend_961( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer response, + ffi.Pointer data, + ) { + return __objc_msgSend_961( + obj, + sel, + response, + data, + ); + } + + late final __objc_msgSend_961Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_961 = __objc_msgSend_961Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithResponse_data_userInfo_storagePolicy_1 = + _registerName1("initWithResponse:data:userInfo:storagePolicy:"); + instancetype _objc_msgSend_962( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer response, + ffi.Pointer data, + ffi.Pointer userInfo, + int storagePolicy, + ) { + return __objc_msgSend_962( + obj, + sel, + response, + data, + userInfo, + storagePolicy, + ); + } + + late final __objc_msgSend_962Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_962 = __objc_msgSend_962Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + + ffi.Pointer _objc_msgSend_963( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_963( + obj, + sel, + ); + } + + late final __objc_msgSend_963Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_963 = __objc_msgSend_963Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_storagePolicy1 = _registerName1("storagePolicy"); + int _objc_msgSend_964( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_964( + obj, + sel, + ); + } + + late final __objc_msgSend_964Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_964 = __objc_msgSend_964Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_cachedResponseForRequest_1 = + _registerName1("cachedResponseForRequest:"); + ffi.Pointer _objc_msgSend_965( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_965( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_965Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_965 = __objc_msgSend_965Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_storeCachedResponse_forRequest_1 = + _registerName1("storeCachedResponse:forRequest:"); + void _objc_msgSend_966( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cachedResponse, + ffi.Pointer request, + ) { + return __objc_msgSend_966( + obj, + sel, + cachedResponse, + request, + ); + } + + late final __objc_msgSend_966Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_966 = __objc_msgSend_966Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_removeCachedResponseForRequest_1 = + _registerName1("removeCachedResponseForRequest:"); + void _objc_msgSend_967( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_967( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_967Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_967 = __objc_msgSend_967Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeAllCachedResponses1 = + _registerName1("removeAllCachedResponses"); + late final _sel_removeCachedResponsesSinceDate_1 = + _registerName1("removeCachedResponsesSinceDate:"); + late final _sel_memoryCapacity1 = _registerName1("memoryCapacity"); + late final _sel_setMemoryCapacity_1 = _registerName1("setMemoryCapacity:"); + late final _sel_diskCapacity1 = _registerName1("diskCapacity"); + late final _sel_setDiskCapacity_1 = _registerName1("setDiskCapacity:"); + late final _sel_currentMemoryUsage1 = _registerName1("currentMemoryUsage"); + late final _sel_currentDiskUsage1 = _registerName1("currentDiskUsage"); + late final _class_NSURLSessionDataTask1 = _getClass1("NSURLSessionDataTask"); + late final _sel_storeCachedResponse_forDataTask_1 = + _registerName1("storeCachedResponse:forDataTask:"); + void _objc_msgSend_968( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cachedResponse, + ffi.Pointer dataTask, + ) { + return __objc_msgSend_968( + obj, + sel, + cachedResponse, + dataTask, + ); + } + + late final __objc_msgSend_968Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_968 = __objc_msgSend_968Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_getCachedResponseForDataTask_completionHandler_1 = + _registerName1("getCachedResponseForDataTask:completionHandler:"); + void _objc_msgSend_969( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dataTask, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_969( + obj, + sel, + dataTask, + completionHandler, + ); + } + + late final __objc_msgSend_969Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_969 = __objc_msgSend_969Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_removeCachedResponseForDataTask_1 = + _registerName1("removeCachedResponseForDataTask:"); + void _objc_msgSend_970( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dataTask, + ) { + return __objc_msgSend_970( + obj, + sel, + dataTask, + ); + } + + late final __objc_msgSend_970Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_970 = __objc_msgSend_970Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSURLConnection1 = _getClass1("NSURLConnection"); + late final _sel_initWithRequest_delegate_startImmediately_1 = + _registerName1("initWithRequest:delegate:startImmediately:"); + instancetype _objc_msgSend_971( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer delegate, + bool startImmediately, + ) { + return __objc_msgSend_971( + obj, + sel, + request, + delegate, + startImmediately, + ); + } + + late final __objc_msgSend_971Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_971 = __objc_msgSend_971Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_initWithRequest_delegate_1 = + _registerName1("initWithRequest:delegate:"); + instancetype _objc_msgSend_972( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer delegate, + ) { + return __objc_msgSend_972( + obj, + sel, + request, + delegate, + ); + } + + late final __objc_msgSend_972Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_972 = __objc_msgSend_972Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_connectionWithRequest_delegate_1 = + _registerName1("connectionWithRequest:delegate:"); + ffi.Pointer _objc_msgSend_973( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer delegate, + ) { + return __objc_msgSend_973( + obj, + sel, + request, + delegate, + ); + } + + late final __objc_msgSend_973Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_973 = __objc_msgSend_973Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_974( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_974( + obj, + sel, + ); + } + + late final __objc_msgSend_974Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_974 = __objc_msgSend_974Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_unscheduleFromRunLoop_forMode_1 = + _registerName1("unscheduleFromRunLoop:forMode:"); + late final _sel_setDelegateQueue_1 = _registerName1("setDelegateQueue:"); + void _objc_msgSend_975( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer queue, + ) { + return __objc_msgSend_975( + obj, + sel, + queue, + ); + } + + late final __objc_msgSend_975Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_975 = __objc_msgSend_975Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_canHandleRequest_1 = _registerName1("canHandleRequest:"); + bool _objc_msgSend_976( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_976( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_976Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_976 = __objc_msgSend_976Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_sendSynchronousRequest_returningResponse_error_1 = + _registerName1("sendSynchronousRequest:returningResponse:error:"); + ffi.Pointer _objc_msgSend_977( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer> response, + ffi.Pointer> error, + ) { + return __objc_msgSend_977( + obj, + sel, + request, + response, + error, + ); + } + + late final __objc_msgSend_977Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_977 = __objc_msgSend_977Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _sel_sendAsynchronousRequest_queue_completionHandler_1 = + _registerName1("sendAsynchronousRequest:queue:completionHandler:"); + void _objc_msgSend_978( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer queue, + ffi.Pointer<_ObjCBlock> handler, + ) { + return __objc_msgSend_978( + obj, + sel, + request, + queue, + handler, + ); + } + + late final __objc_msgSend_978Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_978 = __objc_msgSend_978Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _class_NSURLCredential1 = _getClass1("NSURLCredential"); + late final _sel_persistence1 = _registerName1("persistence"); + int _objc_msgSend_979( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_979( + obj, + sel, + ); + } + + late final __objc_msgSend_979Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_979 = __objc_msgSend_979Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithUser_password_persistence_1 = + _registerName1("initWithUser:password:persistence:"); + instancetype _objc_msgSend_980( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer user, + ffi.Pointer password, + int persistence, + ) { + return __objc_msgSend_980( + obj, + sel, + user, + password, + persistence, + ); + } + + late final __objc_msgSend_980Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_980 = __objc_msgSend_980Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_credentialWithUser_password_persistence_1 = + _registerName1("credentialWithUser:password:persistence:"); + ffi.Pointer _objc_msgSend_981( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer user, + ffi.Pointer password, + int persistence, + ) { + return __objc_msgSend_981( + obj, + sel, + user, + password, + persistence, + ); + } + + late final __objc_msgSend_981Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_981 = __objc_msgSend_981Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + + late final _sel_hasPassword1 = _registerName1("hasPassword"); + late final _sel_initWithIdentity_certificates_persistence_1 = + _registerName1("initWithIdentity:certificates:persistence:"); + instancetype _objc_msgSend_982( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<__SecIdentity> identity, + ffi.Pointer certArray, + int persistence, + ) { + return __objc_msgSend_982( + obj, + sel, + identity, + certArray, + persistence, + ); + } + + late final __objc_msgSend_982Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_982 = __objc_msgSend_982Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<__SecIdentity>, ffi.Pointer, int)>(); + + late final _sel_credentialWithIdentity_certificates_persistence_1 = + _registerName1("credentialWithIdentity:certificates:persistence:"); + ffi.Pointer _objc_msgSend_983( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<__SecIdentity> identity, + ffi.Pointer certArray, + int persistence, + ) { + return __objc_msgSend_983( + obj, + sel, + identity, + certArray, + persistence, + ); + } + + late final __objc_msgSend_983Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_983 = __objc_msgSend_983Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + int)>(); + + late final _sel_identity1 = _registerName1("identity"); + ffi.Pointer<__SecIdentity> _objc_msgSend_984( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_984( + obj, + sel, + ); + } + + late final __objc_msgSend_984Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<__SecIdentity> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_984 = __objc_msgSend_984Ptr.asFunction< + ffi.Pointer<__SecIdentity> Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_certificates1 = _registerName1("certificates"); + late final _sel_initWithTrust_1 = _registerName1("initWithTrust:"); + instancetype _objc_msgSend_985( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<__SecTrust> trust, + ) { + return __objc_msgSend_985( + obj, + sel, + trust, + ); + } + + late final __objc_msgSend_985Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<__SecTrust>)>>('objc_msgSend'); + late final __objc_msgSend_985 = __objc_msgSend_985Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<__SecTrust>)>(); + + late final _sel_credentialForTrust_1 = _registerName1("credentialForTrust:"); + ffi.Pointer _objc_msgSend_986( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<__SecTrust> trust, + ) { + return __objc_msgSend_986( + obj, + sel, + trust, + ); + } + + late final __objc_msgSend_986Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>>('objc_msgSend'); + late final __objc_msgSend_986 = __objc_msgSend_986Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>(); + + late final _class_NSURLProtectionSpace1 = _getClass1("NSURLProtectionSpace"); + late final _sel_initWithHost_port_protocol_realm_authenticationMethod_1 = + _registerName1("initWithHost:port:protocol:realm:authenticationMethod:"); + instancetype _objc_msgSend_987( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer host, + int port, + ffi.Pointer protocol, + ffi.Pointer realm, + ffi.Pointer authenticationMethod, + ) { + return __objc_msgSend_987( + obj, + sel, + host, + port, + protocol, + realm, + authenticationMethod, + ); + } + + late final __objc_msgSend_987Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_987 = __objc_msgSend_987Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithProxyHost_port_type_realm_authenticationMethod_1 = + _registerName1("initWithProxyHost:port:type:realm:authenticationMethod:"); + late final _sel_realm1 = _registerName1("realm"); + late final _sel_receivesCredentialSecurely1 = + _registerName1("receivesCredentialSecurely"); + late final _sel_isProxy1 = _registerName1("isProxy"); + late final _sel_proxyType1 = _registerName1("proxyType"); + late final _sel_protocol1 = _registerName1("protocol"); + late final _sel_authenticationMethod1 = + _registerName1("authenticationMethod"); + late final _sel_distinguishedNames1 = _registerName1("distinguishedNames"); + late final _sel_serverTrust1 = _registerName1("serverTrust"); + ffi.Pointer<__SecTrust> _objc_msgSend_988( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_988( + obj, + sel, + ); + } + + late final __objc_msgSend_988Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<__SecTrust> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_988 = __objc_msgSend_988Ptr.asFunction< + ffi.Pointer<__SecTrust> Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLCredentialStorage1 = + _getClass1("NSURLCredentialStorage"); + late final _sel_sharedCredentialStorage1 = + _registerName1("sharedCredentialStorage"); + ffi.Pointer _objc_msgSend_989( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_989( + obj, + sel, + ); + } + + late final __objc_msgSend_989Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_989 = __objc_msgSend_989Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_credentialsForProtectionSpace_1 = + _registerName1("credentialsForProtectionSpace:"); + ffi.Pointer _objc_msgSend_990( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer space, + ) { + return __objc_msgSend_990( + obj, + sel, + space, + ); + } + + late final __objc_msgSend_990Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_990 = __objc_msgSend_990Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_allCredentials1 = _registerName1("allCredentials"); + late final _sel_setCredential_forProtectionSpace_1 = + _registerName1("setCredential:forProtectionSpace:"); + void _objc_msgSend_991( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer credential, + ffi.Pointer space, + ) { + return __objc_msgSend_991( + obj, + sel, + credential, + space, + ); + } + + late final __objc_msgSend_991Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_991 = __objc_msgSend_991Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_removeCredential_forProtectionSpace_1 = + _registerName1("removeCredential:forProtectionSpace:"); + late final _sel_removeCredential_forProtectionSpace_options_1 = + _registerName1("removeCredential:forProtectionSpace:options:"); + void _objc_msgSend_992( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer credential, + ffi.Pointer space, + ffi.Pointer options, + ) { + return __objc_msgSend_992( + obj, + sel, + credential, + space, + options, + ); + } + + late final __objc_msgSend_992Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_992 = __objc_msgSend_992Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_defaultCredentialForProtectionSpace_1 = + _registerName1("defaultCredentialForProtectionSpace:"); + ffi.Pointer _objc_msgSend_993( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer space, + ) { + return __objc_msgSend_993( + obj, + sel, + space, + ); + } + + late final __objc_msgSend_993Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_993 = __objc_msgSend_993Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setDefaultCredential_forProtectionSpace_1 = + _registerName1("setDefaultCredential:forProtectionSpace:"); + late final _sel_getCredentialsForProtectionSpace_task_completionHandler_1 = + _registerName1( + "getCredentialsForProtectionSpace:task:completionHandler:"); + void _objc_msgSend_994( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer protectionSpace, + ffi.Pointer task, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_994( + obj, + sel, + protectionSpace, + task, + completionHandler, + ); + } + + late final __objc_msgSend_994Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_994 = __objc_msgSend_994Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_setCredential_forProtectionSpace_task_1 = + _registerName1("setCredential:forProtectionSpace:task:"); + void _objc_msgSend_995( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer credential, + ffi.Pointer protectionSpace, + ffi.Pointer task, + ) { + return __objc_msgSend_995( + obj, + sel, + credential, + protectionSpace, + task, + ); + } + + late final __objc_msgSend_995Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_995 = __objc_msgSend_995Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeCredential_forProtectionSpace_options_task_1 = + _registerName1("removeCredential:forProtectionSpace:options:task:"); + void _objc_msgSend_996( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer credential, + ffi.Pointer protectionSpace, + ffi.Pointer options, + ffi.Pointer task, + ) { + return __objc_msgSend_996( + obj, + sel, + credential, + protectionSpace, + options, + task, + ); + } + + late final __objc_msgSend_996Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_996 = __objc_msgSend_996Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_1 = + _registerName1( + "getDefaultCredentialForProtectionSpace:task:completionHandler:"); + void _objc_msgSend_997( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer space, + ffi.Pointer task, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_997( + obj, + sel, + space, + task, + completionHandler, + ); + } + + late final __objc_msgSend_997Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_997 = __objc_msgSend_997Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_setDefaultCredential_forProtectionSpace_task_1 = + _registerName1("setDefaultCredential:forProtectionSpace:task:"); + late final _class_NSURLProtocol1 = _getClass1("NSURLProtocol"); + late final _sel_initWithRequest_cachedResponse_client_1 = + _registerName1("initWithRequest:cachedResponse:client:"); + instancetype _objc_msgSend_998( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer cachedResponse, + ffi.Pointer client, + ) { + return __objc_msgSend_998( + obj, + sel, + request, + cachedResponse, + client, + ); + } + + late final __objc_msgSend_998Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_998 = __objc_msgSend_998Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_client1 = _registerName1("client"); + late final _sel_request1 = _registerName1("request"); + late final _sel_cachedResponse1 = _registerName1("cachedResponse"); + ffi.Pointer _objc_msgSend_999( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_999( + obj, + sel, + ); + } + + late final __objc_msgSend_999Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_999 = __objc_msgSend_999Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_canInitWithRequest_1 = _registerName1("canInitWithRequest:"); + late final _sel_canonicalRequestForRequest_1 = + _registerName1("canonicalRequestForRequest:"); + ffi.Pointer _objc_msgSend_1000( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_1000( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_1000Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1000 = __objc_msgSend_1000Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_requestIsCacheEquivalent_toRequest_1 = + _registerName1("requestIsCacheEquivalent:toRequest:"); + bool _objc_msgSend_1001( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer a, + ffi.Pointer b, + ) { + return __objc_msgSend_1001( + obj, + sel, + a, + b, + ); + } + + late final __objc_msgSend_1001Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1001 = __objc_msgSend_1001Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_startLoading1 = _registerName1("startLoading"); + late final _sel_stopLoading1 = _registerName1("stopLoading"); + late final _sel_propertyForKey_inRequest_1 = + _registerName1("propertyForKey:inRequest:"); + ffi.Pointer _objc_msgSend_1002( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ffi.Pointer request, + ) { + return __objc_msgSend_1002( + obj, + sel, + key, + request, + ); + } + + late final __objc_msgSend_1002Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1002 = __objc_msgSend_1002Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); + late final _sel_setURL_1 = _registerName1("setURL:"); + late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); + void _objc_msgSend_1003( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_1003( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1003Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1003 = __objc_msgSend_1003Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); + late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); + late final _sel_setNetworkServiceType_1 = + _registerName1("setNetworkServiceType:"); + void _objc_msgSend_1004( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_1004( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1004Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1004 = __objc_msgSend_1004Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_setAllowsCellularAccess_1 = + _registerName1("setAllowsCellularAccess:"); + late final _sel_setAllowsExpensiveNetworkAccess_1 = + _registerName1("setAllowsExpensiveNetworkAccess:"); + late final _sel_setAllowsConstrainedNetworkAccess_1 = + _registerName1("setAllowsConstrainedNetworkAccess:"); + late final _sel_setAssumesHTTP3Capable_1 = + _registerName1("setAssumesHTTP3Capable:"); + late final _sel_setAttribution_1 = _registerName1("setAttribution:"); + void _objc_msgSend_1005( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_1005( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1005Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1005 = __objc_msgSend_1005Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_setRequiresDNSSECValidation_1 = + _registerName1("setRequiresDNSSECValidation:"); + late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); + late final _sel_setAllHTTPHeaderFields_1 = + _registerName1("setAllHTTPHeaderFields:"); + late final _sel_setValue_forHTTPHeaderField_1 = + _registerName1("setValue:forHTTPHeaderField:"); + void _objc_msgSend_1006( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer field, + ) { + return __objc_msgSend_1006( + obj, + sel, + value, + field, + ); + } + + late final __objc_msgSend_1006Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1006 = __objc_msgSend_1006Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_addValue_forHTTPHeaderField_1 = + _registerName1("addValue:forHTTPHeaderField:"); + late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); + void _objc_msgSend_1007( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_1007( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1007Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1007 = __objc_msgSend_1007Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); + void _objc_msgSend_1008( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_1008( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1008Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1008 = __objc_msgSend_1008Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setHTTPShouldHandleCookies_1 = + _registerName1("setHTTPShouldHandleCookies:"); + late final _sel_setHTTPShouldUsePipelining_1 = + _registerName1("setHTTPShouldUsePipelining:"); + late final _sel_setProperty_forKey_inRequest_1 = + _registerName1("setProperty:forKey:inRequest:"); + void _objc_msgSend_1009( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer key, + ffi.Pointer request, + ) { + return __objc_msgSend_1009( + obj, + sel, + value, + key, + request, + ); + } + + late final __objc_msgSend_1009Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1009 = __objc_msgSend_1009Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removePropertyForKey_inRequest_1 = + _registerName1("removePropertyForKey:inRequest:"); + void _objc_msgSend_1010( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer key, + ffi.Pointer request, + ) { + return __objc_msgSend_1010( + obj, + sel, + key, + request, + ); + } + + late final __objc_msgSend_1010Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1010 = __objc_msgSend_1010Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_registerClass_1 = _registerName1("registerClass:"); + late final _sel_unregisterClass_1 = _registerName1("unregisterClass:"); + late final _sel_canInitWithTask_1 = _registerName1("canInitWithTask:"); + bool _objc_msgSend_1011( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ) { + return __objc_msgSend_1011( + obj, + sel, + task, + ); + } + + late final __objc_msgSend_1011Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1011 = __objc_msgSend_1011Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithTask_cachedResponse_client_1 = + _registerName1("initWithTask:cachedResponse:client:"); + instancetype _objc_msgSend_1012( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ffi.Pointer cachedResponse, + ffi.Pointer client, + ) { + return __objc_msgSend_1012( + obj, + sel, + task, + cachedResponse, + client, + ); + } + + late final __objc_msgSend_1012Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1012 = __objc_msgSend_1012Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_task1 = _registerName1("task"); + ffi.Pointer _objc_msgSend_1013( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1013( + obj, + sel, + ); + } + + late final __objc_msgSend_1013Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1013 = __objc_msgSend_1013Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSXMLParser1 = _getClass1("NSXMLParser"); + late final _sel_initWithStream_1 = _registerName1("initWithStream:"); + instancetype _objc_msgSend_1014( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer stream, + ) { + return __objc_msgSend_1014( + obj, + sel, + stream, + ); + } + + late final __objc_msgSend_1014Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1014 = __objc_msgSend_1014Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_shouldProcessNamespaces1 = + _registerName1("shouldProcessNamespaces"); + late final _sel_setShouldProcessNamespaces_1 = + _registerName1("setShouldProcessNamespaces:"); + late final _sel_shouldReportNamespacePrefixes1 = + _registerName1("shouldReportNamespacePrefixes"); + late final _sel_setShouldReportNamespacePrefixes_1 = + _registerName1("setShouldReportNamespacePrefixes:"); + late final _sel_externalEntityResolvingPolicy1 = + _registerName1("externalEntityResolvingPolicy"); + int _objc_msgSend_1015( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1015( + obj, + sel, + ); + } + + late final __objc_msgSend_1015Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1015 = __objc_msgSend_1015Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setExternalEntityResolvingPolicy_1 = + _registerName1("setExternalEntityResolvingPolicy:"); + void _objc_msgSend_1016( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_1016( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1016Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1016 = __objc_msgSend_1016Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_allowedExternalEntityURLs1 = + _registerName1("allowedExternalEntityURLs"); + late final _sel_setAllowedExternalEntityURLs_1 = + _registerName1("setAllowedExternalEntityURLs:"); + void _objc_msgSend_1017( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_1017( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1017Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1017 = __objc_msgSend_1017Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_parse1 = _registerName1("parse"); + late final _sel_abortParsing1 = _registerName1("abortParsing"); + late final _sel_parserError1 = _registerName1("parserError"); + late final _sel_shouldResolveExternalEntities1 = + _registerName1("shouldResolveExternalEntities"); + late final _sel_setShouldResolveExternalEntities_1 = + _registerName1("setShouldResolveExternalEntities:"); + late final _sel_publicID1 = _registerName1("publicID"); + late final _sel_systemID1 = _registerName1("systemID"); + late final _sel_lineNumber1 = _registerName1("lineNumber"); + late final _sel_columnNumber1 = _registerName1("columnNumber"); + late final _class_NSFileWrapper1 = _getClass1("NSFileWrapper"); + late final _sel_initWithURL_options_error_1 = + _registerName1("initWithURL:options:error:"); + instancetype _objc_msgSend_1018( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int options, + ffi.Pointer> outError, + ) { + return __objc_msgSend_1018( + obj, + sel, + url, + options, + outError, + ); + } + + late final __objc_msgSend_1018Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_1018 = __objc_msgSend_1018Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_initDirectoryWithFileWrappers_1 = + _registerName1("initDirectoryWithFileWrappers:"); + late final _sel_initRegularFileWithContents_1 = + _registerName1("initRegularFileWithContents:"); + late final _sel_initSymbolicLinkWithDestinationURL_1 = + _registerName1("initSymbolicLinkWithDestinationURL:"); + late final _sel_initWithSerializedRepresentation_1 = + _registerName1("initWithSerializedRepresentation:"); + late final _sel_isDirectory1 = _registerName1("isDirectory"); + late final _sel_isRegularFile1 = _registerName1("isRegularFile"); + late final _sel_isSymbolicLink1 = _registerName1("isSymbolicLink"); + late final _sel_preferredFilename1 = _registerName1("preferredFilename"); + late final _sel_setPreferredFilename_1 = + _registerName1("setPreferredFilename:"); + late final _sel_filename1 = _registerName1("filename"); + late final _sel_setFilename_1 = _registerName1("setFilename:"); + late final _sel_fileAttributes1 = _registerName1("fileAttributes"); + late final _sel_setFileAttributes_1 = _registerName1("setFileAttributes:"); + late final _sel_matchesContentsOfURL_1 = + _registerName1("matchesContentsOfURL:"); + late final _sel_readFromURL_options_error_1 = + _registerName1("readFromURL:options:error:"); + bool _objc_msgSend_1019( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int options, + ffi.Pointer> outError, + ) { + return __objc_msgSend_1019( + obj, + sel, + url, + options, + outError, + ); + } + + late final __objc_msgSend_1019Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_1019 = __objc_msgSend_1019Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_writeToURL_options_originalContentsURL_error_1 = + _registerName1("writeToURL:options:originalContentsURL:error:"); + bool _objc_msgSend_1020( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int options, + ffi.Pointer originalContentsURL, + ffi.Pointer> outError, + ) { + return __objc_msgSend_1020( + obj, + sel, + url, + options, + originalContentsURL, + outError, + ); + } + + late final __objc_msgSend_1020Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_1020 = __objc_msgSend_1020Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_serializedRepresentation1 = + _registerName1("serializedRepresentation"); + late final _sel_addFileWrapper_1 = _registerName1("addFileWrapper:"); + ffi.Pointer _objc_msgSend_1021( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer child, + ) { + return __objc_msgSend_1021( + obj, + sel, + child, + ); + } + + late final __objc_msgSend_1021Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1021 = __objc_msgSend_1021Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_addRegularFileWithContents_preferredFilename_1 = + _registerName1("addRegularFileWithContents:preferredFilename:"); + ffi.Pointer _objc_msgSend_1022( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ffi.Pointer fileName, + ) { + return __objc_msgSend_1022( + obj, + sel, + data, + fileName, + ); + } + + late final __objc_msgSend_1022Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1022 = __objc_msgSend_1022Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeFileWrapper_1 = _registerName1("removeFileWrapper:"); + void _objc_msgSend_1023( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer child, + ) { + return __objc_msgSend_1023( + obj, + sel, + child, + ); + } + + late final __objc_msgSend_1023Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1023 = __objc_msgSend_1023Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_fileWrappers1 = _registerName1("fileWrappers"); + late final _sel_keyForFileWrapper_1 = _registerName1("keyForFileWrapper:"); + ffi.Pointer _objc_msgSend_1024( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer child, + ) { + return __objc_msgSend_1024( + obj, + sel, + child, + ); + } + + late final __objc_msgSend_1024Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1024 = __objc_msgSend_1024Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_regularFileContents1 = _registerName1("regularFileContents"); + late final _sel_symbolicLinkDestinationURL1 = + _registerName1("symbolicLinkDestinationURL"); + late final _sel_initSymbolicLinkWithDestination_1 = + _registerName1("initSymbolicLinkWithDestination:"); + late final _sel_needsToBeUpdatedFromPath_1 = + _registerName1("needsToBeUpdatedFromPath:"); + late final _sel_updateFromPath_1 = _registerName1("updateFromPath:"); + late final _sel_writeToFile_atomically_updateFilenames_1 = + _registerName1("writeToFile:atomically:updateFilenames:"); + bool _objc_msgSend_1025( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool atomicFlag, + bool updateFilenamesFlag, + ) { + return __objc_msgSend_1025( + obj, + sel, + path, + atomicFlag, + updateFilenamesFlag, + ); + } + + late final __objc_msgSend_1025Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_1025 = __objc_msgSend_1025Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool, bool)>(); + + late final _sel_addFileWithPath_1 = _registerName1("addFileWithPath:"); + late final _sel_addSymbolicLinkWithDestination_preferredFilename_1 = + _registerName1("addSymbolicLinkWithDestination:preferredFilename:"); + late final _sel_symbolicLinkDestination1 = + _registerName1("symbolicLinkDestination"); + late final _class_NSURLSession1 = _getClass1("NSURLSession"); + late final _sel_sharedSession1 = _registerName1("sharedSession"); + ffi.Pointer _objc_msgSend_1026( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1026( + obj, + sel, + ); + } + + late final __objc_msgSend_1026Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1026 = __objc_msgSend_1026Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionConfiguration1 = + _getClass1("NSURLSessionConfiguration"); + late final _sel_defaultSessionConfiguration1 = + _registerName1("defaultSessionConfiguration"); + ffi.Pointer _objc_msgSend_1027( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1027( + obj, + sel, + ); + } + + late final __objc_msgSend_1027Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1027 = __objc_msgSend_1027Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_ephemeralSessionConfiguration1 = + _registerName1("ephemeralSessionConfiguration"); + late final _sel_backgroundSessionConfigurationWithIdentifier_1 = + _registerName1("backgroundSessionConfigurationWithIdentifier:"); + ffi.Pointer _objc_msgSend_1028( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer identifier, + ) { + return __objc_msgSend_1028( + obj, + sel, + identifier, + ); + } + + late final __objc_msgSend_1028Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1028 = __objc_msgSend_1028Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_identifier1 = _registerName1("identifier"); + late final _sel_requestCachePolicy1 = _registerName1("requestCachePolicy"); + late final _sel_setRequestCachePolicy_1 = + _registerName1("setRequestCachePolicy:"); + late final _sel_timeoutIntervalForRequest1 = + _registerName1("timeoutIntervalForRequest"); + late final _sel_setTimeoutIntervalForRequest_1 = + _registerName1("setTimeoutIntervalForRequest:"); + late final _sel_timeoutIntervalForResource1 = + _registerName1("timeoutIntervalForResource"); + late final _sel_setTimeoutIntervalForResource_1 = + _registerName1("setTimeoutIntervalForResource:"); + late final _sel_waitsForConnectivity1 = + _registerName1("waitsForConnectivity"); + late final _sel_setWaitsForConnectivity_1 = + _registerName1("setWaitsForConnectivity:"); + late final _sel_isDiscretionary1 = _registerName1("isDiscretionary"); + late final _sel_setDiscretionary_1 = _registerName1("setDiscretionary:"); + late final _sel_sharedContainerIdentifier1 = + _registerName1("sharedContainerIdentifier"); + late final _sel_setSharedContainerIdentifier_1 = + _registerName1("setSharedContainerIdentifier:"); + late final _sel_sessionSendsLaunchEvents1 = + _registerName1("sessionSendsLaunchEvents"); + late final _sel_setSessionSendsLaunchEvents_1 = + _registerName1("setSessionSendsLaunchEvents:"); + late final _sel_connectionProxyDictionary1 = + _registerName1("connectionProxyDictionary"); + late final _sel_setConnectionProxyDictionary_1 = + _registerName1("setConnectionProxyDictionary:"); + late final _sel_TLSMinimumSupportedProtocol1 = + _registerName1("TLSMinimumSupportedProtocol"); + int _objc_msgSend_1029( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1029( + obj, + sel, + ); + } + + late final __objc_msgSend_1029Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1029 = __objc_msgSend_1029Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setTLSMinimumSupportedProtocol_1 = + _registerName1("setTLSMinimumSupportedProtocol:"); + void _objc_msgSend_1030( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_1030( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1030Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1030 = __objc_msgSend_1030Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_TLSMaximumSupportedProtocol1 = + _registerName1("TLSMaximumSupportedProtocol"); + late final _sel_setTLSMaximumSupportedProtocol_1 = + _registerName1("setTLSMaximumSupportedProtocol:"); + late final _sel_TLSMinimumSupportedProtocolVersion1 = + _registerName1("TLSMinimumSupportedProtocolVersion"); + int _objc_msgSend_1031( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1031( + obj, + sel, + ); + } + + late final __objc_msgSend_1031Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1031 = __objc_msgSend_1031Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setTLSMinimumSupportedProtocolVersion_1 = + _registerName1("setTLSMinimumSupportedProtocolVersion:"); + void _objc_msgSend_1032( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_1032( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1032Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1032 = __objc_msgSend_1032Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_TLSMaximumSupportedProtocolVersion1 = + _registerName1("TLSMaximumSupportedProtocolVersion"); + late final _sel_setTLSMaximumSupportedProtocolVersion_1 = + _registerName1("setTLSMaximumSupportedProtocolVersion:"); + late final _sel_HTTPShouldSetCookies1 = + _registerName1("HTTPShouldSetCookies"); + late final _sel_setHTTPShouldSetCookies_1 = + _registerName1("setHTTPShouldSetCookies:"); + late final _sel_HTTPCookieAcceptPolicy1 = + _registerName1("HTTPCookieAcceptPolicy"); + late final _sel_setHTTPCookieAcceptPolicy_1 = + _registerName1("setHTTPCookieAcceptPolicy:"); + late final _sel_HTTPAdditionalHeaders1 = + _registerName1("HTTPAdditionalHeaders"); + late final _sel_setHTTPAdditionalHeaders_1 = + _registerName1("setHTTPAdditionalHeaders:"); + late final _sel_HTTPMaximumConnectionsPerHost1 = + _registerName1("HTTPMaximumConnectionsPerHost"); + late final _sel_setHTTPMaximumConnectionsPerHost_1 = + _registerName1("setHTTPMaximumConnectionsPerHost:"); + late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); + ffi.Pointer _objc_msgSend_1033( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1033( + obj, + sel, + ); + } + + late final __objc_msgSend_1033Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1033 = __objc_msgSend_1033Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setHTTPCookieStorage_1 = + _registerName1("setHTTPCookieStorage:"); + void _objc_msgSend_1034( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_1034( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1034Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1034 = __objc_msgSend_1034Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_URLCredentialStorage1 = + _registerName1("URLCredentialStorage"); + ffi.Pointer _objc_msgSend_1035( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1035( + obj, + sel, + ); + } + + late final __objc_msgSend_1035Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1035 = __objc_msgSend_1035Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setURLCredentialStorage_1 = + _registerName1("setURLCredentialStorage:"); + void _objc_msgSend_1036( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_1036( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1036Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1036 = __objc_msgSend_1036Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_URLCache1 = _registerName1("URLCache"); + ffi.Pointer _objc_msgSend_1037( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1037( + obj, + sel, + ); + } + + late final __objc_msgSend_1037Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1037 = __objc_msgSend_1037Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setURLCache_1 = _registerName1("setURLCache:"); + void _objc_msgSend_1038( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_1038( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1038Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1038 = __objc_msgSend_1038Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_shouldUseExtendedBackgroundIdleMode1 = + _registerName1("shouldUseExtendedBackgroundIdleMode"); + late final _sel_setShouldUseExtendedBackgroundIdleMode_1 = + _registerName1("setShouldUseExtendedBackgroundIdleMode:"); + late final _sel_protocolClasses1 = _registerName1("protocolClasses"); + late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); + void _objc_msgSend_1039( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_1039( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1039Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1039 = __objc_msgSend_1039Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_multipathServiceType1 = + _registerName1("multipathServiceType"); + int _objc_msgSend_1040( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1040( + obj, + sel, + ); + } + + late final __objc_msgSend_1040Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1040 = __objc_msgSend_1040Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setMultipathServiceType_1 = + _registerName1("setMultipathServiceType:"); + void _objc_msgSend_1041( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_1041( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1041Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1041 = __objc_msgSend_1041Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_backgroundSessionConfiguration_1 = + _registerName1("backgroundSessionConfiguration:"); + late final _sel_sessionWithConfiguration_1 = + _registerName1("sessionWithConfiguration:"); + ffi.Pointer _objc_msgSend_1042( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer configuration, + ) { + return __objc_msgSend_1042( + obj, + sel, + configuration, + ); + } + + late final __objc_msgSend_1042Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1042 = __objc_msgSend_1042Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = + _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); + ffi.Pointer _objc_msgSend_1043( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer configuration, + ffi.Pointer delegate, + ffi.Pointer queue, + ) { + return __objc_msgSend_1043( + obj, + sel, + configuration, + delegate, + queue, + ); + } + + late final __objc_msgSend_1043Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1043 = __objc_msgSend_1043Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_delegateQueue1 = _registerName1("delegateQueue"); + late final _sel_configuration1 = _registerName1("configuration"); + late final _sel_sessionDescription1 = _registerName1("sessionDescription"); + late final _sel_setSessionDescription_1 = + _registerName1("setSessionDescription:"); + late final _sel_finishTasksAndInvalidate1 = + _registerName1("finishTasksAndInvalidate"); + late final _sel_invalidateAndCancel1 = _registerName1("invalidateAndCancel"); + late final _sel_resetWithCompletionHandler_1 = + _registerName1("resetWithCompletionHandler:"); + late final _sel_flushWithCompletionHandler_1 = + _registerName1("flushWithCompletionHandler:"); + late final _sel_getTasksWithCompletionHandler_1 = + _registerName1("getTasksWithCompletionHandler:"); + void _objc_msgSend_1044( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1044( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_1044Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1044 = __objc_msgSend_1044Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_getAllTasksWithCompletionHandler_1 = + _registerName1("getAllTasksWithCompletionHandler:"); + void _objc_msgSend_1045( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1045( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_1045Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1045 = __objc_msgSend_1045Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_dataTaskWithRequest_1 = + _registerName1("dataTaskWithRequest:"); + ffi.Pointer _objc_msgSend_1046( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_1046( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_1046Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1046 = __objc_msgSend_1046Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); + ffi.Pointer _objc_msgSend_1047( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_1047( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_1047Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1047 = __objc_msgSend_1047Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionUploadTask1 = + _getClass1("NSURLSessionUploadTask"); + late final _sel_uploadTaskWithRequest_fromFile_1 = + _registerName1("uploadTaskWithRequest:fromFile:"); + ffi.Pointer _objc_msgSend_1048( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer fileURL, + ) { + return __objc_msgSend_1048( + obj, + sel, + request, + fileURL, + ); + } + + late final __objc_msgSend_1048Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1048 = __objc_msgSend_1048Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_uploadTaskWithRequest_fromData_1 = + _registerName1("uploadTaskWithRequest:fromData:"); + ffi.Pointer _objc_msgSend_1049( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer bodyData, + ) { + return __objc_msgSend_1049( + obj, + sel, + request, + bodyData, + ); + } + + late final __objc_msgSend_1049Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1049 = __objc_msgSend_1049Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_uploadTaskWithStreamedRequest_1 = + _registerName1("uploadTaskWithStreamedRequest:"); + ffi.Pointer _objc_msgSend_1050( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_1050( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_1050Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1050 = __objc_msgSend_1050Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionDownloadTask1 = + _getClass1("NSURLSessionDownloadTask"); + late final _sel_cancelByProducingResumeData_1 = + _registerName1("cancelByProducingResumeData:"); + void _objc_msgSend_1051( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1051( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_1051Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1051 = __objc_msgSend_1051Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_downloadTaskWithRequest_1 = + _registerName1("downloadTaskWithRequest:"); + ffi.Pointer _objc_msgSend_1052( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_1052( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_1052Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1052 = __objc_msgSend_1052Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_downloadTaskWithURL_1 = + _registerName1("downloadTaskWithURL:"); + ffi.Pointer _objc_msgSend_1053( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_1053( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_1053Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1053 = __objc_msgSend_1053Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_downloadTaskWithResumeData_1 = + _registerName1("downloadTaskWithResumeData:"); + ffi.Pointer _objc_msgSend_1054( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer resumeData, + ) { + return __objc_msgSend_1054( + obj, + sel, + resumeData, + ); + } + + late final __objc_msgSend_1054Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1054 = __objc_msgSend_1054Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionStreamTask1 = + _getClass1("NSURLSessionStreamTask"); + late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = + _registerName1( + "readDataOfMinLength:maxLength:timeout:completionHandler:"); + void _objc_msgSend_1055( + ffi.Pointer obj, + ffi.Pointer sel, + int minBytes, + int maxBytes, + double timeout, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1055( + obj, + sel, + minBytes, + maxBytes, + timeout, + completionHandler, + ); + } + + late final __objc_msgSend_1055Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Double, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1055 = __objc_msgSend_1055Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int, + double, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_writeData_timeout_completionHandler_1 = + _registerName1("writeData:timeout:completionHandler:"); + void _objc_msgSend_1056( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + double timeout, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1056( + obj, + sel, + data, + timeout, + completionHandler, + ); + } + + late final __objc_msgSend_1056Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1056 = __objc_msgSend_1056Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_captureStreams1 = _registerName1("captureStreams"); + late final _sel_closeWrite1 = _registerName1("closeWrite"); + late final _sel_closeRead1 = _registerName1("closeRead"); + late final _sel_startSecureConnection1 = + _registerName1("startSecureConnection"); + late final _sel_stopSecureConnection1 = + _registerName1("stopSecureConnection"); + late final _sel_streamTaskWithHostName_port_1 = + _registerName1("streamTaskWithHostName:port:"); + ffi.Pointer _objc_msgSend_1057( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer hostname, + int port, + ) { + return __objc_msgSend_1057( + obj, + sel, + hostname, + port, + ); + } + + late final __objc_msgSend_1057Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_1057 = __objc_msgSend_1057Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _class_NSNetService1 = _getClass1("NSNetService"); + late final _sel_initWithDomain_type_name_port_1 = + _registerName1("initWithDomain:type:name:port:"); + instancetype _objc_msgSend_1058( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer domain, + ffi.Pointer type, + ffi.Pointer name, + int port, + ) { + return __objc_msgSend_1058( + obj, + sel, + domain, + type, + name, + port, + ); + } + + late final __objc_msgSend_1058Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>>('objc_msgSend'); + late final __objc_msgSend_1058 = __objc_msgSend_1058Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + + late final _sel_initWithDomain_type_name_1 = + _registerName1("initWithDomain:type:name:"); + instancetype _objc_msgSend_1059( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer domain, + ffi.Pointer type, + ffi.Pointer name, + ) { + return __objc_msgSend_1059( + obj, + sel, + domain, + type, + name, + ); + } + + late final __objc_msgSend_1059Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1059 = __objc_msgSend_1059Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_includesPeerToPeer1 = _registerName1("includesPeerToPeer"); + late final _sel_setIncludesPeerToPeer_1 = + _registerName1("setIncludesPeerToPeer:"); + late final _sel_type1 = _registerName1("type"); + late final _sel_publishWithOptions_1 = _registerName1("publishWithOptions:"); + void _objc_msgSend_1060( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ) { + return __objc_msgSend_1060( + obj, + sel, + options, + ); + } + + late final __objc_msgSend_1060Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1060 = __objc_msgSend_1060Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_resolve1 = _registerName1("resolve"); + late final _sel_stop1 = _registerName1("stop"); + late final _sel_dictionaryFromTXTRecordData_1 = + _registerName1("dictionaryFromTXTRecordData:"); + ffi.Pointer _objc_msgSend_1061( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer txtData, + ) { + return __objc_msgSend_1061( + obj, + sel, + txtData, + ); + } + + late final __objc_msgSend_1061Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1061 = __objc_msgSend_1061Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dataFromTXTRecordDictionary_1 = + _registerName1("dataFromTXTRecordDictionary:"); + ffi.Pointer _objc_msgSend_1062( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer txtDictionary, + ) { + return __objc_msgSend_1062( + obj, + sel, + txtDictionary, + ); + } + + late final __objc_msgSend_1062Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1062 = __objc_msgSend_1062Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_resolveWithTimeout_1 = _registerName1("resolveWithTimeout:"); + late final _sel_getInputStream_outputStream_1 = + _registerName1("getInputStream:outputStream:"); + bool _objc_msgSend_1063( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream, + ) { + return __objc_msgSend_1063( + obj, + sel, + inputStream, + outputStream, + ); + } + + late final __objc_msgSend_1063Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_1063 = __objc_msgSend_1063Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _sel_setTXTRecordData_1 = _registerName1("setTXTRecordData:"); + bool _objc_msgSend_1064( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer recordData, + ) { + return __objc_msgSend_1064( + obj, + sel, + recordData, + ); + } + + late final __objc_msgSend_1064Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1064 = __objc_msgSend_1064Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_TXTRecordData1 = _registerName1("TXTRecordData"); + late final _sel_startMonitoring1 = _registerName1("startMonitoring"); + late final _sel_stopMonitoring1 = _registerName1("stopMonitoring"); + late final _sel_streamTaskWithNetService_1 = + _registerName1("streamTaskWithNetService:"); + ffi.Pointer _objc_msgSend_1065( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer service, + ) { + return __objc_msgSend_1065( + obj, + sel, + service, + ); + } + + late final __objc_msgSend_1065Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1065 = __objc_msgSend_1065Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionWebSocketTask1 = + _getClass1("NSURLSessionWebSocketTask"); + late final _class_NSURLSessionWebSocketMessage1 = + _getClass1("NSURLSessionWebSocketMessage"); + int _objc_msgSend_1066( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1066( + obj, + sel, + ); + } + + late final __objc_msgSend_1066Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1066 = __objc_msgSend_1066Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_sendMessage_completionHandler_1 = + _registerName1("sendMessage:completionHandler:"); + void _objc_msgSend_1067( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer message, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1067( + obj, + sel, + message, + completionHandler, + ); + } + + late final __objc_msgSend_1067Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1067 = __objc_msgSend_1067Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_receiveMessageWithCompletionHandler_1 = + _registerName1("receiveMessageWithCompletionHandler:"); + void _objc_msgSend_1068( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1068( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_1068Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1068 = __objc_msgSend_1068Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_sendPingWithPongReceiveHandler_1 = + _registerName1("sendPingWithPongReceiveHandler:"); + void _objc_msgSend_1069( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> pongReceiveHandler, + ) { + return __objc_msgSend_1069( + obj, + sel, + pongReceiveHandler, + ); + } + + late final __objc_msgSend_1069Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1069 = __objc_msgSend_1069Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_cancelWithCloseCode_reason_1 = + _registerName1("cancelWithCloseCode:reason:"); + void _objc_msgSend_1070( + ffi.Pointer obj, + ffi.Pointer sel, + int closeCode, + ffi.Pointer reason, + ) { + return __objc_msgSend_1070( + obj, + sel, + closeCode, + reason, + ); + } + + late final __objc_msgSend_1070Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1070 = __objc_msgSend_1070Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _sel_maximumMessageSize1 = _registerName1("maximumMessageSize"); + late final _sel_setMaximumMessageSize_1 = + _registerName1("setMaximumMessageSize:"); + late final _sel_closeCode1 = _registerName1("closeCode"); + int _objc_msgSend_1071( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1071( + obj, + sel, + ); + } + + late final __objc_msgSend_1071Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1071 = __objc_msgSend_1071Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_closeReason1 = _registerName1("closeReason"); + late final _sel_webSocketTaskWithURL_1 = + _registerName1("webSocketTaskWithURL:"); + ffi.Pointer _objc_msgSend_1072( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_1072( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_1072Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1072 = __objc_msgSend_1072Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_webSocketTaskWithURL_protocols_1 = + _registerName1("webSocketTaskWithURL:protocols:"); + ffi.Pointer _objc_msgSend_1073( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer protocols, + ) { + return __objc_msgSend_1073( + obj, + sel, + url, + protocols, + ); + } + + late final __objc_msgSend_1073Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1073 = __objc_msgSend_1073Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_webSocketTaskWithRequest_1 = + _registerName1("webSocketTaskWithRequest:"); + ffi.Pointer _objc_msgSend_1074( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_1074( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_1074Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1074 = __objc_msgSend_1074Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dataTaskWithRequest_completionHandler_1 = + _registerName1("dataTaskWithRequest:completionHandler:"); + ffi.Pointer _objc_msgSend_1075( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1075( + obj, + sel, + request, + completionHandler, + ); + } + + late final __objc_msgSend_1075Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1075 = __objc_msgSend_1075Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_dataTaskWithURL_completionHandler_1 = + _registerName1("dataTaskWithURL:completionHandler:"); + ffi.Pointer _objc_msgSend_1076( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1076( + obj, + sel, + url, + completionHandler, + ); + } + + late final __objc_msgSend_1076Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1076 = __objc_msgSend_1076Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = + _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); + ffi.Pointer _objc_msgSend_1077( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer fileURL, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1077( + obj, + sel, + request, + fileURL, + completionHandler, + ); + } + + late final __objc_msgSend_1077Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1077 = __objc_msgSend_1077Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = + _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); + ffi.Pointer _objc_msgSend_1078( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer bodyData, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1078( + obj, + sel, + request, + bodyData, + completionHandler, + ); + } + + late final __objc_msgSend_1078Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1078 = __objc_msgSend_1078Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_downloadTaskWithRequest_completionHandler_1 = + _registerName1("downloadTaskWithRequest:completionHandler:"); + ffi.Pointer _objc_msgSend_1079( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1079( + obj, + sel, + request, + completionHandler, + ); + } + + late final __objc_msgSend_1079Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1079 = __objc_msgSend_1079Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_downloadTaskWithURL_completionHandler_1 = + _registerName1("downloadTaskWithURL:completionHandler:"); + ffi.Pointer _objc_msgSend_1080( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1080( + obj, + sel, + url, + completionHandler, + ); + } + + late final __objc_msgSend_1080Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1080 = __objc_msgSend_1080Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_downloadTaskWithResumeData_completionHandler_1 = + _registerName1("downloadTaskWithResumeData:completionHandler:"); + ffi.Pointer _objc_msgSend_1081( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer resumeData, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_1081( + obj, + sel, + resumeData, + completionHandler, + ); + } + + late final __objc_msgSend_1081Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1081 = __objc_msgSend_1081Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _class_NSProtocolChecker1 = _getClass1("NSProtocolChecker"); + ffi.Pointer _objc_msgSend_1082( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1082( + obj, + sel, + ); + } + + late final __objc_msgSend_1082Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1082 = __objc_msgSend_1082Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_protocolCheckerWithTarget_protocol_1 = + _registerName1("protocolCheckerWithTarget:protocol:"); + instancetype _objc_msgSend_1083( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ffi.Pointer aProtocol, + ) { + return __objc_msgSend_1083( + obj, + sel, + anObject, + aProtocol, + ); + } + + late final __objc_msgSend_1083Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1083 = __objc_msgSend_1083Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithTarget_protocol_1 = + _registerName1("initWithTarget:protocol:"); + late final _class_NSTask1 = _getClass1("NSTask"); + late final _sel_setExecutableURL_1 = _registerName1("setExecutableURL:"); + late final _sel_setEnvironment_1 = _registerName1("setEnvironment:"); + late final _sel_currentDirectoryURL1 = _registerName1("currentDirectoryURL"); + late final _sel_setCurrentDirectoryURL_1 = + _registerName1("setCurrentDirectoryURL:"); + late final _sel_standardInput1 = _registerName1("standardInput"); + late final _sel_setStandardInput_1 = _registerName1("setStandardInput:"); + late final _sel_standardOutput1 = _registerName1("standardOutput"); + late final _sel_setStandardOutput_1 = _registerName1("setStandardOutput:"); + late final _sel_standardError1 = _registerName1("standardError"); + late final _sel_setStandardError_1 = _registerName1("setStandardError:"); + late final _sel_launchAndReturnError_1 = + _registerName1("launchAndReturnError:"); + late final _sel_interrupt1 = _registerName1("interrupt"); + late final _sel_terminate1 = _registerName1("terminate"); + late final _sel_isRunning1 = _registerName1("isRunning"); + late final _sel_terminationStatus1 = _registerName1("terminationStatus"); + late final _sel_terminationReason1 = _registerName1("terminationReason"); + int _objc_msgSend_1084( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1084( + obj, + sel, + ); + } + + late final __objc_msgSend_1084Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1084 = __objc_msgSend_1084Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_terminationHandler1 = _registerName1("terminationHandler"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_1085( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1085( + obj, + sel, + ); + } + + late final __objc_msgSend_1085Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1085 = __objc_msgSend_1085Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setTerminationHandler_1 = + _registerName1("setTerminationHandler:"); + void _objc_msgSend_1086( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> value, + ) { + return __objc_msgSend_1086( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1086Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1086 = __objc_msgSend_1086Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_1 = + _registerName1( + "launchedTaskWithExecutableURL:arguments:error:terminationHandler:"); + ffi.Pointer _objc_msgSend_1087( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer arguments, + ffi.Pointer> error, + ffi.Pointer<_ObjCBlock> terminationHandler, + ) { + return __objc_msgSend_1087( + obj, + sel, + url, + arguments, + error, + terminationHandler, + ); + } + + late final __objc_msgSend_1087Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_1087 = __objc_msgSend_1087Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_waitUntilExit1 = _registerName1("waitUntilExit"); + late final _sel_launchPath1 = _registerName1("launchPath"); + late final _sel_setLaunchPath_1 = _registerName1("setLaunchPath:"); + late final _sel_setCurrentDirectoryPath_1 = + _registerName1("setCurrentDirectoryPath:"); + late final _sel_launch1 = _registerName1("launch"); + late final _sel_launchedTaskWithLaunchPath_arguments_1 = + _registerName1("launchedTaskWithLaunchPath:arguments:"); + ffi.Pointer _objc_msgSend_1088( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer arguments, + ) { + return __objc_msgSend_1088( + obj, + sel, + path, + arguments, + ); + } + + late final __objc_msgSend_1088Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1088 = __objc_msgSend_1088Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSXMLElement1 = _getClass1("NSXMLElement"); + late final _class_NSXMLNode1 = _getClass1("NSXMLNode"); + late final _sel_initWithKind_1 = _registerName1("initWithKind:"); + instancetype _objc_msgSend_1089( + ffi.Pointer obj, + ffi.Pointer sel, + int kind, + ) { + return __objc_msgSend_1089( + obj, + sel, + kind, + ); + } + + late final __objc_msgSend_1089Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1089 = __objc_msgSend_1089Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithKind_options_1 = + _registerName1("initWithKind:options:"); + instancetype _objc_msgSend_1090( + ffi.Pointer obj, + ffi.Pointer sel, + int kind, + int options, + ) { + return __objc_msgSend_1090( + obj, + sel, + kind, + options, + ); + } + + late final __objc_msgSend_1090Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1090 = __objc_msgSend_1090Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, int, int)>(); + + late final _sel_document1 = _registerName1("document"); + late final _sel_documentWithRootElement_1 = + _registerName1("documentWithRootElement:"); + ffi.Pointer _objc_msgSend_1091( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer element, + ) { + return __objc_msgSend_1091( + obj, + sel, + element, + ); + } + + late final __objc_msgSend_1091Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1091 = __objc_msgSend_1091Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_elementWithName_1 = _registerName1("elementWithName:"); + late final _sel_elementWithName_URI_1 = + _registerName1("elementWithName:URI:"); + ffi.Pointer _objc_msgSend_1092( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer URI, + ) { + return __objc_msgSend_1092( + obj, + sel, + name, + URI, + ); + } + + late final __objc_msgSend_1092Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1092 = __objc_msgSend_1092Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_elementWithName_stringValue_1 = + _registerName1("elementWithName:stringValue:"); + late final _sel_elementWithName_children_attributes_1 = + _registerName1("elementWithName:children:attributes:"); + ffi.Pointer _objc_msgSend_1093( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer children, + ffi.Pointer attributes, + ) { + return __objc_msgSend_1093( + obj, + sel, + name, + children, + attributes, + ); + } + + late final __objc_msgSend_1093Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1093 = __objc_msgSend_1093Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_attributeWithName_stringValue_1 = + _registerName1("attributeWithName:stringValue:"); + late final _sel_attributeWithName_URI_stringValue_1 = + _registerName1("attributeWithName:URI:stringValue:"); + late final _sel_namespaceWithName_stringValue_1 = + _registerName1("namespaceWithName:stringValue:"); + late final _sel_processingInstructionWithName_stringValue_1 = + _registerName1("processingInstructionWithName:stringValue:"); + late final _sel_commentWithStringValue_1 = + _registerName1("commentWithStringValue:"); + late final _sel_textWithStringValue_1 = + _registerName1("textWithStringValue:"); + late final _sel_DTDNodeWithXMLString_1 = + _registerName1("DTDNodeWithXMLString:"); + int _objc_msgSend_1094( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1094( + obj, + sel, + ); + } + + late final __objc_msgSend_1094Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1094 = __objc_msgSend_1094Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_objectValue1 = _registerName1("objectValue"); + late final _sel_setObjectValue_1 = _registerName1("setObjectValue:"); + late final _sel_setStringValue_1 = _registerName1("setStringValue:"); + late final _sel_setStringValue_resolvingEntities_1 = + _registerName1("setStringValue:resolvingEntities:"); + void _objc_msgSend_1095( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + bool resolve, + ) { + return __objc_msgSend_1095( + obj, + sel, + string, + resolve, + ); + } + + late final __objc_msgSend_1095Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_1095 = __objc_msgSend_1095Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_index1 = _registerName1("index"); + late final _sel_level1 = _registerName1("level"); + late final _class_NSXMLDocument1 = _getClass1("NSXMLDocument"); + late final _sel_initWithXMLString_options_error_1 = + _registerName1("initWithXMLString:options:error:"); + instancetype _objc_msgSend_1096( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int mask, + ffi.Pointer> error, + ) { + return __objc_msgSend_1096( + obj, + sel, + string, + mask, + error, + ); + } + + late final __objc_msgSend_1096Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_1096 = __objc_msgSend_1096Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + instancetype _objc_msgSend_1097( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int mask, + ffi.Pointer> error, + ) { + return __objc_msgSend_1097( + obj, + sel, + url, + mask, + error, + ); + } + + late final __objc_msgSend_1097Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_1097 = __objc_msgSend_1097Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_initWithData_options_error_1 = + _registerName1("initWithData:options:error:"); + instancetype _objc_msgSend_1098( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + int mask, + ffi.Pointer> error, + ) { + return __objc_msgSend_1098( + obj, + sel, + data, + mask, + error, + ); + } + + late final __objc_msgSend_1098Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_1098 = __objc_msgSend_1098Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_initWithRootElement_1 = + _registerName1("initWithRootElement:"); + instancetype _objc_msgSend_1099( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer element, + ) { + return __objc_msgSend_1099( + obj, + sel, + element, + ); + } + + late final __objc_msgSend_1099Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1099 = __objc_msgSend_1099Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_replacementClassForClass_1 = + _registerName1("replacementClassForClass:"); + late final _sel_characterEncoding1 = _registerName1("characterEncoding"); + late final _sel_setCharacterEncoding_1 = + _registerName1("setCharacterEncoding:"); + late final _sel_isStandalone1 = _registerName1("isStandalone"); + late final _sel_setStandalone_1 = _registerName1("setStandalone:"); + late final _sel_documentContentKind1 = _registerName1("documentContentKind"); + int _objc_msgSend_1100( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1100( + obj, + sel, + ); + } + + late final __objc_msgSend_1100Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1100 = __objc_msgSend_1100Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setDocumentContentKind_1 = + _registerName1("setDocumentContentKind:"); + void _objc_msgSend_1101( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_1101( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1101Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1101 = __objc_msgSend_1101Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_setMIMEType_1 = _registerName1("setMIMEType:"); + late final _class_NSXMLDTD1 = _getClass1("NSXMLDTD"); + late final _sel_setPublicID_1 = _registerName1("setPublicID:"); + late final _sel_setSystemID_1 = _registerName1("setSystemID:"); + late final _sel_insertChild_atIndex_1 = + _registerName1("insertChild:atIndex:"); + void _objc_msgSend_1102( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer child, + int index, + ) { + return __objc_msgSend_1102( + obj, + sel, + child, + index, + ); + } + + late final __objc_msgSend_1102Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_1102 = __objc_msgSend_1102Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_insertChildren_atIndex_1 = + _registerName1("insertChildren:atIndex:"); + void _objc_msgSend_1103( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer children, + int index, + ) { + return __objc_msgSend_1103( + obj, + sel, + children, + index, + ); + } + + late final __objc_msgSend_1103Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_1103 = __objc_msgSend_1103Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_removeChildAtIndex_1 = _registerName1("removeChildAtIndex:"); + late final _sel_setChildren_1 = _registerName1("setChildren:"); + late final _sel_addChild_1 = _registerName1("addChild:"); + void _objc_msgSend_1104( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer child, + ) { + return __objc_msgSend_1104( + obj, + sel, + child, + ); + } + + late final __objc_msgSend_1104Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1104 = __objc_msgSend_1104Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_replaceChildAtIndex_withNode_1 = + _registerName1("replaceChildAtIndex:withNode:"); + void _objc_msgSend_1105( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ffi.Pointer node, + ) { + return __objc_msgSend_1105( + obj, + sel, + index, + node, + ); + } + + late final __objc_msgSend_1105Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1105 = __objc_msgSend_1105Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _class_NSXMLDTDNode1 = _getClass1("NSXMLDTDNode"); + late final _sel_initWithXMLString_1 = _registerName1("initWithXMLString:"); + late final _sel_DTDKind1 = _registerName1("DTDKind"); + int _objc_msgSend_1106( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1106( + obj, + sel, + ); + } + + late final __objc_msgSend_1106Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1106 = __objc_msgSend_1106Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setDTDKind_1 = _registerName1("setDTDKind:"); + void _objc_msgSend_1107( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_1107( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1107Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1107 = __objc_msgSend_1107Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_isExternal1 = _registerName1("isExternal"); + late final _sel_notationName1 = _registerName1("notationName"); + late final _sel_setNotationName_1 = _registerName1("setNotationName:"); + late final _sel_localNameForName_1 = _registerName1("localNameForName:"); + late final _sel_prefixForName_1 = _registerName1("prefixForName:"); + late final _sel_predefinedNamespaceForPrefix_1 = + _registerName1("predefinedNamespaceForPrefix:"); + ffi.Pointer _objc_msgSend_1108( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ) { + return __objc_msgSend_1108( + obj, + sel, + name, + ); + } + + late final __objc_msgSend_1108Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1108 = __objc_msgSend_1108Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_entityDeclarationForName_1 = + _registerName1("entityDeclarationForName:"); + ffi.Pointer _objc_msgSend_1109( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ) { + return __objc_msgSend_1109( + obj, + sel, + name, + ); + } + + late final __objc_msgSend_1109Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1109 = __objc_msgSend_1109Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_notationDeclarationForName_1 = + _registerName1("notationDeclarationForName:"); + late final _sel_elementDeclarationForName_1 = + _registerName1("elementDeclarationForName:"); + late final _sel_attributeDeclarationForName_elementName_1 = + _registerName1("attributeDeclarationForName:elementName:"); + ffi.Pointer _objc_msgSend_1110( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer elementName, + ) { + return __objc_msgSend_1110( + obj, + sel, + name, + elementName, + ); + } + + late final __objc_msgSend_1110Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1110 = __objc_msgSend_1110Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_predefinedEntityDeclarationForName_1 = + _registerName1("predefinedEntityDeclarationForName:"); + late final _sel_DTD1 = _registerName1("DTD"); + ffi.Pointer _objc_msgSend_1111( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1111( + obj, + sel, + ); + } + + late final __objc_msgSend_1111Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1111 = __objc_msgSend_1111Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setDTD_1 = _registerName1("setDTD:"); + void _objc_msgSend_1112( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_1112( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1112Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1112 = __objc_msgSend_1112Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setRootElement_1 = _registerName1("setRootElement:"); + void _objc_msgSend_1113( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer root, + ) { + return __objc_msgSend_1113( + obj, + sel, + root, + ); + } + + late final __objc_msgSend_1113Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1113 = __objc_msgSend_1113Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_rootElement1 = _registerName1("rootElement"); + ffi.Pointer _objc_msgSend_1114( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1114( + obj, + sel, + ); + } + + late final __objc_msgSend_1114Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1114 = __objc_msgSend_1114Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_XMLData1 = _registerName1("XMLData"); + late final _sel_XMLDataWithOptions_1 = _registerName1("XMLDataWithOptions:"); + ffi.Pointer _objc_msgSend_1115( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ) { + return __objc_msgSend_1115( + obj, + sel, + options, + ); + } + + late final __objc_msgSend_1115Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1115 = __objc_msgSend_1115Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_objectByApplyingXSLT_arguments_error_1 = + _registerName1("objectByApplyingXSLT:arguments:error:"); + ffi.Pointer _objc_msgSend_1116( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer xslt, + ffi.Pointer arguments, + ffi.Pointer> error, + ) { + return __objc_msgSend_1116( + obj, + sel, + xslt, + arguments, + error, + ); + } + + late final __objc_msgSend_1116Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_1116 = __objc_msgSend_1116Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_objectByApplyingXSLTString_arguments_error_1 = + _registerName1("objectByApplyingXSLTString:arguments:error:"); + ffi.Pointer _objc_msgSend_1117( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer xslt, + ffi.Pointer arguments, + ffi.Pointer> error, + ) { + return __objc_msgSend_1117( + obj, + sel, + xslt, + arguments, + error, + ); + } + + late final __objc_msgSend_1117Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_1117 = __objc_msgSend_1117Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_objectByApplyingXSLTAtURL_arguments_error_1 = + _registerName1("objectByApplyingXSLTAtURL:arguments:error:"); + ffi.Pointer _objc_msgSend_1118( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer xsltURL, + ffi.Pointer argument, + ffi.Pointer> error, + ) { + return __objc_msgSend_1118( + obj, + sel, + xsltURL, + argument, + error, + ); + } + + late final __objc_msgSend_1118Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_1118 = __objc_msgSend_1118Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_validateAndReturnError_1 = + _registerName1("validateAndReturnError:"); + late final _sel_rootDocument1 = _registerName1("rootDocument"); + ffi.Pointer _objc_msgSend_1119( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1119( + obj, + sel, + ); + } + + late final __objc_msgSend_1119Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1119 = __objc_msgSend_1119Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_parent1 = _registerName1("parent"); + ffi.Pointer _objc_msgSend_1120( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1120( + obj, + sel, + ); + } + + late final __objc_msgSend_1120Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1120 = __objc_msgSend_1120Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_childCount1 = _registerName1("childCount"); + late final _sel_children1 = _registerName1("children"); + late final _sel_childAtIndex_1 = _registerName1("childAtIndex:"); + ffi.Pointer _objc_msgSend_1121( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_1121( + obj, + sel, + index, + ); + } + + late final __objc_msgSend_1121Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_1121 = __objc_msgSend_1121Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_previousSibling1 = _registerName1("previousSibling"); + late final _sel_nextSibling1 = _registerName1("nextSibling"); + late final _sel_previousNode1 = _registerName1("previousNode"); + late final _sel_nextNode1 = _registerName1("nextNode"); + late final _sel_detach1 = _registerName1("detach"); + late final _sel_XPath1 = _registerName1("XPath"); + late final _sel_localName1 = _registerName1("localName"); + late final _sel_prefix1 = _registerName1("prefix"); + late final _sel_URI1 = _registerName1("URI"); + late final _sel_setURI_1 = _registerName1("setURI:"); + late final _sel_XMLString1 = _registerName1("XMLString"); + late final _sel_XMLStringWithOptions_1 = + _registerName1("XMLStringWithOptions:"); + ffi.Pointer _objc_msgSend_1122( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ) { + return __objc_msgSend_1122( + obj, + sel, + options, + ); + } + + late final __objc_msgSend_1122Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_1122 = __objc_msgSend_1122Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_canonicalXMLStringPreservingComments_1 = + _registerName1("canonicalXMLStringPreservingComments:"); + ffi.Pointer _objc_msgSend_1123( + ffi.Pointer obj, + ffi.Pointer sel, + bool comments, + ) { + return __objc_msgSend_1123( + obj, + sel, + comments, + ); + } + + late final __objc_msgSend_1123Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_1123 = __objc_msgSend_1123Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_nodesForXPath_error_1 = + _registerName1("nodesForXPath:error:"); + late final _sel_objectsForXQuery_constants_error_1 = + _registerName1("objectsForXQuery:constants:error:"); + ffi.Pointer _objc_msgSend_1124( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer xquery, + ffi.Pointer constants, + ffi.Pointer> error, + ) { + return __objc_msgSend_1124( + obj, + sel, + xquery, + constants, + error, + ); + } + + late final __objc_msgSend_1124Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_1124 = __objc_msgSend_1124Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_objectsForXQuery_error_1 = + _registerName1("objectsForXQuery:error:"); + late final _sel_initWithName_URI_1 = _registerName1("initWithName:URI:"); + instancetype _objc_msgSend_1125( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer URI, + ) { + return __objc_msgSend_1125( + obj, + sel, + name, + URI, + ); + } + + late final __objc_msgSend_1125Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1125 = __objc_msgSend_1125Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithName_stringValue_1 = + _registerName1("initWithName:stringValue:"); + late final _sel_initWithXMLString_error_1 = + _registerName1("initWithXMLString:error:"); + late final _sel_elementsForName_1 = _registerName1("elementsForName:"); + late final _sel_elementsForLocalName_URI_1 = + _registerName1("elementsForLocalName:URI:"); + ffi.Pointer _objc_msgSend_1126( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer localName, + ffi.Pointer URI, + ) { + return __objc_msgSend_1126( + obj, + sel, + localName, + URI, + ); + } + + late final __objc_msgSend_1126Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1126 = __objc_msgSend_1126Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_addAttribute_1 = _registerName1("addAttribute:"); + late final _sel_removeAttributeForName_1 = + _registerName1("removeAttributeForName:"); + late final _sel_attributes1 = _registerName1("attributes"); + late final _sel_setAttributes_1 = _registerName1("setAttributes:"); + late final _sel_setAttributesWithDictionary_1 = + _registerName1("setAttributesWithDictionary:"); + late final _sel_attributeForName_1 = _registerName1("attributeForName:"); + late final _sel_attributeForLocalName_URI_1 = + _registerName1("attributeForLocalName:URI:"); + ffi.Pointer _objc_msgSend_1127( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer localName, + ffi.Pointer URI, + ) { + return __objc_msgSend_1127( + obj, + sel, + localName, + URI, + ); + } + + late final __objc_msgSend_1127Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1127 = __objc_msgSend_1127Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_addNamespace_1 = _registerName1("addNamespace:"); + late final _sel_removeNamespaceForPrefix_1 = + _registerName1("removeNamespaceForPrefix:"); + late final _sel_namespaces1 = _registerName1("namespaces"); + late final _sel_setNamespaces_1 = _registerName1("setNamespaces:"); + late final _sel_namespaceForPrefix_1 = _registerName1("namespaceForPrefix:"); + late final _sel_resolveNamespaceForName_1 = + _registerName1("resolveNamespaceForName:"); + late final _sel_resolvePrefixForNamespaceURI_1 = + _registerName1("resolvePrefixForNamespaceURI:"); + late final _sel_normalizeAdjacentTextNodesPreservingCDATA_1 = + _registerName1("normalizeAdjacentTextNodesPreservingCDATA:"); + late final _sel_setAttributesAsDictionary_1 = + _registerName1("setAttributesAsDictionary:"); + late final _class_ThermionDartTexture1 = + _getClass1("thermion_dart_texture.ThermionDartTexture"); + late final _sel_cvMetalTextureCache1 = _registerName1("cvMetalTextureCache"); + late final _sel_setCvMetalTextureCache_1 = + _registerName1("setCvMetalTextureCache:"); + void _objc_msgSend_1128( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_1128( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_1128Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('objc_msgSend'); + late final __objc_msgSend_1128 = __objc_msgSend_1128Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_cvMetalTexture1 = _registerName1("cvMetalTexture"); + late final _sel_setCvMetalTexture_1 = _registerName1("setCvMetalTexture:"); + late final _sel_metalTexture1 = _registerName1("metalTexture"); + late final _sel_setMetalTexture_1 = _registerName1("setMetalTexture:"); + late final _sel_metalDevice1 = _registerName1("metalDevice"); + late final _sel_setMetalDevice_1 = _registerName1("setMetalDevice:"); + late final _sel_metalTextureAddress1 = _registerName1("metalTextureAddress"); + late final _sel_setMetalTextureAddress_1 = + _registerName1("setMetalTextureAddress:"); + late final _sel_initWithWidth_height_1 = + _registerName1("initWithWidth:height:"); + instancetype _objc_msgSend_1129( + ffi.Pointer obj, + ffi.Pointer sel, + int width, + int height, + ) { + return __objc_msgSend_1129( + obj, + sel, + width, + height, + ); + } + + late final __objc_msgSend_1129Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Int64, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_1129 = __objc_msgSend_1129Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, int, int)>(); + + late final _sel_destroyTexture1 = _registerName1("destroyTexture"); +} + +class _ObjCWrapper implements ffi.Finalizable { + final ffi.Pointer _id; + final ThermionDartTexture1 _lib; + bool _pendingRelease; + + _ObjCWrapper._(this._id, this._lib, + {bool retain = false, bool release = false}) + : _pendingRelease = release { + if (retain) { + _lib._objc_retain(_id.cast()); + } + if (release) { + _lib._objc_releaseFinalizer2.attach(this, _id.cast(), detach: this); + } + } + + /// Releases the reference to the underlying ObjC object held by this wrapper. + /// Throws a StateError if this wrapper doesn't currently hold a reference. + void release() { + if (_pendingRelease) { + _pendingRelease = false; + _lib._objc_release(_id.cast()); + _lib._objc_releaseFinalizer2.detach(this); + } else { + throw StateError( + 'Released an ObjC object that was unowned or already released.'); + } + } + + @override + bool operator ==(Object other) { + return other is _ObjCWrapper && _id == other._id; + } + + @override + int get hashCode => _id.hashCode; + + /// Return a pointer to this object. + ffi.Pointer get pointer => _id; + + ffi.Pointer _retainAndReturnId() { + _lib._objc_retain(_id.cast()); + return _id; + } +} + +class NSObject extends _ObjCWrapper { + NSObject._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSObject] that points to the same underlying object as [other]. + static NSObject castFrom(T other) { + return NSObject._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSObject] that wraps the given raw object pointer. + static NSObject castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSObject._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSObject]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSObject1); + } + + static void load(ThermionDartTexture1 _lib) { + _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); + } + + static void initialize(ThermionDartTexture1 _lib) { + _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); + } + + NSObject init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_allocWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + void dealloc() { + _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); + } + + void finalize() { + _lib._objc_msgSend_1(_id, _lib._sel_finalize1); + } + + NSObject copy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + NSObject mutableCopy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject copyWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_copyWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject mutableCopyWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_mutableCopyWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static bool instancesRespondToSelector_( + ThermionDartTexture1 _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_4(_lib._class_NSObject1, + _lib._sel_instancesRespondToSelector_1, aSelector); + } + + static bool conformsToProtocol_( + ThermionDartTexture1 _lib, Protocol protocol) { + return _lib._objc_msgSend_5( + _lib._class_NSObject1, _lib._sel_conformsToProtocol_1, protocol._id); + } + + ffi.Pointer> methodForSelector_( + ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); + } + + static ffi.Pointer> + instanceMethodForSelector_( + ThermionDartTexture1 _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_lib._class_NSObject1, + _lib._sel_instanceMethodForSelector_1, aSelector); + } + + void doesNotRecognizeSelector_(ffi.Pointer aSelector) { + _lib._objc_msgSend_7(_id, _lib._sel_doesNotRecognizeSelector_1, aSelector); + } + + NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_8( + _id, _lib._sel_forwardingTargetForSelector_1, aSelector); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void forwardInvocation_(NSInvocation anInvocation) { + _lib._objc_msgSend_420( + _id, _lib._sel_forwardInvocation_1, anInvocation._id); + } + + NSMethodSignature methodSignatureForSelector_( + ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_421( + _id, _lib._sel_methodSignatureForSelector_1, aSelector); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); + } + + static NSMethodSignature instanceMethodSignatureForSelector_( + ThermionDartTexture1 _lib, ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_421(_lib._class_NSObject1, + _lib._sel_instanceMethodSignatureForSelector_1, aSelector); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); + } + + bool allowsWeakReference() { + return _lib._objc_msgSend_12(_id, _lib._sel_allowsWeakReference1); + } + + bool retainWeakReference() { + return _lib._objc_msgSend_12(_id, _lib._sel_retainWeakReference1); + } + + static bool isSubclassOfClass_(ThermionDartTexture1 _lib, NSObject aClass) { + return _lib._objc_msgSend_0( + _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); + } + + static bool resolveClassMethod_( + ThermionDartTexture1 _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); + } + + static bool resolveInstanceMethod_( + ThermionDartTexture1 _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); + } + + static int hash(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_10(_lib._class_NSObject1, _lib._sel_hash1); + } + + static NSObject superclass(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject class1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_class1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSString description(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_21(_lib._class_NSObject1, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString debugDescription(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_21( + _lib._class_NSObject1, _lib._sel_debugDescription1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static int version(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_82(_lib._class_NSObject1, _lib._sel_version1); + } + + static void setVersion_(ThermionDartTexture1 _lib, int aVersion) { + _lib._objc_msgSend_422( + _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); + } + + NSObject get classForCoder { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForCoder1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? replacementObjectForCoder_(NSCoder coder) { + final _ret = _lib._objc_msgSend_46( + _id, _lib._sel_replacementObjectForCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? awakeAfterUsingCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_awakeAfterUsingCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: false, release: true); + } + + static void poseAsClass_(ThermionDartTexture1 _lib, NSObject aClass) { + _lib._objc_msgSend_15( + _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); + } + + NSObject get autoContentAccessingProxy { + final _ret = + _lib._objc_msgSend_2(_id, _lib._sel_autoContentAccessingProxy1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void + attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( + NSError error, + int recoveryOptionIndex, + NSObject? delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo) { + _lib._objc_msgSend_423( + _id, + _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, + error._id, + recoveryOptionIndex, + delegate?._id ?? ffi.nullptr, + didRecoverSelector, + contextInfo); + } + + bool attemptRecoveryFromError_optionIndex_( + NSError error, int recoveryOptionIndex) { + return _lib._objc_msgSend_424( + _id, + _lib._sel_attemptRecoveryFromError_optionIndex_1, + error._id, + recoveryOptionIndex); + } + + void performSelector_withObject_afterDelay_inModes_( + ffi.Pointer aSelector, + NSObject? anArgument, + double delay, + NSArray modes) { + _lib._objc_msgSend_425( + _id, + _lib._sel_performSelector_withObject_afterDelay_inModes_1, + aSelector, + anArgument?._id ?? ffi.nullptr, + delay, + modes._id); + } + + void performSelector_withObject_afterDelay_( + ffi.Pointer aSelector, NSObject? anArgument, double delay) { + _lib._objc_msgSend_426( + _id, + _lib._sel_performSelector_withObject_afterDelay_1, + aSelector, + anArgument?._id ?? ffi.nullptr, + delay); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSObject1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSObject1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + void URL_resourceDataDidBecomeAvailable_(NSURL sender, NSData newBytes) { + _lib._objc_msgSend_427(_id, _lib._sel_URL_resourceDataDidBecomeAvailable_1, + sender._id, newBytes._id); + } + + void URLResourceDidFinishLoading_(NSURL sender) { + _lib._objc_msgSend_428( + _id, _lib._sel_URLResourceDidFinishLoading_1, sender._id); + } + + void URLResourceDidCancelLoading_(NSURL sender) { + _lib._objc_msgSend_428( + _id, _lib._sel_URLResourceDidCancelLoading_1, sender._id); + } + + void URL_resourceDidFailLoadingWithReason_(NSURL sender, NSString reason) { + _lib._objc_msgSend_429( + _id, + _lib._sel_URL_resourceDidFailLoadingWithReason_1, + sender._id, + reason._id); + } + + bool fileManager_shouldProceedAfterError_( + NSFileManager fm, NSDictionary errorInfo) { + return _lib._objc_msgSend_466(_id, + _lib._sel_fileManager_shouldProceedAfterError_1, fm._id, errorInfo._id); + } + + void fileManager_willProcessPath_(NSFileManager fm, NSString path) { + _lib._objc_msgSend_467( + _id, _lib._sel_fileManager_willProcessPath_1, fm._id, path._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSObject1, _lib._sel_accessInstanceVariablesDirectly1); + } + + NSObject? valueForKey_(NSString key) { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_valueForKey_1, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void setValue_forKey_(NSObject? value, NSString key) { + _lib._objc_msgSend_134( + _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); + } + + bool validateValue_forKey_error_(ffi.Pointer> ioValue, + NSString inKey, ffi.Pointer> outError) { + return _lib._objc_msgSend_243(_id, _lib._sel_validateValue_forKey_error_1, + ioValue, inKey._id, outError); + } + + NSMutableArray mutableArrayValueForKey_(NSString key) { + final _ret = _lib._objc_msgSend_487( + _id, _lib._sel_mutableArrayValueForKey_1, key._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + NSMutableOrderedSet mutableOrderedSetValueForKey_(NSString key) { + final _ret = _lib._objc_msgSend_505( + _id, _lib._sel_mutableOrderedSetValueForKey_1, key._id); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + NSMutableSet mutableSetValueForKey_(NSString key) { + final _ret = + _lib._objc_msgSend_506(_id, _lib._sel_mutableSetValueForKey_1, key._id); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + NSObject? valueForKeyPath_(NSString keyPath) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_valueForKeyPath_1, keyPath._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void setValue_forKeyPath_(NSObject? value, NSString keyPath) { + _lib._objc_msgSend_134(_id, _lib._sel_setValue_forKeyPath_1, + value?._id ?? ffi.nullptr, keyPath._id); + } + + bool validateValue_forKeyPath_error_( + ffi.Pointer> ioValue, + NSString inKeyPath, + ffi.Pointer> outError) { + return _lib._objc_msgSend_243( + _id, + _lib._sel_validateValue_forKeyPath_error_1, + ioValue, + inKeyPath._id, + outError); + } + + NSMutableArray mutableArrayValueForKeyPath_(NSString keyPath) { + final _ret = _lib._objc_msgSend_487( + _id, _lib._sel_mutableArrayValueForKeyPath_1, keyPath._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + NSMutableOrderedSet mutableOrderedSetValueForKeyPath_(NSString keyPath) { + final _ret = _lib._objc_msgSend_505( + _id, _lib._sel_mutableOrderedSetValueForKeyPath_1, keyPath._id); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + NSMutableSet mutableSetValueForKeyPath_(NSString keyPath) { + final _ret = _lib._objc_msgSend_506( + _id, _lib._sel_mutableSetValueForKeyPath_1, keyPath._id); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + NSObject? valueForUndefinedKey_(NSString key) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_valueForUndefinedKey_1, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void setValue_forUndefinedKey_(NSObject? value, NSString key) { + _lib._objc_msgSend_134(_id, _lib._sel_setValue_forUndefinedKey_1, + value?._id ?? ffi.nullptr, key._id); + } + + void setNilValueForKey_(NSString key) { + _lib._objc_msgSend_247(_id, _lib._sel_setNilValueForKey_1, key._id); + } + + NSDictionary dictionaryWithValuesForKeys_(NSArray keys) { + final _ret = _lib._objc_msgSend_507( + _id, _lib._sel_dictionaryWithValuesForKeys_1, keys._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + void setValuesForKeysWithDictionary_(NSDictionary keyedValues) { + _lib._objc_msgSend_508( + _id, _lib._sel_setValuesForKeysWithDictionary_1, keyedValues._id); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSObject1, _lib._sel_useStoredAccessor1); + } + + NSObject? storedValueForKey_(NSString key) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_storedValueForKey_1, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void takeStoredValue_forKey_(NSObject? value, NSString key) { + _lib._objc_msgSend_134(_id, _lib._sel_takeStoredValue_forKey_1, + value?._id ?? ffi.nullptr, key._id); + } + + void takeValue_forKey_(NSObject? value, NSString key) { + _lib._objc_msgSend_134( + _id, _lib._sel_takeValue_forKey_1, value?._id ?? ffi.nullptr, key._id); + } + + void takeValue_forKeyPath_(NSObject? value, NSString keyPath) { + _lib._objc_msgSend_134(_id, _lib._sel_takeValue_forKeyPath_1, + value?._id ?? ffi.nullptr, keyPath._id); + } + + NSObject? handleQueryWithUnboundKey_(NSString key) { + final _ret = _lib._objc_msgSend_38( + _id, _lib._sel_handleQueryWithUnboundKey_1, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void handleTakeValue_forUnboundKey_(NSObject? value, NSString key) { + _lib._objc_msgSend_134(_id, _lib._sel_handleTakeValue_forUnboundKey_1, + value?._id ?? ffi.nullptr, key._id); + } + + void unableToSetNilForKey_(NSString key) { + _lib._objc_msgSend_247(_id, _lib._sel_unableToSetNilForKey_1, key._id); + } + + NSDictionary valuesForKeys_(NSArray keys) { + final _ret = + _lib._objc_msgSend_507(_id, _lib._sel_valuesForKeys_1, keys._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + void takeValuesFromDictionary_(NSDictionary properties) { + _lib._objc_msgSend_508( + _id, _lib._sel_takeValuesFromDictionary_1, properties._id); + } + + void observeValueForKeyPath_ofObject_change_context_(NSString? keyPath, + NSObject? object, NSDictionary? change, ffi.Pointer context) { + _lib._objc_msgSend_509( + _id, + _lib._sel_observeValueForKeyPath_ofObject_change_context_1, + keyPath?._id ?? ffi.nullptr, + object?._id ?? ffi.nullptr, + change?._id ?? ffi.nullptr, + context); + } + + void addObserver_forKeyPath_options_context_(NSObject observer, + NSString keyPath, int options, ffi.Pointer context) { + _lib._objc_msgSend_138( + _id, + _lib._sel_addObserver_forKeyPath_options_context_1, + observer._id, + keyPath._id, + options, + context); + } + + void removeObserver_forKeyPath_context_( + NSObject observer, NSString keyPath, ffi.Pointer context) { + _lib._objc_msgSend_139(_id, _lib._sel_removeObserver_forKeyPath_context_1, + observer._id, keyPath._id, context); + } + + void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { + _lib._objc_msgSend_140( + _id, _lib._sel_removeObserver_forKeyPath_1, observer._id, keyPath._id); + } + + void willChangeValueForKey_(NSString key) { + _lib._objc_msgSend_247(_id, _lib._sel_willChangeValueForKey_1, key._id); + } + + void didChangeValueForKey_(NSString key) { + _lib._objc_msgSend_247(_id, _lib._sel_didChangeValueForKey_1, key._id); + } + + void willChange_valuesAtIndexes_forKey_( + int changeKind, NSIndexSet indexes, NSString key) { + _lib._objc_msgSend_510(_id, _lib._sel_willChange_valuesAtIndexes_forKey_1, + changeKind, indexes._id, key._id); + } + + void didChange_valuesAtIndexes_forKey_( + int changeKind, NSIndexSet indexes, NSString key) { + _lib._objc_msgSend_510(_id, _lib._sel_didChange_valuesAtIndexes_forKey_1, + changeKind, indexes._id, key._id); + } + + void willChangeValueForKey_withSetMutation_usingObjects_( + NSString key, int mutationKind, NSSet objects) { + _lib._objc_msgSend_511( + _id, + _lib._sel_willChangeValueForKey_withSetMutation_usingObjects_1, + key._id, + mutationKind, + objects._id); + } + + void didChangeValueForKey_withSetMutation_usingObjects_( + NSString key, int mutationKind, NSSet objects) { + _lib._objc_msgSend_511( + _id, + _lib._sel_didChangeValueForKey_withSetMutation_usingObjects_1, + key._id, + mutationKind, + objects._id); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSObject1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSObject1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + ffi.Pointer get observationInfo { + return _lib._objc_msgSend_20(_id, _lib._sel_observationInfo1); + } + + set observationInfo(ffi.Pointer value) { + return _lib._objc_msgSend_512(_id, _lib._sel_setObservationInfo_1, value); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSObject1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + NSObject? get classForKeyedArchiver { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_classForKeyedArchiver1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? replacementObjectForKeyedArchiver_(NSKeyedArchiver archiver) { + final _ret = _lib._objc_msgSend_527( + _id, _lib._sel_replacementObjectForKeyedArchiver_1, archiver._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSObject1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSObject1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void performSelectorOnMainThread_withObject_waitUntilDone_modes_( + ffi.Pointer aSelector, + NSObject? arg, + bool wait, + NSArray? array) { + _lib._objc_msgSend_528( + _id, + _lib._sel_performSelectorOnMainThread_withObject_waitUntilDone_modes_1, + aSelector, + arg?._id ?? ffi.nullptr, + wait, + array?._id ?? ffi.nullptr); + } + + void performSelectorOnMainThread_withObject_waitUntilDone_( + ffi.Pointer aSelector, NSObject? arg, bool wait) { + _lib._objc_msgSend_529( + _id, + _lib._sel_performSelectorOnMainThread_withObject_waitUntilDone_1, + aSelector, + arg?._id ?? ffi.nullptr, + wait); + } + + void performSelector_onThread_withObject_waitUntilDone_modes_( + ffi.Pointer aSelector, + NSThread thr, + NSObject? arg, + bool wait, + NSArray? array) { + _lib._objc_msgSend_547( + _id, + _lib._sel_performSelector_onThread_withObject_waitUntilDone_modes_1, + aSelector, + thr._id, + arg?._id ?? ffi.nullptr, + wait, + array?._id ?? ffi.nullptr); + } + + void performSelector_onThread_withObject_waitUntilDone_( + ffi.Pointer aSelector, NSThread thr, NSObject? arg, bool wait) { + _lib._objc_msgSend_548( + _id, + _lib._sel_performSelector_onThread_withObject_waitUntilDone_1, + aSelector, + thr._id, + arg?._id ?? ffi.nullptr, + wait); + } + + void performSelectorInBackground_withObject_( + ffi.Pointer aSelector, NSObject? arg) { + _lib._objc_msgSend_89( + _id, + _lib._sel_performSelectorInBackground_withObject_1, + aSelector, + arg?._id ?? ffi.nullptr); + } + + NSObject? get classForArchiver { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_classForArchiver1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? replacementObjectForArchiver_(NSArchiver archiver) { + final _ret = _lib._objc_msgSend_551( + _id, _lib._sel_replacementObjectForArchiver_1, archiver._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject get classForPortCoder { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForPortCoder1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? replacementObjectForPortCoder_(NSPortCoder coder) { + final _ret = _lib._objc_msgSend_596( + _id, _lib._sel_replacementObjectForPortCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSClassDescription get classDescription { + final _ret = _lib._objc_msgSend_599(_id, _lib._sel_classDescription1); + return NSClassDescription._(_ret, _lib, retain: true, release: true); + } + + NSArray get attributeKeys { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_attributeKeys1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get toOneRelationshipKeys { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_toOneRelationshipKeys1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get toManyRelationshipKeys { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_toManyRelationshipKeys1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? inverseForRelationshipKey_(NSString relationshipKey) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_inverseForRelationshipKey_1, relationshipKey._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSObject? scriptingValueForSpecifier_( + NSScriptObjectSpecifier objectSpecifier) { + final _ret = _lib._objc_msgSend_648( + _id, _lib._sel_scriptingValueForSpecifier_1, objectSpecifier._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get scriptingProperties { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_scriptingProperties1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set scriptingProperties(NSDictionary? value) { + return _lib._objc_msgSend_633( + _id, _lib._sel_setScriptingProperties_1, value?._id ?? ffi.nullptr); + } + + NSObject? copyScriptingValue_forKey_withProperties_( + NSObject value, NSString key, NSDictionary properties) { + final _ret = _lib._objc_msgSend_649( + _id, + _lib._sel_copyScriptingValue_forKey_withProperties_1, + value._id, + key._id, + properties._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: false, release: true); + } + + NSObject? + newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_( + NSObject objectClass, + NSString key, + NSObject? contentsValue, + NSDictionary properties) { + final _ret = _lib._objc_msgSend_650( + _id, + _lib._sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_1, + objectClass._id, + key._id, + contentsValue?._id ?? ffi.nullptr, + properties._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: false, release: true); + } + + int get classCode { + return _lib._objc_msgSend_213(_id, _lib._sel_classCode1); + } + + NSString? get className { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_className1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSObject? valueAtIndex_inPropertyWithKey_(int index, NSString key) { + final _ret = _lib._objc_msgSend_651( + _id, _lib._sel_valueAtIndex_inPropertyWithKey_1, index, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? valueWithName_inPropertyWithKey_(NSString name, NSString key) { + final _ret = _lib._objc_msgSend_174( + _id, _lib._sel_valueWithName_inPropertyWithKey_1, name._id, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? valueWithUniqueID_inPropertyWithKey_( + NSObject uniqueID, NSString key) { + final _ret = _lib._objc_msgSend_310(_id, + _lib._sel_valueWithUniqueID_inPropertyWithKey_1, uniqueID._id, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void insertValue_atIndex_inPropertyWithKey_( + NSObject value, int index, NSString key) { + _lib._objc_msgSend_652( + _id, + _lib._sel_insertValue_atIndex_inPropertyWithKey_1, + value._id, + index, + key._id); + } + + void removeValueAtIndex_fromPropertyWithKey_(int index, NSString key) { + _lib._objc_msgSend_653(_id, + _lib._sel_removeValueAtIndex_fromPropertyWithKey_1, index, key._id); + } + + void replaceValueAtIndex_inPropertyWithKey_withValue_( + int index, NSString key, NSObject value) { + _lib._objc_msgSend_654( + _id, + _lib._sel_replaceValueAtIndex_inPropertyWithKey_withValue_1, + index, + key._id, + value._id); + } + + void insertValue_inPropertyWithKey_(NSObject value, NSString key) { + _lib._objc_msgSend_655( + _id, _lib._sel_insertValue_inPropertyWithKey_1, value._id, key._id); + } + + NSObject? coerceValue_forKey_(NSObject? value, NSString key) { + final _ret = _lib._objc_msgSend_656(_id, _lib._sel_coerceValue_forKey_1, + value?._id ?? ffi.nullptr, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSScriptObjectSpecifier? get objectSpecifier { + final _ret = _lib._objc_msgSend_631(_id, _lib._sel_objectSpecifier1); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + } + + NSArray? indicesOfObjectsByEvaluatingObjectSpecifier_( + NSScriptObjectSpecifier specifier) { + final _ret = _lib._objc_msgSend_657(_id, + _lib._sel_indicesOfObjectsByEvaluatingObjectSpecifier_1, specifier._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + bool isEqualTo_(NSObject? object) { + return _lib._objc_msgSend_216( + _id, _lib._sel_isEqualTo_1, object?._id ?? ffi.nullptr); + } + + bool isLessThanOrEqualTo_(NSObject? object) { + return _lib._objc_msgSend_216( + _id, _lib._sel_isLessThanOrEqualTo_1, object?._id ?? ffi.nullptr); + } + + bool isLessThan_(NSObject? object) { + return _lib._objc_msgSend_216( + _id, _lib._sel_isLessThan_1, object?._id ?? ffi.nullptr); + } + + bool isGreaterThanOrEqualTo_(NSObject? object) { + return _lib._objc_msgSend_216( + _id, _lib._sel_isGreaterThanOrEqualTo_1, object?._id ?? ffi.nullptr); + } + + bool isGreaterThan_(NSObject? object) { + return _lib._objc_msgSend_216( + _id, _lib._sel_isGreaterThan_1, object?._id ?? ffi.nullptr); + } + + bool isNotEqualTo_(NSObject? object) { + return _lib._objc_msgSend_216( + _id, _lib._sel_isNotEqualTo_1, object?._id ?? ffi.nullptr); + } + + bool doesContain_(NSObject object) { + return _lib._objc_msgSend_0(_id, _lib._sel_doesContain_1, object._id); + } + + bool isLike_(NSString object) { + return _lib._objc_msgSend_63(_id, _lib._sel_isLike_1, object._id); + } + + bool isCaseInsensitiveLike_(NSString object) { + return _lib._objc_msgSend_63( + _id, _lib._sel_isCaseInsensitiveLike_1, object._id); + } + + bool scriptingIsEqualTo_(NSObject object) { + return _lib._objc_msgSend_0( + _id, _lib._sel_scriptingIsEqualTo_1, object._id); + } + + bool scriptingIsLessThanOrEqualTo_(NSObject object) { + return _lib._objc_msgSend_0( + _id, _lib._sel_scriptingIsLessThanOrEqualTo_1, object._id); + } + + bool scriptingIsLessThan_(NSObject object) { + return _lib._objc_msgSend_0( + _id, _lib._sel_scriptingIsLessThan_1, object._id); + } + + bool scriptingIsGreaterThanOrEqualTo_(NSObject object) { + return _lib._objc_msgSend_0( + _id, _lib._sel_scriptingIsGreaterThanOrEqualTo_1, object._id); + } + + bool scriptingIsGreaterThan_(NSObject object) { + return _lib._objc_msgSend_0( + _id, _lib._sel_scriptingIsGreaterThan_1, object._id); + } + + bool scriptingBeginsWith_(NSObject object) { + return _lib._objc_msgSend_0( + _id, _lib._sel_scriptingBeginsWith_1, object._id); + } + + bool scriptingEndsWith_(NSObject object) { + return _lib._objc_msgSend_0(_id, _lib._sel_scriptingEndsWith_1, object._id); + } + + bool scriptingContains_(NSObject object) { + return _lib._objc_msgSend_0(_id, _lib._sel_scriptingContains_1, object._id); + } +} + +final class ObjCSel extends ffi.Opaque {} + +final class ObjCObject extends ffi.Opaque {} + +typedef instancetype = ffi.Pointer; +typedef Dartinstancetype = NSObject; + +final class _NSZone extends ffi.Opaque {} + +class Protocol extends _ObjCWrapper { + Protocol._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [Protocol] that points to the same underlying object as [other]. + static Protocol castFrom(T other) { + return Protocol._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [Protocol] that wraps the given raw object pointer. + static Protocol castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return Protocol._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [Protocol]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_Protocol1); + } +} + +class NSInvocation extends NSObject { + NSInvocation._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSInvocation] that points to the same underlying object as [other]. + static NSInvocation castFrom(T other) { + return NSInvocation._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSInvocation] that wraps the given raw object pointer. + static NSInvocation castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInvocation._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSInvocation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInvocation1); + } + + static NSInvocation invocationWithMethodSignature_( + ThermionDartTexture1 _lib, NSMethodSignature sig) { + final _ret = _lib._objc_msgSend_413(_lib._class_NSInvocation1, + _lib._sel_invocationWithMethodSignature_1, sig._id); + return NSInvocation._(_ret, _lib, retain: true, release: true); + } + + NSMethodSignature get methodSignature { + final _ret = _lib._objc_msgSend_414(_id, _lib._sel_methodSignature1); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); + } + + void retainArguments() { + _lib._objc_msgSend_1(_id, _lib._sel_retainArguments1); + } + + bool get argumentsRetained { + return _lib._objc_msgSend_12(_id, _lib._sel_argumentsRetained1); + } + + NSObject? get target { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_target1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set target(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setTarget_1, value?._id ?? ffi.nullptr); + } + + ffi.Pointer get selector { + return _lib._objc_msgSend_416(_id, _lib._sel_selector1); + } + + set selector(ffi.Pointer value) { + return _lib._objc_msgSend_417(_id, _lib._sel_setSelector_1, value); + } + + void getReturnValue_(ffi.Pointer retLoc) { + _lib._objc_msgSend_51(_id, _lib._sel_getReturnValue_1, retLoc); + } + + void setReturnValue_(ffi.Pointer retLoc) { + _lib._objc_msgSend_51(_id, _lib._sel_setReturnValue_1, retLoc); + } + + void getArgument_atIndex_(ffi.Pointer argumentLocation, int idx) { + _lib._objc_msgSend_418( + _id, _lib._sel_getArgument_atIndex_1, argumentLocation, idx); + } + + void setArgument_atIndex_(ffi.Pointer argumentLocation, int idx) { + _lib._objc_msgSend_418( + _id, _lib._sel_setArgument_atIndex_1, argumentLocation, idx); + } + + void invoke() { + _lib._objc_msgSend_1(_id, _lib._sel_invoke1); + } + + void invokeWithTarget_(NSObject target) { + _lib._objc_msgSend_15(_id, _lib._sel_invokeWithTarget_1, target._id); + } + + void invokeUsingIMP_( + ffi.Pointer> imp) { + _lib._objc_msgSend_419(_id, _lib._sel_invokeUsingIMP_1, imp); + } + + @override + NSInvocation init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSInvocation._(_ret, _lib, retain: true, release: true); + } + + static NSInvocation new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSInvocation1, _lib._sel_new1); + return NSInvocation._(_ret, _lib, retain: false, release: true); + } + + static NSInvocation allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSInvocation1, _lib._sel_allocWithZone_1, zone); + return NSInvocation._(_ret, _lib, retain: false, release: true); + } + + static NSInvocation alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSInvocation1, _lib._sel_alloc1); + return NSInvocation._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSInvocation1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSInvocation1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSInvocation1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSInvocation1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSInvocation1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSInvocation1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSInvocation1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSInvocation1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSInvocation1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSMethodSignature extends NSObject { + NSMethodSignature._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. + static NSMethodSignature castFrom(T other) { + return NSMethodSignature._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMethodSignature] that wraps the given raw object pointer. + static NSMethodSignature castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMethodSignature._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMethodSignature]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMethodSignature1); + } + + static NSMethodSignature? signatureWithObjCTypes_( + ThermionDartTexture1 _lib, ffi.Pointer types) { + final _ret = _lib._objc_msgSend_9(_lib._class_NSMethodSignature1, + _lib._sel_signatureWithObjCTypes_1, types); + return _ret.address == 0 + ? null + : NSMethodSignature._(_ret, _lib, retain: true, release: true); + } + + int get numberOfArguments { + return _lib._objc_msgSend_10(_id, _lib._sel_numberOfArguments1); + } + + ffi.Pointer getArgumentTypeAtIndex_(int idx) { + return _lib._objc_msgSend_11(_id, _lib._sel_getArgumentTypeAtIndex_1, idx); + } + + int get frameLength { + return _lib._objc_msgSend_10(_id, _lib._sel_frameLength1); + } + + bool isOneway() { + return _lib._objc_msgSend_12(_id, _lib._sel_isOneway1); + } + + ffi.Pointer get methodReturnType { + return _lib._objc_msgSend_13(_id, _lib._sel_methodReturnType1); + } + + int get methodReturnLength { + return _lib._objc_msgSend_10(_id, _lib._sel_methodReturnLength1); + } + + @override + NSMethodSignature init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); + } + + static NSMethodSignature new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMethodSignature1, _lib._sel_new1); + return NSMethodSignature._(_ret, _lib, retain: false, release: true); + } + + static NSMethodSignature allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMethodSignature1, _lib._sel_allocWithZone_1, zone); + return NSMethodSignature._(_ret, _lib, retain: false, release: true); + } + + static NSMethodSignature alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMethodSignature1, _lib._sel_alloc1); + return NSMethodSignature._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSMethodSignature1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSMethodSignature1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSMethodSignature1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMethodSignature1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSMethodSignature1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSMethodSignature1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSMethodSignature1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSMethodSignature1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMethodSignature1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSSet extends NSObject { + NSSet._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSSet] that points to the same underlying object as [other]. + static NSSet castFrom(T other) { + return NSSet._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSSet] that wraps the given raw object pointer. + static NSSet castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSSet._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSSet1); + } + + int get count { + return _lib._objc_msgSend_10(_id, _lib._sel_count1); + } + + NSObject? member_(NSObject object) { + final _ret = _lib._objc_msgSend_16(_id, _lib._sel_member_1, object._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_76(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + @override + NSSet init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + NSSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_65( + _id, _lib._sel_initWithObjects_count_1, objects, cnt); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + NSSet? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSSet._(_ret, _lib, retain: true, release: true); + } + + NSArray get allObjects { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_allObjects1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSObject? anyObject() { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_anyObject1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + bool containsObject_(NSObject anObject) { + return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); + } + + NSString get description { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _lib._objc_msgSend_69( + _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool intersectsSet_(NSSet otherSet) { + return _lib._objc_msgSend_402(_id, _lib._sel_intersectsSet_1, otherSet._id); + } + + bool isEqualToSet_(NSSet otherSet) { + return _lib._objc_msgSend_402(_id, _lib._sel_isEqualToSet_1, otherSet._id); + } + + bool isSubsetOfSet_(NSSet otherSet) { + return _lib._objc_msgSend_402(_id, _lib._sel_isSubsetOfSet_1, otherSet._id); + } + + void makeObjectsPerformSelector_(ffi.Pointer aSelector) { + _lib._objc_msgSend_7( + _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); + } + + void makeObjectsPerformSelector_withObject_( + ffi.Pointer aSelector, NSObject? argument) { + _lib._objc_msgSend_89( + _id, + _lib._sel_makeObjectsPerformSelector_withObject_1, + aSelector, + argument?._id ?? ffi.nullptr); + } + + NSSet setByAddingObject_(NSObject anObject) { + final _ret = _lib._objc_msgSend_403( + _id, _lib._sel_setByAddingObject_1, anObject._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + NSSet setByAddingObjectsFromSet_(NSSet other) { + final _ret = _lib._objc_msgSend_404( + _id, _lib._sel_setByAddingObjectsFromSet_1, other._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + NSSet setByAddingObjectsFromArray_(NSArray other) { + final _ret = _lib._objc_msgSend_405( + _id, _lib._sel_setByAddingObjectsFromArray_1, other._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + void enumerateObjectsUsingBlock_(ObjCBlock_ffiVoid_ObjCObject_bool block) { + _lib._objc_msgSend_406( + _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); + } + + void enumerateObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_ObjCObject_bool block) { + _lib._objc_msgSend_407(_id, + _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); + } + + NSSet objectsPassingTest_(ObjCBlock_bool_ObjCObject_bool predicate) { + final _ret = _lib._objc_msgSend_408( + _id, _lib._sel_objectsPassingTest_1, predicate._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + NSSet objectsWithOptions_passingTest_( + int opts, ObjCBlock_bool_ObjCObject_bool predicate) { + final _ret = _lib._objc_msgSend_409( + _id, _lib._sel_objectsWithOptions_passingTest_1, opts, predicate._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static NSSet set1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSSet1, _lib._sel_set1); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static NSSet setWithObject_(ThermionDartTexture1 _lib, NSObject object) { + final _ret = _lib._objc_msgSend_123( + _lib._class_NSSet1, _lib._sel_setWithObject_1, object._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static NSSet setWithObjects_count_(ThermionDartTexture1 _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_65( + _lib._class_NSSet1, _lib._sel_setWithObjects_count_1, objects, cnt); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static NSSet setWithObjects_(ThermionDartTexture1 _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_123( + _lib._class_NSSet1, _lib._sel_setWithObjects_1, firstObj._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static NSSet setWithSet_(ThermionDartTexture1 _lib, NSSet set) { + final _ret = _lib._objc_msgSend_410( + _lib._class_NSSet1, _lib._sel_setWithSet_1, set._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static NSSet setWithArray_(ThermionDartTexture1 _lib, NSArray array) { + final _ret = _lib._objc_msgSend_124( + _lib._class_NSSet1, _lib._sel_setWithArray_1, array._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + NSSet initWithObjects_(NSObject firstObj) { + final _ret = + _lib._objc_msgSend_123(_id, _lib._sel_initWithObjects_1, firstObj._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + NSSet initWithSet_(NSSet set) { + final _ret = _lib._objc_msgSend_410(_id, _lib._sel_initWithSet_1, set._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + NSSet initWithSet_copyItems_(NSSet set, bool flag) { + final _ret = _lib._objc_msgSend_411( + _id, _lib._sel_initWithSet_copyItems_1, set._id, flag); + return NSSet._(_ret, _lib, retain: false, release: true); + } + + NSSet initWithArray_(NSArray array) { + final _ret = + _lib._objc_msgSend_124(_id, _lib._sel_initWithArray_1, array._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + NSObject valueForKey_(NSString key) { + final _ret = _lib._objc_msgSend_31(_id, _lib._sel_valueForKey_1, key._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + @override + void setValue_forKey_(NSObject? value, NSString key) { + _lib._objc_msgSend_134( + _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); + } + + @override + void addObserver_forKeyPath_options_context_(NSObject observer, + NSString keyPath, int options, ffi.Pointer context) { + _lib._objc_msgSend_138( + _id, + _lib._sel_addObserver_forKeyPath_options_context_1, + observer._id, + keyPath._id, + options, + context); + } + + @override + void removeObserver_forKeyPath_context_( + NSObject observer, NSString keyPath, ffi.Pointer context) { + _lib._objc_msgSend_139(_id, _lib._sel_removeObserver_forKeyPath_context_1, + observer._id, keyPath._id, context); + } + + @override + void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { + _lib._objc_msgSend_140( + _id, _lib._sel_removeObserver_forKeyPath_1, observer._id, keyPath._id); + } + + NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { + final _ret = _lib._objc_msgSend_67( + _id, _lib._sel_sortedArrayUsingDescriptors_1, sortDescriptors._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSSet filteredSetUsingPredicate_(NSPredicate predicate) { + final _ret = _lib._objc_msgSend_412( + _id, _lib._sel_filteredSetUsingPredicate_1, predicate._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static NSSet new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSSet1, _lib._sel_new1); + return NSSet._(_ret, _lib, retain: false, release: true); + } + + static NSSet allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSSet1, _lib._sel_allocWithZone_1, zone); + return NSSet._(_ret, _lib, retain: false, release: true); + } + + static NSSet alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSSet1, _lib._sel_alloc1); + return NSSet._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSSet1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSSet1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSSet1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSSet1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSSet1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSSet1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSSet1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSSet1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSSet1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSEnumerator extends NSObject { + NSEnumerator._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSEnumerator] that points to the same underlying object as [other]. + static NSEnumerator castFrom(T other) { + return NSEnumerator._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSEnumerator] that wraps the given raw object pointer. + static NSEnumerator castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSEnumerator._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSEnumerator]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSEnumerator1); + } + + NSObject? nextObject() { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_nextObject1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject get allObjects { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + @override + NSEnumerator init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + static NSEnumerator new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_new1); + return NSEnumerator._(_ret, _lib, retain: false, release: true); + } + + static NSEnumerator allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSEnumerator1, _lib._sel_allocWithZone_1, zone); + return NSEnumerator._(_ret, _lib, retain: false, release: true); + } + + static NSEnumerator alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_alloc1); + return NSEnumerator._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSEnumerator1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSEnumerator1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSEnumerator1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSEnumerator1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSEnumerator1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSEnumerator1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSEnumerator1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSEnumerator1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSEnumerator1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSString extends NSObject { + NSString._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSString] that points to the same underlying object as [other]. + static NSString castFrom(T other) { + return NSString._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSString] that wraps the given raw object pointer. + static NSString castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSString._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSString1); + } + + factory NSString(ThermionDartTexture1 _lib, String str) { + final cstr = str.toNativeUtf16(); + final nsstr = stringWithCharacters_length_(_lib, cstr.cast(), str.length); + pkg_ffi.calloc.free(cstr); + return nsstr; + } + + @override + String toString() { + final data = + dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); + return data!.bytes.cast().toDartString(length: length); + } + + int get length { + return _lib._objc_msgSend_10(_id, _lib._sel_length1); + } + + int characterAtIndex_(int index) { + return _lib._objc_msgSend_18(_id, _lib._sel_characterAtIndex_1, index); + } + + @override + NSString init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString substringFromIndex_(int from) { + final _ret = + _lib._objc_msgSend_331(_id, _lib._sel_substringFromIndex_1, from); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString substringToIndex_(int to) { + final _ret = _lib._objc_msgSend_331(_id, _lib._sel_substringToIndex_1, to); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString substringWithRange_(_NSRange range) { + final _ret = + _lib._objc_msgSend_332(_id, _lib._sel_substringWithRange_1, range); + return NSString._(_ret, _lib, retain: true, release: true); + } + + void getCharacters_range_( + ffi.Pointer buffer, _NSRange range) { + _lib._objc_msgSend_333(_id, _lib._sel_getCharacters_range_1, buffer, range); + } + + int compare_(NSString string) { + return _lib._objc_msgSend_334(_id, _lib._sel_compare_1, string._id); + } + + int compare_options_(NSString string, int mask) { + return _lib._objc_msgSend_335( + _id, _lib._sel_compare_options_1, string._id, mask); + } + + int compare_options_range_( + NSString string, int mask, _NSRange rangeOfReceiverToCompare) { + return _lib._objc_msgSend_336(_id, _lib._sel_compare_options_range_1, + string._id, mask, rangeOfReceiverToCompare); + } + + int compare_options_range_locale_(NSString string, int mask, + _NSRange rangeOfReceiverToCompare, NSObject? locale) { + return _lib._objc_msgSend_337(_id, _lib._sel_compare_options_range_locale_1, + string._id, mask, rangeOfReceiverToCompare, locale?._id ?? ffi.nullptr); + } + + int caseInsensitiveCompare_(NSString string) { + return _lib._objc_msgSend_334( + _id, _lib._sel_caseInsensitiveCompare_1, string._id); + } + + int localizedCompare_(NSString string) { + return _lib._objc_msgSend_334( + _id, _lib._sel_localizedCompare_1, string._id); + } + + int localizedCaseInsensitiveCompare_(NSString string) { + return _lib._objc_msgSend_334( + _id, _lib._sel_localizedCaseInsensitiveCompare_1, string._id); + } + + int localizedStandardCompare_(NSString string) { + return _lib._objc_msgSend_334( + _id, _lib._sel_localizedStandardCompare_1, string._id); + } + + bool isEqualToString_(NSString aString) { + return _lib._objc_msgSend_63(_id, _lib._sel_isEqualToString_1, aString._id); + } + + bool hasPrefix_(NSString str) { + return _lib._objc_msgSend_63(_id, _lib._sel_hasPrefix_1, str._id); + } + + bool hasSuffix_(NSString str) { + return _lib._objc_msgSend_63(_id, _lib._sel_hasSuffix_1, str._id); + } + + NSString commonPrefixWithString_options_(NSString str, int mask) { + final _ret = _lib._objc_msgSend_338( + _id, _lib._sel_commonPrefixWithString_options_1, str._id, mask); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool containsString_(NSString str) { + return _lib._objc_msgSend_63(_id, _lib._sel_containsString_1, str._id); + } + + bool localizedCaseInsensitiveContainsString_(NSString str) { + return _lib._objc_msgSend_63( + _id, _lib._sel_localizedCaseInsensitiveContainsString_1, str._id); + } + + bool localizedStandardContainsString_(NSString str) { + return _lib._objc_msgSend_63( + _id, _lib._sel_localizedStandardContainsString_1, str._id); + } + + void localizedStandardRangeOfString_( + ffi.Pointer<_NSRange> stret, NSString str) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_339_stret( + stret, _id, _lib._sel_localizedStandardRangeOfString_1, str._id) + : stret.ref = _lib._objc_msgSend_339( + _id, _lib._sel_localizedStandardRangeOfString_1, str._id); + } + + void rangeOfString_(ffi.Pointer<_NSRange> stret, NSString searchString) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_339_stret( + stret, _id, _lib._sel_rangeOfString_1, searchString._id) + : stret.ref = _lib._objc_msgSend_339( + _id, _lib._sel_rangeOfString_1, searchString._id); + } + + void rangeOfString_options_( + ffi.Pointer<_NSRange> stret, NSString searchString, int mask) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_340_stret(stret, _id, + _lib._sel_rangeOfString_options_1, searchString._id, mask) + : stret.ref = _lib._objc_msgSend_340( + _id, _lib._sel_rangeOfString_options_1, searchString._id, mask); + } + + void rangeOfString_options_range_(ffi.Pointer<_NSRange> stret, + NSString searchString, int mask, _NSRange rangeOfReceiverToSearch) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_341_stret( + stret, + _id, + _lib._sel_rangeOfString_options_range_1, + searchString._id, + mask, + rangeOfReceiverToSearch) + : stret.ref = _lib._objc_msgSend_341( + _id, + _lib._sel_rangeOfString_options_range_1, + searchString._id, + mask, + rangeOfReceiverToSearch); + } + + void rangeOfString_options_range_locale_( + ffi.Pointer<_NSRange> stret, + NSString searchString, + int mask, + _NSRange rangeOfReceiverToSearch, + NSLocale? locale) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_342_stret( + stret, + _id, + _lib._sel_rangeOfString_options_range_locale_1, + searchString._id, + mask, + rangeOfReceiverToSearch, + locale?._id ?? ffi.nullptr) + : stret.ref = _lib._objc_msgSend_342( + _id, + _lib._sel_rangeOfString_options_range_locale_1, + searchString._id, + mask, + rangeOfReceiverToSearch, + locale?._id ?? ffi.nullptr); + } + + void rangeOfCharacterFromSet_( + ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_343_stret( + stret, _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id) + : stret.ref = _lib._objc_msgSend_343( + _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id); + } + + void rangeOfCharacterFromSet_options_( + ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet, int mask) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_344_stret(stret, _id, + _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask) + : stret.ref = _lib._objc_msgSend_344(_id, + _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask); + } + + void rangeOfCharacterFromSet_options_range_(ffi.Pointer<_NSRange> stret, + NSCharacterSet searchSet, int mask, _NSRange rangeOfReceiverToSearch) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_345_stret( + stret, + _id, + _lib._sel_rangeOfCharacterFromSet_options_range_1, + searchSet._id, + mask, + rangeOfReceiverToSearch) + : stret.ref = _lib._objc_msgSend_345( + _id, + _lib._sel_rangeOfCharacterFromSet_options_range_1, + searchSet._id, + mask, + rangeOfReceiverToSearch); + } + + void rangeOfComposedCharacterSequenceAtIndex_( + ffi.Pointer<_NSRange> stret, int index) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_346_stret(stret, _id, + _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index) + : stret.ref = _lib._objc_msgSend_346( + _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); + } + + void rangeOfComposedCharacterSequencesForRange_( + ffi.Pointer<_NSRange> stret, _NSRange range) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_347_stret(stret, _id, + _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range) + : stret.ref = _lib._objc_msgSend_347( + _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); + } + + NSString stringByAppendingString_(NSString aString) { + final _ret = _lib._objc_msgSend_68( + _id, _lib._sel_stringByAppendingString_1, aString._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByAppendingFormat_(NSString format) { + final _ret = _lib._objc_msgSend_68( + _id, _lib._sel_stringByAppendingFormat_1, format._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + double get doubleValue { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_doubleValue1) + : _lib._objc_msgSend_164(_id, _lib._sel_doubleValue1); + } + + double get floatValue { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_238_fpret(_id, _lib._sel_floatValue1) + : _lib._objc_msgSend_238(_id, _lib._sel_floatValue1); + } + + int get intValue { + return _lib._objc_msgSend_236(_id, _lib._sel_intValue1); + } + + int get integerValue { + return _lib._objc_msgSend_82(_id, _lib._sel_integerValue1); + } + + int get longLongValue { + return _lib._objc_msgSend_237(_id, _lib._sel_longLongValue1); + } + + bool get boolValue { + return _lib._objc_msgSend_12(_id, _lib._sel_boolValue1); + } + + NSString get uppercaseString { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_uppercaseString1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get lowercaseString { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_lowercaseString1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get capitalizedString { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_capitalizedString1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get localizedUppercaseString { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_localizedUppercaseString1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get localizedLowercaseString { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_localizedLowercaseString1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get localizedCapitalizedString { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_localizedCapitalizedString1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString uppercaseStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_348( + _id, _lib._sel_uppercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString lowercaseStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_348( + _id, _lib._sel_lowercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString capitalizedStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_348(_id, + _lib._sel_capitalizedStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + void getLineStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + _NSRange range) { + _lib._objc_msgSend_349( + _id, + _lib._sel_getLineStart_end_contentsEnd_forRange_1, + startPtr, + lineEndPtr, + contentsEndPtr, + range); + } + + void lineRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_347_stret( + stret, _id, _lib._sel_lineRangeForRange_1, range) + : stret.ref = + _lib._objc_msgSend_347(_id, _lib._sel_lineRangeForRange_1, range); + } + + void getParagraphStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer parEndPtr, + ffi.Pointer contentsEndPtr, + _NSRange range) { + _lib._objc_msgSend_349( + _id, + _lib._sel_getParagraphStart_end_contentsEnd_forRange_1, + startPtr, + parEndPtr, + contentsEndPtr, + range); + } + + void paragraphRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_347_stret( + stret, _id, _lib._sel_paragraphRangeForRange_1, range) + : stret.ref = _lib._objc_msgSend_347( + _id, _lib._sel_paragraphRangeForRange_1, range); + } + + void enumerateSubstringsInRange_options_usingBlock_(_NSRange range, int opts, + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { + _lib._objc_msgSend_350( + _id, + _lib._sel_enumerateSubstringsInRange_options_usingBlock_1, + range, + opts, + block._id); + } + + void enumerateLinesUsingBlock_(ObjCBlock_ffiVoid_NSString_bool block) { + _lib._objc_msgSend_351( + _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); + } + + ffi.Pointer get UTF8String { + return _lib._objc_msgSend_13(_id, _lib._sel_UTF8String1); + } + + int get fastestEncoding { + return _lib._objc_msgSend_10(_id, _lib._sel_fastestEncoding1); + } + + int get smallestEncoding { + return _lib._objc_msgSend_10(_id, _lib._sel_smallestEncoding1); + } + + NSData? dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { + final _ret = _lib._objc_msgSend_352(_id, + _lib._sel_dataUsingEncoding_allowLossyConversion_1, encoding, lossy); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSData? dataUsingEncoding_(int encoding) { + final _ret = + _lib._objc_msgSend_353(_id, _lib._sel_dataUsingEncoding_1, encoding); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + bool canBeConvertedToEncoding_(int encoding) { + return _lib._objc_msgSend_96( + _id, _lib._sel_canBeConvertedToEncoding_1, encoding); + } + + ffi.Pointer cStringUsingEncoding_(int encoding) { + return _lib._objc_msgSend_11( + _id, _lib._sel_cStringUsingEncoding_1, encoding); + } + + bool getCString_maxLength_encoding_( + ffi.Pointer buffer, int maxBufferCount, int encoding) { + return _lib._objc_msgSend_354( + _id, + _lib._sel_getCString_maxLength_encoding_1, + buffer, + maxBufferCount, + encoding); + } + + bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( + ffi.Pointer buffer, + int maxBufferCount, + ffi.Pointer usedBufferCount, + int encoding, + int options, + _NSRange range, + ffi.Pointer<_NSRange> leftover) { + return _lib._objc_msgSend_355( + _id, + _lib._sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options, + range, + leftover); + } + + int maximumLengthOfBytesUsingEncoding_(int enc) { + return _lib._objc_msgSend_93( + _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); + } + + int lengthOfBytesUsingEncoding_(int enc) { + return _lib._objc_msgSend_93( + _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); + } + + static ffi.Pointer getAvailableStringEncodings( + ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_356( + _lib._class_NSString1, _lib._sel_availableStringEncodings1); + } + + static NSString localizedNameOfStringEncoding_( + ThermionDartTexture1 _lib, int encoding) { + final _ret = _lib._objc_msgSend_331(_lib._class_NSString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static int getDefaultCStringEncoding(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_10( + _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); + } + + NSString get decomposedStringWithCanonicalMapping { + final _ret = _lib._objc_msgSend_21( + _id, _lib._sel_decomposedStringWithCanonicalMapping1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get precomposedStringWithCanonicalMapping { + final _ret = _lib._objc_msgSend_21( + _id, _lib._sel_precomposedStringWithCanonicalMapping1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get decomposedStringWithCompatibilityMapping { + final _ret = _lib._objc_msgSend_21( + _id, _lib._sel_decomposedStringWithCompatibilityMapping1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get precomposedStringWithCompatibilityMapping { + final _ret = _lib._objc_msgSend_21( + _id, _lib._sel_precomposedStringWithCompatibilityMapping1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray componentsSeparatedByString_(NSString separator) { + final _ret = _lib._objc_msgSend_357( + _id, _lib._sel_componentsSeparatedByString_1, separator._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet separator) { + final _ret = _lib._objc_msgSend_358( + _id, _lib._sel_componentsSeparatedByCharactersInSet_1, separator._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString stringByTrimmingCharactersInSet_(NSCharacterSet set) { + final _ret = _lib._objc_msgSend_359( + _id, _lib._sel_stringByTrimmingCharactersInSet_1, set._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByPaddingToLength_withString_startingAtIndex_( + int newLength, NSString padString, int padIndex) { + final _ret = _lib._objc_msgSend_360( + _id, + _lib._sel_stringByPaddingToLength_withString_startingAtIndex_1, + newLength, + padString._id, + padIndex); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { + final _ret = _lib._objc_msgSend_361( + _id, + _lib._sel_stringByFoldingWithOptions_locale_1, + options, + locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByReplacingOccurrencesOfString_withString_options_range_( + NSString target, + NSString replacement, + int options, + _NSRange searchRange) { + final _ret = _lib._objc_msgSend_362( + _id, + _lib._sel_stringByReplacingOccurrencesOfString_withString_options_range_1, + target._id, + replacement._id, + options, + searchRange); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByReplacingOccurrencesOfString_withString_( + NSString target, NSString replacement) { + final _ret = _lib._objc_msgSend_363( + _id, + _lib._sel_stringByReplacingOccurrencesOfString_withString_1, + target._id, + replacement._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByReplacingCharactersInRange_withString_( + _NSRange range, NSString replacement) { + final _ret = _lib._objc_msgSend_364( + _id, + _lib._sel_stringByReplacingCharactersInRange_withString_1, + range, + replacement._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? stringByApplyingTransform_reverse_( + NSString transform, bool reverse) { + final _ret = _lib._objc_msgSend_365(_id, + _lib._sel_stringByApplyingTransform_reverse_1, transform._id, reverse); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + bool writeToURL_atomically_encoding_error_(NSURL url, bool useAuxiliaryFile, + int enc, ffi.Pointer> error) { + return _lib._objc_msgSend_366( + _id, + _lib._sel_writeToURL_atomically_encoding_error_1, + url._id, + useAuxiliaryFile, + enc, + error); + } + + bool writeToFile_atomically_encoding_error_( + NSString path, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error) { + return _lib._objc_msgSend_367( + _id, + _lib._sel_writeToFile_atomically_encoding_error_1, + path._id, + useAuxiliaryFile, + enc, + error); + } + + NSString get description { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + int get hash { + return _lib._objc_msgSend_10(_id, _lib._sel_hash1); + } + + NSString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, int length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_368( + _id, + _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, + characters, + length, + freeBuffer); + return NSString._(_ret, _lib, retain: false, release: true); + } + + NSString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, + int len, + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { + final _ret = _lib._objc_msgSend_369( + _id, + _lib._sel_initWithCharactersNoCopy_length_deallocator_1, + chars, + len, + deallocator?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: false, release: true); + } + + NSString initWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_370( + _id, _lib._sel_initWithCharacters_length_1, characters, length); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? initWithUTF8String_(ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_371( + _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithString_(NSString aString) { + final _ret = + _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, aString._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithFormat_(NSString format) { + final _ret = + _lib._objc_msgSend_31(_id, _lib._sel_initWithFormat_1, format._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithFormat_arguments_( + NSString format, ffi.Pointer argList) { + final _ret = _lib._objc_msgSend_372( + _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithFormat_locale_(NSString format, NSObject? locale) { + final _ret = _lib._objc_msgSend_373(_id, _lib._sel_initWithFormat_locale_1, + format._id, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithFormat_locale_arguments_( + NSString format, NSObject? locale, ffi.Pointer argList) { + final _ret = _lib._objc_msgSend_374( + _id, + _lib._sel_initWithFormat_locale_arguments_1, + format._id, + locale?._id ?? ffi.nullptr, + argList); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? initWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_375( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, + format._id, + validFormatSpecifiers._id, + error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_376( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, + format._id, + validFormatSpecifiers._id, + locale?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? initWithValidatedFormat_validFormatSpecifiers_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_377( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, + format._id, + validFormatSpecifiers._id, + argList, + error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? + initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_378( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, + format._id, + validFormatSpecifiers._id, + locale?._id ?? ffi.nullptr, + argList, + error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? initWithData_encoding_(NSData data, int encoding) { + final _ret = _lib._objc_msgSend_379( + _id, _lib._sel_initWithData_encoding_1, data._id, encoding); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? initWithBytes_length_encoding_( + ffi.Pointer bytes, int len, int encoding) { + final _ret = _lib._objc_msgSend_380( + _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { + final _ret = _lib._objc_msgSend_381( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, + bytes, + len, + encoding, + freeBuffer); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: false, release: true); + } + + NSString? initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + int len, + int encoding, + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { + final _ret = _lib._objc_msgSend_382( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, + bytes, + len, + encoding, + deallocator?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: false, release: true); + } + + static NSString string(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_string1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString stringWithString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSString1, _lib._sel_stringWithString_1, string._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString stringWithCharacters_length_(ThermionDartTexture1 _lib, + ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_370(_lib._class_NSString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? stringWithUTF8String_( + ThermionDartTexture1 _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_371(_lib._class_NSString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString stringWithFormat_( + ThermionDartTexture1 _lib, NSString format) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSString1, _lib._sel_stringWithFormat_1, format._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString localizedStringWithFormat_( + ThermionDartTexture1 _lib, NSString format) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSString1, + _lib._sel_localizedStringWithFormat_1, format._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? stringWithValidatedFormat_validFormatSpecifiers_error_( + ThermionDartTexture1 _lib, + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_375( + _lib._class_NSString1, + _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, + format._id, + validFormatSpecifiers._id, + error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + ThermionDartTexture1 _lib, + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_375( + _lib._class_NSString1, + _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, + format._id, + validFormatSpecifiers._id, + error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, int encoding) { + final _ret = _lib._objc_msgSend_383(_id, + _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? stringWithCString_encoding_( + ThermionDartTexture1 _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_383(_lib._class_NSString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? initWithContentsOfURL_encoding_error_( + NSURL url, int enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_384(_id, + _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? initWithContentsOfFile_encoding_error_( + NSString path, int enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_385( + _id, + _lib._sel_initWithContentsOfFile_encoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? stringWithContentsOfURL_encoding_error_( + ThermionDartTexture1 _lib, + NSURL url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_384( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url._id, + enc, + error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? stringWithContentsOfFile_encoding_error_( + ThermionDartTexture1 _lib, + NSString path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_385( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? initWithContentsOfURL_usedEncoding_error_( + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_386( + _id, + _lib._sel_initWithContentsOfURL_usedEncoding_error_1, + url._id, + enc, + error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? initWithContentsOfFile_usedEncoding_error_( + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_387( + _id, + _lib._sel_initWithContentsOfFile_usedEncoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? stringWithContentsOfURL_usedEncoding_error_( + ThermionDartTexture1 _lib, + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_386( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url._id, + enc, + error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? stringWithContentsOfFile_usedEncoding_error_( + ThermionDartTexture1 _lib, + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_387( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + ThermionDartTexture1 _lib, + NSData data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_388( + _lib._class_NSString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data._id, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } + + NSObject propertyList() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_propertyList1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? propertyListFromStringsFileFormat() { + final _ret = _lib._objc_msgSend_389( + _id, _lib._sel_propertyListFromStringsFileFormat1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + ffi.Pointer cString() { + return _lib._objc_msgSend_13(_id, _lib._sel_cString1); + } + + ffi.Pointer lossyCString() { + return _lib._objc_msgSend_13(_id, _lib._sel_lossyCString1); + } + + int cStringLength() { + return _lib._objc_msgSend_10(_id, _lib._sel_cStringLength1); + } + + void getCString_(ffi.Pointer bytes) { + _lib._objc_msgSend_289(_id, _lib._sel_getCString_1, bytes); + } + + void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { + _lib._objc_msgSend_390( + _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); + } + + void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, + int maxLength, _NSRange aRange, ffi.Pointer<_NSRange> leftoverRange) { + _lib._objc_msgSend_391( + _id, + _lib._sel_getCString_maxLength_range_remainingRange_1, + bytes, + maxLength, + aRange, + leftoverRange); + } + + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_26( + _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _lib._objc_msgSend_133( + _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); + } + + NSObject? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_38( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_276(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? stringWithContentsOfFile_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_38( + _lib._class_NSString1, _lib._sel_stringWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? stringWithContentsOfURL_( + ThermionDartTexture1 _lib, NSURL url) { + final _ret = _lib._objc_msgSend_276( + _lib._class_NSString1, _lib._sel_stringWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? initWithCStringNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_392( + _id, + _lib._sel_initWithCStringNoCopy_length_freeWhenDone_1, + bytes, + length, + freeBuffer); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: false, release: true); + } + + NSObject? initWithCString_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_383( + _id, _lib._sel_initWithCString_length_1, bytes, length); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? initWithCString_(ffi.Pointer bytes) { + final _ret = + _lib._objc_msgSend_371(_id, _lib._sel_initWithCString_1, bytes); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? stringWithCString_length_( + ThermionDartTexture1 _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_383(_lib._class_NSString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? stringWithCString_( + ThermionDartTexture1 _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_371( + _lib._class_NSString1, _lib._sel_stringWithCString_1, bytes); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void getCharacters_(ffi.Pointer buffer) { + _lib._objc_msgSend_393(_id, _lib._sel_getCharacters_1, buffer); + } + + NSString variantFittingPresentationWidth_(int width) { + final _ret = _lib._objc_msgSend_394( + _id, _lib._sel_variantFittingPresentationWidth_1, width); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString pathWithComponents_( + ThermionDartTexture1 _lib, NSArray components) { + final _ret = _lib._objc_msgSend_395( + _lib._class_NSString1, _lib._sel_pathWithComponents_1, components._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray get pathComponents { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_pathComponents1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + bool get absolutePath { + return _lib._objc_msgSend_12(_id, _lib._sel_isAbsolutePath1); + } + + NSString get lastPathComponent { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_lastPathComponent1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get stringByDeletingLastPathComponent { + final _ret = _lib._objc_msgSend_21( + _id, _lib._sel_stringByDeletingLastPathComponent1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByAppendingPathComponent_(NSString str) { + final _ret = _lib._objc_msgSend_68( + _id, _lib._sel_stringByAppendingPathComponent_1, str._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get pathExtension { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_pathExtension1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get stringByDeletingPathExtension { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_stringByDeletingPathExtension1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? stringByAppendingPathExtension_(NSString str) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_stringByAppendingPathExtension_1, str._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get stringByAbbreviatingWithTildeInPath { + final _ret = _lib._objc_msgSend_21( + _id, _lib._sel_stringByAbbreviatingWithTildeInPath1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get stringByExpandingTildeInPath { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_stringByExpandingTildeInPath1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get stringByStandardizingPath { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_stringByStandardizingPath1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get stringByResolvingSymlinksInPath { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_stringByResolvingSymlinksInPath1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray stringsByAppendingPaths_(NSArray paths) { + final _ret = _lib._objc_msgSend_67( + _id, _lib._sel_stringsByAppendingPaths_1, paths._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + int completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_( + ffi.Pointer> outputName, + bool flag, + ffi.Pointer> outputArray, + NSArray? filterTypes) { + return _lib._objc_msgSend_396( + _id, + _lib._sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_1, + outputName, + flag, + outputArray, + filterTypes?._id ?? ffi.nullptr); + } + + ffi.Pointer get fileSystemRepresentation { + return _lib._objc_msgSend_13(_id, _lib._sel_fileSystemRepresentation1); + } + + bool getFileSystemRepresentation_maxLength_( + ffi.Pointer cname, int max) { + return _lib._objc_msgSend_241( + _id, _lib._sel_getFileSystemRepresentation_maxLength_1, cname, max); + } + + NSString? stringByAddingPercentEncodingWithAllowedCharacters_( + NSCharacterSet allowedCharacters) { + final _ret = _lib._objc_msgSend_397( + _id, + _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, + allowedCharacters._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get stringByRemovingPercentEncoding { + final _ret = + _lib._objc_msgSend_43(_id, _lib._sel_stringByRemovingPercentEncoding1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? stringByAddingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_398( + _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? stringByReplacingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_398( + _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray linguisticTagsInRange_scheme_options_orthography_tokenRanges_( + _NSRange range, + NSString scheme, + int options, + NSOrthography? orthography, + ffi.Pointer> tokenRanges) { + final _ret = _lib._objc_msgSend_400( + _id, + _lib._sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_1, + range, + scheme._id, + options, + orthography?._id ?? ffi.nullptr, + tokenRanges); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + void enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_( + _NSRange range, + NSString scheme, + int options, + NSOrthography? orthography, + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { + _lib._objc_msgSend_401( + _id, + _lib._sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_1, + range, + scheme._id, + options, + orthography?._id ?? ffi.nullptr, + block._id); + } + + static NSString new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_new1); + return NSString._(_ret, _lib, retain: false, release: true); + } + + static NSString allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSString1, _lib._sel_allocWithZone_1, zone); + return NSString._(_ret, _lib, retain: false, release: true); + } + + static NSString alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); + return NSString._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSString1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSString1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSString1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSString1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSString1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSString1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSString1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSString1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSString1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +extension StringToNSString on String { + NSString toNSString(ThermionDartTexture1 lib) => NSString(lib, this); +} + +class NSCoder extends NSObject { + NSCoder._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSCoder] that points to the same underlying object as [other]. + static NSCoder castFrom(T other) { + return NSCoder._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSCoder] that wraps the given raw object pointer. + static NSCoder castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCoder._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSCoder]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCoder1); + } + + void encodeValueOfObjCType_at_( + ffi.Pointer type, ffi.Pointer addr) { + _lib._objc_msgSend_19( + _id, _lib._sel_encodeValueOfObjCType_at_1, type, addr); + } + + void encodeDataObject_(NSData data) { + _lib._objc_msgSend_284(_id, _lib._sel_encodeDataObject_1, data._id); + } + + NSData? decodeDataObject() { + final _ret = _lib._objc_msgSend_285(_id, _lib._sel_decodeDataObject1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + void decodeValueOfObjCType_at_size_( + ffi.Pointer type, ffi.Pointer data, int size) { + _lib._objc_msgSend_286( + _id, _lib._sel_decodeValueOfObjCType_at_size_1, type, data, size); + } + + int versionForClassName_(NSString className) { + return _lib._objc_msgSend_287( + _id, _lib._sel_versionForClassName_1, className._id); + } + + void encodeObject_(NSObject? object) { + _lib._objc_msgSend_288( + _id, _lib._sel_encodeObject_1, object?._id ?? ffi.nullptr); + } + + void encodeRootObject_(NSObject rootObject) { + _lib._objc_msgSend_15(_id, _lib._sel_encodeRootObject_1, rootObject._id); + } + + void encodeBycopyObject_(NSObject? anObject) { + _lib._objc_msgSend_288( + _id, _lib._sel_encodeBycopyObject_1, anObject?._id ?? ffi.nullptr); + } + + void encodeByrefObject_(NSObject? anObject) { + _lib._objc_msgSend_288( + _id, _lib._sel_encodeByrefObject_1, anObject?._id ?? ffi.nullptr); + } + + void encodeConditionalObject_(NSObject? object) { + _lib._objc_msgSend_288( + _id, _lib._sel_encodeConditionalObject_1, object?._id ?? ffi.nullptr); + } + + void encodeValuesOfObjCTypes_(ffi.Pointer types) { + _lib._objc_msgSend_289(_id, _lib._sel_encodeValuesOfObjCTypes_1, types); + } + + void encodeArrayOfObjCType_count_at_( + ffi.Pointer type, int count, ffi.Pointer array) { + _lib._objc_msgSend_290( + _id, _lib._sel_encodeArrayOfObjCType_count_at_1, type, count, array); + } + + void encodeBytes_length_(ffi.Pointer byteaddr, int length) { + _lib._objc_msgSend_22( + _id, _lib._sel_encodeBytes_length_1, byteaddr, length); + } + + NSObject? decodeObject() { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_decodeObject1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? decodeTopLevelObjectAndReturnError_( + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_291( + _id, _lib._sel_decodeTopLevelObjectAndReturnError_1, error); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void decodeValuesOfObjCTypes_(ffi.Pointer types) { + _lib._objc_msgSend_289(_id, _lib._sel_decodeValuesOfObjCTypes_1, types); + } + + void decodeArrayOfObjCType_count_at_( + ffi.Pointer itemType, int count, ffi.Pointer array) { + _lib._objc_msgSend_290(_id, _lib._sel_decodeArrayOfObjCType_count_at_1, + itemType, count, array); + } + + ffi.Pointer decodeBytesWithReturnedLength_( + ffi.Pointer lengthp) { + return _lib._objc_msgSend_292( + _id, _lib._sel_decodeBytesWithReturnedLength_1, lengthp); + } + + void encodePropertyList_(NSObject aPropertyList) { + _lib._objc_msgSend_15( + _id, _lib._sel_encodePropertyList_1, aPropertyList._id); + } + + NSObject? decodePropertyList() { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_decodePropertyList1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void setObjectZone_(ffi.Pointer<_NSZone> zone) { + _lib._objc_msgSend_293(_id, _lib._sel_setObjectZone_1, zone); + } + + ffi.Pointer<_NSZone> objectZone() { + return _lib._objc_msgSend_294(_id, _lib._sel_objectZone1); + } + + int get systemVersion { + return _lib._objc_msgSend_213(_id, _lib._sel_systemVersion1); + } + + bool get allowsKeyedCoding { + return _lib._objc_msgSend_12(_id, _lib._sel_allowsKeyedCoding1); + } + + void encodeObject_forKey_(NSObject? object, NSString key) { + _lib._objc_msgSend_134(_id, _lib._sel_encodeObject_forKey_1, + object?._id ?? ffi.nullptr, key._id); + } + + void encodeConditionalObject_forKey_(NSObject? object, NSString key) { + _lib._objc_msgSend_134(_id, _lib._sel_encodeConditionalObject_forKey_1, + object?._id ?? ffi.nullptr, key._id); + } + + void encodeBool_forKey_(bool value, NSString key) { + _lib._objc_msgSend_295(_id, _lib._sel_encodeBool_forKey_1, value, key._id); + } + + void encodeInt_forKey_(int value, NSString key) { + _lib._objc_msgSend_296(_id, _lib._sel_encodeInt_forKey_1, value, key._id); + } + + void encodeInt32_forKey_(int value, NSString key) { + _lib._objc_msgSend_297(_id, _lib._sel_encodeInt32_forKey_1, value, key._id); + } + + void encodeInt64_forKey_(int value, NSString key) { + _lib._objc_msgSend_298(_id, _lib._sel_encodeInt64_forKey_1, value, key._id); + } + + void encodeFloat_forKey_(double value, NSString key) { + _lib._objc_msgSend_299(_id, _lib._sel_encodeFloat_forKey_1, value, key._id); + } + + void encodeDouble_forKey_(double value, NSString key) { + _lib._objc_msgSend_300( + _id, _lib._sel_encodeDouble_forKey_1, value, key._id); + } + + void encodeBytes_length_forKey_( + ffi.Pointer bytes, int length, NSString key) { + _lib._objc_msgSend_301( + _id, _lib._sel_encodeBytes_length_forKey_1, bytes, length, key._id); + } + + bool containsValueForKey_(NSString key) { + return _lib._objc_msgSend_63(_id, _lib._sel_containsValueForKey_1, key._id); + } + + NSObject? decodeObjectForKey_(NSString key) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_decodeObjectForKey_1, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? decodeTopLevelObjectForKey_error_( + NSString key, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_302( + _id, _lib._sel_decodeTopLevelObjectForKey_error_1, key._id, error); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + bool decodeBoolForKey_(NSString key) { + return _lib._objc_msgSend_63(_id, _lib._sel_decodeBoolForKey_1, key._id); + } + + int decodeIntForKey_(NSString key) { + return _lib._objc_msgSend_303(_id, _lib._sel_decodeIntForKey_1, key._id); + } + + int decodeInt32ForKey_(NSString key) { + return _lib._objc_msgSend_304(_id, _lib._sel_decodeInt32ForKey_1, key._id); + } + + int decodeInt64ForKey_(NSString key) { + return _lib._objc_msgSend_305(_id, _lib._sel_decodeInt64ForKey_1, key._id); + } + + double decodeFloatForKey_(NSString key) { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_306_fpret( + _id, _lib._sel_decodeFloatForKey_1, key._id) + : _lib._objc_msgSend_306(_id, _lib._sel_decodeFloatForKey_1, key._id); + } + + double decodeDoubleForKey_(NSString key) { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_307_fpret( + _id, _lib._sel_decodeDoubleForKey_1, key._id) + : _lib._objc_msgSend_307(_id, _lib._sel_decodeDoubleForKey_1, key._id); + } + + ffi.Pointer decodeBytesForKey_returnedLength_( + NSString key, ffi.Pointer lengthp) { + return _lib._objc_msgSend_308( + _id, _lib._sel_decodeBytesForKey_returnedLength_1, key._id, lengthp); + } + + void encodeInteger_forKey_(int value, NSString key) { + _lib._objc_msgSend_309( + _id, _lib._sel_encodeInteger_forKey_1, value, key._id); + } + + int decodeIntegerForKey_(NSString key) { + return _lib._objc_msgSend_287( + _id, _lib._sel_decodeIntegerForKey_1, key._id); + } + + bool get requiresSecureCoding { + return _lib._objc_msgSend_12(_id, _lib._sel_requiresSecureCoding1); + } + + NSObject? decodeObjectOfClass_forKey_(NSObject aClass, NSString key) { + final _ret = _lib._objc_msgSend_310( + _id, _lib._sel_decodeObjectOfClass_forKey_1, aClass._id, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? decodeTopLevelObjectOfClass_forKey_error_(NSObject aClass, + NSString key, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_311( + _id, + _lib._sel_decodeTopLevelObjectOfClass_forKey_error_1, + aClass._id, + key._id, + error); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSArray? decodeArrayOfObjectsOfClass_forKey_(NSObject cls, NSString key) { + final _ret = _lib._objc_msgSend_312( + _id, _lib._sel_decodeArrayOfObjectsOfClass_forKey_1, cls._id, key._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_( + NSObject keyCls, NSObject objectCls, NSString key) { + final _ret = _lib._objc_msgSend_313( + _id, + _lib._sel_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_1, + keyCls._id, + objectCls._id, + key._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSObject? decodeObjectOfClasses_forKey_(NSSet? classes, NSString key) { + final _ret = _lib._objc_msgSend_314( + _id, + _lib._sel_decodeObjectOfClasses_forKey_1, + classes?._id ?? ffi.nullptr, + key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? decodeTopLevelObjectOfClasses_forKey_error_(NSSet? classes, + NSString key, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_315( + _id, + _lib._sel_decodeTopLevelObjectOfClasses_forKey_error_1, + classes?._id ?? ffi.nullptr, + key._id, + error); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSArray? decodeArrayOfObjectsOfClasses_forKey_(NSSet classes, NSString key) { + final _ret = _lib._objc_msgSend_316(_id, + _lib._sel_decodeArrayOfObjectsOfClasses_forKey_1, classes._id, key._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_( + NSSet keyClasses, NSSet objectClasses, NSString key) { + final _ret = _lib._objc_msgSend_317( + _id, + _lib._sel_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_1, + keyClasses._id, + objectClasses._id, + key._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSObject? decodePropertyListForKey_(NSString key) { + final _ret = _lib._objc_msgSend_38( + _id, _lib._sel_decodePropertyListForKey_1, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSSet? get allowedClasses { + final _ret = _lib._objc_msgSend_318(_id, _lib._sel_allowedClasses1); + return _ret.address == 0 + ? null + : NSSet._(_ret, _lib, retain: true, release: true); + } + + void failWithError_(NSError error) { + _lib._objc_msgSend_319(_id, _lib._sel_failWithError_1, error._id); + } + + int get decodingFailurePolicy { + return _lib._objc_msgSend_320(_id, _lib._sel_decodingFailurePolicy1); + } + + NSError? get error { + final _ret = _lib._objc_msgSend_321(_id, _lib._sel_error1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } + + void encodeNXObject_(NSObject object) { + _lib._objc_msgSend_15(_id, _lib._sel_encodeNXObject_1, object._id); + } + + NSObject? decodeNXObject() { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_decodeNXObject1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void decodeValueOfObjCType_at_( + ffi.Pointer type, ffi.Pointer data) { + _lib._objc_msgSend_19( + _id, _lib._sel_decodeValueOfObjCType_at_1, type, data); + } + + void encodePoint_(CGPoint point) { + _lib._objc_msgSend_322(_id, _lib._sel_encodePoint_1, point); + } + + void decodePoint(ffi.Pointer stret) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_58_stret(stret, _id, _lib._sel_decodePoint1) + : stret.ref = _lib._objc_msgSend_58(_id, _lib._sel_decodePoint1); + } + + void encodeSize_(CGSize size) { + _lib._objc_msgSend_323(_id, _lib._sel_encodeSize_1, size); + } + + void decodeSize(ffi.Pointer stret) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_59_stret(stret, _id, _lib._sel_decodeSize1) + : stret.ref = _lib._objc_msgSend_59(_id, _lib._sel_decodeSize1); + } + + void encodeRect_(CGRect rect) { + _lib._objc_msgSend_324(_id, _lib._sel_encodeRect_1, rect); + } + + void decodeRect(ffi.Pointer stret) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_60_stret(stret, _id, _lib._sel_decodeRect1) + : stret.ref = _lib._objc_msgSend_60(_id, _lib._sel_decodeRect1); + } + + void encodePoint_forKey_(CGPoint point, NSString key) { + _lib._objc_msgSend_325(_id, _lib._sel_encodePoint_forKey_1, point, key._id); + } + + void encodeSize_forKey_(CGSize size, NSString key) { + _lib._objc_msgSend_326(_id, _lib._sel_encodeSize_forKey_1, size, key._id); + } + + void encodeRect_forKey_(CGRect rect, NSString key) { + _lib._objc_msgSend_327(_id, _lib._sel_encodeRect_forKey_1, rect, key._id); + } + + void decodePointForKey_(ffi.Pointer stret, NSString key) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_328_stret( + stret, _id, _lib._sel_decodePointForKey_1, key._id) + : stret.ref = + _lib._objc_msgSend_328(_id, _lib._sel_decodePointForKey_1, key._id); + } + + void decodeSizeForKey_(ffi.Pointer stret, NSString key) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_329_stret( + stret, _id, _lib._sel_decodeSizeForKey_1, key._id) + : stret.ref = + _lib._objc_msgSend_329(_id, _lib._sel_decodeSizeForKey_1, key._id); + } + + void decodeRectForKey_(ffi.Pointer stret, NSString key) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_330_stret( + stret, _id, _lib._sel_decodeRectForKey_1, key._id) + : stret.ref = + _lib._objc_msgSend_330(_id, _lib._sel_decodeRectForKey_1, key._id); + } + + @override + NSCoder init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSCoder._(_ret, _lib, retain: true, release: true); + } + + static NSCoder new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSCoder1, _lib._sel_new1); + return NSCoder._(_ret, _lib, retain: false, release: true); + } + + static NSCoder allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSCoder1, _lib._sel_allocWithZone_1, zone); + return NSCoder._(_ret, _lib, retain: false, release: true); + } + + static NSCoder alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSCoder1, _lib._sel_alloc1); + return NSCoder._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSCoder1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSCoder1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSCoder1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSCoder1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSCoder1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSCoder1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSCoder1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSCoder1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSCoder1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSData extends NSObject { + NSData._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSData] that points to the same underlying object as [other]. + static NSData castFrom(T other) { + return NSData._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSData] that wraps the given raw object pointer. + static NSData castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSData._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); + } + + int get length { + return _lib._objc_msgSend_10(_id, _lib._sel_length1); + } + + ffi.Pointer get bytes { + return _lib._objc_msgSend_20(_id, _lib._sel_bytes1); + } + + NSString get description { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + void getBytes_length_(ffi.Pointer buffer, int length) { + _lib._objc_msgSend_22(_id, _lib._sel_getBytes_length_1, buffer, length); + } + + void getBytes_range_(ffi.Pointer buffer, _NSRange range) { + _lib._objc_msgSend_23(_id, _lib._sel_getBytes_range_1, buffer, range); + } + + bool isEqualToData_(NSData other) { + return _lib._objc_msgSend_24(_id, _lib._sel_isEqualToData_1, other._id); + } + + NSData subdataWithRange_(_NSRange range) { + final _ret = + _lib._objc_msgSend_25(_id, _lib._sel_subdataWithRange_1, range); + return NSData._(_ret, _lib, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_26( + _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _lib._objc_msgSend_133( + _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); + } + + bool writeToFile_options_error_(NSString path, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _lib._objc_msgSend_268(_id, _lib._sel_writeToFile_options_error_1, + path._id, writeOptionsMask, errorPtr); + } + + bool writeToURL_options_error_(NSURL url, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _lib._objc_msgSend_269(_id, _lib._sel_writeToURL_options_error_1, + url._id, writeOptionsMask, errorPtr); + } + + void rangeOfData_options_range_(ffi.Pointer<_NSRange> stret, + NSData dataToFind, int mask, _NSRange searchRange) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_270_stret( + stret, + _id, + _lib._sel_rangeOfData_options_range_1, + dataToFind._id, + mask, + searchRange) + : stret.ref = _lib._objc_msgSend_270( + _id, + _lib._sel_rangeOfData_options_range_1, + dataToFind._id, + mask, + searchRange); + } + + void enumerateByteRangesUsingBlock_( + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool block) { + _lib._objc_msgSend_271( + _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._id); + } + + static NSData data(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_data1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithBytes_length_( + ThermionDartTexture1 _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_272( + _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithBytesNoCopy_length_( + ThermionDartTexture1 _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_272(_lib._class_NSData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSData._(_ret, _lib, retain: false, release: true); + } + + static NSData dataWithBytesNoCopy_length_freeWhenDone_( + ThermionDartTexture1 _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_273(_lib._class_NSData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSData._(_ret, _lib, retain: false, release: true); + } + + static NSData? dataWithContentsOfFile_options_error_( + ThermionDartTexture1 _lib, + NSString path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_274( + _lib._class_NSData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path._id, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData? dataWithContentsOfURL_options_error_( + ThermionDartTexture1 _lib, + NSURL url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_275( + _lib._class_NSData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url._id, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData? dataWithContentsOfFile_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_38( + _lib._class_NSData1, _lib._sel_dataWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData? dataWithContentsOfURL_(ThermionDartTexture1 _lib, NSURL url) { + final _ret = _lib._objc_msgSend_276( + _lib._class_NSData1, _lib._sel_dataWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithBytes_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_272( + _id, _lib._sel_initWithBytes_length_1, bytes, length); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_272( + _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); + return NSData._(_ret, _lib, retain: false, release: true); + } + + NSData initWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _lib._objc_msgSend_273(_id, + _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSData._(_ret, _lib, retain: false, release: true); + } + + NSData initWithBytesNoCopy_length_deallocator_(ffi.Pointer bytes, + int length, ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { + final _ret = _lib._objc_msgSend_277( + _id, + _lib._sel_initWithBytesNoCopy_length_deallocator_1, + bytes, + length, + deallocator?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: false, release: true); + } + + NSData? initWithContentsOfFile_options_error_(NSString path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_274( + _id, + _lib._sel_initWithContentsOfFile_options_error_1, + path._id, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSData? initWithContentsOfURL_options_error_(NSURL url, int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_275( + _id, + _lib._sel_initWithContentsOfURL_options_error_1, + url._id, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSData? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_38( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSData? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_276(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithData_(NSData data) { + final _ret = + _lib._objc_msgSend_278(_id, _lib._sel_initWithData_1, data._id); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithData_(ThermionDartTexture1 _lib, NSData data) { + final _ret = _lib._objc_msgSend_278( + _lib._class_NSData1, _lib._sel_dataWithData_1, data._id); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData? initWithBase64EncodedString_options_( + NSString base64String, int options) { + final _ret = _lib._objc_msgSend_279( + _id, + _lib._sel_initWithBase64EncodedString_options_1, + base64String._id, + options); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSString base64EncodedStringWithOptions_(int options) { + final _ret = _lib._objc_msgSend_280( + _id, _lib._sel_base64EncodedStringWithOptions_1, options); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSData? initWithBase64EncodedData_options_(NSData base64Data, int options) { + final _ret = _lib._objc_msgSend_281(_id, + _lib._sel_initWithBase64EncodedData_options_1, base64Data._id, options); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSData base64EncodedDataWithOptions_(int options) { + final _ret = _lib._objc_msgSend_282( + _id, _lib._sel_base64EncodedDataWithOptions_1, options); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData? decompressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_283(_id, + _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSData? compressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_283( + _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + void getBytes_(ffi.Pointer buffer) { + _lib._objc_msgSend_51(_id, _lib._sel_getBytes_1, buffer); + } + + static NSObject? dataWithContentsOfMappedFile_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSData1, + _lib._sel_dataWithContentsOfMappedFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? initWithContentsOfMappedFile_(NSString path) { + final _ret = _lib._objc_msgSend_38( + _id, _lib._sel_initWithContentsOfMappedFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? initWithBase64Encoding_(NSString base64String) { + final _ret = _lib._objc_msgSend_38( + _id, _lib._sel_initWithBase64Encoding_1, base64String._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSString base64Encoding() { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_base64Encoding1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + @override + NSData init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); + return NSData._(_ret, _lib, retain: false, release: true); + } + + static NSData allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSData1, _lib._sel_allocWithZone_1, zone); + return NSData._(_ret, _lib, retain: false, release: true); + } + + static NSData alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); + return NSData._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSData1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSData1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSData1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSData1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSData1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSData1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSData1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSData1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSData1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +final class _NSRange extends ffi.Struct { + @ffi.UnsignedLong() + external int location; + + @ffi.UnsignedLong() + external int length; +} + +class NSURL extends NSObject { + NSURL._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURL] that points to the same underlying object as [other]. + static NSURL castFrom(T other) { + return NSURL._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURL] that wraps the given raw object pointer. + static NSURL castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURL._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURL]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURL1); + } + + NSURL? initWithScheme_host_path_( + NSString scheme, NSString? host, NSString path) { + final _ret = _lib._objc_msgSend_27( + _id, + _lib._sel_initWithScheme_host_path_1, + scheme._id, + host?._id ?? ffi.nullptr, + path._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL initFileURLWithPath_isDirectory_relativeToURL_( + NSString path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_28( + _id, + _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, + path._id, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL initFileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_29( + _id, + _lib._sel_initFileURLWithPath_relativeToURL_1, + path._id, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL initFileURLWithPath_isDirectory_(NSString path, bool isDir) { + final _ret = _lib._objc_msgSend_30( + _id, _lib._sel_initFileURLWithPath_isDirectory_1, path._id, isDir); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL initFileURLWithPath_(NSString path) { + final _ret = + _lib._objc_msgSend_31(_id, _lib._sel_initFileURLWithPath_1, path._id); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL fileURLWithPath_isDirectory_relativeToURL_( + ThermionDartTexture1 _lib, NSString path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_32( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, + path._id, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL fileURLWithPath_relativeToURL_( + ThermionDartTexture1 _lib, NSString path, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_33( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_relativeToURL_1, + path._id, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL fileURLWithPath_isDirectory_( + ThermionDartTexture1 _lib, NSString path, bool isDir) { + final _ret = _lib._objc_msgSend_34(_lib._class_NSURL1, + _lib._sel_fileURLWithPath_isDirectory_1, path._id, isDir); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL fileURLWithPath_(ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_35( + _lib._class_NSURL1, _lib._sel_fileURLWithPath_1, path._id); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + ffi.Pointer path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_36( + _id, + _lib._sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, + path, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + ThermionDartTexture1 _lib, + ffi.Pointer path, + bool isDir, + NSURL? baseURL) { + final _ret = _lib._objc_msgSend_37( + _lib._class_NSURL1, + _lib._sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, + path, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? initWithString_(NSString URLString) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_initWithString_1, URLString._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? initWithString_relativeToURL_(NSString URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_39( + _id, + _lib._sel_initWithString_relativeToURL_1, + URLString._id, + baseURL?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL? URLWithString_(ThermionDartTexture1 _lib, NSString URLString) { + final _ret = _lib._objc_msgSend_38( + _lib._class_NSURL1, _lib._sel_URLWithString_1, URLString._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL? URLWithString_relativeToURL_( + ThermionDartTexture1 _lib, NSString URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_39( + _lib._class_NSURL1, + _lib._sel_URLWithString_relativeToURL_1, + URLString._id, + baseURL?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL initWithDataRepresentation_relativeToURL_(NSData data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _id, + _lib._sel_initWithDataRepresentation_relativeToURL_1, + data._id, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL URLWithDataRepresentation_relativeToURL_( + ThermionDartTexture1 _lib, NSData data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_41( + _lib._class_NSURL1, + _lib._sel_URLWithDataRepresentation_relativeToURL_1, + data._id, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( + NSData data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _id, + _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, + data._id, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL absoluteURLWithDataRepresentation_relativeToURL_( + ThermionDartTexture1 _lib, NSData data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_41( + _lib._class_NSURL1, + _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, + data._id, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSData get dataRepresentation { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_dataRepresentation1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSString? get absoluteString { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_absoluteString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get relativeString { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_relativeString1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSURL? get baseURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_baseURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get absoluteURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_absoluteURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSString? get scheme { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_scheme1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get resourceSpecifier { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_resourceSpecifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get host { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_host1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSNumber? get port { + final _ret = _lib._objc_msgSend_214(_id, _lib._sel_port1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSString? get user { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_user1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get password { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_password1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get path { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_path1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get fragment { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_fragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get parameterString { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_parameterString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get query { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_query1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get relativePath { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_relativePath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + bool get hasDirectoryPath { + return _lib._objc_msgSend_12(_id, _lib._sel_hasDirectoryPath1); + } + + bool getFileSystemRepresentation_maxLength_( + ffi.Pointer buffer, int maxBufferLength) { + return _lib._objc_msgSend_241( + _id, + _lib._sel_getFileSystemRepresentation_maxLength_1, + buffer, + maxBufferLength); + } + + ffi.Pointer get fileSystemRepresentation { + return _lib._objc_msgSend_13(_id, _lib._sel_fileSystemRepresentation1); + } + + bool get fileURL { + return _lib._objc_msgSend_12(_id, _lib._sel_isFileURL1); + } + + NSURL? get standardizedURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_standardizedURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + bool checkResourceIsReachableAndReturnError_( + ffi.Pointer> error) { + return _lib._objc_msgSend_242( + _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); + } + + bool isFileReferenceURL() { + return _lib._objc_msgSend_12(_id, _lib._sel_isFileReferenceURL1); + } + + NSURL? fileReferenceURL() { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_fileReferenceURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get filePathURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_filePathURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + bool getResourceValue_forKey_error_( + ffi.Pointer> value, + NSString key, + ffi.Pointer> error) { + return _lib._objc_msgSend_243( + _id, _lib._sel_getResourceValue_forKey_error_1, value, key._id, error); + } + + NSObject? resourceValuesForKeys_error_( + NSArray keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_244( + _id, _lib._sel_resourceValuesForKeys_error_1, keys._id, error); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + bool setResourceValue_forKey_error_(NSObject? value, NSString key, + ffi.Pointer> error) { + return _lib._objc_msgSend_245( + _id, + _lib._sel_setResourceValue_forKey_error_1, + value?._id ?? ffi.nullptr, + key._id, + error); + } + + bool setResourceValues_error_( + NSObject keyedValues, ffi.Pointer> error) { + return _lib._objc_msgSend_246( + _id, _lib._sel_setResourceValues_error_1, keyedValues._id, error); + } + + void removeCachedResourceValueForKey_(NSString key) { + _lib._objc_msgSend_247( + _id, _lib._sel_removeCachedResourceValueForKey_1, key._id); + } + + void removeAllCachedResourceValues() { + _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); + } + + void setTemporaryResourceValue_forKey_(NSObject? value, NSString key) { + _lib._objc_msgSend_134(_id, _lib._sel_setTemporaryResourceValue_forKey_1, + value?._id ?? ffi.nullptr, key._id); + } + + NSData? + bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( + int options, + NSArray? keys, + NSURL? relativeURL, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_248( + _id, + _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, + options, + keys?._id ?? ffi.nullptr, + relativeURL?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSURL? + initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NSData bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_249( + _id, + _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, + bookmarkData._id, + options, + relativeURL?._id ?? ffi.nullptr, + isStale, + error); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL? + URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + ThermionDartTexture1 _lib, + NSData bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_249( + _lib._class_NSURL1, + _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, + bookmarkData._id, + options, + relativeURL?._id ?? ffi.nullptr, + isStale, + error); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSObject? resourceValuesForKeys_fromBookmarkData_( + ThermionDartTexture1 _lib, NSArray keys, NSData bookmarkData) { + final _ret = _lib._objc_msgSend_250( + _lib._class_NSURL1, + _lib._sel_resourceValuesForKeys_fromBookmarkData_1, + keys._id, + bookmarkData._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static bool writeBookmarkData_toURL_options_error_( + ThermionDartTexture1 _lib, + NSData bookmarkData, + NSURL bookmarkFileURL, + int options, + ffi.Pointer> error) { + return _lib._objc_msgSend_251( + _lib._class_NSURL1, + _lib._sel_writeBookmarkData_toURL_options_error_1, + bookmarkData._id, + bookmarkFileURL._id, + options, + error); + } + + static NSData? bookmarkDataWithContentsOfURL_error_(ThermionDartTexture1 _lib, + NSURL bookmarkFileURL, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_252( + _lib._class_NSURL1, + _lib._sel_bookmarkDataWithContentsOfURL_error_1, + bookmarkFileURL._id, + error); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + static NSURL? URLByResolvingAliasFileAtURL_options_error_( + ThermionDartTexture1 _lib, + NSURL url, + int options, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_253( + _lib._class_NSURL1, + _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, + url._id, + options, + error); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + bool startAccessingSecurityScopedResource() { + return _lib._objc_msgSend_12( + _id, _lib._sel_startAccessingSecurityScopedResource1); + } + + void stopAccessingSecurityScopedResource() { + _lib._objc_msgSend_1(_id, _lib._sel_stopAccessingSecurityScopedResource1); + } + + bool getPromisedItemResourceValue_forKey_error_( + ffi.Pointer> value, + NSString key, + ffi.Pointer> error) { + return _lib._objc_msgSend_243( + _id, + _lib._sel_getPromisedItemResourceValue_forKey_error_1, + value, + key._id, + error); + } + + NSDictionary? promisedItemResourceValuesForKeys_error_( + NSArray keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_254(_id, + _lib._sel_promisedItemResourceValuesForKeys_error_1, keys._id, error); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + bool checkPromisedItemIsReachableAndReturnError_( + ffi.Pointer> error) { + return _lib._objc_msgSend_242( + _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); + } + + static NSURL? fileURLWithPathComponents_( + ThermionDartTexture1 _lib, NSArray components) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSURL1, + _lib._sel_fileURLWithPathComponents_1, components._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSArray? get pathComponents { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_pathComponents1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? get lastPathComponent { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_lastPathComponent1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get pathExtension { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_pathExtension1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSURL? URLByAppendingPathComponent_(NSString pathComponent) { + final _ret = _lib._objc_msgSend_256( + _id, _lib._sel_URLByAppendingPathComponent_1, pathComponent._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? URLByAppendingPathComponent_isDirectory_( + NSString pathComponent, bool isDirectory) { + final _ret = _lib._objc_msgSend_257( + _id, + _lib._sel_URLByAppendingPathComponent_isDirectory_1, + pathComponent._id, + isDirectory); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get URLByDeletingLastPathComponent { + final _ret = + _lib._objc_msgSend_44(_id, _lib._sel_URLByDeletingLastPathComponent1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? URLByAppendingPathExtension_(NSString pathExtension) { + final _ret = _lib._objc_msgSend_256( + _id, _lib._sel_URLByAppendingPathExtension_1, pathExtension._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get URLByDeletingPathExtension { + final _ret = + _lib._objc_msgSend_44(_id, _lib._sel_URLByDeletingPathExtension1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get URLByStandardizingPath { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_URLByStandardizingPath1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get URLByResolvingSymlinksInPath { + final _ret = + _lib._objc_msgSend_44(_id, _lib._sel_URLByResolvingSymlinksInPath1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSData? resourceDataUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_258( + _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + void loadResourceDataNotifyingClient_usingCache_( + NSObject client, bool shouldUseCache) { + _lib._objc_msgSend_259( + _id, + _lib._sel_loadResourceDataNotifyingClient_usingCache_1, + client._id, + shouldUseCache); + } + + NSObject? propertyForKey_(NSString propertyKey) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_propertyForKey_1, propertyKey._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + bool setResourceData_(NSData data) { + return _lib._objc_msgSend_24(_id, _lib._sel_setResourceData_1, data._id); + } + + bool setProperty_forKey_(NSObject property, NSString propertyKey) { + return _lib._objc_msgSend_260( + _id, _lib._sel_setProperty_forKey_1, property._id, propertyKey._id); + } + + NSURLHandle? URLHandleUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_267( + _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); + return _ret.address == 0 + ? null + : NSURLHandle._(_ret, _lib, retain: true, release: true); + } + + @override + NSURL init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_new1); + return NSURL._(_ret, _lib, retain: false, release: true); + } + + static NSURL allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURL1, _lib._sel_allocWithZone_1, zone); + return NSURL._(_ret, _lib, retain: false, release: true); + } + + static NSURL alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); + return NSURL._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURL1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURL1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURL1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURL1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURL1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURL1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURL1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSURL1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURL1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSNumber extends NSValue { + NSNumber._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNumber] that points to the same underlying object as [other]. + static NSNumber castFrom(T other) { + return NSNumber._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSNumber] that wraps the given raw object pointer. + static NSNumber castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNumber._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNumber]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNumber1); + } + + @override + NSNumber? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithChar_(int value) { + final _ret = _lib._objc_msgSend_219(_id, _lib._sel_initWithChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedChar_(int value) { + final _ret = + _lib._objc_msgSend_220(_id, _lib._sel_initWithUnsignedChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithShort_(int value) { + final _ret = _lib._objc_msgSend_221(_id, _lib._sel_initWithShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedShort_(int value) { + final _ret = + _lib._objc_msgSend_222(_id, _lib._sel_initWithUnsignedShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithInt_(int value) { + final _ret = _lib._objc_msgSend_223(_id, _lib._sel_initWithInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedInt_(int value) { + final _ret = + _lib._objc_msgSend_224(_id, _lib._sel_initWithUnsignedInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithLong_(int value) { + final _ret = _lib._objc_msgSend_225(_id, _lib._sel_initWithLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedLong_(int value) { + final _ret = + _lib._objc_msgSend_226(_id, _lib._sel_initWithUnsignedLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithLongLong_(int value) { + final _ret = + _lib._objc_msgSend_227(_id, _lib._sel_initWithLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedLongLong_(int value) { + final _ret = _lib._objc_msgSend_228( + _id, _lib._sel_initWithUnsignedLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithFloat_(double value) { + final _ret = _lib._objc_msgSend_229(_id, _lib._sel_initWithFloat_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithDouble_(double value) { + final _ret = _lib._objc_msgSend_230(_id, _lib._sel_initWithDouble_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithBool_(bool value) { + final _ret = _lib._objc_msgSend_231(_id, _lib._sel_initWithBool_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithInteger_(int value) { + final _ret = + _lib._objc_msgSend_225(_id, _lib._sel_initWithInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedInteger_(int value) { + final _ret = + _lib._objc_msgSend_226(_id, _lib._sel_initWithUnsignedInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + int get charValue { + return _lib._objc_msgSend_232(_id, _lib._sel_charValue1); + } + + int get unsignedCharValue { + return _lib._objc_msgSend_233(_id, _lib._sel_unsignedCharValue1); + } + + int get shortValue { + return _lib._objc_msgSend_234(_id, _lib._sel_shortValue1); + } + + int get unsignedShortValue { + return _lib._objc_msgSend_235(_id, _lib._sel_unsignedShortValue1); + } + + int get intValue { + return _lib._objc_msgSend_236(_id, _lib._sel_intValue1); + } + + int get unsignedIntValue { + return _lib._objc_msgSend_213(_id, _lib._sel_unsignedIntValue1); + } + + int get longValue { + return _lib._objc_msgSend_82(_id, _lib._sel_longValue1); + } + + int get unsignedLongValue { + return _lib._objc_msgSend_10(_id, _lib._sel_unsignedLongValue1); + } + + int get longLongValue { + return _lib._objc_msgSend_237(_id, _lib._sel_longLongValue1); + } + + int get unsignedLongLongValue { + return _lib._objc_msgSend_163(_id, _lib._sel_unsignedLongLongValue1); + } + + double get floatValue { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_238_fpret(_id, _lib._sel_floatValue1) + : _lib._objc_msgSend_238(_id, _lib._sel_floatValue1); + } + + double get doubleValue { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_doubleValue1) + : _lib._objc_msgSend_164(_id, _lib._sel_doubleValue1); + } + + bool get boolValue { + return _lib._objc_msgSend_12(_id, _lib._sel_boolValue1); + } + + int get integerValue { + return _lib._objc_msgSend_82(_id, _lib._sel_integerValue1); + } + + int get unsignedIntegerValue { + return _lib._objc_msgSend_10(_id, _lib._sel_unsignedIntegerValue1); + } + + NSString get stringValue { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_stringValue1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + int compare_(NSNumber otherNumber) { + return _lib._objc_msgSend_239(_id, _lib._sel_compare_1, otherNumber._id); + } + + bool isEqualToNumber_(NSNumber number) { + return _lib._objc_msgSend_240(_id, _lib._sel_isEqualToNumber_1, number._id); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _lib._objc_msgSend_69( + _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithChar_(ThermionDartTexture1 _lib, int value) { + final _ret = _lib._objc_msgSend_219( + _lib._class_NSNumber1, _lib._sel_numberWithChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithUnsignedChar_( + ThermionDartTexture1 _lib, int value) { + final _ret = _lib._objc_msgSend_220( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithShort_(ThermionDartTexture1 _lib, int value) { + final _ret = _lib._objc_msgSend_221( + _lib._class_NSNumber1, _lib._sel_numberWithShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithUnsignedShort_( + ThermionDartTexture1 _lib, int value) { + final _ret = _lib._objc_msgSend_222( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithInt_(ThermionDartTexture1 _lib, int value) { + final _ret = _lib._objc_msgSend_223( + _lib._class_NSNumber1, _lib._sel_numberWithInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithUnsignedInt_(ThermionDartTexture1 _lib, int value) { + final _ret = _lib._objc_msgSend_224( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithLong_(ThermionDartTexture1 _lib, int value) { + final _ret = _lib._objc_msgSend_225( + _lib._class_NSNumber1, _lib._sel_numberWithLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithUnsignedLong_( + ThermionDartTexture1 _lib, int value) { + final _ret = _lib._objc_msgSend_226( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithLongLong_(ThermionDartTexture1 _lib, int value) { + final _ret = _lib._objc_msgSend_227( + _lib._class_NSNumber1, _lib._sel_numberWithLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithUnsignedLongLong_( + ThermionDartTexture1 _lib, int value) { + final _ret = _lib._objc_msgSend_228( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithFloat_(ThermionDartTexture1 _lib, double value) { + final _ret = _lib._objc_msgSend_229( + _lib._class_NSNumber1, _lib._sel_numberWithFloat_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithDouble_(ThermionDartTexture1 _lib, double value) { + final _ret = _lib._objc_msgSend_230( + _lib._class_NSNumber1, _lib._sel_numberWithDouble_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithBool_(ThermionDartTexture1 _lib, bool value) { + final _ret = _lib._objc_msgSend_231( + _lib._class_NSNumber1, _lib._sel_numberWithBool_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithInteger_(ThermionDartTexture1 _lib, int value) { + final _ret = _lib._objc_msgSend_225( + _lib._class_NSNumber1, _lib._sel_numberWithInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithUnsignedInteger_( + ThermionDartTexture1 _lib, int value) { + final _ret = _lib._objc_msgSend_226( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + @override + NSNumber initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_45( + _id, _lib._sel_initWithBytes_objCType_1, value, type); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithBytes_objCType_(ThermionDartTexture1 _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_47(_lib._class_NSNumber1, + _lib._sel_valueWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue value_withObjCType_(ThermionDartTexture1 _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_47( + _lib._class_NSNumber1, _lib._sel_value_withObjCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithNonretainedObject_( + ThermionDartTexture1 _lib, NSObject? anObject) { + final _ret = _lib._objc_msgSend_48(_lib._class_NSNumber1, + _lib._sel_valueWithNonretainedObject_1, anObject?._id ?? ffi.nullptr); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithPointer_( + ThermionDartTexture1 _lib, ffi.Pointer pointer) { + final _ret = _lib._objc_msgSend_49( + _lib._class_NSNumber1, _lib._sel_valueWithPointer_1, pointer); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithRange_(ThermionDartTexture1 _lib, _NSRange range) { + final _ret = _lib._objc_msgSend_52( + _lib._class_NSNumber1, _lib._sel_valueWithRange_1, range); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithPoint_(ThermionDartTexture1 _lib, CGPoint point) { + final _ret = _lib._objc_msgSend_54( + _lib._class_NSNumber1, _lib._sel_valueWithPoint_1, point); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithSize_(ThermionDartTexture1 _lib, CGSize size) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSNumber1, _lib._sel_valueWithSize_1, size); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithRect_(ThermionDartTexture1 _lib, CGRect rect) { + final _ret = _lib._objc_msgSend_56( + _lib._class_NSNumber1, _lib._sel_valueWithRect_1, rect); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithEdgeInsets_( + ThermionDartTexture1 _lib, NSEdgeInsets insets) { + final _ret = _lib._objc_msgSend_57( + _lib._class_NSNumber1, _lib._sel_valueWithEdgeInsets_1, insets); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + @override + NSNumber init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); + return NSNumber._(_ret, _lib, retain: false, release: true); + } + + static NSNumber allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSNumber1, _lib._sel_allocWithZone_1, zone); + return NSNumber._(_ret, _lib, retain: false, release: true); + } + + static NSNumber alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); + return NSNumber._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSNumber1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSNumber1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSNumber1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSNumber1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSNumber1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSNumber1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSNumber1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSNumber1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSNumber1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSValue extends NSObject { + NSValue._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSValue] that points to the same underlying object as [other]. + static NSValue castFrom(T other) { + return NSValue._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSValue] that wraps the given raw object pointer. + static NSValue castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSValue._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSValue]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); + } + + void getValue_size_(ffi.Pointer value, int size) { + _lib._objc_msgSend_22(_id, _lib._sel_getValue_size_1, value, size); + } + + ffi.Pointer get objCType { + return _lib._objc_msgSend_13(_id, _lib._sel_objCType1); + } + + NSValue initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_45( + _id, _lib._sel_initWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + NSValue? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithBytes_objCType_(ThermionDartTexture1 _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_47( + _lib._class_NSValue1, _lib._sel_valueWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue value_withObjCType_(ThermionDartTexture1 _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_47( + _lib._class_NSValue1, _lib._sel_value_withObjCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithNonretainedObject_( + ThermionDartTexture1 _lib, NSObject? anObject) { + final _ret = _lib._objc_msgSend_48(_lib._class_NSValue1, + _lib._sel_valueWithNonretainedObject_1, anObject?._id ?? ffi.nullptr); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + NSObject? get nonretainedObjectValue { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_nonretainedObjectValue1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithPointer_( + ThermionDartTexture1 _lib, ffi.Pointer pointer) { + final _ret = _lib._objc_msgSend_49( + _lib._class_NSValue1, _lib._sel_valueWithPointer_1, pointer); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + ffi.Pointer get pointerValue { + return _lib._objc_msgSend_20(_id, _lib._sel_pointerValue1); + } + + bool isEqualToValue_(NSValue value) { + return _lib._objc_msgSend_50(_id, _lib._sel_isEqualToValue_1, value._id); + } + + void getValue_(ffi.Pointer value) { + _lib._objc_msgSend_51(_id, _lib._sel_getValue_1, value); + } + + static NSValue valueWithRange_(ThermionDartTexture1 _lib, _NSRange range) { + final _ret = _lib._objc_msgSend_52( + _lib._class_NSValue1, _lib._sel_valueWithRange_1, range); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + void getRangeValue(ffi.Pointer<_NSRange> stret) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_53_stret(stret, _id, _lib._sel_rangeValue1) + : stret.ref = _lib._objc_msgSend_53(_id, _lib._sel_rangeValue1); + } + + static NSValue valueWithPoint_(ThermionDartTexture1 _lib, CGPoint point) { + final _ret = _lib._objc_msgSend_54( + _lib._class_NSValue1, _lib._sel_valueWithPoint_1, point); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithSize_(ThermionDartTexture1 _lib, CGSize size) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSValue1, _lib._sel_valueWithSize_1, size); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithRect_(ThermionDartTexture1 _lib, CGRect rect) { + final _ret = _lib._objc_msgSend_56( + _lib._class_NSValue1, _lib._sel_valueWithRect_1, rect); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithEdgeInsets_( + ThermionDartTexture1 _lib, NSEdgeInsets insets) { + final _ret = _lib._objc_msgSend_57( + _lib._class_NSValue1, _lib._sel_valueWithEdgeInsets_1, insets); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + void getPointValue(ffi.Pointer stret) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_58_stret(stret, _id, _lib._sel_pointValue1) + : stret.ref = _lib._objc_msgSend_58(_id, _lib._sel_pointValue1); + } + + void getSizeValue(ffi.Pointer stret) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_59_stret(stret, _id, _lib._sel_sizeValue1) + : stret.ref = _lib._objc_msgSend_59(_id, _lib._sel_sizeValue1); + } + + void getRectValue(ffi.Pointer stret) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_60_stret(stret, _id, _lib._sel_rectValue1) + : stret.ref = _lib._objc_msgSend_60(_id, _lib._sel_rectValue1); + } + + void getEdgeInsetsValue(ffi.Pointer stret) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_61_stret(stret, _id, _lib._sel_edgeInsetsValue1) + : stret.ref = _lib._objc_msgSend_61(_id, _lib._sel_edgeInsetsValue1); + } + + @override + NSValue init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_new1); + return NSValue._(_ret, _lib, retain: false, release: true); + } + + static NSValue allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSValue1, _lib._sel_allocWithZone_1, zone); + return NSValue._(_ret, _lib, retain: false, release: true); + } + + static NSValue alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); + return NSValue._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSValue1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSValue1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSValue1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSValue1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSValue1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSValue1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSValue1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSValue1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSValue1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +final class CGPoint extends ffi.Struct { + @ffi.Double() + external double x; + + @ffi.Double() + external double y; +} + +final class CGSize extends ffi.Struct { + @ffi.Double() + external double width; + + @ffi.Double() + external double height; +} + +final class CGRect extends ffi.Struct { + external CGPoint origin; + + external CGSize size; +} + +final class NSEdgeInsets extends ffi.Struct { + @ffi.Double() + external double top; + + @ffi.Double() + external double left; + + @ffi.Double() + external double bottom; + + @ffi.Double() + external double right; +} + +class NSArray extends NSObject { + NSArray._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSArray] that points to the same underlying object as [other]. + static NSArray castFrom(T other) { + return NSArray._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSArray] that wraps the given raw object pointer. + static NSArray castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSArray._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSArray]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); + } + + int get count { + return _lib._objc_msgSend_10(_id, _lib._sel_count1); + } + + NSObject objectAtIndex_(int index) { + final _ret = _lib._objc_msgSend_64(_id, _lib._sel_objectAtIndex_1, index); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + @override + NSArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_65( + _id, _lib._sel_initWithObjects_count_1, objects, cnt); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray arrayByAddingObject_(NSObject anObject) { + final _ret = _lib._objc_msgSend_66( + _id, _lib._sel_arrayByAddingObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray arrayByAddingObjectsFromArray_(NSArray otherArray) { + final _ret = _lib._objc_msgSend_67( + _id, _lib._sel_arrayByAddingObjectsFromArray_1, otherArray._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString componentsJoinedByString_(NSString separator) { + final _ret = _lib._objc_msgSend_68( + _id, _lib._sel_componentsJoinedByString_1, separator._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool containsObject_(NSObject anObject) { + return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); + } + + NSString get description { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _lib._objc_msgSend_69( + _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_indent_(NSObject? locale, int level) { + final _ret = _lib._objc_msgSend_70( + _id, + _lib._sel_descriptionWithLocale_indent_1, + locale?._id ?? ffi.nullptr, + level); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSObject? firstObjectCommonWithArray_(NSArray otherArray) { + final _ret = _lib._objc_msgSend_71( + _id, _lib._sel_firstObjectCommonWithArray_1, otherArray._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void getObjects_range_( + ffi.Pointer> objects, _NSRange range) { + _lib._objc_msgSend_72(_id, _lib._sel_getObjects_range_1, objects, range); + } + + int indexOfObject_(NSObject anObject) { + return _lib._objc_msgSend_73(_id, _lib._sel_indexOfObject_1, anObject._id); + } + + int indexOfObject_inRange_(NSObject anObject, _NSRange range) { + return _lib._objc_msgSend_74( + _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); + } + + int indexOfObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_73( + _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); + } + + int indexOfObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { + return _lib._objc_msgSend_74( + _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); + } + + bool isEqualToArray_(NSArray otherArray) { + return _lib._objc_msgSend_75( + _id, _lib._sel_isEqualToArray_1, otherArray._id); + } + + NSObject? get firstObject { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_firstObject1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? get lastObject { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_lastObject1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_76(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + NSEnumerator reverseObjectEnumerator() { + final _ret = _lib._objc_msgSend_76(_id, _lib._sel_reverseObjectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + NSData get sortedArrayHint { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_sortedArrayHint1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSArray sortedArrayUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context) { + final _ret = _lib._objc_msgSend_77( + _id, _lib._sel_sortedArrayUsingFunction_context_1, comparator, context); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray sortedArrayUsingFunction_context_hint_( + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + NSData? hint) { + final _ret = _lib._objc_msgSend_78( + _id, + _lib._sel_sortedArrayUsingFunction_context_hint_1, + comparator, + context, + hint?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { + final _ret = _lib._objc_msgSend_79( + _id, _lib._sel_sortedArrayUsingSelector_1, comparator); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray subarrayWithRange_(_NSRange range) { + final _ret = + _lib._objc_msgSend_80(_id, _lib._sel_subarrayWithRange_1, range); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + bool writeToURL_error_( + NSURL url, ffi.Pointer> error) { + return _lib._objc_msgSend_88( + _id, _lib._sel_writeToURL_error_1, url._id, error); + } + + void makeObjectsPerformSelector_(ffi.Pointer aSelector) { + _lib._objc_msgSend_7( + _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); + } + + void makeObjectsPerformSelector_withObject_( + ffi.Pointer aSelector, NSObject? argument) { + _lib._objc_msgSend_89( + _id, + _lib._sel_makeObjectsPerformSelector_withObject_1, + aSelector, + argument?._id ?? ffi.nullptr); + } + + NSArray objectsAtIndexes_(NSIndexSet indexes) { + final _ret = + _lib._objc_msgSend_110(_id, _lib._sel_objectsAtIndexes_1, indexes._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSObject objectAtIndexedSubscript_(int idx) { + final _ret = + _lib._objc_msgSend_64(_id, _lib._sel_objectAtIndexedSubscript_1, idx); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void enumerateObjectsUsingBlock_( + ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { + _lib._objc_msgSend_111( + _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); + } + + void enumerateObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { + _lib._objc_msgSend_112(_id, + _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); + } + + void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, + ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { + _lib._objc_msgSend_113( + _id, + _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, + s._id, + opts, + block._id); + } + + int indexOfObjectPassingTest_( + ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); + } + + int indexOfObjectWithOptions_passingTest_( + int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { + return _lib._objc_msgSend_115(_id, + _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); + } + + int indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, int opts, + ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { + return _lib._objc_msgSend_116( + _id, + _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, + s._id, + opts, + predicate._id); + } + + NSIndexSet indexesOfObjectsPassingTest_( + ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _lib._objc_msgSend_117( + _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesOfObjectsWithOptions_passingTest_( + int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _lib._objc_msgSend_118( + _id, + _lib._sel_indexesOfObjectsWithOptions_passingTest_1, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, + int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _lib._objc_msgSend_119( + _id, + _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, + s._id, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSArray sortedArrayUsingComparator_( + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { + final _ret = _lib._objc_msgSend_120( + _id, _lib._sel_sortedArrayUsingComparator_1, cmptr._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray sortedArrayWithOptions_usingComparator_( + int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { + final _ret = _lib._objc_msgSend_121(_id, + _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + int indexOfObject_inSortedRange_options_usingComparator_( + NSObject obj, + _NSRange r, + int opts, + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmp) { + return _lib._objc_msgSend_122( + _id, + _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, + obj._id, + r, + opts, + cmp._id); + } + + static NSArray array(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_array1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithObject_( + ThermionDartTexture1 _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_123( + _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithObjects_count_(ThermionDartTexture1 _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_65( + _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithObjects_( + ThermionDartTexture1 _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_123( + _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithArray_(ThermionDartTexture1 _lib, NSArray array) { + final _ret = _lib._objc_msgSend_124( + _lib._class_NSArray1, _lib._sel_arrayWithArray_1, array._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithObjects_(NSObject firstObj) { + final _ret = + _lib._objc_msgSend_123(_id, _lib._sel_initWithObjects_1, firstObj._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithArray_(NSArray array) { + final _ret = + _lib._objc_msgSend_124(_id, _lib._sel_initWithArray_1, array._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithArray_copyItems_(NSArray array, bool flag) { + final _ret = _lib._objc_msgSend_125( + _id, _lib._sel_initWithArray_copyItems_1, array._id, flag); + return NSArray._(_ret, _lib, retain: false, release: true); + } + + NSArray? initWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_126( + _id, _lib._sel_initWithContentsOfURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray? arrayWithContentsOfURL_error_(ThermionDartTexture1 _lib, + NSURL url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_126(_lib._class_NSArray1, + _lib._sel_arrayWithContentsOfURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSObject differenceFromArray_withOptions_usingEquivalenceTest_( + NSArray other, int options, ObjCBlock_bool_ObjCObject_ObjCObject block) { + final _ret = _lib._objc_msgSend_127( + _id, + _lib._sel_differenceFromArray_withOptions_usingEquivalenceTest_1, + other._id, + options, + block._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject differenceFromArray_withOptions_(NSArray other, int options) { + final _ret = _lib._objc_msgSend_128( + _id, _lib._sel_differenceFromArray_withOptions_1, other._id, options); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject differenceFromArray_(NSArray other) { + final _ret = + _lib._objc_msgSend_124(_id, _lib._sel_differenceFromArray_1, other._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSArray? arrayByApplyingDifference_(NSObject difference) { + final _ret = _lib._objc_msgSend_129( + _id, _lib._sel_arrayByApplyingDifference_1, difference._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + void getObjects_(ffi.Pointer> objects) { + _lib._objc_msgSend_130(_id, _lib._sel_getObjects_1, objects); + } + + static NSArray? arrayWithContentsOfFile_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_131( + _lib._class_NSArray1, _lib._sel_arrayWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray? arrayWithContentsOfURL_( + ThermionDartTexture1 _lib, NSURL url) { + final _ret = _lib._objc_msgSend_132( + _lib._class_NSArray1, _lib._sel_arrayWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_131( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_132(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_26( + _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _lib._objc_msgSend_133( + _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); + } + + NSArray pathsMatchingExtensions_(NSArray filterTypes) { + final _ret = _lib._objc_msgSend_67( + _id, _lib._sel_pathsMatchingExtensions_1, filterTypes._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSObject valueForKey_(NSString key) { + final _ret = _lib._objc_msgSend_31(_id, _lib._sel_valueForKey_1, key._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + @override + void setValue_forKey_(NSObject? value, NSString key) { + _lib._objc_msgSend_134( + _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); + } + + void addObserver_toObjectsAtIndexes_forKeyPath_options_context_( + NSObject observer, + NSIndexSet indexes, + NSString keyPath, + int options, + ffi.Pointer context) { + _lib._objc_msgSend_135( + _id, + _lib._sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_1, + observer._id, + indexes._id, + keyPath._id, + options, + context); + } + + void removeObserver_fromObjectsAtIndexes_forKeyPath_context_( + NSObject observer, + NSIndexSet indexes, + NSString keyPath, + ffi.Pointer context) { + _lib._objc_msgSend_136( + _id, + _lib._sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_1, + observer._id, + indexes._id, + keyPath._id, + context); + } + + void removeObserver_fromObjectsAtIndexes_forKeyPath_( + NSObject observer, NSIndexSet indexes, NSString keyPath) { + _lib._objc_msgSend_137( + _id, + _lib._sel_removeObserver_fromObjectsAtIndexes_forKeyPath_1, + observer._id, + indexes._id, + keyPath._id); + } + + @override + void addObserver_forKeyPath_options_context_(NSObject observer, + NSString keyPath, int options, ffi.Pointer context) { + _lib._objc_msgSend_138( + _id, + _lib._sel_addObserver_forKeyPath_options_context_1, + observer._id, + keyPath._id, + options, + context); + } + + @override + void removeObserver_forKeyPath_context_( + NSObject observer, NSString keyPath, ffi.Pointer context) { + _lib._objc_msgSend_139(_id, _lib._sel_removeObserver_forKeyPath_context_1, + observer._id, keyPath._id, context); + } + + @override + void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { + _lib._objc_msgSend_140( + _id, _lib._sel_removeObserver_forKeyPath_1, observer._id, keyPath._id); + } + + NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { + final _ret = _lib._objc_msgSend_67( + _id, _lib._sel_sortedArrayUsingDescriptors_1, sortDescriptors._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray filteredArrayUsingPredicate_(NSPredicate predicate) { + final _ret = _lib._objc_msgSend_218( + _id, _lib._sel_filteredArrayUsingPredicate_1, predicate._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_new1); + return NSArray._(_ret, _lib, retain: false, release: true); + } + + static NSArray allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSArray1, _lib._sel_allocWithZone_1, zone); + return NSArray._(_ret, _lib, retain: false, release: true); + } + + static NSArray alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); + return NSArray._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSArray1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSArray1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSArray1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSArray1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSArray1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSArray1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSArray1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSArray1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSArray1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSError extends NSObject { + NSError._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSError] that points to the same underlying object as [other]. + static NSError castFrom(T other) { + return NSError._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSError] that wraps the given raw object pointer. + static NSError castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSError._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSError]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSError1); + } + + NSError initWithDomain_code_userInfo_( + NSString domain, int code, NSObject? dict) { + final _ret = _lib._objc_msgSend_81( + _id, + _lib._sel_initWithDomain_code_userInfo_1, + domain._id, + code, + dict?._id ?? ffi.nullptr); + return NSError._(_ret, _lib, retain: true, release: true); + } + + static NSError errorWithDomain_code_userInfo_( + ThermionDartTexture1 _lib, NSString domain, int code, NSObject? dict) { + final _ret = _lib._objc_msgSend_81( + _lib._class_NSError1, + _lib._sel_errorWithDomain_code_userInfo_1, + domain._id, + code, + dict?._id ?? ffi.nullptr); + return NSError._(_ret, _lib, retain: true, release: true); + } + + NSString get domain { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_domain1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + int get code { + return _lib._objc_msgSend_82(_id, _lib._sel_code1); + } + + NSObject get userInfo { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_userInfo1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSString get localizedDescription { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_localizedDescription1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get localizedFailureReason { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_localizedFailureReason1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get localizedRecoverySuggestion { + final _ret = + _lib._objc_msgSend_43(_id, _lib._sel_localizedRecoverySuggestion1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray? get localizedRecoveryOptions { + final _ret = + _lib._objc_msgSend_83(_id, _lib._sel_localizedRecoveryOptions1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSObject? get recoveryAttempter { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_recoveryAttempter1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSString? get helpAnchor { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_helpAnchor1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray get underlyingErrors { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_underlyingErrors1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static void setUserInfoValueProviderForDomain_provider_( + ThermionDartTexture1 _lib, + NSString errorDomain, + ObjCBlock_ObjCObject_NSError_NSString? provider) { + _lib._objc_msgSend_85( + _lib._class_NSError1, + _lib._sel_setUserInfoValueProviderForDomain_provider_1, + errorDomain._id, + provider?._id ?? ffi.nullptr); + } + + static ObjCBlock_ObjCObject_NSError_NSString? userInfoValueProviderForDomain_( + ThermionDartTexture1 _lib, + NSError err, + NSString userInfoKey, + NSString errorDomain) { + final _ret = _lib._objc_msgSend_86( + _lib._class_NSError1, + _lib._sel_userInfoValueProviderForDomain_1, + err._id, + userInfoKey._id, + errorDomain._id); + return _ret.address == 0 + ? null + : ObjCBlock_ObjCObject_NSError_NSString._(_ret, _lib, + retain: true, release: true); + } + + @override + NSError init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSError._(_ret, _lib, retain: true, release: true); + } + + static NSError new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_new1); + return NSError._(_ret, _lib, retain: false, release: true); + } + + static NSError allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSError1, _lib._sel_allocWithZone_1, zone); + return NSError._(_ret, _lib, retain: false, release: true); + } + + static NSError alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); + return NSError._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSError1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSError1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSError1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSError1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSError1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSError1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSError1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSError1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSError1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class _ObjCBlockBase implements ffi.Finalizable { + final ffi.Pointer<_ObjCBlock> _id; + final ThermionDartTexture1 _lib; + bool _pendingRelease; + + _ObjCBlockBase._(this._id, this._lib, + {bool retain = false, bool release = false}) + : _pendingRelease = release { + if (retain) { + _lib._Block_copy(_id.cast()); + } + if (release) { + _lib._objc_releaseFinalizer11.attach(this, _id.cast(), detach: this); + } + } + + /// Releases the reference to the underlying ObjC block held by this wrapper. + /// Throws a StateError if this wrapper doesn't currently hold a reference. + void release() { + if (_pendingRelease) { + _pendingRelease = false; + _lib._Block_release(_id.cast()); + _lib._objc_releaseFinalizer11.detach(this); + } else { + throw StateError( + 'Released an ObjC block that was unowned or already released.'); + } + } + + @override + bool operator ==(Object other) { + return other is _ObjCBlockBase && _id == other._id; + } + + @override + int get hashCode => _id.hashCode; + + /// Return a pointer to this object. + ffi.Pointer<_ObjCBlock> get pointer => _id; + + ffi.Pointer<_ObjCBlock> _retainAndReturnId() { + _lib._Block_copy(_id.cast()); + return _id; + } +} + +ffi.Pointer _ObjCBlock_ObjCObject_NSError_NSString_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ObjCObject_NSError_NSString_closureRegistry = Function( + ffi.Pointer, ffi.Pointer)>{}; +int _ObjCBlock_ObjCObject_NSError_NSString_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ObjCObject_NSError_NSString_registerClosure( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ObjCObject_NSError_NSString_closureRegistryIndex; + _ObjCBlock_ObjCObject_NSError_NSString_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer + _ObjCBlock_ObjCObject_NSError_NSString_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ObjCObject_NSError_NSString_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ObjCObject_NSError_NSString extends _ObjCBlockBase { + ObjCBlock_ObjCObject_NSError_NSString._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ObjCObject_NSError_NSString.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ObjCObject_NSError_NSString_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ObjCObject_NSError_NSString.fromFunction( + ThermionDartTexture1 lib, NSObject? Function(NSError, NSString) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ObjCObject_NSError_NSString_closureTrampoline) + .cast(), + _ObjCBlock_ObjCObject_NSError_NSString_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(NSError._(arg0, lib, retain: true, release: true), NSString._(arg1, lib, retain: true, release: true)) + ?._retainAndReturnId() ?? + ffi.nullptr)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + NSObject? call(NSError arg0, NSString arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>() + (_id, arg0._id, arg1._id) + .address == + 0 + ? null + : NSObject._( + _id.ref.invoke + .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>()(_id, arg0._id, arg1._id), + _lib, + retain: false, + release: true); +} + +final class _ObjCBlockDesc extends ffi.Struct { + @ffi.UnsignedLong() + external int reserved; + + @ffi.UnsignedLong() + external int size; + + external ffi.Pointer copy_helper; + + external ffi.Pointer dispose_helper; + + external ffi.Pointer signature; +} + +final class _ObjCBlock extends ffi.Struct { + external ffi.Pointer isa; + + @ffi.Int() + external int flags; + + @ffi.Int() + external int reserved; + + external ffi.Pointer invoke; + + external ffi.Pointer<_ObjCBlockDesc> descriptor; + + external ffi.Pointer target; +} + +class NSIndexSet extends NSObject { + NSIndexSet._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSIndexSet] that points to the same underlying object as [other]. + static NSIndexSet castFrom(T other) { + return NSIndexSet._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSIndexSet] that wraps the given raw object pointer. + static NSIndexSet castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSIndexSet._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSIndexSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); + } + + static NSIndexSet indexSet(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_indexSet1); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + static NSIndexSet indexSetWithIndex_(ThermionDartTexture1 _lib, int value) { + final _ret = _lib._objc_msgSend_64( + _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + static NSIndexSet indexSetWithIndexesInRange_( + ThermionDartTexture1 _lib, _NSRange range) { + final _ret = _lib._objc_msgSend_90( + _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet initWithIndexesInRange_(_NSRange range) { + final _ret = + _lib._objc_msgSend_90(_id, _lib._sel_initWithIndexesInRange_1, range); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet initWithIndexSet_(NSIndexSet indexSet) { + final _ret = + _lib._objc_msgSend_91(_id, _lib._sel_initWithIndexSet_1, indexSet._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet initWithIndex_(int value) { + final _ret = _lib._objc_msgSend_64(_id, _lib._sel_initWithIndex_1, value); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + bool isEqualToIndexSet_(NSIndexSet indexSet) { + return _lib._objc_msgSend_92( + _id, _lib._sel_isEqualToIndexSet_1, indexSet._id); + } + + int get count { + return _lib._objc_msgSend_10(_id, _lib._sel_count1); + } + + int get firstIndex { + return _lib._objc_msgSend_10(_id, _lib._sel_firstIndex1); + } + + int get lastIndex { + return _lib._objc_msgSend_10(_id, _lib._sel_lastIndex1); + } + + int indexGreaterThanIndex_(int value) { + return _lib._objc_msgSend_93(_id, _lib._sel_indexGreaterThanIndex_1, value); + } + + int indexLessThanIndex_(int value) { + return _lib._objc_msgSend_93(_id, _lib._sel_indexLessThanIndex_1, value); + } + + int indexGreaterThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_93( + _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); + } + + int indexLessThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_93( + _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); + } + + int getIndexes_maxCount_inIndexRange_( + ffi.Pointer indexBuffer, + int bufferSize, + ffi.Pointer<_NSRange> range) { + return _lib._objc_msgSend_94( + _id, + _lib._sel_getIndexes_maxCount_inIndexRange_1, + indexBuffer, + bufferSize, + range); + } + + int countOfIndexesInRange_(_NSRange range) { + return _lib._objc_msgSend_95(_id, _lib._sel_countOfIndexesInRange_1, range); + } + + bool containsIndex_(int value) { + return _lib._objc_msgSend_96(_id, _lib._sel_containsIndex_1, value); + } + + bool containsIndexesInRange_(_NSRange range) { + return _lib._objc_msgSend_97( + _id, _lib._sel_containsIndexesInRange_1, range); + } + + bool containsIndexes_(NSIndexSet indexSet) { + return _lib._objc_msgSend_92( + _id, _lib._sel_containsIndexes_1, indexSet._id); + } + + bool intersectsIndexesInRange_(_NSRange range) { + return _lib._objc_msgSend_97( + _id, _lib._sel_intersectsIndexesInRange_1, range); + } + + void enumerateIndexesUsingBlock_( + ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { + _lib._objc_msgSend_98( + _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); + } + + void enumerateIndexesWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { + _lib._objc_msgSend_99(_id, + _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); + } + + void enumerateIndexesInRange_options_usingBlock_( + _NSRange range, int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { + _lib._objc_msgSend_100( + _id, + _lib._sel_enumerateIndexesInRange_options_usingBlock_1, + range, + opts, + block._id); + } + + int indexPassingTest_(ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + return _lib._objc_msgSend_101( + _id, _lib._sel_indexPassingTest_1, predicate._id); + } + + int indexWithOptions_passingTest_( + int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + return _lib._objc_msgSend_102( + _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); + } + + int indexInRange_options_passingTest_( + _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + return _lib._objc_msgSend_103( + _id, + _lib._sel_indexInRange_options_passingTest_1, + range, + opts, + predicate._id); + } + + NSIndexSet indexesPassingTest_( + ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + final _ret = _lib._objc_msgSend_104( + _id, _lib._sel_indexesPassingTest_1, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesWithOptions_passingTest_( + int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + final _ret = _lib._objc_msgSend_105( + _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesInRange_options_passingTest_( + _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + final _ret = _lib._objc_msgSend_106( + _id, + _lib._sel_indexesInRange_options_passingTest_1, + range, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + void enumerateRangesUsingBlock_(ObjCBlock_ffiVoid_NSRange_bool block) { + _lib._objc_msgSend_107( + _id, _lib._sel_enumerateRangesUsingBlock_1, block._id); + } + + void enumerateRangesWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_NSRange_bool block) { + _lib._objc_msgSend_108(_id, + _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); + } + + void enumerateRangesInRange_options_usingBlock_( + _NSRange range, int opts, ObjCBlock_ffiVoid_NSRange_bool block) { + _lib._objc_msgSend_109( + _id, + _lib._sel_enumerateRangesInRange_options_usingBlock_1, + range, + opts, + block._id); + } + + @override + NSIndexSet init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + static NSIndexSet new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); + return NSIndexSet._(_ret, _lib, retain: false, release: true); + } + + static NSIndexSet allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSIndexSet1, _lib._sel_allocWithZone_1, zone); + return NSIndexSet._(_ret, _lib, retain: false, release: true); + } + + static NSIndexSet alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); + return NSIndexSet._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSIndexSet1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSIndexSet1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSIndexSet1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSIndexSet1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSIndexSet1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSIndexSet1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSIndexSet1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSIndexSet1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSIndexSet1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() + .asFunction)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( + void Function(int, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_ffiUnsignedLong_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ffiUnsignedLong_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiUnsignedLong_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.UnsignedLong arg0, ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.UnsignedLong, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiUnsignedLong_bool.fromFunction( + ThermionDartTexture1 lib, void Function(int, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.UnsignedLong, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( + (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiUnsignedLong_bool.listener( + ThermionDartTexture1 lib, void Function(int, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.UnsignedLong, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( + (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.UnsignedLong, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(int arg0, ffi.Pointer arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, int, + ffi.Pointer)>()(_id, arg0, arg1); +} + +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; +} + +bool _ObjCBlock_bool_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() + .asFunction)>()(arg0, arg1); +final _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry = + )>{}; +int _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_bool_ffiUnsignedLong_bool_registerClosure( + bool Function(int, ffi.Pointer) fn) { + final id = ++_ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => + _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_bool_ffiUnsignedLong_bool extends _ObjCBlockBase { + ObjCBlock_bool_ffiUnsignedLong_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ffiUnsignedLong_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.UnsignedLong arg0, ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock>, + ffi.UnsignedLong, ffi.Pointer)>( + _ObjCBlock_bool_ffiUnsignedLong_bool_fnPtrTrampoline, + false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ffiUnsignedLong_bool.fromFunction( + ThermionDartTexture1 lib, bool Function(int, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock>, + ffi.UnsignedLong, ffi.Pointer)>( + _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline, + false) + .cast(), + _ObjCBlock_bool_ffiUnsignedLong_bool_registerClosure( + (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(int arg0, ffi.Pointer arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer<_ObjCBlock>, int, + ffi.Pointer)>()(_id, arg0, arg1); +} + +void _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + _NSRange arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(_NSRange, ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( + void Function(_NSRange, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + _NSRange arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[block.ref.target.address]!( + arg0, arg1); + +class ObjCBlock_ffiVoid_NSRange_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSRange_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSRange_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSRange_bool.fromFunction(ThermionDartTexture1 lib, + void Function(_NSRange, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( + (_NSRange arg0, ffi.Pointer arg1) => + fn(arg0, arg1))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSRange_bool.listener(ThermionDartTexture1 lib, + void Function(_NSRange, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( + (_NSRange arg0, ffi.Pointer arg1) => + fn(arg0, arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, _NSRange, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(_NSRange arg0, ffi.Pointer arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, _NSRange arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, _NSRange, + ffi.Pointer)>()(_id, arg0, arg1); +} + +void _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_registerClosure( + void Function(ffi.Pointer, int, ffi.Pointer) fn) { + final id = + ++_ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool.fromFunction( + ThermionDartTexture1 lib, + void Function(NSObject, int, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool.listener( + ThermionDartTexture1 lib, + void Function(NSObject, int, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(NSObject._(arg0, lib, retain: true, release: true), + arg1, arg2))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject arg0, int arg1, ffi.Pointer arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + int, ffi.Pointer)>()(_id, arg0._id, arg1, arg2); +} + +bool _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_registerClosure( + bool Function(ffi.Pointer, int, ffi.Pointer) fn) { + final id = + ++_ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool extends _ObjCBlockBase { + ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline, + false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool.fromFunction( + ThermionDartTexture1 lib, + bool Function(NSObject, int, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSObject arg0, int arg1, ffi.Pointer arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + int, ffi.Pointer)>()(_id, arg0._id, arg1, arg2); +} + +int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_registerClosure( + int Function(ffi.Pointer, ffi.Pointer) fn) { + final id = + ++_ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistryIndex; + _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject + extends _ObjCBlockBase { + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_fnPtrTrampoline, + 0) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject.fromFunction( + ThermionDartTexture1 lib, int Function(NSObject, NSObject) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureTrampoline, 0) + .cast(), + _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + NSObject._(arg0, lib, retain: true, release: true), + NSObject._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + int call(NSObject arg0, NSObject arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1._id); +} + +abstract class NSComparisonResult { + static const int NSOrderedAscending = -1; + static const int NSOrderedSame = 0; + static const int NSOrderedDescending = 1; +} + +abstract class NSSortOptions { + static const int NSSortConcurrent = 1; + static const int NSSortStable = 16; +} + +abstract class NSBinarySearchingOptions { + static const int NSBinarySearchingFirstEqual = 256; + static const int NSBinarySearchingLastEqual = 512; + static const int NSBinarySearchingInsertionIndex = 1024; +} + +abstract class NSOrderedCollectionDifferenceCalculationOptions { + static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = + 1; + static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = + 2; + static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; +} + +bool _ObjCBlock_bool_ObjCObject_ObjCObject_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_bool_ObjCObject_ObjCObject_registerClosure( + bool Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistryIndex; + _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_ObjCObject_ObjCObject_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_bool_ObjCObject_ObjCObject extends _ObjCBlockBase { + ObjCBlock_bool_ObjCObject_ObjCObject._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_ObjCObject.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_ObjCObject_fnPtrTrampoline, + false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_ObjCObject.fromFunction( + ThermionDartTexture1 lib, bool Function(NSObject, NSObject) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_ObjCObject_closureTrampoline, + false) + .cast(), + _ObjCBlock_bool_ObjCObject_ObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(NSObject._(arg0, lib, retain: true, release: true), NSObject._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSObject arg0, NSObject arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1._id); +} + +abstract class NSKeyValueObservingOptions { + static const int NSKeyValueObservingOptionNew = 1; + static const int NSKeyValueObservingOptionOld = 2; + static const int NSKeyValueObservingOptionInitial = 4; + static const int NSKeyValueObservingOptionPrior = 8; +} + +class NSPredicate extends NSObject { + NSPredicate._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSPredicate] that points to the same underlying object as [other]. + static NSPredicate castFrom(T other) { + return NSPredicate._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSPredicate] that wraps the given raw object pointer. + static NSPredicate castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSPredicate._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSPredicate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSPredicate1); + } + + static NSPredicate predicateWithFormat_argumentArray_( + ThermionDartTexture1 _lib, NSString predicateFormat, NSArray? arguments) { + final _ret = _lib._objc_msgSend_141( + _lib._class_NSPredicate1, + _lib._sel_predicateWithFormat_argumentArray_1, + predicateFormat._id, + arguments?._id ?? ffi.nullptr); + return NSPredicate._(_ret, _lib, retain: true, release: true); + } + + static NSPredicate predicateWithFormat_( + ThermionDartTexture1 _lib, NSString predicateFormat) { + final _ret = _lib._objc_msgSend_142(_lib._class_NSPredicate1, + _lib._sel_predicateWithFormat_1, predicateFormat._id); + return NSPredicate._(_ret, _lib, retain: true, release: true); + } + + static NSPredicate predicateWithFormat_arguments_(ThermionDartTexture1 _lib, + NSString predicateFormat, ffi.Pointer argList) { + final _ret = _lib._objc_msgSend_143( + _lib._class_NSPredicate1, + _lib._sel_predicateWithFormat_arguments_1, + predicateFormat._id, + argList); + return NSPredicate._(_ret, _lib, retain: true, release: true); + } + + static NSPredicate? predicateFromMetadataQueryString_( + ThermionDartTexture1 _lib, NSString queryString) { + final _ret = _lib._objc_msgSend_144(_lib._class_NSPredicate1, + _lib._sel_predicateFromMetadataQueryString_1, queryString._id); + return _ret.address == 0 + ? null + : NSPredicate._(_ret, _lib, retain: true, release: true); + } + + static NSPredicate predicateWithValue_( + ThermionDartTexture1 _lib, bool value) { + final _ret = _lib._objc_msgSend_145( + _lib._class_NSPredicate1, _lib._sel_predicateWithValue_1, value); + return NSPredicate._(_ret, _lib, retain: true, release: true); + } + + static NSPredicate predicateWithBlock_( + ThermionDartTexture1 _lib, ObjCBlock_bool_ObjCObject_NSDictionary block) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSPredicate1, _lib._sel_predicateWithBlock_1, block._id); + return NSPredicate._(_ret, _lib, retain: true, release: true); + } + + NSString get predicateFormat { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_predicateFormat1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSPredicate predicateWithSubstitutionVariables_(NSDictionary variables) { + final _ret = _lib._objc_msgSend_158( + _id, _lib._sel_predicateWithSubstitutionVariables_1, variables._id); + return NSPredicate._(_ret, _lib, retain: true, release: true); + } + + bool evaluateWithObject_(NSObject? object) { + return _lib._objc_msgSend_216( + _id, _lib._sel_evaluateWithObject_1, object?._id ?? ffi.nullptr); + } + + bool evaluateWithObject_substitutionVariables_( + NSObject? object, NSDictionary? bindings) { + return _lib._objc_msgSend_217( + _id, + _lib._sel_evaluateWithObject_substitutionVariables_1, + object?._id ?? ffi.nullptr, + bindings?._id ?? ffi.nullptr); + } + + void allowEvaluation() { + _lib._objc_msgSend_1(_id, _lib._sel_allowEvaluation1); + } + + @override + NSPredicate init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSPredicate._(_ret, _lib, retain: true, release: true); + } + + static NSPredicate new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSPredicate1, _lib._sel_new1); + return NSPredicate._(_ret, _lib, retain: false, release: true); + } + + static NSPredicate allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSPredicate1, _lib._sel_allocWithZone_1, zone); + return NSPredicate._(_ret, _lib, retain: false, release: true); + } + + static NSPredicate alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPredicate1, _lib._sel_alloc1); + return NSPredicate._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSPredicate1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSPredicate1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSPredicate1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSPredicate1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSPredicate1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSPredicate1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSPredicate1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSPredicate1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSPredicate1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +bool _ObjCBlock_bool_ObjCObject_NSDictionary_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_bool_ObjCObject_NSDictionary_registerClosure( + bool Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistryIndex; + _ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_ObjCObject_NSDictionary_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_bool_ObjCObject_NSDictionary extends _ObjCBlockBase { + ObjCBlock_bool_ObjCObject_NSDictionary._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_NSDictionary.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_NSDictionary_fnPtrTrampoline, + false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_NSDictionary.fromFunction( + ThermionDartTexture1 lib, bool Function(NSObject?, NSDictionary?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_NSDictionary_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_ObjCObject_NSDictionary_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSObject._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSDictionary._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSObject? arg0, NSDictionary? arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); +} + +class NSDictionary extends NSObject { + NSDictionary._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDictionary] that points to the same underlying object as [other]. + static NSDictionary castFrom(T other) { + return NSDictionary._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSDictionary] that wraps the given raw object pointer. + static NSDictionary castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDictionary._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSDictionary]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); + } + + int get count { + return _lib._objc_msgSend_10(_id, _lib._sel_count1); + } + + NSObject? objectForKey_(NSObject aKey) { + final _ret = _lib._objc_msgSend_16(_id, _lib._sel_objectForKey_1, aKey._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSEnumerator keyEnumerator() { + final _ret = _lib._objc_msgSend_76(_id, _lib._sel_keyEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + @override + NSDictionary init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_146( + _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSArray get allKeys { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_allKeys1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray allKeysForObject_(NSObject anObject) { + final _ret = + _lib._objc_msgSend_66(_id, _lib._sel_allKeysForObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get allValues { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_allValues1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString get description { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get descriptionInStringsFileFormat { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_descriptionInStringsFileFormat1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _lib._objc_msgSend_69( + _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_indent_(NSObject? locale, int level) { + final _ret = _lib._objc_msgSend_70( + _id, + _lib._sel_descriptionWithLocale_indent_1, + locale?._id ?? ffi.nullptr, + level); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool isEqualToDictionary_(NSDictionary otherDictionary) { + return _lib._objc_msgSend_147( + _id, _lib._sel_isEqualToDictionary_1, otherDictionary._id); + } + + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_76(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + NSArray objectsForKeys_notFoundMarker_(NSArray keys, NSObject marker) { + final _ret = _lib._objc_msgSend_148( + _id, _lib._sel_objectsForKeys_notFoundMarker_1, keys._id, marker._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + bool writeToURL_error_( + NSURL url, ffi.Pointer> error) { + return _lib._objc_msgSend_88( + _id, _lib._sel_writeToURL_error_1, url._id, error); + } + + NSArray keysSortedByValueUsingSelector_(ffi.Pointer comparator) { + final _ret = _lib._objc_msgSend_79( + _id, _lib._sel_keysSortedByValueUsingSelector_1, comparator); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + void getObjects_andKeys_count_(ffi.Pointer> objects, + ffi.Pointer> keys, int count) { + _lib._objc_msgSend_149( + _id, _lib._sel_getObjects_andKeys_count_1, objects, keys, count); + } + + NSObject? objectForKeyedSubscript_(NSObject key) { + final _ret = _lib._objc_msgSend_16( + _id, _lib._sel_objectForKeyedSubscript_1, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void enumerateKeysAndObjectsUsingBlock_( + ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool block) { + _lib._objc_msgSend_150( + _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); + } + + void enumerateKeysAndObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool block) { + _lib._objc_msgSend_151( + _id, + _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, + opts, + block._id); + } + + NSArray keysSortedByValueUsingComparator_( + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { + final _ret = _lib._objc_msgSend_120( + _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray keysSortedByValueWithOptions_usingComparator_( + int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { + final _ret = _lib._objc_msgSend_121( + _id, + _lib._sel_keysSortedByValueWithOptions_usingComparator_1, + opts, + cmptr._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSObject keysOfEntriesPassingTest_( + ObjCBlock_bool_ObjCObject_ObjCObject_bool predicate) { + final _ret = _lib._objc_msgSend_152( + _id, _lib._sel_keysOfEntriesPassingTest_1, predicate._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject keysOfEntriesWithOptions_passingTest_( + int opts, ObjCBlock_bool_ObjCObject_ObjCObject_bool predicate) { + final _ret = _lib._objc_msgSend_153(_id, + _lib._sel_keysOfEntriesWithOptions_passingTest_1, opts, predicate._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void getObjects_andKeys_(ffi.Pointer> objects, + ffi.Pointer> keys) { + _lib._objc_msgSend_154(_id, _lib._sel_getObjects_andKeys_1, objects, keys); + } + + static NSDictionary? dictionaryWithContentsOfFile_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_155(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary? dictionaryWithContentsOfURL_( + ThermionDartTexture1 _lib, NSURL url) { + final _ret = _lib._objc_msgSend_156(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_155( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_156(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_26( + _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _lib._objc_msgSend_133( + _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); + } + + static NSDictionary dictionary(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_dictionary1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithObject_forKey_( + ThermionDartTexture1 _lib, NSObject object, NSObject key) { + final _ret = _lib._objc_msgSend_157(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjects_forKeys_count_( + ThermionDartTexture1 _lib, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_146(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjectsAndKeys_( + ThermionDartTexture1 _lib, NSObject firstObject) { + final _ret = _lib._objc_msgSend_123(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithDictionary_( + ThermionDartTexture1 _lib, NSDictionary dict) { + final _ret = _lib._objc_msgSend_158(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithDictionary_1, dict._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjects_forKeys_( + ThermionDartTexture1 _lib, NSArray objects, NSArray keys) { + final _ret = _lib._objc_msgSend_159(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_1, objects._id, keys._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _lib._objc_msgSend_123( + _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithDictionary_(NSDictionary otherDictionary) { + final _ret = _lib._objc_msgSend_158( + _id, _lib._sel_initWithDictionary_1, otherDictionary._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithDictionary_copyItems_( + NSDictionary otherDictionary, bool flag) { + final _ret = _lib._objc_msgSend_160(_id, + _lib._sel_initWithDictionary_copyItems_1, otherDictionary._id, flag); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } + + NSDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { + final _ret = _lib._objc_msgSend_159( + _id, _lib._sel_initWithObjects_forKeys_1, objects._id, keys._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? initWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_161( + _id, _lib._sel_initWithContentsOfURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary? dictionaryWithContentsOfURL_error_( + ThermionDartTexture1 _lib, + NSURL url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_161(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSObject sharedKeySetForKeys_( + ThermionDartTexture1 _lib, NSArray keys) { + final _ret = _lib._objc_msgSend_124( + _lib._class_NSDictionary1, _lib._sel_sharedKeySetForKeys_1, keys._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + int countByEnumeratingWithState_objects_count_( + ffi.Pointer state, + ffi.Pointer> buffer, + int len) { + return _lib._objc_msgSend_162( + _id, + _lib._sel_countByEnumeratingWithState_objects_count_1, + state, + buffer, + len); + } + + int fileSize() { + return _lib._objc_msgSend_163(_id, _lib._sel_fileSize1); + } + + NSDate? fileModificationDate() { + final _ret = _lib._objc_msgSend_182(_id, _lib._sel_fileModificationDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSString? fileType() { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_fileType1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + int filePosixPermissions() { + return _lib._objc_msgSend_10(_id, _lib._sel_filePosixPermissions1); + } + + NSString? fileOwnerAccountName() { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_fileOwnerAccountName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? fileGroupOwnerAccountName() { + final _ret = + _lib._objc_msgSend_43(_id, _lib._sel_fileGroupOwnerAccountName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + int fileSystemNumber() { + return _lib._objc_msgSend_82(_id, _lib._sel_fileSystemNumber1); + } + + int fileSystemFileNumber() { + return _lib._objc_msgSend_10(_id, _lib._sel_fileSystemFileNumber1); + } + + bool fileExtensionHidden() { + return _lib._objc_msgSend_12(_id, _lib._sel_fileExtensionHidden1); + } + + int fileHFSCreatorCode() { + return _lib._objc_msgSend_213(_id, _lib._sel_fileHFSCreatorCode1); + } + + int fileHFSTypeCode() { + return _lib._objc_msgSend_213(_id, _lib._sel_fileHFSTypeCode1); + } + + bool fileIsImmutable() { + return _lib._objc_msgSend_12(_id, _lib._sel_fileIsImmutable1); + } + + bool fileIsAppendOnly() { + return _lib._objc_msgSend_12(_id, _lib._sel_fileIsAppendOnly1); + } + + NSDate? fileCreationDate() { + final _ret = _lib._objc_msgSend_182(_id, _lib._sel_fileCreationDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSNumber? fileOwnerAccountID() { + final _ret = _lib._objc_msgSend_214(_id, _lib._sel_fileOwnerAccountID1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber? fileGroupOwnerAccountID() { + final _ret = + _lib._objc_msgSend_214(_id, _lib._sel_fileGroupOwnerAccountID1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + @override + NSObject? valueForKey_(NSString key) { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_valueForKey_1, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } + + static NSDictionary allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSDictionary1, _lib._sel_allocWithZone_1, zone); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } + + static NSDictionary alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSDictionary1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSDictionary1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSDictionary1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSDictionary1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSDictionary1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSDictionary1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSDictionary1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSDictionary1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSDictionary1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +void _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.fromFunction( + ThermionDartTexture1 lib, + void Function(NSObject, NSObject, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + NSObject._(arg0, lib, retain: true, release: true), + NSObject._(arg1, lib, retain: true, release: true), + arg2))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.listener( + ThermionDartTexture1 lib, + void Function(NSObject, NSObject, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure((ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + NSObject._(arg0, lib, retain: true, release: true), + NSObject._(arg1, lib, retain: true, release: true), + arg2))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2); +} + +bool _ObjCBlock_bool_ObjCObject_ObjCObject_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_ObjCObject_ObjCObject_bool_registerClosure( + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer) + fn) { + final id = ++_ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistryIndex; + _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_bool_ObjCObject_ObjCObject_bool extends _ObjCBlockBase { + ObjCBlock_bool_ObjCObject_ObjCObject_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_ObjCObject_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_ObjCObject_bool_fnPtrTrampoline, + false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_ObjCObject_bool.fromFunction( + ThermionDartTexture1 lib, + bool Function(NSObject, NSObject, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_ObjCObject_ObjCObject_bool_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn(NSObject._(arg0, lib, retain: true, release: true), NSObject._(arg1, lib, retain: true, release: true), arg2))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2); +} + +final class NSFastEnumerationState extends ffi.Struct { + @ffi.UnsignedLong() + external int state; + + external ffi.Pointer> itemsPtr; + + external ffi.Pointer mutationsPtr; + + @ffi.Array.multi([5]) + external ffi.Array extra; +} + +class NSDate extends NSObject { + NSDate._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDate] that points to the same underlying object as [other]. + static NSDate castFrom(T other) { + return NSDate._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSDate] that wraps the given raw object pointer. + static NSDate castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDate._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSDate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); + } + + double get timeIntervalSinceReferenceDate { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret( + _id, _lib._sel_timeIntervalSinceReferenceDate1) + : _lib._objc_msgSend_164( + _id, _lib._sel_timeIntervalSinceReferenceDate1); + } + + @override + NSDate init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { + final _ret = _lib._objc_msgSend_165( + _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + double timeIntervalSinceDate_(NSDate anotherDate) { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_166_fpret( + _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id) + : _lib._objc_msgSend_166( + _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id); + } + + double get timeIntervalSinceNow { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_timeIntervalSinceNow1) + : _lib._objc_msgSend_164(_id, _lib._sel_timeIntervalSinceNow1); + } + + double get timeIntervalSince1970 { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_timeIntervalSince19701) + : _lib._objc_msgSend_164(_id, _lib._sel_timeIntervalSince19701); + } + + NSObject addTimeInterval_(double seconds) { + final _ret = + _lib._objc_msgSend_165(_id, _lib._sel_addTimeInterval_1, seconds); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSDate dateByAddingTimeInterval_(double ti) { + final _ret = + _lib._objc_msgSend_165(_id, _lib._sel_dateByAddingTimeInterval_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate earlierDate_(NSDate anotherDate) { + final _ret = + _lib._objc_msgSend_167(_id, _lib._sel_earlierDate_1, anotherDate._id); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate laterDate_(NSDate anotherDate) { + final _ret = + _lib._objc_msgSend_167(_id, _lib._sel_laterDate_1, anotherDate._id); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + int compare_(NSDate other) { + return _lib._objc_msgSend_168(_id, _lib._sel_compare_1, other._id); + } + + bool isEqualToDate_(NSDate otherDate) { + return _lib._objc_msgSend_169( + _id, _lib._sel_isEqualToDate_1, otherDate._id); + } + + NSString get description { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _lib._objc_msgSend_69( + _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSDate date(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_date1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSinceNow_( + ThermionDartTexture1 _lib, double secs) { + final _ret = _lib._objc_msgSend_165( + _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSinceReferenceDate_( + ThermionDartTexture1 _lib, double ti) { + final _ret = _lib._objc_msgSend_165(_lib._class_NSDate1, + _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSince1970_( + ThermionDartTexture1 _lib, double secs) { + final _ret = _lib._objc_msgSend_165( + _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate dateWithTimeInterval_sinceDate_( + ThermionDartTexture1 _lib, double secsToBeAdded, NSDate date) { + final _ret = _lib._objc_msgSend_170(_lib._class_NSDate1, + _lib._sel_dateWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate getDistantFuture(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_171(_lib._class_NSDate1, _lib._sel_distantFuture1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate getDistantPast(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_171(_lib._class_NSDate1, _lib._sel_distantPast1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate getNow(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_171(_lib._class_NSDate1, _lib._sel_now1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeIntervalSinceNow_(double secs) { + final _ret = _lib._objc_msgSend_165( + _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeIntervalSince1970_(double secs) { + final _ret = _lib._objc_msgSend_165( + _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate date) { + final _ret = _lib._objc_msgSend_170(_id, + _lib._sel_initWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSObject? dateWithNaturalLanguageString_locale_( + ThermionDartTexture1 _lib, NSString string, NSObject? locale) { + final _ret = _lib._objc_msgSend_172( + _lib._class_NSDate1, + _lib._sel_dateWithNaturalLanguageString_locale_1, + string._id, + locale?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? dateWithNaturalLanguageString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSDate1, + _lib._sel_dateWithNaturalLanguageString_1, string._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject dateWithString_(ThermionDartTexture1 _lib, NSString aString) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSDate1, _lib._sel_dateWithString_1, aString._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSCalendarDate dateWithCalendarFormat_timeZone_( + NSString? format, NSTimeZone? aTimeZone) { + final _ret = _lib._objc_msgSend_211( + _id, + _lib._sel_dateWithCalendarFormat_timeZone_1, + format?._id ?? ffi.nullptr, + aTimeZone?._id ?? ffi.nullptr); + return NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + NSString? descriptionWithCalendarFormat_timeZone_locale_( + NSString? format, NSTimeZone? aTimeZone, NSObject? locale) { + final _ret = _lib._objc_msgSend_212( + _id, + _lib._sel_descriptionWithCalendarFormat_timeZone_locale_1, + format?._id ?? ffi.nullptr, + aTimeZone?._id ?? ffi.nullptr, + locale?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSObject? initWithString_(NSString description) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_initWithString_1, description._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSDate new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); + return NSDate._(_ret, _lib, retain: false, release: true); + } + + static NSDate allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSDate1, _lib._sel_allocWithZone_1, zone); + return NSDate._(_ret, _lib, retain: false, release: true); + } + + static NSDate alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); + return NSDate._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSDate1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSDate1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSDate1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSDate1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSDate1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSDate1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSDate1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSDate1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSDate1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSCalendarDate extends NSDate { + NSCalendarDate._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSCalendarDate] that points to the same underlying object as [other]. + static NSCalendarDate castFrom(T other) { + return NSCalendarDate._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSCalendarDate] that wraps the given raw object pointer. + static NSCalendarDate castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCalendarDate._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSCalendarDate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSCalendarDate1); + } + + static NSObject calendarDate(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSCalendarDate1, _lib._sel_calendarDate1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? dateWithString_calendarFormat_locale_( + ThermionDartTexture1 _lib, + NSString description, + NSString format, + NSObject? locale) { + final _ret = _lib._objc_msgSend_173( + _lib._class_NSCalendarDate1, + _lib._sel_dateWithString_calendarFormat_locale_1, + description._id, + format._id, + locale?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? dateWithString_calendarFormat_( + ThermionDartTexture1 _lib, NSString description, NSString format) { + final _ret = _lib._objc_msgSend_174(_lib._class_NSCalendarDate1, + _lib._sel_dateWithString_calendarFormat_1, description._id, format._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject dateWithYear_month_day_hour_minute_second_timeZone_( + ThermionDartTexture1 _lib, + int year, + int month, + int day, + int hour, + int minute, + int second, + NSTimeZone? aTimeZone) { + final _ret = _lib._objc_msgSend_205( + _lib._class_NSCalendarDate1, + _lib._sel_dateWithYear_month_day_hour_minute_second_timeZone_1, + year, + month, + day, + hour, + minute, + second, + aTimeZone?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSCalendarDate dateByAddingYears_months_days_hours_minutes_seconds_( + int year, int month, int day, int hour, int minute, int second) { + final _ret = _lib._objc_msgSend_206( + _id, + _lib._sel_dateByAddingYears_months_days_hours_minutes_seconds_1, + year, + month, + day, + hour, + minute, + second); + return NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + int dayOfCommonEra() { + return _lib._objc_msgSend_82(_id, _lib._sel_dayOfCommonEra1); + } + + int dayOfMonth() { + return _lib._objc_msgSend_82(_id, _lib._sel_dayOfMonth1); + } + + int dayOfWeek() { + return _lib._objc_msgSend_82(_id, _lib._sel_dayOfWeek1); + } + + int dayOfYear() { + return _lib._objc_msgSend_82(_id, _lib._sel_dayOfYear1); + } + + int hourOfDay() { + return _lib._objc_msgSend_82(_id, _lib._sel_hourOfDay1); + } + + int minuteOfHour() { + return _lib._objc_msgSend_82(_id, _lib._sel_minuteOfHour1); + } + + int monthOfYear() { + return _lib._objc_msgSend_82(_id, _lib._sel_monthOfYear1); + } + + int secondOfMinute() { + return _lib._objc_msgSend_82(_id, _lib._sel_secondOfMinute1); + } + + int yearOfCommonEra() { + return _lib._objc_msgSend_82(_id, _lib._sel_yearOfCommonEra1); + } + + NSString calendarFormat() { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_calendarFormat1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithCalendarFormat_locale_( + NSString format, NSObject? locale) { + final _ret = _lib._objc_msgSend_207( + _id, + _lib._sel_descriptionWithCalendarFormat_locale_1, + format._id, + locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithCalendarFormat_(NSString format) { + final _ret = _lib._objc_msgSend_68( + _id, _lib._sel_descriptionWithCalendarFormat_1, format._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + @override + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _lib._objc_msgSend_69( + _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSTimeZone timeZone() { + final _ret = _lib._objc_msgSend_178(_id, _lib._sel_timeZone1); + return NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + NSObject? initWithString_calendarFormat_locale_( + NSString description, NSString format, NSObject? locale) { + final _ret = _lib._objc_msgSend_173( + _id, + _lib._sel_initWithString_calendarFormat_locale_1, + description._id, + format._id, + locale?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? initWithString_calendarFormat_( + NSString description, NSString format) { + final _ret = _lib._objc_msgSend_174(_id, + _lib._sel_initWithString_calendarFormat_1, description._id, format._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + @override + NSObject? initWithString_(NSString description) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_initWithString_1, description._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject initWithYear_month_day_hour_minute_second_timeZone_( + int year, + int month, + int day, + int hour, + int minute, + int second, + NSTimeZone? aTimeZone) { + final _ret = _lib._objc_msgSend_205( + _id, + _lib._sel_initWithYear_month_day_hour_minute_second_timeZone_1, + year, + month, + day, + hour, + minute, + second, + aTimeZone?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void setCalendarFormat_(NSString? format) { + _lib._objc_msgSend_208( + _id, _lib._sel_setCalendarFormat_1, format?._id ?? ffi.nullptr); + } + + void setTimeZone_(NSTimeZone? aTimeZone) { + _lib._objc_msgSend_209( + _id, _lib._sel_setTimeZone_1, aTimeZone?._id ?? ffi.nullptr); + } + + void years_months_days_hours_minutes_seconds_sinceDate_( + ffi.Pointer yp, + ffi.Pointer mop, + ffi.Pointer dp, + ffi.Pointer hp, + ffi.Pointer mip, + ffi.Pointer sp, + NSCalendarDate date) { + _lib._objc_msgSend_210( + _id, + _lib._sel_years_months_days_hours_minutes_seconds_sinceDate_1, + yp, + mop, + dp, + hp, + mip, + sp, + date._id); + } + + static NSDate getDistantFuture(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_171( + _lib._class_NSCalendarDate1, _lib._sel_distantFuture1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate getDistantPast(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_171( + _lib._class_NSCalendarDate1, _lib._sel_distantPast1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + @override + NSCalendarDate init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + @override + NSCalendarDate initWithTimeIntervalSinceReferenceDate_(double ti) { + final _ret = _lib._objc_msgSend_165( + _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); + return NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + @override + NSCalendarDate? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + @override + NSCalendarDate dateByAddingTimeInterval_(double ti) { + final _ret = + _lib._objc_msgSend_165(_id, _lib._sel_dateByAddingTimeInterval_1, ti); + return NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + static NSCalendarDate date(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCalendarDate1, _lib._sel_date1); + return NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + static NSCalendarDate dateWithTimeIntervalSinceNow_( + ThermionDartTexture1 _lib, double secs) { + final _ret = _lib._objc_msgSend_165(_lib._class_NSCalendarDate1, + _lib._sel_dateWithTimeIntervalSinceNow_1, secs); + return NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + static NSCalendarDate dateWithTimeIntervalSinceReferenceDate_( + ThermionDartTexture1 _lib, double ti) { + final _ret = _lib._objc_msgSend_165(_lib._class_NSCalendarDate1, + _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); + return NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + static NSCalendarDate dateWithTimeIntervalSince1970_( + ThermionDartTexture1 _lib, double secs) { + final _ret = _lib._objc_msgSend_165(_lib._class_NSCalendarDate1, + _lib._sel_dateWithTimeIntervalSince1970_1, secs); + return NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + static NSCalendarDate dateWithTimeInterval_sinceDate_( + ThermionDartTexture1 _lib, double secsToBeAdded, NSDate date) { + final _ret = _lib._objc_msgSend_170(_lib._class_NSCalendarDate1, + _lib._sel_dateWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); + return NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate getNow(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_171(_lib._class_NSCalendarDate1, _lib._sel_now1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + @override + NSCalendarDate initWithTimeIntervalSinceNow_(double secs) { + final _ret = _lib._objc_msgSend_165( + _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); + return NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + @override + NSCalendarDate initWithTimeIntervalSince1970_(double secs) { + final _ret = _lib._objc_msgSend_165( + _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); + return NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + @override + NSCalendarDate initWithTimeInterval_sinceDate_( + double secsToBeAdded, NSDate date) { + final _ret = _lib._objc_msgSend_170(_id, + _lib._sel_initWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); + return NSCalendarDate._(_ret, _lib, retain: true, release: true); + } + + static NSObject? dateWithNaturalLanguageString_locale_( + ThermionDartTexture1 _lib, NSString string, NSObject? locale) { + final _ret = _lib._objc_msgSend_172( + _lib._class_NSCalendarDate1, + _lib._sel_dateWithNaturalLanguageString_locale_1, + string._id, + locale?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? dateWithNaturalLanguageString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSCalendarDate1, + _lib._sel_dateWithNaturalLanguageString_1, string._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject dateWithString_(ThermionDartTexture1 _lib, NSString aString) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSCalendarDate1, _lib._sel_dateWithString_1, aString._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSCalendarDate new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCalendarDate1, _lib._sel_new1); + return NSCalendarDate._(_ret, _lib, retain: false, release: true); + } + + static NSCalendarDate allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSCalendarDate1, _lib._sel_allocWithZone_1, zone); + return NSCalendarDate._(_ret, _lib, retain: false, release: true); + } + + static NSCalendarDate alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCalendarDate1, _lib._sel_alloc1); + return NSCalendarDate._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSCalendarDate1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSCalendarDate1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSCalendarDate1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSCalendarDate1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSCalendarDate1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSCalendarDate1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSCalendarDate1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSCalendarDate1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSCalendarDate1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSTimeZone extends NSObject { + NSTimeZone._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSTimeZone] that points to the same underlying object as [other]. + static NSTimeZone castFrom(T other) { + return NSTimeZone._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSTimeZone] that wraps the given raw object pointer. + static NSTimeZone castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSTimeZone._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSTimeZone]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSTimeZone1); + } + + NSString get name { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSData get data { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_data1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + int secondsFromGMTForDate_(NSDate aDate) { + return _lib._objc_msgSend_175( + _id, _lib._sel_secondsFromGMTForDate_1, aDate._id); + } + + NSString? abbreviationForDate_(NSDate aDate) { + final _ret = + _lib._objc_msgSend_176(_id, _lib._sel_abbreviationForDate_1, aDate._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + bool isDaylightSavingTimeForDate_(NSDate aDate) { + return _lib._objc_msgSend_169( + _id, _lib._sel_isDaylightSavingTimeForDate_1, aDate._id); + } + + double daylightSavingTimeOffsetForDate_(NSDate aDate) { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_166_fpret( + _id, _lib._sel_daylightSavingTimeOffsetForDate_1, aDate._id) + : _lib._objc_msgSend_166( + _id, _lib._sel_daylightSavingTimeOffsetForDate_1, aDate._id); + } + + NSDate? nextDaylightSavingTimeTransitionAfterDate_(NSDate aDate) { + final _ret = _lib._objc_msgSend_177( + _id, _lib._sel_nextDaylightSavingTimeTransitionAfterDate_1, aDate._id); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSTimeZone getSystemTimeZone(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_178( + _lib._class_NSTimeZone1, _lib._sel_systemTimeZone1); + return NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + static void resetSystemTimeZone(ThermionDartTexture1 _lib) { + _lib._objc_msgSend_1( + _lib._class_NSTimeZone1, _lib._sel_resetSystemTimeZone1); + } + + static NSTimeZone getDefaultTimeZone(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_178( + _lib._class_NSTimeZone1, _lib._sel_defaultTimeZone1); + return NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + static void setDefaultTimeZone(ThermionDartTexture1 _lib, NSTimeZone value) { + return _lib._objc_msgSend_179( + _lib._class_NSTimeZone1, _lib._sel_setDefaultTimeZone_1, value._id); + } + + static NSTimeZone getLocalTimeZone(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_178( + _lib._class_NSTimeZone1, _lib._sel_localTimeZone1); + return NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + static NSArray getKnownTimeZoneNames(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSTimeZone1, _lib._sel_knownTimeZoneNames1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary getAbbreviationDictionary(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_180( + _lib._class_NSTimeZone1, _lib._sel_abbreviationDictionary1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static void setAbbreviationDictionary( + ThermionDartTexture1 _lib, NSDictionary value) { + return _lib._objc_msgSend_181(_lib._class_NSTimeZone1, + _lib._sel_setAbbreviationDictionary_1, value._id); + } + + static NSString getTimeZoneDataVersion(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_21( + _lib._class_NSTimeZone1, _lib._sel_timeZoneDataVersion1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + int get secondsFromGMT { + return _lib._objc_msgSend_82(_id, _lib._sel_secondsFromGMT1); + } + + NSString? get abbreviation { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_abbreviation1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + bool get daylightSavingTime { + return _lib._objc_msgSend_12(_id, _lib._sel_isDaylightSavingTime1); + } + + double get daylightSavingTimeOffset { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_daylightSavingTimeOffset1) + : _lib._objc_msgSend_164(_id, _lib._sel_daylightSavingTimeOffset1); + } + + NSDate? get nextDaylightSavingTimeTransition { + final _ret = _lib._objc_msgSend_182( + _id, _lib._sel_nextDaylightSavingTimeTransition1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSString get description { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool isEqualToTimeZone_(NSTimeZone aTimeZone) { + return _lib._objc_msgSend_183( + _id, _lib._sel_isEqualToTimeZone_1, aTimeZone._id); + } + + NSString? localizedName_locale_(int style, NSLocale? locale) { + final _ret = _lib._objc_msgSend_202(_id, _lib._sel_localizedName_locale_1, + style, locale?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSTimeZone? timeZoneWithName_( + ThermionDartTexture1 _lib, NSString tzName) { + final _ret = _lib._objc_msgSend_38( + _lib._class_NSTimeZone1, _lib._sel_timeZoneWithName_1, tzName._id); + return _ret.address == 0 + ? null + : NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + static NSTimeZone? timeZoneWithName_data_( + ThermionDartTexture1 _lib, NSString tzName, NSData? aData) { + final _ret = _lib._objc_msgSend_203( + _lib._class_NSTimeZone1, + _lib._sel_timeZoneWithName_data_1, + tzName._id, + aData?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + NSTimeZone? initWithName_(NSString tzName) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_initWithName_1, tzName._id); + return _ret.address == 0 + ? null + : NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + NSTimeZone? initWithName_data_(NSString tzName, NSData? aData) { + final _ret = _lib._objc_msgSend_203(_id, _lib._sel_initWithName_data_1, + tzName._id, aData?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + static NSTimeZone timeZoneForSecondsFromGMT_( + ThermionDartTexture1 _lib, int seconds) { + final _ret = _lib._objc_msgSend_204(_lib._class_NSTimeZone1, + _lib._sel_timeZoneForSecondsFromGMT_1, seconds); + return NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + static NSTimeZone? timeZoneWithAbbreviation_( + ThermionDartTexture1 _lib, NSString abbreviation) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSTimeZone1, + _lib._sel_timeZoneWithAbbreviation_1, abbreviation._id); + return _ret.address == 0 + ? null + : NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + @override + NSTimeZone init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + static NSTimeZone new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSTimeZone1, _lib._sel_new1); + return NSTimeZone._(_ret, _lib, retain: false, release: true); + } + + static NSTimeZone allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSTimeZone1, _lib._sel_allocWithZone_1, zone); + return NSTimeZone._(_ret, _lib, retain: false, release: true); + } + + static NSTimeZone alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSTimeZone1, _lib._sel_alloc1); + return NSTimeZone._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSTimeZone1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSTimeZone1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSTimeZone1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSTimeZone1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSTimeZone1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSTimeZone1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSTimeZone1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSTimeZone1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSTimeZone1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSTimeZoneNameStyle { + static const int NSTimeZoneNameStyleStandard = 0; + static const int NSTimeZoneNameStyleShortStandard = 1; + static const int NSTimeZoneNameStyleDaylightSaving = 2; + static const int NSTimeZoneNameStyleShortDaylightSaving = 3; + static const int NSTimeZoneNameStyleGeneric = 4; + static const int NSTimeZoneNameStyleShortGeneric = 5; +} + +class NSLocale extends NSObject { + NSLocale._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSLocale] that points to the same underlying object as [other]. + static NSLocale castFrom(T other) { + return NSLocale._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSLocale] that wraps the given raw object pointer. + static NSLocale castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSLocale._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSLocale]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLocale1); + } + + NSObject? objectForKey_(NSString key) { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_objectForKey_1, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSString? displayNameForKey_value_(NSString key, NSObject value) { + final _ret = _lib._objc_msgSend_184( + _id, _lib._sel_displayNameForKey_value_1, key._id, value._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSLocale initWithLocaleIdentifier_(NSString string) { + final _ret = _lib._objc_msgSend_31( + _id, _lib._sel_initWithLocaleIdentifier_1, string._id); + return NSLocale._(_ret, _lib, retain: true, release: true); + } + + NSLocale? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSLocale._(_ret, _lib, retain: true, release: true); + } + + NSString get localeIdentifier { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_localeIdentifier1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString localizedStringForLocaleIdentifier_(NSString localeIdentifier) { + final _ret = _lib._objc_msgSend_68(_id, + _lib._sel_localizedStringForLocaleIdentifier_1, localeIdentifier._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get languageCode { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_languageCode1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? localizedStringForLanguageCode_(NSString languageCode) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_localizedStringForLanguageCode_1, languageCode._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get countryCode { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_countryCode1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? localizedStringForCountryCode_(NSString countryCode) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_localizedStringForCountryCode_1, countryCode._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get scriptCode { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_scriptCode1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? localizedStringForScriptCode_(NSString scriptCode) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_localizedStringForScriptCode_1, scriptCode._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get variantCode { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_variantCode1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? localizedStringForVariantCode_(NSString variantCode) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_localizedStringForVariantCode_1, variantCode._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSCharacterSet get exemplarCharacterSet { + final _ret = _lib._objc_msgSend_186(_id, _lib._sel_exemplarCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + NSString get calendarIdentifier { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_calendarIdentifier1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? localizedStringForCalendarIdentifier_(NSString calendarIdentifier) { + final _ret = _lib._objc_msgSend_185( + _id, + _lib._sel_localizedStringForCalendarIdentifier_1, + calendarIdentifier._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get collationIdentifier { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_collationIdentifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? localizedStringForCollationIdentifier_( + NSString collationIdentifier) { + final _ret = _lib._objc_msgSend_185( + _id, + _lib._sel_localizedStringForCollationIdentifier_1, + collationIdentifier._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + bool get usesMetricSystem { + return _lib._objc_msgSend_12(_id, _lib._sel_usesMetricSystem1); + } + + NSString get decimalSeparator { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_decimalSeparator1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get groupingSeparator { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_groupingSeparator1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get currencySymbol { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currencySymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get currencyCode { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_currencyCode1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? localizedStringForCurrencyCode_(NSString currencyCode) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_localizedStringForCurrencyCode_1, currencyCode._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get collatorIdentifier { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_collatorIdentifier1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? localizedStringForCollatorIdentifier_(NSString collatorIdentifier) { + final _ret = _lib._objc_msgSend_185( + _id, + _lib._sel_localizedStringForCollatorIdentifier_1, + collatorIdentifier._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get quotationBeginDelimiter { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_quotationBeginDelimiter1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get quotationEndDelimiter { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_quotationEndDelimiter1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get alternateQuotationBeginDelimiter { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_alternateQuotationBeginDelimiter1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get alternateQuotationEndDelimiter { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_alternateQuotationEndDelimiter1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSLocale getAutoupdatingCurrentLocale(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_196( + _lib._class_NSLocale1, _lib._sel_autoupdatingCurrentLocale1); + return NSLocale._(_ret, _lib, retain: true, release: true); + } + + static NSLocale getCurrentLocale(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_196(_lib._class_NSLocale1, _lib._sel_currentLocale1); + return NSLocale._(_ret, _lib, retain: true, release: true); + } + + static NSLocale getSystemLocale(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_196(_lib._class_NSLocale1, _lib._sel_systemLocale1); + return NSLocale._(_ret, _lib, retain: true, release: true); + } + + static NSLocale localeWithLocaleIdentifier_( + ThermionDartTexture1 _lib, NSString ident) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSLocale1, + _lib._sel_localeWithLocaleIdentifier_1, ident._id); + return NSLocale._(_ret, _lib, retain: true, release: true); + } + + @override + NSLocale init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSLocale._(_ret, _lib, retain: true, release: true); + } + + static NSArray getAvailableLocaleIdentifiers(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSLocale1, _lib._sel_availableLocaleIdentifiers1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray getISOLanguageCodes(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSLocale1, _lib._sel_ISOLanguageCodes1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray getISOCountryCodes(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSLocale1, _lib._sel_ISOCountryCodes1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray getISOCurrencyCodes(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSLocale1, _lib._sel_ISOCurrencyCodes1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray getCommonISOCurrencyCodes(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSLocale1, _lib._sel_commonISOCurrencyCodes1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray getPreferredLanguages(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSLocale1, _lib._sel_preferredLanguages1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary componentsFromLocaleIdentifier_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_197(_lib._class_NSLocale1, + _lib._sel_componentsFromLocaleIdentifier_1, string._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSString localeIdentifierFromComponents_( + ThermionDartTexture1 _lib, NSDictionary dict) { + final _ret = _lib._objc_msgSend_198(_lib._class_NSLocale1, + _lib._sel_localeIdentifierFromComponents_1, dict._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString canonicalLocaleIdentifierFromString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_68(_lib._class_NSLocale1, + _lib._sel_canonicalLocaleIdentifierFromString_1, string._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString canonicalLanguageIdentifierFromString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_68(_lib._class_NSLocale1, + _lib._sel_canonicalLanguageIdentifierFromString_1, string._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? localeIdentifierFromWindowsLocaleCode_( + ThermionDartTexture1 _lib, int lcid) { + final _ret = _lib._objc_msgSend_199(_lib._class_NSLocale1, + _lib._sel_localeIdentifierFromWindowsLocaleCode_1, lcid); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static int windowsLocaleCodeFromLocaleIdentifier_( + ThermionDartTexture1 _lib, NSString localeIdentifier) { + return _lib._objc_msgSend_200( + _lib._class_NSLocale1, + _lib._sel_windowsLocaleCodeFromLocaleIdentifier_1, + localeIdentifier._id); + } + + static int characterDirectionForLanguage_( + ThermionDartTexture1 _lib, NSString isoLangCode) { + return _lib._objc_msgSend_201(_lib._class_NSLocale1, + _lib._sel_characterDirectionForLanguage_1, isoLangCode._id); + } + + static int lineDirectionForLanguage_( + ThermionDartTexture1 _lib, NSString isoLangCode) { + return _lib._objc_msgSend_201(_lib._class_NSLocale1, + _lib._sel_lineDirectionForLanguage_1, isoLangCode._id); + } + + static NSLocale new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSLocale1, _lib._sel_new1); + return NSLocale._(_ret, _lib, retain: false, release: true); + } + + static NSLocale allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSLocale1, _lib._sel_allocWithZone_1, zone); + return NSLocale._(_ret, _lib, retain: false, release: true); + } + + static NSLocale alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSLocale1, _lib._sel_alloc1); + return NSLocale._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSLocale1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSLocale1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSLocale1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSLocale1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSLocale1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSLocale1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSLocale1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSLocale1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSLocale1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSCharacterSet extends NSObject { + NSCharacterSet._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. + static NSCharacterSet castFrom(T other) { + return NSCharacterSet._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSCharacterSet] that wraps the given raw object pointer. + static NSCharacterSet castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCharacterSet._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSCharacterSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSCharacterSet1); + } + + static NSCharacterSet getControlCharacterSet(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getWhitespaceCharacterSet(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getWhitespaceAndNewlineCharacterSet( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186(_lib._class_NSCharacterSet1, + _lib._sel_whitespaceAndNewlineCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getDecimalDigitCharacterSet(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getLetterCharacterSet(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getLowercaseLetterCharacterSet( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getUppercaseLetterCharacterSet( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getNonBaseCharacterSet(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getAlphanumericCharacterSet(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getDecomposableCharacterSet(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getIllegalCharacterSet(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getPunctuationCharacterSet(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getCapitalizedLetterCharacterSet( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getSymbolCharacterSet(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getNewlineCharacterSet(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); + } + + static NSCharacterSet characterSetWithRange_( + ThermionDartTexture1 _lib, _NSRange aRange) { + final _ret = _lib._objc_msgSend_187( + _lib._class_NSCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet characterSetWithCharactersInString_( + ThermionDartTexture1 _lib, NSString aString) { + final _ret = _lib._objc_msgSend_188(_lib._class_NSCharacterSet1, + _lib._sel_characterSetWithCharactersInString_1, aString._id); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet characterSetWithBitmapRepresentation_( + ThermionDartTexture1 _lib, NSData data) { + final _ret = _lib._objc_msgSend_189(_lib._class_NSCharacterSet1, + _lib._sel_characterSetWithBitmapRepresentation_1, data._id); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? characterSetWithContentsOfFile_( + ThermionDartTexture1 _lib, NSString fName) { + final _ret = _lib._objc_msgSend_190(_lib._class_NSCharacterSet1, + _lib._sel_characterSetWithContentsOfFile_1, fName._id); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + NSCharacterSet initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_191(_id, _lib._sel_initWithCoder_1, coder._id); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + bool characterIsMember_(int aCharacter) { + return _lib._objc_msgSend_192( + _id, _lib._sel_characterIsMember_1, aCharacter); + } + + NSData get bitmapRepresentation { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_bitmapRepresentation1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSCharacterSet get invertedSet { + final _ret = _lib._objc_msgSend_186(_id, _lib._sel_invertedSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + bool longCharacterIsMember_(int theLongChar) { + return _lib._objc_msgSend_193( + _id, _lib._sel_longCharacterIsMember_1, theLongChar); + } + + bool isSupersetOfSet_(NSCharacterSet theOtherSet) { + return _lib._objc_msgSend_194( + _id, _lib._sel_isSupersetOfSet_1, theOtherSet._id); + } + + bool hasMemberInPlane_(int thePlane) { + return _lib._objc_msgSend_195(_id, _lib._sel_hasMemberInPlane_1, thePlane); + } + + static NSCharacterSet getURLUserAllowedCharacterSet( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getURLPasswordAllowedCharacterSet( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getURLHostAllowedCharacterSet( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getURLPathAllowedCharacterSet( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getURLQueryAllowedCharacterSet( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet getURLFragmentAllowedCharacterSet( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_186( + _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSCharacterSet init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_new1); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); + } + + static NSCharacterSet allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSCharacterSet1, _lib._sel_allocWithZone_1, zone); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); + } + + static NSCharacterSet alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSCharacterSet1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSCharacterSet1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSCharacterSet1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSCharacterSet1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSCharacterSet1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSCharacterSet1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSCharacterSet1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSCharacterSet1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSCharacterSet1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSLocaleLanguageDirection { + static const int NSLocaleLanguageDirectionUnknown = 0; + static const int NSLocaleLanguageDirectionLeftToRight = 1; + static const int NSLocaleLanguageDirectionRightToLeft = 2; + static const int NSLocaleLanguageDirectionTopToBottom = 3; + static const int NSLocaleLanguageDirectionBottomToTop = 4; +} + +abstract class NSURLBookmarkCreationOptions { + static const int NSURLBookmarkCreationPreferFileIDResolution = 256; + static const int NSURLBookmarkCreationMinimalBookmark = 512; + static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; + static const int NSURLBookmarkCreationWithSecurityScope = 2048; + static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; + static const int NSURLBookmarkCreationWithoutImplicitSecurityScope = + 536870912; +} + +abstract class NSURLBookmarkResolutionOptions { + static const int NSURLBookmarkResolutionWithoutUI = 256; + static const int NSURLBookmarkResolutionWithoutMounting = 512; + static const int NSURLBookmarkResolutionWithSecurityScope = 1024; + static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; +} + +class NSURLHandle extends NSObject { + NSURLHandle._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLHandle] that points to the same underlying object as [other]. + static NSURLHandle castFrom(T other) { + return NSURLHandle._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLHandle] that wraps the given raw object pointer. + static NSURLHandle castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLHandle._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLHandle]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLHandle1); + } + + static void registerURLHandleClass_( + ThermionDartTexture1 _lib, NSObject anURLHandleSubclass) { + _lib._objc_msgSend_15(_lib._class_NSURLHandle1, + _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); + } + + static NSObject URLHandleClassForURL_( + ThermionDartTexture1 _lib, NSURL anURL) { + final _ret = _lib._objc_msgSend_261( + _lib._class_NSURLHandle1, _lib._sel_URLHandleClassForURL_1, anURL._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + int status() { + return _lib._objc_msgSend_262(_id, _lib._sel_status1); + } + + NSString failureReason() { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_failureReason1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + void addClient_(NSObject client) { + _lib._objc_msgSend_15(_id, _lib._sel_addClient_1, client._id); + } + + void removeClient_(NSObject client) { + _lib._objc_msgSend_15(_id, _lib._sel_removeClient_1, client._id); + } + + void loadInBackground() { + _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); + } + + void cancelLoadInBackground() { + _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); + } + + NSData resourceData() { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_resourceData1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData availableResourceData() { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_availableResourceData1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + int expectedResourceDataSize() { + return _lib._objc_msgSend_237(_id, _lib._sel_expectedResourceDataSize1); + } + + void flushCachedData() { + _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); + } + + void backgroundLoadDidFailWithReason_(NSString reason) { + _lib._objc_msgSend_247( + _id, _lib._sel_backgroundLoadDidFailWithReason_1, reason._id); + } + + void didLoadBytes_loadComplete_(NSData newBytes, bool yorn) { + _lib._objc_msgSend_263( + _id, _lib._sel_didLoadBytes_loadComplete_1, newBytes._id, yorn); + } + + static bool canInitWithURL_(ThermionDartTexture1 _lib, NSURL anURL) { + return _lib._objc_msgSend_264( + _lib._class_NSURLHandle1, _lib._sel_canInitWithURL_1, anURL._id); + } + + static NSURLHandle cachedHandleForURL_( + ThermionDartTexture1 _lib, NSURL anURL) { + final _ret = _lib._objc_msgSend_265( + _lib._class_NSURLHandle1, _lib._sel_cachedHandleForURL_1, anURL._id); + return NSURLHandle._(_ret, _lib, retain: true, release: true); + } + + NSObject initWithURL_cached_(NSURL anURL, bool willCache) { + final _ret = _lib._objc_msgSend_266( + _id, _lib._sel_initWithURL_cached_1, anURL._id, willCache); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject propertyForKey_(NSString propertyKey) { + final _ret = + _lib._objc_msgSend_31(_id, _lib._sel_propertyForKey_1, propertyKey._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject propertyForKeyIfAvailable_(NSString propertyKey) { + final _ret = _lib._objc_msgSend_31( + _id, _lib._sel_propertyForKeyIfAvailable_1, propertyKey._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + bool writeProperty_forKey_(NSObject propertyValue, NSString propertyKey) { + return _lib._objc_msgSend_260(_id, _lib._sel_writeProperty_forKey_1, + propertyValue._id, propertyKey._id); + } + + bool writeData_(NSData data) { + return _lib._objc_msgSend_24(_id, _lib._sel_writeData_1, data._id); + } + + NSData loadInForeground() { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_loadInForeground1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + void beginLoadInBackground() { + _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); + } + + void endLoadInBackground() { + _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); + } + + @override + NSURLHandle init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLHandle._(_ret, _lib, retain: true, release: true); + } + + static NSURLHandle new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); + return NSURLHandle._(_ret, _lib, retain: false, release: true); + } + + static NSURLHandle allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLHandle1, _lib._sel_allocWithZone_1, zone); + return NSURLHandle._(_ret, _lib, retain: false, release: true); + } + + static NSURLHandle alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); + return NSURLHandle._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLHandle1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLHandle1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLHandle1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLHandle1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLHandle1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLHandle1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLHandle1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSURLHandle1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLHandle1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSURLHandleStatus { + static const int NSURLHandleNotLoaded = 0; + static const int NSURLHandleLoadSucceeded = 1; + static const int NSURLHandleLoadInProgress = 2; + static const int NSURLHandleLoadFailed = 3; +} + +abstract class NSDataWritingOptions { + static const int NSDataWritingAtomic = 1; + static const int NSDataWritingWithoutOverwriting = 2; + static const int NSDataWritingFileProtectionNone = 268435456; + static const int NSDataWritingFileProtectionComplete = 536870912; + static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; + static const int + NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = + 1073741824; + static const int NSDataWritingFileProtectionMask = 4026531840; + static const int NSAtomicWrite = 1; +} + +abstract class NSDataSearchOptions { + static const int NSDataSearchBackwards = 1; + static const int NSDataSearchAnchored = 2; +} + +void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( + void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunction(ThermionDartTexture1 lib, + void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(arg0, arg1, arg2))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.listener(ThermionDartTexture1 lib, + void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(arg0, arg1, arg2))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + _NSRange, ffi.Pointer)>()(_id, arg0, arg1, arg2); +} + +abstract class NSDataReadingOptions { + static const int NSDataReadingMappedIfSafe = 1; + static const int NSDataReadingUncached = 2; + static const int NSDataReadingMappedAlways = 8; + static const int NSDataReadingMapped = 1; + static const int NSMappedRead = 1; + static const int NSUncachedRead = 2; +} + +void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() + .asFunction, int)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry = + , int)>{}; +int _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( + void Function(ffi.Pointer, int) fn) { + final id = ++_ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, ffi.UnsignedLong arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer, ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong.fromFunction( + ThermionDartTexture1 lib, void Function(ffi.Pointer, int) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer, ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong.listener( + ThermionDartTexture1 lib, void Function(ffi.Pointer, int) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.UnsignedLong)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.UnsignedLong)>? _dartFuncListenerTrampoline; + + void call(ffi.Pointer arg0, int arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + int)>()(_id, arg0, arg1); +} + +abstract class NSDataBase64DecodingOptions { + static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; +} + +abstract class NSDataBase64EncodingOptions { + static const int NSDataBase64Encoding64CharacterLineLength = 1; + static const int NSDataBase64Encoding76CharacterLineLength = 2; + static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; + static const int NSDataBase64EncodingEndLineWithLineFeed = 32; +} + +abstract class NSDataCompressionAlgorithm { + static const int NSDataCompressionAlgorithmLZFSE = 0; + static const int NSDataCompressionAlgorithmLZ4 = 1; + static const int NSDataCompressionAlgorithmLZMA = 2; + static const int NSDataCompressionAlgorithmZlib = 3; +} + +abstract class NSDecodingFailurePolicy { + static const int NSDecodingFailurePolicyRaiseException = 0; + static const int NSDecodingFailurePolicySetErrorAndReturn = 1; +} + +abstract class NSStringCompareOptions { + static const int NSCaseInsensitiveSearch = 1; + static const int NSLiteralSearch = 2; + static const int NSBackwardsSearch = 4; + static const int NSAnchoredSearch = 8; + static const int NSNumericSearch = 64; + static const int NSDiacriticInsensitiveSearch = 128; + static const int NSWidthInsensitiveSearch = 256; + static const int NSForcedOrderingSearch = 512; + static const int NSRegularExpressionSearch = 1024; +} + +abstract class NSStringEnumerationOptions { + static const int NSStringEnumerationByLines = 0; + static const int NSStringEnumerationByParagraphs = 1; + static const int NSStringEnumerationByComposedCharacterSequences = 2; + static const int NSStringEnumerationByWords = 3; + static const int NSStringEnumerationBySentences = 4; + static const int NSStringEnumerationByCaretPositions = 5; + static const int NSStringEnumerationByDeletionClusters = 6; + static const int NSStringEnumerationReverse = 256; + static const int NSStringEnumerationSubstringNotRequired = 512; + static const int NSStringEnumerationLocalized = 1024; +} + +void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + _NSRange arg1, + _NSRange arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, + _NSRange arg2, ffi.Pointer arg3)>>() + .asFunction< + void Function(ffi.Pointer, _NSRange, _NSRange, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +final _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry = , _NSRange, _NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( + void Function(ffi.Pointer, _NSRange, _NSRange, + ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + _NSRange arg1, + _NSRange arg2, + ffi.Pointer arg3) => + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2, arg3); + +class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, + _NSRange arg2, ffi.Pointer arg3)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunction( + ThermionDartTexture1 lib, + void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, _NSRange arg2, + ffi.Pointer arg3) => + fn(arg0.address == 0 ? null : NSString._(arg0, lib, retain: true, release: true), arg1, arg2, arg3))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.listener( + ThermionDartTexture1 lib, + void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, _NSRange arg2, + ffi.Pointer arg3) => + fn(arg0.address == 0 ? null : NSString._(arg0, lib, retain: true, release: true), arg1, arg2, arg3))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSString? arg0, _NSRange arg1, _NSRange arg2, + ffi.Pointer arg3) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + _NSRange arg1, + _NSRange arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1, arg2, arg3); +} + +void _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSString_bool_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSString_bool_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[block.ref.target.address]!( + arg0, arg1); + +class ObjCBlock_ffiVoid_NSString_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSString_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_bool.fromFunction(ThermionDartTexture1 lib, + void Function(NSString, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSString_bool_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(NSString._(arg0, lib, retain: true, release: true), + arg1))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSString_bool.listener(ThermionDartTexture1 lib, + void Function(NSString, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSString_bool_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(NSString._(arg0, lib, retain: true, release: true), + arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSString arg0, ffi.Pointer arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1); +} + +abstract class NSStringEncodingConversionOptions { + static const int NSStringEncodingConversionAllowLossy = 1; + static const int NSStringEncodingConversionExternalRepresentation = 2; +} + +void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1)>>() + .asFunction, int)>()( + arg0, arg1); +final _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry = + , int)>{}; +int _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( + void Function(ffi.Pointer, int) fn) { + final id = + ++_ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1) => + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong + extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong.fromFunction( + ThermionDartTexture1 lib, + void Function(ffi.Pointer, int) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( + (ffi.Pointer arg0, int arg1) => + fn(arg0, arg1))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong.listener( + ThermionDartTexture1 lib, + void Function(ffi.Pointer, int) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.UnsignedLong)>.listener( + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( + (ffi.Pointer arg0, int arg1) => + fn(arg0, arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.UnsignedLong)>? _dartFuncListenerTrampoline; + + void call(ffi.Pointer arg0, int arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + int)>()(_id, arg0, arg1); +} + +abstract class NSLinguisticTaggerOptions { + static const int NSLinguisticTaggerOmitWords = 1; + static const int NSLinguisticTaggerOmitPunctuation = 2; + static const int NSLinguisticTaggerOmitWhitespace = 4; + static const int NSLinguisticTaggerOmitOther = 8; + static const int NSLinguisticTaggerJoinNames = 16; +} + +class NSOrthography extends NSObject { + NSOrthography._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOrthography] that points to the same underlying object as [other]. + static NSOrthography castFrom(T other) { + return NSOrthography._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSOrthography] that wraps the given raw object pointer. + static NSOrthography castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOrthography._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSOrthography]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOrthography1); + } + + NSString get dominantScript { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_dominantScript1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSDictionary get languageMap { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_languageMap1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSOrthography initWithDominantScript_languageMap_( + NSString script, NSDictionary map) { + final _ret = _lib._objc_msgSend_399(_id, + _lib._sel_initWithDominantScript_languageMap_1, script._id, map._id); + return NSOrthography._(_ret, _lib, retain: true, release: true); + } + + NSOrthography? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSOrthography._(_ret, _lib, retain: true, release: true); + } + + NSArray? languagesForScript_(NSString script) { + final _ret = + _lib._objc_msgSend_131(_id, _lib._sel_languagesForScript_1, script._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? dominantLanguageForScript_(NSString script) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_dominantLanguageForScript_1, script._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get dominantLanguage { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_dominantLanguage1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray get allScripts { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_allScripts1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get allLanguages { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_allLanguages1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSOrthography defaultOrthographyForLanguage_( + ThermionDartTexture1 _lib, NSString language) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSOrthography1, + _lib._sel_defaultOrthographyForLanguage_1, language._id); + return NSOrthography._(_ret, _lib, retain: true, release: true); + } + + static NSOrthography orthographyWithDominantScript_languageMap_( + ThermionDartTexture1 _lib, NSString script, NSDictionary map) { + final _ret = _lib._objc_msgSend_399( + _lib._class_NSOrthography1, + _lib._sel_orthographyWithDominantScript_languageMap_1, + script._id, + map._id); + return NSOrthography._(_ret, _lib, retain: true, release: true); + } + + @override + NSOrthography init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSOrthography._(_ret, _lib, retain: true, release: true); + } + + static NSOrthography new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOrthography1, _lib._sel_new1); + return NSOrthography._(_ret, _lib, retain: false, release: true); + } + + static NSOrthography allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSOrthography1, _lib._sel_allocWithZone_1, zone); + return NSOrthography._(_ret, _lib, retain: false, release: true); + } + + static NSOrthography alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOrthography1, _lib._sel_alloc1); + return NSOrthography._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSOrthography1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSOrthography1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSOrthography1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSOrthography1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSOrthography1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSOrthography1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSOrthography1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSOrthography1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrthography1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +void _ObjCBlock_ffiVoid_ObjCObject_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_ObjCObject_bool_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ObjCObject_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_ObjCObject_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ObjCObject_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_bool.fromFunction(ThermionDartTexture1 lib, + void Function(NSObject, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_bool_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(NSObject._(arg0, lib, retain: true, release: true), + arg1))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ObjCObject_bool.listener(ThermionDartTexture1 lib, + void Function(NSObject, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ObjCObject_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_bool_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(NSObject._(arg0, lib, retain: true, release: true), + arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject arg0, ffi.Pointer arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1); +} + +bool _ObjCBlock_bool_ObjCObject_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer, ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_bool_ObjCObject_bool_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_bool_ObjCObject_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_bool_ObjCObject_bool_registerClosure( + bool Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_bool_ObjCObject_bool_closureRegistryIndex; + _ObjCBlock_bool_ObjCObject_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_ObjCObject_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_ObjCObject_bool_closureRegistry[block.ref.target.address]!( + arg0, arg1); + +class ObjCBlock_bool_ObjCObject_bool extends _ObjCBlockBase { + ObjCBlock_bool_ObjCObject_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_bool_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_bool.fromFunction(ThermionDartTexture1 lib, + bool Function(NSObject, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_bool_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_ObjCObject_bool_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(NSObject._(arg0, lib, retain: true, release: true), arg1))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSObject arg0, ffi.Pointer arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1); +} + +class NSFileManager extends NSObject { + NSFileManager._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSFileManager] that points to the same underlying object as [other]. + static NSFileManager castFrom(T other) { + return NSFileManager._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSFileManager] that wraps the given raw object pointer. + static NSFileManager castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSFileManager._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSFileManager]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSFileManager1); + } + + static NSFileManager getDefaultManager(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_430( + _lib._class_NSFileManager1, _lib._sel_defaultManager1); + return NSFileManager._(_ret, _lib, retain: true, release: true); + } + + NSArray? mountedVolumeURLsIncludingResourceValuesForKeys_options_( + NSArray? propertyKeys, int options) { + final _ret = _lib._objc_msgSend_431( + _id, + _lib._sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_1, + propertyKeys?._id ?? ffi.nullptr, + options); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + void unmountVolumeAtURL_options_completionHandler_( + NSURL url, int mask, ObjCBlock_ffiVoid_NSError completionHandler) { + _lib._objc_msgSend_432( + _id, + _lib._sel_unmountVolumeAtURL_options_completionHandler_1, + url._id, + mask, + completionHandler._id); + } + + NSArray? contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_( + NSURL url, + NSArray? keys, + int mask, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_433( + _id, + _lib._sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_1, + url._id, + keys?._id ?? ffi.nullptr, + mask, + error); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray URLsForDirectory_inDomains_(int directory, int domainMask) { + final _ret = _lib._objc_msgSend_434( + _id, _lib._sel_URLsForDirectory_inDomains_1, directory, domainMask); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSURL? URLForDirectory_inDomain_appropriateForURL_create_error_( + int directory, + int domain, + NSURL? url, + bool shouldCreate, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_435( + _id, + _lib._sel_URLForDirectory_inDomain_appropriateForURL_create_error_1, + directory, + domain, + url?._id ?? ffi.nullptr, + shouldCreate, + error); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + bool getRelationship_ofDirectoryAtURL_toItemAtURL_error_( + ffi.Pointer outRelationship, + NSURL directoryURL, + NSURL otherURL, + ffi.Pointer> error) { + return _lib._objc_msgSend_436( + _id, + _lib._sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_1, + outRelationship, + directoryURL._id, + otherURL._id, + error); + } + + bool getRelationship_ofDirectory_inDomain_toItemAtURL_error_( + ffi.Pointer outRelationship, + int directory, + int domainMask, + NSURL url, + ffi.Pointer> error) { + return _lib._objc_msgSend_437( + _id, + _lib._sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_1, + outRelationship, + directory, + domainMask, + url._id, + error); + } + + bool createDirectoryAtURL_withIntermediateDirectories_attributes_error_( + NSURL url, + bool createIntermediates, + NSDictionary? attributes, + ffi.Pointer> error) { + return _lib._objc_msgSend_438( + _id, + _lib._sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_1, + url._id, + createIntermediates, + attributes?._id ?? ffi.nullptr, + error); + } + + bool createSymbolicLinkAtURL_withDestinationURL_error_( + NSURL url, NSURL destURL, ffi.Pointer> error) { + return _lib._objc_msgSend_439( + _id, + _lib._sel_createSymbolicLinkAtURL_withDestinationURL_error_1, + url._id, + destURL._id, + error); + } + + NSObject? get delegate { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set delegate(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + } + + bool setAttributes_ofItemAtPath_error_(NSDictionary attributes, NSString path, + ffi.Pointer> error) { + return _lib._objc_msgSend_440( + _id, + _lib._sel_setAttributes_ofItemAtPath_error_1, + attributes._id, + path._id, + error); + } + + bool createDirectoryAtPath_withIntermediateDirectories_attributes_error_( + NSString path, + bool createIntermediates, + NSDictionary? attributes, + ffi.Pointer> error) { + return _lib._objc_msgSend_441( + _id, + _lib._sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_1, + path._id, + createIntermediates, + attributes?._id ?? ffi.nullptr, + error); + } + + NSArray? contentsOfDirectoryAtPath_error_( + NSString path, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_442( + _id, _lib._sel_contentsOfDirectoryAtPath_error_1, path._id, error); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray? subpathsOfDirectoryAtPath_error_( + NSString path, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_442( + _id, _lib._sel_subpathsOfDirectoryAtPath_error_1, path._id, error); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? attributesOfItemAtPath_error_( + NSString path, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_443( + _id, _lib._sel_attributesOfItemAtPath_error_1, path._id, error); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? attributesOfFileSystemForPath_error_( + NSString path, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_443( + _id, _lib._sel_attributesOfFileSystemForPath_error_1, path._id, error); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + bool createSymbolicLinkAtPath_withDestinationPath_error_(NSString path, + NSString destPath, ffi.Pointer> error) { + return _lib._objc_msgSend_444( + _id, + _lib._sel_createSymbolicLinkAtPath_withDestinationPath_error_1, + path._id, + destPath._id, + error); + } + + NSString? destinationOfSymbolicLinkAtPath_error_( + NSString path, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_445(_id, + _lib._sel_destinationOfSymbolicLinkAtPath_error_1, path._id, error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + bool copyItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, + ffi.Pointer> error) { + return _lib._objc_msgSend_444(_id, _lib._sel_copyItemAtPath_toPath_error_1, + srcPath._id, dstPath._id, error); + } + + bool moveItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, + ffi.Pointer> error) { + return _lib._objc_msgSend_444(_id, _lib._sel_moveItemAtPath_toPath_error_1, + srcPath._id, dstPath._id, error); + } + + bool linkItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, + ffi.Pointer> error) { + return _lib._objc_msgSend_444(_id, _lib._sel_linkItemAtPath_toPath_error_1, + srcPath._id, dstPath._id, error); + } + + bool removeItemAtPath_error_( + NSString path, ffi.Pointer> error) { + return _lib._objc_msgSend_446( + _id, _lib._sel_removeItemAtPath_error_1, path._id, error); + } + + bool copyItemAtURL_toURL_error_( + NSURL srcURL, NSURL dstURL, ffi.Pointer> error) { + return _lib._objc_msgSend_439(_id, _lib._sel_copyItemAtURL_toURL_error_1, + srcURL._id, dstURL._id, error); + } + + bool moveItemAtURL_toURL_error_( + NSURL srcURL, NSURL dstURL, ffi.Pointer> error) { + return _lib._objc_msgSend_439(_id, _lib._sel_moveItemAtURL_toURL_error_1, + srcURL._id, dstURL._id, error); + } + + bool linkItemAtURL_toURL_error_( + NSURL srcURL, NSURL dstURL, ffi.Pointer> error) { + return _lib._objc_msgSend_439(_id, _lib._sel_linkItemAtURL_toURL_error_1, + srcURL._id, dstURL._id, error); + } + + bool removeItemAtURL_error_( + NSURL URL, ffi.Pointer> error) { + return _lib._objc_msgSend_88( + _id, _lib._sel_removeItemAtURL_error_1, URL._id, error); + } + + bool trashItemAtURL_resultingItemURL_error_( + NSURL url, + ffi.Pointer> outResultingURL, + ffi.Pointer> error) { + return _lib._objc_msgSend_447( + _id, + _lib._sel_trashItemAtURL_resultingItemURL_error_1, + url._id, + outResultingURL, + error); + } + + NSDictionary? fileAttributesAtPath_traverseLink_(NSString path, bool yorn) { + final _ret = _lib._objc_msgSend_448( + _id, _lib._sel_fileAttributesAtPath_traverseLink_1, path._id, yorn); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + bool changeFileAttributes_atPath_(NSDictionary attributes, NSString path) { + return _lib._objc_msgSend_449( + _id, _lib._sel_changeFileAttributes_atPath_1, attributes._id, path._id); + } + + NSArray? directoryContentsAtPath_(NSString path) { + final _ret = _lib._objc_msgSend_131( + _id, _lib._sel_directoryContentsAtPath_1, path._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? fileSystemAttributesAtPath_(NSString path) { + final _ret = _lib._objc_msgSend_155( + _id, _lib._sel_fileSystemAttributesAtPath_1, path._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSString? pathContentOfSymbolicLinkAtPath_(NSString path) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_pathContentOfSymbolicLinkAtPath_1, path._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + bool createSymbolicLinkAtPath_pathContent_( + NSString path, NSString otherpath) { + return _lib._objc_msgSend_450( + _id, + _lib._sel_createSymbolicLinkAtPath_pathContent_1, + path._id, + otherpath._id); + } + + bool createDirectoryAtPath_attributes_( + NSString path, NSDictionary attributes) { + return _lib._objc_msgSend_451(_id, + _lib._sel_createDirectoryAtPath_attributes_1, path._id, attributes._id); + } + + bool linkPath_toPath_handler_( + NSString src, NSString dest, NSObject? handler) { + return _lib._objc_msgSend_452(_id, _lib._sel_linkPath_toPath_handler_1, + src._id, dest._id, handler?._id ?? ffi.nullptr); + } + + bool copyPath_toPath_handler_( + NSString src, NSString dest, NSObject? handler) { + return _lib._objc_msgSend_452(_id, _lib._sel_copyPath_toPath_handler_1, + src._id, dest._id, handler?._id ?? ffi.nullptr); + } + + bool movePath_toPath_handler_( + NSString src, NSString dest, NSObject? handler) { + return _lib._objc_msgSend_452(_id, _lib._sel_movePath_toPath_handler_1, + src._id, dest._id, handler?._id ?? ffi.nullptr); + } + + bool removeFileAtPath_handler_(NSString path, NSObject? handler) { + return _lib._objc_msgSend_453(_id, _lib._sel_removeFileAtPath_handler_1, + path._id, handler?._id ?? ffi.nullptr); + } + + NSString get currentDirectoryPath { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currentDirectoryPath1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool changeCurrentDirectoryPath_(NSString path) { + return _lib._objc_msgSend_63( + _id, _lib._sel_changeCurrentDirectoryPath_1, path._id); + } + + bool fileExistsAtPath_(NSString path) { + return _lib._objc_msgSend_63(_id, _lib._sel_fileExistsAtPath_1, path._id); + } + + bool fileExistsAtPath_isDirectory_( + NSString path, ffi.Pointer isDirectory) { + return _lib._objc_msgSend_454( + _id, _lib._sel_fileExistsAtPath_isDirectory_1, path._id, isDirectory); + } + + bool isReadableFileAtPath_(NSString path) { + return _lib._objc_msgSend_63( + _id, _lib._sel_isReadableFileAtPath_1, path._id); + } + + bool isWritableFileAtPath_(NSString path) { + return _lib._objc_msgSend_63( + _id, _lib._sel_isWritableFileAtPath_1, path._id); + } + + bool isExecutableFileAtPath_(NSString path) { + return _lib._objc_msgSend_63( + _id, _lib._sel_isExecutableFileAtPath_1, path._id); + } + + bool isDeletableFileAtPath_(NSString path) { + return _lib._objc_msgSend_63( + _id, _lib._sel_isDeletableFileAtPath_1, path._id); + } + + bool contentsEqualAtPath_andPath_(NSString path1, NSString path2) { + return _lib._objc_msgSend_450( + _id, _lib._sel_contentsEqualAtPath_andPath_1, path1._id, path2._id); + } + + NSString displayNameAtPath_(NSString path) { + final _ret = + _lib._objc_msgSend_68(_id, _lib._sel_displayNameAtPath_1, path._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray? componentsToDisplayForPath_(NSString path) { + final _ret = _lib._objc_msgSend_131( + _id, _lib._sel_componentsToDisplayForPath_1, path._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSObject? enumeratorAtPath_(NSString path) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_enumeratorAtPath_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_( + NSURL url, + NSArray? keys, + int mask, + ObjCBlock_bool_NSURL_NSError? handler) { + final _ret = _lib._objc_msgSend_455( + _id, + _lib._sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_1, + url._id, + keys?._id ?? ffi.nullptr, + mask, + handler?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSArray? subpathsAtPath_(NSString path) { + final _ret = + _lib._objc_msgSend_131(_id, _lib._sel_subpathsAtPath_1, path._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSData? contentsAtPath_(NSString path) { + final _ret = + _lib._objc_msgSend_456(_id, _lib._sel_contentsAtPath_1, path._id); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + bool createFileAtPath_contents_attributes_( + NSString path, NSData? data, NSDictionary? attr) { + return _lib._objc_msgSend_457( + _id, + _lib._sel_createFileAtPath_contents_attributes_1, + path._id, + data?._id ?? ffi.nullptr, + attr?._id ?? ffi.nullptr); + } + + ffi.Pointer fileSystemRepresentationWithPath_(NSString path) { + return _lib._objc_msgSend_458( + _id, _lib._sel_fileSystemRepresentationWithPath_1, path._id); + } + + NSString stringWithFileSystemRepresentation_length_( + ffi.Pointer str, int len) { + final _ret = _lib._objc_msgSend_459( + _id, _lib._sel_stringWithFileSystemRepresentation_length_1, str, len); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool + replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_( + NSURL originalItemURL, + NSURL newItemURL, + NSString? backupItemName, + int options, + ffi.Pointer> resultingURL, + ffi.Pointer> error) { + return _lib._objc_msgSend_460( + _id, + _lib._sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_1, + originalItemURL._id, + newItemURL._id, + backupItemName?._id ?? ffi.nullptr, + options, + resultingURL, + error); + } + + bool setUbiquitous_itemAtURL_destinationURL_error_(bool flag, NSURL url, + NSURL destinationURL, ffi.Pointer> error) { + return _lib._objc_msgSend_461( + _id, + _lib._sel_setUbiquitous_itemAtURL_destinationURL_error_1, + flag, + url._id, + destinationURL._id, + error); + } + + bool isUbiquitousItemAtURL_(NSURL url) { + return _lib._objc_msgSend_264( + _id, _lib._sel_isUbiquitousItemAtURL_1, url._id); + } + + bool startDownloadingUbiquitousItemAtURL_error_( + NSURL url, ffi.Pointer> error) { + return _lib._objc_msgSend_88(_id, + _lib._sel_startDownloadingUbiquitousItemAtURL_error_1, url._id, error); + } + + bool evictUbiquitousItemAtURL_error_( + NSURL url, ffi.Pointer> error) { + return _lib._objc_msgSend_88( + _id, _lib._sel_evictUbiquitousItemAtURL_error_1, url._id, error); + } + + NSURL? URLForUbiquityContainerIdentifier_(NSString? containerIdentifier) { + final _ret = _lib._objc_msgSend_462( + _id, + _lib._sel_URLForUbiquityContainerIdentifier_1, + containerIdentifier?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? URLForPublishingUbiquitousItemAtURL_expirationDate_error_( + NSURL url, + ffi.Pointer> outDate, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_463( + _id, + _lib._sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_1, + url._id, + outDate, + error); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSObject? get ubiquityIdentityToken { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_ubiquityIdentityToken1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void getFileProviderServicesForItemAtURL_completionHandler_( + NSURL url, ObjCBlock_ffiVoid_NSDictionary_NSError completionHandler) { + _lib._objc_msgSend_464( + _id, + _lib._sel_getFileProviderServicesForItemAtURL_completionHandler_1, + url._id, + completionHandler._id); + } + + NSURL? containerURLForSecurityApplicationGroupIdentifier_( + NSString groupIdentifier) { + final _ret = _lib._objc_msgSend_256( + _id, + _lib._sel_containerURLForSecurityApplicationGroupIdentifier_1, + groupIdentifier._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL get homeDirectoryForCurrentUser { + final _ret = + _lib._objc_msgSend_465(_id, _lib._sel_homeDirectoryForCurrentUser1); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL get temporaryDirectory { + final _ret = _lib._objc_msgSend_465(_id, _lib._sel_temporaryDirectory1); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? homeDirectoryForUser_(NSString userName) { + final _ret = _lib._objc_msgSend_256( + _id, _lib._sel_homeDirectoryForUser_1, userName._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + @override + NSFileManager init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSFileManager._(_ret, _lib, retain: true, release: true); + } + + static NSFileManager new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileManager1, _lib._sel_new1); + return NSFileManager._(_ret, _lib, retain: false, release: true); + } + + static NSFileManager allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSFileManager1, _lib._sel_allocWithZone_1, zone); + return NSFileManager._(_ret, _lib, retain: false, release: true); + } + + static NSFileManager alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileManager1, _lib._sel_alloc1); + return NSFileManager._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSFileManager1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSFileManager1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSFileManager1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSFileManager1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSFileManager1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSFileManager1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSFileManager1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSFileManager1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSFileManager1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSVolumeEnumerationOptions { + static const int NSVolumeEnumerationSkipHiddenVolumes = 2; + static const int NSVolumeEnumerationProduceFileReferenceURLs = 4; +} + +abstract class NSFileManagerUnmountOptions { + static const int NSFileManagerUnmountAllPartitionsAndEjectDisk = 1; + static const int NSFileManagerUnmountWithoutUI = 2; +} + +void _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSError_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSError_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSError_closureRegistry[block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSError.fromFunction( + ThermionDartTexture1 lib, void Function(NSError?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSError_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSError._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSError.listener( + ThermionDartTexture1 lib, void Function(NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSError_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSError._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSError? arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); +} + +abstract class NSDirectoryEnumerationOptions { + static const int NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1; + static const int NSDirectoryEnumerationSkipsPackageDescendants = 2; + static const int NSDirectoryEnumerationSkipsHiddenFiles = 4; + static const int NSDirectoryEnumerationIncludesDirectoriesPostOrder = 8; + static const int NSDirectoryEnumerationProducesRelativePathURLs = 16; +} + +abstract class NSSearchPathDirectory { + static const int NSApplicationDirectory = 1; + static const int NSDemoApplicationDirectory = 2; + static const int NSDeveloperApplicationDirectory = 3; + static const int NSAdminApplicationDirectory = 4; + static const int NSLibraryDirectory = 5; + static const int NSDeveloperDirectory = 6; + static const int NSUserDirectory = 7; + static const int NSDocumentationDirectory = 8; + static const int NSDocumentDirectory = 9; + static const int NSCoreServiceDirectory = 10; + static const int NSAutosavedInformationDirectory = 11; + static const int NSDesktopDirectory = 12; + static const int NSCachesDirectory = 13; + static const int NSApplicationSupportDirectory = 14; + static const int NSDownloadsDirectory = 15; + static const int NSInputMethodsDirectory = 16; + static const int NSMoviesDirectory = 17; + static const int NSMusicDirectory = 18; + static const int NSPicturesDirectory = 19; + static const int NSPrinterDescriptionDirectory = 20; + static const int NSSharedPublicDirectory = 21; + static const int NSPreferencePanesDirectory = 22; + static const int NSApplicationScriptsDirectory = 23; + static const int NSItemReplacementDirectory = 99; + static const int NSAllApplicationsDirectory = 100; + static const int NSAllLibrariesDirectory = 101; + static const int NSTrashDirectory = 102; +} + +abstract class NSSearchPathDomainMask { + static const int NSUserDomainMask = 1; + static const int NSLocalDomainMask = 2; + static const int NSNetworkDomainMask = 4; + static const int NSSystemDomainMask = 8; + static const int NSAllDomainsMask = 65535; +} + +abstract class NSURLRelationship { + static const int NSURLRelationshipContains = 0; + static const int NSURLRelationshipSame = 1; + static const int NSURLRelationshipOther = 2; +} + +bool _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_bool_NSURL_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_bool_NSURL_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_bool_NSURL_NSError_registerClosure( + bool Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_bool_NSURL_NSError_closureRegistryIndex; + _ObjCBlock_bool_NSURL_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_NSURL_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_NSURL_NSError_closureRegistry[block.ref.target.address]!( + arg0, arg1); + +class ObjCBlock_bool_NSURL_NSError extends _ObjCBlockBase { + ObjCBlock_bool_NSURL_NSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_NSURL_NSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_NSURL_NSError.fromFunction( + ThermionDartTexture1 lib, bool Function(NSURL, NSError) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_NSURL_NSError_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_NSURL_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(NSURL._(arg0, lib, retain: true, release: true), NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSURL arg0, NSError arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1._id); +} + +abstract class NSFileManagerItemReplacementOptions { + static const int NSFileManagerItemReplacementUsingNewMetadataOnly = 1; + static const int NSFileManagerItemReplacementWithoutDeletingBackupItem = 2; +} + +void _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_NSDictionary_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSDictionary_NSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary_NSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary_NSError.fromFunction( + ThermionDartTexture1 lib, void Function(NSDictionary?, NSError?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 ? null : NSDictionary._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSDictionary_NSError.listener( + ThermionDartTexture1 lib, void Function(NSDictionary?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi + .NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSDictionary._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSDictionary? arg0, NSError? arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); +} + +class NSMutableArray extends NSArray { + NSMutableArray._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableArray] that points to the same underlying object as [other]. + static NSMutableArray castFrom(T other) { + return NSMutableArray._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSMutableArray] that wraps the given raw object pointer. + static NSMutableArray castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableArray._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableArray]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableArray1); + } + + void addObject_(NSObject anObject) { + _lib._objc_msgSend_15(_id, _lib._sel_addObject_1, anObject._id); + } + + void insertObject_atIndex_(NSObject anObject, int index) { + _lib._objc_msgSend_468( + _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); + } + + void removeLastObject() { + _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); + } + + void removeObjectAtIndex_(int index) { + _lib._objc_msgSend_469(_id, _lib._sel_removeObjectAtIndex_1, index); + } + + void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { + _lib._objc_msgSend_470( + _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); + } + + @override + NSMutableArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + NSMutableArray initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_64(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableArray? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + void addObjectsFromArray_(NSArray otherArray) { + _lib._objc_msgSend_471( + _id, _lib._sel_addObjectsFromArray_1, otherArray._id); + } + + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + _lib._objc_msgSend_472( + _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); + } + + void removeAllObjects() { + _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } + + void removeObject_inRange_(NSObject anObject, _NSRange range) { + _lib._objc_msgSend_473( + _id, _lib._sel_removeObject_inRange_1, anObject._id, range); + } + + void removeObject_(NSObject anObject) { + _lib._objc_msgSend_15(_id, _lib._sel_removeObject_1, anObject._id); + } + + void removeObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { + _lib._objc_msgSend_473( + _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); + } + + void removeObjectIdenticalTo_(NSObject anObject) { + _lib._objc_msgSend_15( + _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); + } + + void removeObjectsFromIndices_numIndices_( + ffi.Pointer indices, int cnt) { + _lib._objc_msgSend_474( + _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); + } + + void removeObjectsInArray_(NSArray otherArray) { + _lib._objc_msgSend_471( + _id, _lib._sel_removeObjectsInArray_1, otherArray._id); + } + + void removeObjectsInRange_(_NSRange range) { + _lib._objc_msgSend_475(_id, _lib._sel_removeObjectsInRange_1, range); + } + + void replaceObjectsInRange_withObjectsFromArray_range_( + _NSRange range, NSArray otherArray, _NSRange otherRange) { + _lib._objc_msgSend_476( + _id, + _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, + range, + otherArray._id, + otherRange); + } + + void replaceObjectsInRange_withObjectsFromArray_( + _NSRange range, NSArray otherArray) { + _lib._objc_msgSend_477( + _id, + _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, + range, + otherArray._id); + } + + void setArray_(NSArray otherArray) { + _lib._objc_msgSend_471(_id, _lib._sel_setArray_1, otherArray._id); + } + + void sortUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context) { + _lib._objc_msgSend_478( + _id, _lib._sel_sortUsingFunction_context_1, compare, context); + } + + void sortUsingSelector_(ffi.Pointer comparator) { + _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); + } + + void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { + _lib._objc_msgSend_479( + _id, _lib._sel_insertObjects_atIndexes_1, objects._id, indexes._id); + } + + void removeObjectsAtIndexes_(NSIndexSet indexes) { + _lib._objc_msgSend_480( + _id, _lib._sel_removeObjectsAtIndexes_1, indexes._id); + } + + void replaceObjectsAtIndexes_withObjects_( + NSIndexSet indexes, NSArray objects) { + _lib._objc_msgSend_481(_id, _lib._sel_replaceObjectsAtIndexes_withObjects_1, + indexes._id, objects._id); + } + + void setObject_atIndexedSubscript_(NSObject obj, int idx) { + _lib._objc_msgSend_468( + _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); + } + + void sortUsingComparator_( + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { + _lib._objc_msgSend_482(_id, _lib._sel_sortUsingComparator_1, cmptr._id); + } + + void sortWithOptions_usingComparator_( + int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { + _lib._objc_msgSend_483( + _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr._id); + } + + static NSMutableArray arrayWithCapacity_( + ThermionDartTexture1 _lib, int numItems) { + final _ret = _lib._objc_msgSend_64( + _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray? arrayWithContentsOfFile_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_484(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray? arrayWithContentsOfURL_( + ThermionDartTexture1 _lib, NSURL url) { + final _ret = _lib._objc_msgSend_485(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + NSMutableArray? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_484( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + NSMutableArray? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_485(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + void applyDifference_(NSObject difference) { + _lib._objc_msgSend_15(_id, _lib._sel_applyDifference_1, difference._id); + } + + void sortUsingDescriptors_(NSArray sortDescriptors) { + _lib._objc_msgSend_471( + _id, _lib._sel_sortUsingDescriptors_1, sortDescriptors._id); + } + + void filterUsingPredicate_(NSPredicate predicate) { + _lib._objc_msgSend_486( + _id, _lib._sel_filterUsingPredicate_1, predicate._id); + } + + @override + NSMutableArray initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_65( + _id, _lib._sel_initWithObjects_count_1, objects, cnt); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray array(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_array1); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithObject_( + ThermionDartTexture1 _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_123( + _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithObjects_count_(ThermionDartTexture1 _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_65(_lib._class_NSMutableArray1, + _lib._sel_arrayWithObjects_count_1, objects, cnt); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithObjects_( + ThermionDartTexture1 _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_123(_lib._class_NSMutableArray1, + _lib._sel_arrayWithObjects_1, firstObj._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithArray_( + ThermionDartTexture1 _lib, NSArray array) { + final _ret = _lib._objc_msgSend_124( + _lib._class_NSMutableArray1, _lib._sel_arrayWithArray_1, array._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableArray initWithObjects_(NSObject firstObj) { + final _ret = + _lib._objc_msgSend_123(_id, _lib._sel_initWithObjects_1, firstObj._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableArray initWithArray_(NSArray array) { + final _ret = + _lib._objc_msgSend_124(_id, _lib._sel_initWithArray_1, array._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableArray initWithArray_copyItems_(NSArray array, bool flag) { + final _ret = _lib._objc_msgSend_125( + _id, _lib._sel_initWithArray_copyItems_1, array._id, flag); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } + + static NSArray? arrayWithContentsOfURL_error_(ThermionDartTexture1 _lib, + NSURL url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_126(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_new1); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } + + static NSMutableArray allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableArray1, _lib._sel_allocWithZone_1, zone); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } + + static NSMutableArray alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSMutableArray1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSMutableArray1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSMutableArray1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableArray1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSMutableArray1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSMutableArray1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSMutableArray1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSMutableArray1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableArray1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSMutableOrderedSet extends NSOrderedSet { + NSMutableOrderedSet._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableOrderedSet] that points to the same underlying object as [other]. + static NSMutableOrderedSet castFrom(T other) { + return NSMutableOrderedSet._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableOrderedSet] that wraps the given raw object pointer. + static NSMutableOrderedSet castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableOrderedSet._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableOrderedSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableOrderedSet1); + } + + void insertObject_atIndex_(NSObject object, int idx) { + _lib._objc_msgSend_468( + _id, _lib._sel_insertObject_atIndex_1, object._id, idx); + } + + void removeObjectAtIndex_(int idx) { + _lib._objc_msgSend_469(_id, _lib._sel_removeObjectAtIndex_1, idx); + } + + void replaceObjectAtIndex_withObject_(int idx, NSObject object) { + _lib._objc_msgSend_470( + _id, _lib._sel_replaceObjectAtIndex_withObject_1, idx, object._id); + } + + @override + NSMutableOrderedSet? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableOrderedSet init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + NSMutableOrderedSet initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_64(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + void addObject_(NSObject object) { + _lib._objc_msgSend_15(_id, _lib._sel_addObject_1, object._id); + } + + void addObjects_count_( + ffi.Pointer> objects, int count) { + _lib._objc_msgSend_499(_id, _lib._sel_addObjects_count_1, objects, count); + } + + void addObjectsFromArray_(NSArray array) { + _lib._objc_msgSend_471(_id, _lib._sel_addObjectsFromArray_1, array._id); + } + + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + _lib._objc_msgSend_472( + _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); + } + + void moveObjectsAtIndexes_toIndex_(NSIndexSet indexes, int idx) { + _lib._objc_msgSend_500( + _id, _lib._sel_moveObjectsAtIndexes_toIndex_1, indexes._id, idx); + } + + void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { + _lib._objc_msgSend_479( + _id, _lib._sel_insertObjects_atIndexes_1, objects._id, indexes._id); + } + + void setObject_atIndex_(NSObject obj, int idx) { + _lib._objc_msgSend_468(_id, _lib._sel_setObject_atIndex_1, obj._id, idx); + } + + void setObject_atIndexedSubscript_(NSObject obj, int idx) { + _lib._objc_msgSend_468( + _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); + } + + void replaceObjectsInRange_withObjects_count_( + _NSRange range, ffi.Pointer> objects, int count) { + _lib._objc_msgSend_501( + _id, + _lib._sel_replaceObjectsInRange_withObjects_count_1, + range, + objects, + count); + } + + void replaceObjectsAtIndexes_withObjects_( + NSIndexSet indexes, NSArray objects) { + _lib._objc_msgSend_481(_id, _lib._sel_replaceObjectsAtIndexes_withObjects_1, + indexes._id, objects._id); + } + + void removeObjectsInRange_(_NSRange range) { + _lib._objc_msgSend_475(_id, _lib._sel_removeObjectsInRange_1, range); + } + + void removeObjectsAtIndexes_(NSIndexSet indexes) { + _lib._objc_msgSend_480( + _id, _lib._sel_removeObjectsAtIndexes_1, indexes._id); + } + + void removeAllObjects() { + _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } + + void removeObject_(NSObject object) { + _lib._objc_msgSend_15(_id, _lib._sel_removeObject_1, object._id); + } + + void removeObjectsInArray_(NSArray array) { + _lib._objc_msgSend_471(_id, _lib._sel_removeObjectsInArray_1, array._id); + } + + void intersectOrderedSet_(NSOrderedSet other) { + _lib._objc_msgSend_502(_id, _lib._sel_intersectOrderedSet_1, other._id); + } + + void minusOrderedSet_(NSOrderedSet other) { + _lib._objc_msgSend_502(_id, _lib._sel_minusOrderedSet_1, other._id); + } + + void unionOrderedSet_(NSOrderedSet other) { + _lib._objc_msgSend_502(_id, _lib._sel_unionOrderedSet_1, other._id); + } + + void intersectSet_(NSSet other) { + _lib._objc_msgSend_503(_id, _lib._sel_intersectSet_1, other._id); + } + + void minusSet_(NSSet other) { + _lib._objc_msgSend_503(_id, _lib._sel_minusSet_1, other._id); + } + + void unionSet_(NSSet other) { + _lib._objc_msgSend_503(_id, _lib._sel_unionSet_1, other._id); + } + + void sortUsingComparator_( + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { + _lib._objc_msgSend_482(_id, _lib._sel_sortUsingComparator_1, cmptr._id); + } + + void sortWithOptions_usingComparator_( + int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { + _lib._objc_msgSend_483( + _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr._id); + } + + void sortRange_options_usingComparator_(_NSRange range, int opts, + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { + _lib._objc_msgSend_504(_id, _lib._sel_sortRange_options_usingComparator_1, + range, opts, cmptr._id); + } + + static NSMutableOrderedSet orderedSetWithCapacity_( + ThermionDartTexture1 _lib, int numItems) { + final _ret = _lib._objc_msgSend_64(_lib._class_NSMutableOrderedSet1, + _lib._sel_orderedSetWithCapacity_1, numItems); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + void applyDifference_(NSObject difference) { + _lib._objc_msgSend_15(_id, _lib._sel_applyDifference_1, difference._id); + } + + void sortUsingDescriptors_(NSArray sortDescriptors) { + _lib._objc_msgSend_471( + _id, _lib._sel_sortUsingDescriptors_1, sortDescriptors._id); + } + + void filterUsingPredicate_(NSPredicate p) { + _lib._objc_msgSend_486(_id, _lib._sel_filterUsingPredicate_1, p._id); + } + + @override + NSMutableOrderedSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_65( + _id, _lib._sel_initWithObjects_count_1, objects, cnt); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableOrderedSet orderedSet(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableOrderedSet1, _lib._sel_orderedSet1); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableOrderedSet orderedSetWithObject_( + ThermionDartTexture1 _lib, NSObject object) { + final _ret = _lib._objc_msgSend_123(_lib._class_NSMutableOrderedSet1, + _lib._sel_orderedSetWithObject_1, object._id); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableOrderedSet orderedSetWithObjects_count_( + ThermionDartTexture1 _lib, + ffi.Pointer> objects, + int cnt) { + final _ret = _lib._objc_msgSend_65(_lib._class_NSMutableOrderedSet1, + _lib._sel_orderedSetWithObjects_count_1, objects, cnt); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableOrderedSet orderedSetWithObjects_( + ThermionDartTexture1 _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_123(_lib._class_NSMutableOrderedSet1, + _lib._sel_orderedSetWithObjects_1, firstObj._id); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableOrderedSet orderedSetWithOrderedSet_( + ThermionDartTexture1 _lib, NSOrderedSet set) { + final _ret = _lib._objc_msgSend_491(_lib._class_NSMutableOrderedSet1, + _lib._sel_orderedSetWithOrderedSet_1, set._id); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableOrderedSet orderedSetWithOrderedSet_range_copyItems_( + ThermionDartTexture1 _lib, NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _lib._objc_msgSend_492( + _lib._class_NSMutableOrderedSet1, + _lib._sel_orderedSetWithOrderedSet_range_copyItems_1, + set._id, + range, + flag); + return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); + } + + static NSMutableOrderedSet orderedSetWithArray_( + ThermionDartTexture1 _lib, NSArray array) { + final _ret = _lib._objc_msgSend_124(_lib._class_NSMutableOrderedSet1, + _lib._sel_orderedSetWithArray_1, array._id); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableOrderedSet orderedSetWithArray_range_copyItems_( + ThermionDartTexture1 _lib, NSArray array, _NSRange range, bool flag) { + final _ret = _lib._objc_msgSend_493( + _lib._class_NSMutableOrderedSet1, + _lib._sel_orderedSetWithArray_range_copyItems_1, + array._id, + range, + flag); + return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); + } + + static NSMutableOrderedSet orderedSetWithSet_( + ThermionDartTexture1 _lib, NSSet set) { + final _ret = _lib._objc_msgSend_410(_lib._class_NSMutableOrderedSet1, + _lib._sel_orderedSetWithSet_1, set._id); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableOrderedSet orderedSetWithSet_copyItems_( + ThermionDartTexture1 _lib, NSSet set, bool flag) { + final _ret = _lib._objc_msgSend_411(_lib._class_NSMutableOrderedSet1, + _lib._sel_orderedSetWithSet_copyItems_1, set._id, flag); + return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableOrderedSet initWithObject_(NSObject object) { + final _ret = + _lib._objc_msgSend_123(_id, _lib._sel_initWithObject_1, object._id); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableOrderedSet initWithObjects_(NSObject firstObj) { + final _ret = + _lib._objc_msgSend_123(_id, _lib._sel_initWithObjects_1, firstObj._id); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableOrderedSet initWithOrderedSet_(NSOrderedSet set) { + final _ret = + _lib._objc_msgSend_491(_id, _lib._sel_initWithOrderedSet_1, set._id); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableOrderedSet initWithOrderedSet_copyItems_( + NSOrderedSet set, bool flag) { + final _ret = _lib._objc_msgSend_494( + _id, _lib._sel_initWithOrderedSet_copyItems_1, set._id, flag); + return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableOrderedSet initWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _lib._objc_msgSend_492(_id, + _lib._sel_initWithOrderedSet_range_copyItems_1, set._id, range, flag); + return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableOrderedSet initWithArray_(NSArray array) { + final _ret = + _lib._objc_msgSend_124(_id, _lib._sel_initWithArray_1, array._id); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableOrderedSet initWithArray_copyItems_(NSArray set, bool flag) { + final _ret = _lib._objc_msgSend_125( + _id, _lib._sel_initWithArray_copyItems_1, set._id, flag); + return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableOrderedSet initWithArray_range_copyItems_( + NSArray set, _NSRange range, bool flag) { + final _ret = _lib._objc_msgSend_493( + _id, _lib._sel_initWithArray_range_copyItems_1, set._id, range, flag); + return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableOrderedSet initWithSet_(NSSet set) { + final _ret = _lib._objc_msgSend_410(_id, _lib._sel_initWithSet_1, set._id); + return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableOrderedSet initWithSet_copyItems_(NSSet set, bool flag) { + final _ret = _lib._objc_msgSend_411( + _id, _lib._sel_initWithSet_copyItems_1, set._id, flag); + return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); + } + + static NSMutableOrderedSet new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableOrderedSet1, _lib._sel_new1); + return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); + } + + static NSMutableOrderedSet allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableOrderedSet1, _lib._sel_allocWithZone_1, zone); + return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); + } + + static NSMutableOrderedSet alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableOrderedSet1, _lib._sel_alloc1); + return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSMutableOrderedSet1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSMutableOrderedSet1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSMutableOrderedSet1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableOrderedSet1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSMutableOrderedSet1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSMutableOrderedSet1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSMutableOrderedSet1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSMutableOrderedSet1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableOrderedSet1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSOrderedSet extends NSObject { + NSOrderedSet._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOrderedSet] that points to the same underlying object as [other]. + static NSOrderedSet castFrom(T other) { + return NSOrderedSet._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSOrderedSet] that wraps the given raw object pointer. + static NSOrderedSet castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOrderedSet._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSOrderedSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOrderedSet1); + } + + int get count { + return _lib._objc_msgSend_10(_id, _lib._sel_count1); + } + + NSObject objectAtIndex_(int idx) { + final _ret = _lib._objc_msgSend_64(_id, _lib._sel_objectAtIndex_1, idx); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + int indexOfObject_(NSObject object) { + return _lib._objc_msgSend_73(_id, _lib._sel_indexOfObject_1, object._id); + } + + @override + NSOrderedSet init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + NSOrderedSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_65( + _id, _lib._sel_initWithObjects_count_1, objects, cnt); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + NSOrderedSet? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + void getObjects_range_( + ffi.Pointer> objects, _NSRange range) { + _lib._objc_msgSend_72(_id, _lib._sel_getObjects_range_1, objects, range); + } + + NSArray objectsAtIndexes_(NSIndexSet indexes) { + final _ret = + _lib._objc_msgSend_110(_id, _lib._sel_objectsAtIndexes_1, indexes._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSObject? get firstObject { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_firstObject1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? get lastObject { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_lastObject1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + bool isEqualToOrderedSet_(NSOrderedSet other) { + return _lib._objc_msgSend_488( + _id, _lib._sel_isEqualToOrderedSet_1, other._id); + } + + bool containsObject_(NSObject object) { + return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, object._id); + } + + bool intersectsOrderedSet_(NSOrderedSet other) { + return _lib._objc_msgSend_488( + _id, _lib._sel_intersectsOrderedSet_1, other._id); + } + + bool intersectsSet_(NSSet set) { + return _lib._objc_msgSend_402(_id, _lib._sel_intersectsSet_1, set._id); + } + + bool isSubsetOfOrderedSet_(NSOrderedSet other) { + return _lib._objc_msgSend_488( + _id, _lib._sel_isSubsetOfOrderedSet_1, other._id); + } + + bool isSubsetOfSet_(NSSet set) { + return _lib._objc_msgSend_402(_id, _lib._sel_isSubsetOfSet_1, set._id); + } + + NSObject objectAtIndexedSubscript_(int idx) { + final _ret = + _lib._objc_msgSend_64(_id, _lib._sel_objectAtIndexedSubscript_1, idx); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_76(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + NSEnumerator reverseObjectEnumerator() { + final _ret = _lib._objc_msgSend_76(_id, _lib._sel_reverseObjectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + NSOrderedSet get reversedOrderedSet { + final _ret = _lib._objc_msgSend_489(_id, _lib._sel_reversedOrderedSet1); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + NSArray get array { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_array1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSSet get set1 { + final _ret = _lib._objc_msgSend_490(_id, _lib._sel_set1); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + void enumerateObjectsUsingBlock_( + ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { + _lib._objc_msgSend_111( + _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); + } + + void enumerateObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { + _lib._objc_msgSend_112(_id, + _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); + } + + void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, + ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { + _lib._objc_msgSend_113( + _id, + _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, + s._id, + opts, + block._id); + } + + int indexOfObjectPassingTest_( + ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); + } + + int indexOfObjectWithOptions_passingTest_( + int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { + return _lib._objc_msgSend_115(_id, + _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); + } + + int indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, int opts, + ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { + return _lib._objc_msgSend_116( + _id, + _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, + s._id, + opts, + predicate._id); + } + + NSIndexSet indexesOfObjectsPassingTest_( + ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _lib._objc_msgSend_117( + _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesOfObjectsWithOptions_passingTest_( + int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _lib._objc_msgSend_118( + _id, + _lib._sel_indexesOfObjectsWithOptions_passingTest_1, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, + int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _lib._objc_msgSend_119( + _id, + _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, + s._id, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + int indexOfObject_inSortedRange_options_usingComparator_( + NSObject object, + _NSRange range, + int opts, + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmp) { + return _lib._objc_msgSend_122( + _id, + _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, + object._id, + range, + opts, + cmp._id); + } + + NSArray sortedArrayUsingComparator_( + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { + final _ret = _lib._objc_msgSend_120( + _id, _lib._sel_sortedArrayUsingComparator_1, cmptr._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray sortedArrayWithOptions_usingComparator_( + int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { + final _ret = _lib._objc_msgSend_121(_id, + _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString get description { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _lib._objc_msgSend_69( + _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_indent_(NSObject? locale, int level) { + final _ret = _lib._objc_msgSend_70( + _id, + _lib._sel_descriptionWithLocale_indent_1, + locale?._id ?? ffi.nullptr, + level); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSOrderedSet orderedSet(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOrderedSet1, _lib._sel_orderedSet1); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSOrderedSet orderedSetWithObject_( + ThermionDartTexture1 _lib, NSObject object) { + final _ret = _lib._objc_msgSend_123(_lib._class_NSOrderedSet1, + _lib._sel_orderedSetWithObject_1, object._id); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSOrderedSet orderedSetWithObjects_count_(ThermionDartTexture1 _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_65(_lib._class_NSOrderedSet1, + _lib._sel_orderedSetWithObjects_count_1, objects, cnt); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSOrderedSet orderedSetWithObjects_( + ThermionDartTexture1 _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_123(_lib._class_NSOrderedSet1, + _lib._sel_orderedSetWithObjects_1, firstObj._id); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSOrderedSet orderedSetWithOrderedSet_( + ThermionDartTexture1 _lib, NSOrderedSet set) { + final _ret = _lib._objc_msgSend_491(_lib._class_NSOrderedSet1, + _lib._sel_orderedSetWithOrderedSet_1, set._id); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSOrderedSet orderedSetWithOrderedSet_range_copyItems_( + ThermionDartTexture1 _lib, NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _lib._objc_msgSend_492( + _lib._class_NSOrderedSet1, + _lib._sel_orderedSetWithOrderedSet_range_copyItems_1, + set._id, + range, + flag); + return NSOrderedSet._(_ret, _lib, retain: false, release: true); + } + + static NSOrderedSet orderedSetWithArray_( + ThermionDartTexture1 _lib, NSArray array) { + final _ret = _lib._objc_msgSend_124( + _lib._class_NSOrderedSet1, _lib._sel_orderedSetWithArray_1, array._id); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSOrderedSet orderedSetWithArray_range_copyItems_( + ThermionDartTexture1 _lib, NSArray array, _NSRange range, bool flag) { + final _ret = _lib._objc_msgSend_493( + _lib._class_NSOrderedSet1, + _lib._sel_orderedSetWithArray_range_copyItems_1, + array._id, + range, + flag); + return NSOrderedSet._(_ret, _lib, retain: false, release: true); + } + + static NSOrderedSet orderedSetWithSet_(ThermionDartTexture1 _lib, NSSet set) { + final _ret = _lib._objc_msgSend_410( + _lib._class_NSOrderedSet1, _lib._sel_orderedSetWithSet_1, set._id); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSOrderedSet orderedSetWithSet_copyItems_( + ThermionDartTexture1 _lib, NSSet set, bool flag) { + final _ret = _lib._objc_msgSend_411(_lib._class_NSOrderedSet1, + _lib._sel_orderedSetWithSet_copyItems_1, set._id, flag); + return NSOrderedSet._(_ret, _lib, retain: false, release: true); + } + + NSOrderedSet initWithObject_(NSObject object) { + final _ret = + _lib._objc_msgSend_123(_id, _lib._sel_initWithObject_1, object._id); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + NSOrderedSet initWithObjects_(NSObject firstObj) { + final _ret = + _lib._objc_msgSend_123(_id, _lib._sel_initWithObjects_1, firstObj._id); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + NSOrderedSet initWithOrderedSet_(NSOrderedSet set) { + final _ret = + _lib._objc_msgSend_491(_id, _lib._sel_initWithOrderedSet_1, set._id); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + NSOrderedSet initWithOrderedSet_copyItems_(NSOrderedSet set, bool flag) { + final _ret = _lib._objc_msgSend_494( + _id, _lib._sel_initWithOrderedSet_copyItems_1, set._id, flag); + return NSOrderedSet._(_ret, _lib, retain: false, release: true); + } + + NSOrderedSet initWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _lib._objc_msgSend_492(_id, + _lib._sel_initWithOrderedSet_range_copyItems_1, set._id, range, flag); + return NSOrderedSet._(_ret, _lib, retain: false, release: true); + } + + NSOrderedSet initWithArray_(NSArray array) { + final _ret = + _lib._objc_msgSend_124(_id, _lib._sel_initWithArray_1, array._id); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + NSOrderedSet initWithArray_copyItems_(NSArray set, bool flag) { + final _ret = _lib._objc_msgSend_125( + _id, _lib._sel_initWithArray_copyItems_1, set._id, flag); + return NSOrderedSet._(_ret, _lib, retain: false, release: true); + } + + NSOrderedSet initWithArray_range_copyItems_( + NSArray set, _NSRange range, bool flag) { + final _ret = _lib._objc_msgSend_493( + _id, _lib._sel_initWithArray_range_copyItems_1, set._id, range, flag); + return NSOrderedSet._(_ret, _lib, retain: false, release: true); + } + + NSOrderedSet initWithSet_(NSSet set) { + final _ret = _lib._objc_msgSend_410(_id, _lib._sel_initWithSet_1, set._id); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + NSOrderedSet initWithSet_copyItems_(NSSet set, bool flag) { + final _ret = _lib._objc_msgSend_411( + _id, _lib._sel_initWithSet_copyItems_1, set._id, flag); + return NSOrderedSet._(_ret, _lib, retain: false, release: true); + } + + NSObject differenceFromOrderedSet_withOptions_usingEquivalenceTest_( + NSOrderedSet other, + int options, + ObjCBlock_bool_ObjCObject_ObjCObject block) { + final _ret = _lib._objc_msgSend_495( + _id, + _lib._sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_1, + other._id, + options, + block._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject differenceFromOrderedSet_withOptions_( + NSOrderedSet other, int options) { + final _ret = _lib._objc_msgSend_496(_id, + _lib._sel_differenceFromOrderedSet_withOptions_1, other._id, options); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject differenceFromOrderedSet_(NSOrderedSet other) { + final _ret = _lib._objc_msgSend_491( + _id, _lib._sel_differenceFromOrderedSet_1, other._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSOrderedSet? orderedSetByApplyingDifference_(NSObject difference) { + final _ret = _lib._objc_msgSend_497( + _id, _lib._sel_orderedSetByApplyingDifference_1, difference._id); + return _ret.address == 0 + ? null + : NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + NSObject valueForKey_(NSString key) { + final _ret = _lib._objc_msgSend_31(_id, _lib._sel_valueForKey_1, key._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + @override + void setValue_forKey_(NSObject? value, NSString key) { + _lib._objc_msgSend_134( + _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); + } + + @override + void addObserver_forKeyPath_options_context_(NSObject observer, + NSString keyPath, int options, ffi.Pointer context) { + _lib._objc_msgSend_138( + _id, + _lib._sel_addObserver_forKeyPath_options_context_1, + observer._id, + keyPath._id, + options, + context); + } + + @override + void removeObserver_forKeyPath_context_( + NSObject observer, NSString keyPath, ffi.Pointer context) { + _lib._objc_msgSend_139(_id, _lib._sel_removeObserver_forKeyPath_context_1, + observer._id, keyPath._id, context); + } + + @override + void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { + _lib._objc_msgSend_140( + _id, _lib._sel_removeObserver_forKeyPath_1, observer._id, keyPath._id); + } + + NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { + final _ret = _lib._objc_msgSend_67( + _id, _lib._sel_sortedArrayUsingDescriptors_1, sortDescriptors._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSOrderedSet filteredOrderedSetUsingPredicate_(NSPredicate p) { + final _ret = _lib._objc_msgSend_498( + _id, _lib._sel_filteredOrderedSetUsingPredicate_1, p._id); + return NSOrderedSet._(_ret, _lib, retain: true, release: true); + } + + static NSOrderedSet new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOrderedSet1, _lib._sel_new1); + return NSOrderedSet._(_ret, _lib, retain: false, release: true); + } + + static NSOrderedSet allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSOrderedSet1, _lib._sel_allocWithZone_1, zone); + return NSOrderedSet._(_ret, _lib, retain: false, release: true); + } + + static NSOrderedSet alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOrderedSet1, _lib._sel_alloc1); + return NSOrderedSet._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSOrderedSet1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSOrderedSet1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSOrderedSet1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSOrderedSet1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSOrderedSet1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSOrderedSet1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSOrderedSet1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSOrderedSet1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedSet1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSMutableSet extends NSSet { + NSMutableSet._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableSet] that points to the same underlying object as [other]. + static NSMutableSet castFrom(T other) { + return NSMutableSet._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSMutableSet] that wraps the given raw object pointer. + static NSMutableSet castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableSet._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableSet1); + } + + void addObject_(NSObject object) { + _lib._objc_msgSend_15(_id, _lib._sel_addObject_1, object._id); + } + + void removeObject_(NSObject object) { + _lib._objc_msgSend_15(_id, _lib._sel_removeObject_1, object._id); + } + + @override + NSMutableSet? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableSet init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + NSMutableSet initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_64(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + void addObjectsFromArray_(NSArray array) { + _lib._objc_msgSend_471(_id, _lib._sel_addObjectsFromArray_1, array._id); + } + + void intersectSet_(NSSet otherSet) { + _lib._objc_msgSend_503(_id, _lib._sel_intersectSet_1, otherSet._id); + } + + void minusSet_(NSSet otherSet) { + _lib._objc_msgSend_503(_id, _lib._sel_minusSet_1, otherSet._id); + } + + void removeAllObjects() { + _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } + + void unionSet_(NSSet otherSet) { + _lib._objc_msgSend_503(_id, _lib._sel_unionSet_1, otherSet._id); + } + + void setSet_(NSSet otherSet) { + _lib._objc_msgSend_503(_id, _lib._sel_setSet_1, otherSet._id); + } + + static NSMutableSet setWithCapacity_( + ThermionDartTexture1 _lib, int numItems) { + final _ret = _lib._objc_msgSend_64( + _lib._class_NSMutableSet1, _lib._sel_setWithCapacity_1, numItems); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + void filterUsingPredicate_(NSPredicate predicate) { + _lib._objc_msgSend_486( + _id, _lib._sel_filterUsingPredicate_1, predicate._id); + } + + @override + NSMutableSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_65( + _id, _lib._sel_initWithObjects_count_1, objects, cnt); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableSet set1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableSet1, _lib._sel_set1); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableSet setWithObject_( + ThermionDartTexture1 _lib, NSObject object) { + final _ret = _lib._objc_msgSend_123( + _lib._class_NSMutableSet1, _lib._sel_setWithObject_1, object._id); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableSet setWithObjects_count_(ThermionDartTexture1 _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_65(_lib._class_NSMutableSet1, + _lib._sel_setWithObjects_count_1, objects, cnt); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableSet setWithObjects_( + ThermionDartTexture1 _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_123( + _lib._class_NSMutableSet1, _lib._sel_setWithObjects_1, firstObj._id); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableSet setWithSet_(ThermionDartTexture1 _lib, NSSet set) { + final _ret = _lib._objc_msgSend_410( + _lib._class_NSMutableSet1, _lib._sel_setWithSet_1, set._id); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableSet setWithArray_(ThermionDartTexture1 _lib, NSArray array) { + final _ret = _lib._objc_msgSend_124( + _lib._class_NSMutableSet1, _lib._sel_setWithArray_1, array._id); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableSet initWithObjects_(NSObject firstObj) { + final _ret = + _lib._objc_msgSend_123(_id, _lib._sel_initWithObjects_1, firstObj._id); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableSet initWithSet_(NSSet set) { + final _ret = _lib._objc_msgSend_410(_id, _lib._sel_initWithSet_1, set._id); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableSet initWithSet_copyItems_(NSSet set, bool flag) { + final _ret = _lib._objc_msgSend_411( + _id, _lib._sel_initWithSet_copyItems_1, set._id, flag); + return NSMutableSet._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableSet initWithArray_(NSArray array) { + final _ret = + _lib._objc_msgSend_124(_id, _lib._sel_initWithArray_1, array._id); + return NSMutableSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableSet new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableSet1, _lib._sel_new1); + return NSMutableSet._(_ret, _lib, retain: false, release: true); + } + + static NSMutableSet allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableSet1, _lib._sel_allocWithZone_1, zone); + return NSMutableSet._(_ret, _lib, retain: false, release: true); + } + + static NSMutableSet alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableSet1, _lib._sel_alloc1); + return NSMutableSet._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSMutableSet1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSMutableSet1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableSet1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableSet1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSMutableSet1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSMutableSet1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSMutableSet1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSMutableSet1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableSet1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSKeyValueChange { + static const int NSKeyValueChangeSetting = 1; + static const int NSKeyValueChangeInsertion = 2; + static const int NSKeyValueChangeRemoval = 3; + static const int NSKeyValueChangeReplacement = 4; +} + +abstract class NSKeyValueSetMutationKind { + static const int NSKeyValueUnionSetMutation = 1; + static const int NSKeyValueMinusSetMutation = 2; + static const int NSKeyValueIntersectSetMutation = 3; + static const int NSKeyValueSetSetMutation = 4; +} + +class NSKeyedArchiver extends NSCoder { + NSKeyedArchiver._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSKeyedArchiver] that points to the same underlying object as [other]. + static NSKeyedArchiver castFrom(T other) { + return NSKeyedArchiver._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSKeyedArchiver] that wraps the given raw object pointer. + static NSKeyedArchiver castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSKeyedArchiver._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSKeyedArchiver]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSKeyedArchiver1); + } + + NSKeyedArchiver initRequiringSecureCoding_(bool requiresSecureCoding) { + final _ret = _lib._objc_msgSend_513( + _id, _lib._sel_initRequiringSecureCoding_1, requiresSecureCoding); + return NSKeyedArchiver._(_ret, _lib, retain: true, release: true); + } + + static NSData? archivedDataWithRootObject_requiringSecureCoding_error_( + ThermionDartTexture1 _lib, + NSObject object, + bool requiresSecureCoding, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_514( + _lib._class_NSKeyedArchiver1, + _lib._sel_archivedDataWithRootObject_requiringSecureCoding_error_1, + object._id, + requiresSecureCoding, + error); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + @override + NSKeyedArchiver init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSKeyedArchiver._(_ret, _lib, retain: true, release: true); + } + + NSKeyedArchiver initForWritingWithMutableData_(NSMutableData data) { + final _ret = _lib._objc_msgSend_520( + _id, _lib._sel_initForWritingWithMutableData_1, data._id); + return NSKeyedArchiver._(_ret, _lib, retain: true, release: true); + } + + static NSData archivedDataWithRootObject_( + ThermionDartTexture1 _lib, NSObject rootObject) { + final _ret = _lib._objc_msgSend_521(_lib._class_NSKeyedArchiver1, + _lib._sel_archivedDataWithRootObject_1, rootObject._id); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static bool archiveRootObject_toFile_( + ThermionDartTexture1 _lib, NSObject rootObject, NSString path) { + return _lib._objc_msgSend_260(_lib._class_NSKeyedArchiver1, + _lib._sel_archiveRootObject_toFile_1, rootObject._id, path._id); + } + + NSObject? get delegate { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set delegate(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + } + + int get outputFormat { + return _lib._objc_msgSend_522(_id, _lib._sel_outputFormat1); + } + + set outputFormat(int value) { + return _lib._objc_msgSend_523(_id, _lib._sel_setOutputFormat_1, value); + } + + NSData get encodedData { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_encodedData1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + void finishEncoding() { + _lib._objc_msgSend_1(_id, _lib._sel_finishEncoding1); + } + + static void setClassName_forClass_( + ThermionDartTexture1 _lib, NSString? codedName, NSObject cls) { + _lib._objc_msgSend_524( + _lib._class_NSKeyedArchiver1, + _lib._sel_setClassName_forClass_1, + codedName?._id ?? ffi.nullptr, + cls._id); + } + + static NSString? classNameForClass_(ThermionDartTexture1 _lib, NSObject cls) { + final _ret = _lib._objc_msgSend_525( + _lib._class_NSKeyedArchiver1, _lib._sel_classNameForClass_1, cls._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + @override + void encodeObject_forKey_(NSObject? object, NSString key) { + _lib._objc_msgSend_134(_id, _lib._sel_encodeObject_forKey_1, + object?._id ?? ffi.nullptr, key._id); + } + + @override + void encodeConditionalObject_forKey_(NSObject? object, NSString key) { + _lib._objc_msgSend_134(_id, _lib._sel_encodeConditionalObject_forKey_1, + object?._id ?? ffi.nullptr, key._id); + } + + @override + void encodeBool_forKey_(bool value, NSString key) { + _lib._objc_msgSend_295(_id, _lib._sel_encodeBool_forKey_1, value, key._id); + } + + @override + void encodeInt_forKey_(int value, NSString key) { + _lib._objc_msgSend_296(_id, _lib._sel_encodeInt_forKey_1, value, key._id); + } + + @override + void encodeInt32_forKey_(int value, NSString key) { + _lib._objc_msgSend_297(_id, _lib._sel_encodeInt32_forKey_1, value, key._id); + } + + @override + void encodeInt64_forKey_(int value, NSString key) { + _lib._objc_msgSend_298(_id, _lib._sel_encodeInt64_forKey_1, value, key._id); + } + + @override + void encodeFloat_forKey_(double value, NSString key) { + _lib._objc_msgSend_299(_id, _lib._sel_encodeFloat_forKey_1, value, key._id); + } + + @override + void encodeDouble_forKey_(double value, NSString key) { + _lib._objc_msgSend_300( + _id, _lib._sel_encodeDouble_forKey_1, value, key._id); + } + + @override + void encodeBytes_length_forKey_( + ffi.Pointer bytes, int length, NSString key) { + _lib._objc_msgSend_301( + _id, _lib._sel_encodeBytes_length_forKey_1, bytes, length, key._id); + } + + @override + bool get requiresSecureCoding { + return _lib._objc_msgSend_12(_id, _lib._sel_requiresSecureCoding1); + } + + set requiresSecureCoding(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setRequiresSecureCoding_1, value); + } + + static NSKeyedArchiver new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSKeyedArchiver1, _lib._sel_new1); + return NSKeyedArchiver._(_ret, _lib, retain: false, release: true); + } + + static NSKeyedArchiver allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSKeyedArchiver1, _lib._sel_allocWithZone_1, zone); + return NSKeyedArchiver._(_ret, _lib, retain: false, release: true); + } + + static NSKeyedArchiver alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSKeyedArchiver1, _lib._sel_alloc1); + return NSKeyedArchiver._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSKeyedArchiver1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSKeyedArchiver1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSKeyedArchiver1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSKeyedArchiver1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSKeyedArchiver1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSKeyedArchiver1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSKeyedArchiver1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSKeyedArchiver1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSKeyedArchiver1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSMutableData extends NSData { + NSMutableData._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableData] that points to the same underlying object as [other]. + static NSMutableData castFrom(T other) { + return NSMutableData._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSMutableData] that wraps the given raw object pointer. + static NSMutableData castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableData._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableData1); + } + + ffi.Pointer get mutableBytes { + return _lib._objc_msgSend_20(_id, _lib._sel_mutableBytes1); + } + + @override + int get length { + return _lib._objc_msgSend_10(_id, _lib._sel_length1); + } + + set length(int value) { + return _lib._objc_msgSend_515(_id, _lib._sel_setLength_1, value); + } + + void appendBytes_length_(ffi.Pointer bytes, int length) { + _lib._objc_msgSend_22(_id, _lib._sel_appendBytes_length_1, bytes, length); + } + + void appendData_(NSData other) { + _lib._objc_msgSend_284(_id, _lib._sel_appendData_1, other._id); + } + + void increaseLengthBy_(int extraLength) { + _lib._objc_msgSend_469(_id, _lib._sel_increaseLengthBy_1, extraLength); + } + + void replaceBytesInRange_withBytes_( + _NSRange range, ffi.Pointer bytes) { + _lib._objc_msgSend_516( + _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); + } + + void resetBytesInRange_(_NSRange range) { + _lib._objc_msgSend_475(_id, _lib._sel_resetBytesInRange_1, range); + } + + void setData_(NSData data) { + _lib._objc_msgSend_284(_id, _lib._sel_setData_1, data._id); + } + + void replaceBytesInRange_withBytes_length_(_NSRange range, + ffi.Pointer replacementBytes, int replacementLength) { + _lib._objc_msgSend_517( + _id, + _lib._sel_replaceBytesInRange_withBytes_length_1, + range, + replacementBytes, + replacementLength); + } + + static NSMutableData? dataWithCapacity_( + ThermionDartTexture1 _lib, int aNumItems) { + final _ret = _lib._objc_msgSend_518( + _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData? dataWithLength_(ThermionDartTexture1 _lib, int length) { + final _ret = _lib._objc_msgSend_518( + _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + NSMutableData? initWithCapacity_(int capacity) { + final _ret = + _lib._objc_msgSend_518(_id, _lib._sel_initWithCapacity_1, capacity); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + NSMutableData? initWithLength_(int length) { + final _ret = + _lib._objc_msgSend_518(_id, _lib._sel_initWithLength_1, length); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + bool decompressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _lib._objc_msgSend_519( + _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); + } + + bool compressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _lib._objc_msgSend_519( + _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); + } + + static NSMutableData data(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_data1); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithBytes_length_( + ThermionDartTexture1 _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_272(_lib._class_NSMutableData1, + _lib._sel_dataWithBytes_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithBytesNoCopy_length_( + ThermionDartTexture1 _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_272(_lib._class_NSMutableData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( + ThermionDartTexture1 _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_273(_lib._class_NSMutableData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData? dataWithContentsOfFile_options_error_( + ThermionDartTexture1 _lib, + NSString path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_274( + _lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path._id, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData? dataWithContentsOfURL_options_error_( + ThermionDartTexture1 _lib, + NSURL url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_275( + _lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url._id, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData? dataWithContentsOfFile_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData? dataWithContentsOfURL_( + ThermionDartTexture1 _lib, NSURL url) { + final _ret = _lib._objc_msgSend_276( + _lib._class_NSMutableData1, _lib._sel_dataWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData initWithBytes_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_272( + _id, _lib._sel_initWithBytes_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData initWithBytesNoCopy_length_( + ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_272( + _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableData initWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _lib._objc_msgSend_273(_id, + _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableData initWithBytesNoCopy_length_deallocator_( + ffi.Pointer bytes, + int length, + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { + final _ret = _lib._objc_msgSend_277( + _id, + _lib._sel_initWithBytesNoCopy_length_deallocator_1, + bytes, + length, + deallocator?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableData? initWithContentsOfFile_options_error_(NSString path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_274( + _id, + _lib._sel_initWithContentsOfFile_options_error_1, + path._id, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData? initWithContentsOfURL_options_error_(NSURL url, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_275( + _id, + _lib._sel_initWithContentsOfURL_options_error_1, + url._id, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_38( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_276(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData initWithData_(NSData data) { + final _ret = + _lib._objc_msgSend_278(_id, _lib._sel_initWithData_1, data._id); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithData_(ThermionDartTexture1 _lib, NSData data) { + final _ret = _lib._objc_msgSend_278( + _lib._class_NSMutableData1, _lib._sel_dataWithData_1, data._id); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData? initWithBase64EncodedString_options_( + NSString base64String, int options) { + final _ret = _lib._objc_msgSend_279( + _id, + _lib._sel_initWithBase64EncodedString_options_1, + base64String._id, + options); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData? initWithBase64EncodedData_options_( + NSData base64Data, int options) { + final _ret = _lib._objc_msgSend_281(_id, + _lib._sel_initWithBase64EncodedData_options_1, base64Data._id, options); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData? decompressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_283(_id, + _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData? compressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_283( + _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSObject? dataWithContentsOfMappedFile_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfMappedFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_new1); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableData1, _lib._sel_allocWithZone_1, zone); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSMutableData1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSMutableData1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableData1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableData1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSMutableData1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSMutableData1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSMutableData1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSMutableData1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableData1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSPropertyListFormat { + static const int NSPropertyListOpenStepFormat = 1; + static const int NSPropertyListXMLFormat_v1_0 = 100; + static const int NSPropertyListBinaryFormat_v1_0 = 200; +} + +class NSThread extends NSObject { + NSThread._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSThread] that points to the same underlying object as [other]. + static NSThread castFrom(T other) { + return NSThread._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSThread] that wraps the given raw object pointer. + static NSThread castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSThread._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSThread]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSThread1); + } + + static NSThread getCurrentThread(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_530(_lib._class_NSThread1, _lib._sel_currentThread1); + return NSThread._(_ret, _lib, retain: true, release: true); + } + + static void detachNewThreadWithBlock_( + ThermionDartTexture1 _lib, ObjCBlock_ffiVoid block) { + _lib._objc_msgSend_531( + _lib._class_NSThread1, _lib._sel_detachNewThreadWithBlock_1, block._id); + } + + static void detachNewThreadSelector_toTarget_withObject_( + ThermionDartTexture1 _lib, + ffi.Pointer selector, + NSObject target, + NSObject? argument) { + _lib._objc_msgSend_532( + _lib._class_NSThread1, + _lib._sel_detachNewThreadSelector_toTarget_withObject_1, + selector, + target._id, + argument?._id ?? ffi.nullptr); + } + + static bool isMultiThreaded(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSThread1, _lib._sel_isMultiThreaded1); + } + + NSMutableDictionary get threadDictionary { + final _ret = _lib._objc_msgSend_538(_id, _lib._sel_threadDictionary1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static void sleepUntilDate_(ThermionDartTexture1 _lib, NSDate date) { + _lib._objc_msgSend_539( + _lib._class_NSThread1, _lib._sel_sleepUntilDate_1, date._id); + } + + static void sleepForTimeInterval_(ThermionDartTexture1 _lib, double ti) { + _lib._objc_msgSend_540( + _lib._class_NSThread1, _lib._sel_sleepForTimeInterval_1, ti); + } + + static void exit(ThermionDartTexture1 _lib) { + _lib._objc_msgSend_1(_lib._class_NSThread1, _lib._sel_exit1); + } + + double get threadPriority { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_threadPriority1) + : _lib._objc_msgSend_164(_id, _lib._sel_threadPriority1); + } + + set threadPriority(double value) { + return _lib._objc_msgSend_541(_id, _lib._sel_setThreadPriority_1, value); + } + + int get qualityOfService { + return _lib._objc_msgSend_542(_id, _lib._sel_qualityOfService1); + } + + set qualityOfService(int value) { + return _lib._objc_msgSend_543(_id, _lib._sel_setQualityOfService_1, value); + } + + static NSArray getCallStackReturnAddresses(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSThread1, _lib._sel_callStackReturnAddresses1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray getCallStackSymbols(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSThread1, _lib._sel_callStackSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? get name { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set name(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } + + int get stackSize { + return _lib._objc_msgSend_10(_id, _lib._sel_stackSize1); + } + + set stackSize(int value) { + return _lib._objc_msgSend_515(_id, _lib._sel_setStackSize_1, value); + } + + bool get isMainThread { + return _lib._objc_msgSend_12(_id, _lib._sel_isMainThread1); + } + + static NSThread getMainThread(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_530(_lib._class_NSThread1, _lib._sel_mainThread1); + return NSThread._(_ret, _lib, retain: true, release: true); + } + + @override + NSThread init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSThread._(_ret, _lib, retain: true, release: true); + } + + NSThread initWithTarget_selector_object_( + NSObject target, ffi.Pointer selector, NSObject? argument) { + final _ret = _lib._objc_msgSend_545( + _id, + _lib._sel_initWithTarget_selector_object_1, + target._id, + selector, + argument?._id ?? ffi.nullptr); + return NSThread._(_ret, _lib, retain: true, release: true); + } + + NSThread initWithBlock_(ObjCBlock_ffiVoid block) { + final _ret = + _lib._objc_msgSend_546(_id, _lib._sel_initWithBlock_1, block._id); + return NSThread._(_ret, _lib, retain: true, release: true); + } + + bool get executing { + return _lib._objc_msgSend_12(_id, _lib._sel_isExecuting1); + } + + bool get finished { + return _lib._objc_msgSend_12(_id, _lib._sel_isFinished1); + } + + bool get cancelled { + return _lib._objc_msgSend_12(_id, _lib._sel_isCancelled1); + } + + void cancel() { + _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + void start() { + _lib._objc_msgSend_1(_id, _lib._sel_start1); + } + + void main() { + _lib._objc_msgSend_1(_id, _lib._sel_main1); + } + + static NSThread new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSThread1, _lib._sel_new1); + return NSThread._(_ret, _lib, retain: false, release: true); + } + + static NSThread allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSThread1, _lib._sel_allocWithZone_1, zone); + return NSThread._(_ret, _lib, retain: false, release: true); + } + + static NSThread alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSThread1, _lib._sel_alloc1); + return NSThread._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSThread1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSThread1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSThread1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSThread1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSThread1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSThread1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSThread1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSThread1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSThread1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +void _ObjCBlock_ffiVoid_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, +) => + block.ref.target + .cast>() + .asFunction()(); +final _ObjCBlock_ffiVoid_closureRegistry = {}; +int _ObjCBlock_ffiVoid_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_registerClosure(void Function() fn) { + final id = ++_ObjCBlock_ffiVoid_closureRegistryIndex; + _ObjCBlock_ffiVoid_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, +) => + _ObjCBlock_ffiVoid_closureRegistry[block.ref.target.address]!(); + +class ObjCBlock_ffiVoid extends _ObjCBlockBase { + ObjCBlock_ffiVoid._(ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid.fromFunctionPointer(ThermionDartTexture1 lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_ffiVoid_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid.fromFunction(ThermionDartTexture1 lib, void Function() fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_ffiVoid_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_registerClosure(() => fn())), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid.listener(ThermionDartTexture1 lib, void Function() fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>)>.listener( + _ObjCBlock_ffiVoid_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_registerClosure(() => fn())), + lib); + static ffi.NativeCallable)>? + _dartFuncListenerTrampoline; + + void call() => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() + .asFunction)>()( + _id, + ); +} + +class NSMutableDictionary extends NSDictionary { + NSMutableDictionary._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. + static NSMutableDictionary castFrom(T other) { + return NSMutableDictionary._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. + static NSMutableDictionary castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableDictionary._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableDictionary]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableDictionary1); + } + + void removeObjectForKey_(NSObject aKey) { + _lib._objc_msgSend_15(_id, _lib._sel_removeObjectForKey_1, aKey._id); + } + + void setObject_forKey_(NSObject anObject, NSObject aKey) { + _lib._objc_msgSend_533( + _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); + } + + @override + NSMutableDictionary init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + NSMutableDictionary initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_64(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableDictionary? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + void addEntriesFromDictionary_(NSDictionary otherDictionary) { + _lib._objc_msgSend_508( + _id, _lib._sel_addEntriesFromDictionary_1, otherDictionary._id); + } + + void removeAllObjects() { + _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } + + void removeObjectsForKeys_(NSArray keyArray) { + _lib._objc_msgSend_471(_id, _lib._sel_removeObjectsForKeys_1, keyArray._id); + } + + void setDictionary_(NSDictionary otherDictionary) { + _lib._objc_msgSend_508(_id, _lib._sel_setDictionary_1, otherDictionary._id); + } + + void setObject_forKeyedSubscript_(NSObject? obj, NSObject key) { + _lib._objc_msgSend_534(_id, _lib._sel_setObject_forKeyedSubscript_1, + obj?._id ?? ffi.nullptr, key._id); + } + + static NSMutableDictionary dictionaryWithCapacity_( + ThermionDartTexture1 _lib, int numItems) { + final _ret = _lib._objc_msgSend_64(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithCapacity_1, numItems); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary? dictionaryWithContentsOfFile_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_535(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary? dictionaryWithContentsOfURL_( + ThermionDartTexture1 _lib, NSURL url) { + final _ret = _lib._objc_msgSend_536(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + NSMutableDictionary? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_535( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + NSMutableDictionary? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_536(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithSharedKeySet_( + ThermionDartTexture1 _lib, NSObject keyset) { + final _ret = _lib._objc_msgSend_537(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + void setValue_forKey_(NSObject? value, NSString key) { + _lib._objc_msgSend_134( + _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); + } + + @override + NSMutableDictionary initWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_146( + _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionary(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObject_forKey_( + ThermionDartTexture1 _lib, NSObject object, NSObject key) { + final _ret = _lib._objc_msgSend_157(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjects_forKeys_count_( + ThermionDartTexture1 _lib, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_146(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjectsAndKeys_( + ThermionDartTexture1 _lib, NSObject firstObject) { + final _ret = _lib._objc_msgSend_123(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithDictionary_( + ThermionDartTexture1 _lib, NSDictionary dict) { + final _ret = _lib._objc_msgSend_158(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithDictionary_1, dict._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjects_forKeys_( + ThermionDartTexture1 _lib, NSArray objects, NSArray keys) { + final _ret = _lib._objc_msgSend_159(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_1, objects._id, keys._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableDictionary initWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _lib._objc_msgSend_123( + _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableDictionary initWithDictionary_(NSDictionary otherDictionary) { + final _ret = _lib._objc_msgSend_158( + _id, _lib._sel_initWithDictionary_1, otherDictionary._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableDictionary initWithDictionary_copyItems_( + NSDictionary otherDictionary, bool flag) { + final _ret = _lib._objc_msgSend_160(_id, + _lib._sel_initWithDictionary_copyItems_1, otherDictionary._id, flag); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { + final _ret = _lib._objc_msgSend_159( + _id, _lib._sel_initWithObjects_forKeys_1, objects._id, keys._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary? dictionaryWithContentsOfURL_error_( + ThermionDartTexture1 _lib, + NSURL url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_161(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSObject sharedKeySetForKeys_( + ThermionDartTexture1 _lib, NSArray keys) { + final _ret = _lib._objc_msgSend_124(_lib._class_NSMutableDictionary1, + _lib._sel_sharedKeySetForKeys_1, keys._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } + + static NSMutableDictionary allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableDictionary1, _lib._sel_allocWithZone_1, zone); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } + + static NSMutableDictionary alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableDictionary1, _lib._sel_alloc1); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSMutableDictionary1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSMutableDictionary1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSMutableDictionary1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableDictionary1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSMutableDictionary1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSMutableDictionary1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSMutableDictionary1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSMutableDictionary1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableDictionary1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSQualityOfService { + static const int NSQualityOfServiceUserInteractive = 33; + static const int NSQualityOfServiceUserInitiated = 25; + static const int NSQualityOfServiceUtility = 17; + static const int NSQualityOfServiceBackground = 9; + static const int NSQualityOfServiceDefault = -1; +} + +class NSArchiver extends NSCoder { + NSArchiver._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSArchiver] that points to the same underlying object as [other]. + static NSArchiver castFrom(T other) { + return NSArchiver._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSArchiver] that wraps the given raw object pointer. + static NSArchiver castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSArchiver._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSArchiver]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArchiver1); + } + + NSArchiver initForWritingWithMutableData_(NSMutableData mdata) { + final _ret = _lib._objc_msgSend_520( + _id, _lib._sel_initForWritingWithMutableData_1, mdata._id); + return NSArchiver._(_ret, _lib, retain: true, release: true); + } + + NSMutableData get archiverData { + final _ret = _lib._objc_msgSend_549(_id, _lib._sel_archiverData1); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + void encodeRootObject_(NSObject rootObject) { + _lib._objc_msgSend_15(_id, _lib._sel_encodeRootObject_1, rootObject._id); + } + + @override + void encodeConditionalObject_(NSObject? object) { + _lib._objc_msgSend_288( + _id, _lib._sel_encodeConditionalObject_1, object?._id ?? ffi.nullptr); + } + + static NSData archivedDataWithRootObject_( + ThermionDartTexture1 _lib, NSObject rootObject) { + final _ret = _lib._objc_msgSend_521(_lib._class_NSArchiver1, + _lib._sel_archivedDataWithRootObject_1, rootObject._id); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static bool archiveRootObject_toFile_( + ThermionDartTexture1 _lib, NSObject rootObject, NSString path) { + return _lib._objc_msgSend_260(_lib._class_NSArchiver1, + _lib._sel_archiveRootObject_toFile_1, rootObject._id, path._id); + } + + void encodeClassName_intoClassName_( + NSString trueName, NSString inArchiveName) { + _lib._objc_msgSend_550(_id, _lib._sel_encodeClassName_intoClassName_1, + trueName._id, inArchiveName._id); + } + + NSString? classNameEncodedForTrueClassName_(NSString trueName) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_classNameEncodedForTrueClassName_1, trueName._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + void replaceObject_withObject_(NSObject object, NSObject newObject) { + _lib._objc_msgSend_533( + _id, _lib._sel_replaceObject_withObject_1, object._id, newObject._id); + } + + @override + NSArchiver init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSArchiver._(_ret, _lib, retain: true, release: true); + } + + static NSArchiver new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArchiver1, _lib._sel_new1); + return NSArchiver._(_ret, _lib, retain: false, release: true); + } + + static NSArchiver allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSArchiver1, _lib._sel_allocWithZone_1, zone); + return NSArchiver._(_ret, _lib, retain: false, release: true); + } + + static NSArchiver alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSArchiver1, _lib._sel_alloc1); + return NSArchiver._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSArchiver1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSArchiver1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSArchiver1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSArchiver1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSArchiver1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSArchiver1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSArchiver1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSArchiver1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSArchiver1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSPortCoder extends NSCoder { + NSPortCoder._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSPortCoder] that points to the same underlying object as [other]. + static NSPortCoder castFrom(T other) { + return NSPortCoder._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSPortCoder] that wraps the given raw object pointer. + static NSPortCoder castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSPortCoder._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSPortCoder]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSPortCoder1); + } + + bool isBycopy() { + return _lib._objc_msgSend_12(_id, _lib._sel_isBycopy1); + } + + bool isByref() { + return _lib._objc_msgSend_12(_id, _lib._sel_isByref1); + } + + void encodePortObject_(NSPort aport) { + _lib._objc_msgSend_592(_id, _lib._sel_encodePortObject_1, aport._id); + } + + NSPort? decodePortObject() { + final _ret = _lib._objc_msgSend_593(_id, _lib._sel_decodePortObject1); + return _ret.address == 0 + ? null + : NSPort._(_ret, _lib, retain: true, release: true); + } + + NSConnection? connection() { + final _ret = _lib._objc_msgSend_594(_id, _lib._sel_connection1); + return _ret.address == 0 + ? null + : NSConnection._(_ret, _lib, retain: true, release: true); + } + + static NSObject portCoderWithReceivePort_sendPort_components_( + ThermionDartTexture1 _lib, + NSPort? rcvPort, + NSPort? sndPort, + NSArray? comps) { + final _ret = _lib._objc_msgSend_595( + _lib._class_NSPortCoder1, + _lib._sel_portCoderWithReceivePort_sendPort_components_1, + rcvPort?._id ?? ffi.nullptr, + sndPort?._id ?? ffi.nullptr, + comps?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject initWithReceivePort_sendPort_components_( + NSPort? rcvPort, NSPort? sndPort, NSArray? comps) { + final _ret = _lib._objc_msgSend_595( + _id, + _lib._sel_initWithReceivePort_sendPort_components_1, + rcvPort?._id ?? ffi.nullptr, + sndPort?._id ?? ffi.nullptr, + comps?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void dispatch() { + _lib._objc_msgSend_1(_id, _lib._sel_dispatch1); + } + + @override + NSPortCoder init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSPortCoder._(_ret, _lib, retain: true, release: true); + } + + static NSPortCoder new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSPortCoder1, _lib._sel_new1); + return NSPortCoder._(_ret, _lib, retain: false, release: true); + } + + static NSPortCoder allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSPortCoder1, _lib._sel_allocWithZone_1, zone); + return NSPortCoder._(_ret, _lib, retain: false, release: true); + } + + static NSPortCoder alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPortCoder1, _lib._sel_alloc1); + return NSPortCoder._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSPortCoder1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSPortCoder1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSPortCoder1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSPortCoder1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSPortCoder1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSPortCoder1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSPortCoder1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSPortCoder1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSPortCoder1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSPort extends NSObject { + NSPort._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSPort] that points to the same underlying object as [other]. + static NSPort castFrom(T other) { + return NSPort._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSPort] that wraps the given raw object pointer. + static NSPort castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSPort._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSPort]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSPort1); + } + + static NSPort port(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_552(_lib._class_NSPort1, _lib._sel_port1); + return NSPort._(_ret, _lib, retain: true, release: true); + } + + void invalidate() { + _lib._objc_msgSend_1(_id, _lib._sel_invalidate1); + } + + bool get valid { + return _lib._objc_msgSend_12(_id, _lib._sel_isValid1); + } + + void setDelegate_(NSObject? anObject) { + _lib._objc_msgSend_288( + _id, _lib._sel_setDelegate_1, anObject?._id ?? ffi.nullptr); + } + + NSObject? delegate() { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + void scheduleInRunLoop_forMode_(NSRunLoop runLoop, NSString mode) { + _lib._objc_msgSend_568( + _id, _lib._sel_scheduleInRunLoop_forMode_1, runLoop._id, mode._id); + } + + void removeFromRunLoop_forMode_(NSRunLoop runLoop, NSString mode) { + _lib._objc_msgSend_568( + _id, _lib._sel_removeFromRunLoop_forMode_1, runLoop._id, mode._id); + } + + int get reservedSpaceLength { + return _lib._objc_msgSend_10(_id, _lib._sel_reservedSpaceLength1); + } + + bool sendBeforeDate_components_from_reserved_( + NSDate limitDate, + NSMutableArray? components, + NSPort? receivePort, + int headerSpaceReserved) { + return _lib._objc_msgSend_569( + _id, + _lib._sel_sendBeforeDate_components_from_reserved_1, + limitDate._id, + components?._id ?? ffi.nullptr, + receivePort?._id ?? ffi.nullptr, + headerSpaceReserved); + } + + bool sendBeforeDate_msgid_components_from_reserved_( + NSDate limitDate, + int msgID, + NSMutableArray? components, + NSPort? receivePort, + int headerSpaceReserved) { + return _lib._objc_msgSend_570( + _id, + _lib._sel_sendBeforeDate_msgid_components_from_reserved_1, + limitDate._id, + msgID, + components?._id ?? ffi.nullptr, + receivePort?._id ?? ffi.nullptr, + headerSpaceReserved); + } + + void addConnection_toRunLoop_forMode_( + NSConnection conn, NSRunLoop runLoop, NSString mode) { + _lib._objc_msgSend_591(_id, _lib._sel_addConnection_toRunLoop_forMode_1, + conn._id, runLoop._id, mode._id); + } + + void removeConnection_fromRunLoop_forMode_( + NSConnection conn, NSRunLoop runLoop, NSString mode) { + _lib._objc_msgSend_591( + _id, + _lib._sel_removeConnection_fromRunLoop_forMode_1, + conn._id, + runLoop._id, + mode._id); + } + + @override + NSPort init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSPort._(_ret, _lib, retain: true, release: true); + } + + static NSPort new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSPort1, _lib._sel_new1); + return NSPort._(_ret, _lib, retain: false, release: true); + } + + static NSPort allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSPort1, _lib._sel_allocWithZone_1, zone); + return NSPort._(_ret, _lib, retain: false, release: true); + } + + static NSPort alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSPort1, _lib._sel_alloc1); + return NSPort._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSPort1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSPort1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSPort1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSPort1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSPort1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSPort1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSPort1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSPort1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSPort1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSRunLoop extends NSObject { + NSRunLoop._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSRunLoop] that points to the same underlying object as [other]. + static NSRunLoop castFrom(T other) { + return NSRunLoop._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSRunLoop] that wraps the given raw object pointer. + static NSRunLoop castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSRunLoop._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSRunLoop]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSRunLoop1); + } + + static NSRunLoop getCurrentRunLoop(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_553( + _lib._class_NSRunLoop1, _lib._sel_currentRunLoop1); + return NSRunLoop._(_ret, _lib, retain: true, release: true); + } + + static NSRunLoop getMainRunLoop(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_553(_lib._class_NSRunLoop1, _lib._sel_mainRunLoop1); + return NSRunLoop._(_ret, _lib, retain: true, release: true); + } + + NSString? get currentMode { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_currentMode1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + ffi.Pointer<__CFRunLoop> getCFRunLoop() { + return _lib._objc_msgSend_554(_id, _lib._sel_getCFRunLoop1); + } + + void addTimer_forMode_(NSTimer timer, NSString mode) { + _lib._objc_msgSend_561( + _id, _lib._sel_addTimer_forMode_1, timer._id, mode._id); + } + + void addPort_forMode_(NSPort aPort, NSString mode) { + _lib._objc_msgSend_562( + _id, _lib._sel_addPort_forMode_1, aPort._id, mode._id); + } + + void removePort_forMode_(NSPort aPort, NSString mode) { + _lib._objc_msgSend_562( + _id, _lib._sel_removePort_forMode_1, aPort._id, mode._id); + } + + NSDate? limitDateForMode_(NSString mode) { + final _ret = + _lib._objc_msgSend_563(_id, _lib._sel_limitDateForMode_1, mode._id); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + void acceptInputForMode_beforeDate_(NSString mode, NSDate limitDate) { + _lib._objc_msgSend_564(_id, _lib._sel_acceptInputForMode_beforeDate_1, + mode._id, limitDate._id); + } + + void run() { + _lib._objc_msgSend_1(_id, _lib._sel_run1); + } + + void runUntilDate_(NSDate limitDate) { + _lib._objc_msgSend_539(_id, _lib._sel_runUntilDate_1, limitDate._id); + } + + bool runMode_beforeDate_(NSString mode, NSDate limitDate) { + return _lib._objc_msgSend_565( + _id, _lib._sel_runMode_beforeDate_1, mode._id, limitDate._id); + } + + void configureAsServer() { + _lib._objc_msgSend_1(_id, _lib._sel_configureAsServer1); + } + + void performInModes_block_(NSArray modes, ObjCBlock_ffiVoid block) { + _lib._objc_msgSend_566( + _id, _lib._sel_performInModes_block_1, modes._id, block._id); + } + + void performBlock_(ObjCBlock_ffiVoid block) { + _lib._objc_msgSend_531(_id, _lib._sel_performBlock_1, block._id); + } + + void performSelector_target_argument_order_modes_( + ffi.Pointer aSelector, + NSObject target, + NSObject? arg, + int order, + NSArray modes) { + _lib._objc_msgSend_567( + _id, + _lib._sel_performSelector_target_argument_order_modes_1, + aSelector, + target._id, + arg?._id ?? ffi.nullptr, + order, + modes._id); + } + + void cancelPerformSelector_target_argument_( + ffi.Pointer aSelector, NSObject target, NSObject? arg) { + _lib._objc_msgSend_532( + _id, + _lib._sel_cancelPerformSelector_target_argument_1, + aSelector, + target._id, + arg?._id ?? ffi.nullptr); + } + + void cancelPerformSelectorsWithTarget_(NSObject target) { + _lib._objc_msgSend_15( + _id, _lib._sel_cancelPerformSelectorsWithTarget_1, target._id); + } + + @override + NSRunLoop init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSRunLoop._(_ret, _lib, retain: true, release: true); + } + + static NSRunLoop new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSRunLoop1, _lib._sel_new1); + return NSRunLoop._(_ret, _lib, retain: false, release: true); + } + + static NSRunLoop allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSRunLoop1, _lib._sel_allocWithZone_1, zone); + return NSRunLoop._(_ret, _lib, retain: false, release: true); + } + + static NSRunLoop alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSRunLoop1, _lib._sel_alloc1); + return NSRunLoop._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSRunLoop1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSRunLoop1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSRunLoop1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSRunLoop1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSRunLoop1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSRunLoop1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSRunLoop1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSRunLoop1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSRunLoop1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +final class __CFRunLoop extends ffi.Opaque {} + +class NSTimer extends NSObject { + NSTimer._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSTimer] that points to the same underlying object as [other]. + static NSTimer castFrom(T other) { + return NSTimer._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSTimer] that wraps the given raw object pointer. + static NSTimer castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSTimer._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSTimer]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSTimer1); + } + + static NSTimer timerWithTimeInterval_invocation_repeats_( + ThermionDartTexture1 _lib, + double ti, + NSInvocation invocation, + bool yesOrNo) { + final _ret = _lib._objc_msgSend_555( + _lib._class_NSTimer1, + _lib._sel_timerWithTimeInterval_invocation_repeats_1, + ti, + invocation._id, + yesOrNo); + return NSTimer._(_ret, _lib, retain: true, release: true); + } + + static NSTimer scheduledTimerWithTimeInterval_invocation_repeats_( + ThermionDartTexture1 _lib, + double ti, + NSInvocation invocation, + bool yesOrNo) { + final _ret = _lib._objc_msgSend_555( + _lib._class_NSTimer1, + _lib._sel_scheduledTimerWithTimeInterval_invocation_repeats_1, + ti, + invocation._id, + yesOrNo); + return NSTimer._(_ret, _lib, retain: true, release: true); + } + + static NSTimer timerWithTimeInterval_target_selector_userInfo_repeats_( + ThermionDartTexture1 _lib, + double ti, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? userInfo, + bool yesOrNo) { + final _ret = _lib._objc_msgSend_556( + _lib._class_NSTimer1, + _lib._sel_timerWithTimeInterval_target_selector_userInfo_repeats_1, + ti, + aTarget._id, + aSelector, + userInfo?._id ?? ffi.nullptr, + yesOrNo); + return NSTimer._(_ret, _lib, retain: true, release: true); + } + + static NSTimer + scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_( + ThermionDartTexture1 _lib, + double ti, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? userInfo, + bool yesOrNo) { + final _ret = _lib._objc_msgSend_556( + _lib._class_NSTimer1, + _lib._sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_1, + ti, + aTarget._id, + aSelector, + userInfo?._id ?? ffi.nullptr, + yesOrNo); + return NSTimer._(_ret, _lib, retain: true, release: true); + } + + static NSTimer timerWithTimeInterval_repeats_block_(ThermionDartTexture1 _lib, + double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _lib._objc_msgSend_557( + _lib._class_NSTimer1, + _lib._sel_timerWithTimeInterval_repeats_block_1, + interval, + repeats, + block._id); + return NSTimer._(_ret, _lib, retain: true, release: true); + } + + static NSTimer scheduledTimerWithTimeInterval_repeats_block_( + ThermionDartTexture1 _lib, + double interval, + bool repeats, + ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _lib._objc_msgSend_557( + _lib._class_NSTimer1, + _lib._sel_scheduledTimerWithTimeInterval_repeats_block_1, + interval, + repeats, + block._id); + return NSTimer._(_ret, _lib, retain: true, release: true); + } + + NSTimer initWithFireDate_interval_repeats_block_(NSDate date, double interval, + bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _lib._objc_msgSend_558( + _id, + _lib._sel_initWithFireDate_interval_repeats_block_1, + date._id, + interval, + repeats, + block._id); + return NSTimer._(_ret, _lib, retain: true, release: true); + } + + NSTimer initWithFireDate_interval_target_selector_userInfo_repeats_( + NSDate date, + double ti, + NSObject t, + ffi.Pointer s, + NSObject? ui, + bool rep) { + final _ret = _lib._objc_msgSend_559( + _id, + _lib._sel_initWithFireDate_interval_target_selector_userInfo_repeats_1, + date._id, + ti, + t._id, + s, + ui?._id ?? ffi.nullptr, + rep); + return NSTimer._(_ret, _lib, retain: true, release: true); + } + + void fire() { + _lib._objc_msgSend_1(_id, _lib._sel_fire1); + } + + NSDate get fireDate { + final _ret = _lib._objc_msgSend_171(_id, _lib._sel_fireDate1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + set fireDate(NSDate value) { + return _lib._objc_msgSend_560(_id, _lib._sel_setFireDate_1, value._id); + } + + double get timeInterval { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_timeInterval1) + : _lib._objc_msgSend_164(_id, _lib._sel_timeInterval1); + } + + double get tolerance { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_tolerance1) + : _lib._objc_msgSend_164(_id, _lib._sel_tolerance1); + } + + set tolerance(double value) { + return _lib._objc_msgSend_541(_id, _lib._sel_setTolerance_1, value); + } + + void invalidate() { + _lib._objc_msgSend_1(_id, _lib._sel_invalidate1); + } + + bool get valid { + return _lib._objc_msgSend_12(_id, _lib._sel_isValid1); + } + + NSObject? get userInfo { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + @override + NSTimer init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSTimer._(_ret, _lib, retain: true, release: true); + } + + static NSTimer new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSTimer1, _lib._sel_new1); + return NSTimer._(_ret, _lib, retain: false, release: true); + } + + static NSTimer allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSTimer1, _lib._sel_allocWithZone_1, zone); + return NSTimer._(_ret, _lib, retain: false, release: true); + } + + static NSTimer alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSTimer1, _lib._sel_alloc1); + return NSTimer._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSTimer1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSTimer1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSTimer1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSTimer1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSTimer1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSTimer1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSTimer1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSTimer1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSTimer1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +void _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSTimer_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTimer_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSTimer_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSTimer_closureRegistry[block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSTimer extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSTimer._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTimer.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTimer.fromFunction( + ThermionDartTexture1 lib, void Function(NSTimer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSTimer_registerClosure( + (ffi.Pointer arg0) => + fn(NSTimer._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSTimer.listener( + ThermionDartTexture1 lib, void Function(NSTimer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSTimer_registerClosure( + (ffi.Pointer arg0) => + fn(NSTimer._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSTimer arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0._id); +} + +class NSConnection extends NSObject { + NSConnection._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSConnection] that points to the same underlying object as [other]. + static NSConnection castFrom(T other) { + return NSConnection._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSConnection] that wraps the given raw object pointer. + static NSConnection castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSConnection._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSConnection]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSConnection1); + } + + NSDictionary get statistics { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_statistics1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSArray allConnections(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSConnection1, _lib._sel_allConnections1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSConnection defaultConnection(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_571( + _lib._class_NSConnection1, _lib._sel_defaultConnection1); + return NSConnection._(_ret, _lib, retain: true, release: true); + } + + static NSConnection? connectionWithRegisteredName_host_( + ThermionDartTexture1 _lib, NSString name, NSString? hostName) { + final _ret = _lib._objc_msgSend_572( + _lib._class_NSConnection1, + _lib._sel_connectionWithRegisteredName_host_1, + name._id, + hostName?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection._(_ret, _lib, retain: true, release: true); + } + + static NSConnection? connectionWithRegisteredName_host_usingNameServer_( + ThermionDartTexture1 _lib, + NSString name, + NSString? hostName, + NSPortNameServer server) { + final _ret = _lib._objc_msgSend_577( + _lib._class_NSConnection1, + _lib._sel_connectionWithRegisteredName_host_usingNameServer_1, + name._id, + hostName?._id ?? ffi.nullptr, + server._id); + return _ret.address == 0 + ? null + : NSConnection._(_ret, _lib, retain: true, release: true); + } + + static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_( + ThermionDartTexture1 _lib, NSString name, NSString? hostName) { + final _ret = _lib._objc_msgSend_582( + _lib._class_NSConnection1, + _lib._sel_rootProxyForConnectionWithRegisteredName_host_1, + name._id, + hostName?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSDistantObject._(_ret, _lib, retain: true, release: true); + } + + static NSDistantObject? + rootProxyForConnectionWithRegisteredName_host_usingNameServer_( + ThermionDartTexture1 _lib, + NSString name, + NSString? hostName, + NSPortNameServer server) { + final _ret = _lib._objc_msgSend_583( + _lib._class_NSConnection1, + _lib._sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_1, + name._id, + hostName?._id ?? ffi.nullptr, + server._id); + return _ret.address == 0 + ? null + : NSDistantObject._(_ret, _lib, retain: true, release: true); + } + + static NSConnection? serviceConnectionWithName_rootObject_usingNameServer_( + ThermionDartTexture1 _lib, + NSString name, + NSObject root, + NSPortNameServer server) { + final _ret = _lib._objc_msgSend_584( + _lib._class_NSConnection1, + _lib._sel_serviceConnectionWithName_rootObject_usingNameServer_1, + name._id, + root._id, + server._id); + return _ret.address == 0 + ? null + : NSConnection._(_ret, _lib, retain: true, release: true); + } + + static NSConnection? serviceConnectionWithName_rootObject_( + ThermionDartTexture1 _lib, NSString name, NSObject root) { + final _ret = _lib._objc_msgSend_585(_lib._class_NSConnection1, + _lib._sel_serviceConnectionWithName_rootObject_1, name._id, root._id); + return _ret.address == 0 + ? null + : NSConnection._(_ret, _lib, retain: true, release: true); + } + + double get requestTimeout { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_requestTimeout1) + : _lib._objc_msgSend_164(_id, _lib._sel_requestTimeout1); + } + + set requestTimeout(double value) { + return _lib._objc_msgSend_541(_id, _lib._sel_setRequestTimeout_1, value); + } + + double get replyTimeout { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_replyTimeout1) + : _lib._objc_msgSend_164(_id, _lib._sel_replyTimeout1); + } + + set replyTimeout(double value) { + return _lib._objc_msgSend_541(_id, _lib._sel_setReplyTimeout_1, value); + } + + NSObject? get rootObject { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_rootObject1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set rootObject(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setRootObject_1, value?._id ?? ffi.nullptr); + } + + NSObject? get delegate { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set delegate(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + } + + bool get independentConversationQueueing { + return _lib._objc_msgSend_12( + _id, _lib._sel_independentConversationQueueing1); + } + + set independentConversationQueueing(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setIndependentConversationQueueing_1, value); + } + + bool get valid { + return _lib._objc_msgSend_12(_id, _lib._sel_isValid1); + } + + NSDistantObject get rootProxy { + final _ret = _lib._objc_msgSend_586(_id, _lib._sel_rootProxy1); + return NSDistantObject._(_ret, _lib, retain: true, release: true); + } + + void invalidate() { + _lib._objc_msgSend_1(_id, _lib._sel_invalidate1); + } + + void addRequestMode_(NSString rmode) { + _lib._objc_msgSend_247(_id, _lib._sel_addRequestMode_1, rmode._id); + } + + void removeRequestMode_(NSString rmode) { + _lib._objc_msgSend_247(_id, _lib._sel_removeRequestMode_1, rmode._id); + } + + NSArray get requestModes { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_requestModes1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + bool registerName_(NSString? name) { + return _lib._objc_msgSend_587( + _id, _lib._sel_registerName_1, name?._id ?? ffi.nullptr); + } + + bool registerName_withNameServer_(NSString? name, NSPortNameServer server) { + return _lib._objc_msgSend_588(_id, _lib._sel_registerName_withNameServer_1, + name?._id ?? ffi.nullptr, server._id); + } + + static NSConnection? connectionWithReceivePort_sendPort_( + ThermionDartTexture1 _lib, NSPort? receivePort, NSPort? sendPort) { + final _ret = _lib._objc_msgSend_589( + _lib._class_NSConnection1, + _lib._sel_connectionWithReceivePort_sendPort_1, + receivePort?._id ?? ffi.nullptr, + sendPort?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection._(_ret, _lib, retain: true, release: true); + } + + static NSObject? currentConversation(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_17( + _lib._class_NSConnection1, _lib._sel_currentConversation1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSConnection? initWithReceivePort_sendPort_( + NSPort? receivePort, NSPort? sendPort) { + final _ret = _lib._objc_msgSend_589( + _id, + _lib._sel_initWithReceivePort_sendPort_1, + receivePort?._id ?? ffi.nullptr, + sendPort?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection._(_ret, _lib, retain: true, release: true); + } + + NSPort get sendPort { + final _ret = _lib._objc_msgSend_552(_id, _lib._sel_sendPort1); + return NSPort._(_ret, _lib, retain: true, release: true); + } + + NSPort get receivePort { + final _ret = _lib._objc_msgSend_552(_id, _lib._sel_receivePort1); + return NSPort._(_ret, _lib, retain: true, release: true); + } + + void enableMultipleThreads() { + _lib._objc_msgSend_1(_id, _lib._sel_enableMultipleThreads1); + } + + bool get multipleThreadsEnabled { + return _lib._objc_msgSend_12(_id, _lib._sel_multipleThreadsEnabled1); + } + + void addRunLoop_(NSRunLoop runloop) { + _lib._objc_msgSend_590(_id, _lib._sel_addRunLoop_1, runloop._id); + } + + void removeRunLoop_(NSRunLoop runloop) { + _lib._objc_msgSend_590(_id, _lib._sel_removeRunLoop_1, runloop._id); + } + + void runInNewThread() { + _lib._objc_msgSend_1(_id, _lib._sel_runInNewThread1); + } + + NSArray get remoteObjects { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_remoteObjects1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get localObjects { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_localObjects1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + void dispatchWithComponents_(NSArray components) { + _lib._objc_msgSend_471( + _id, _lib._sel_dispatchWithComponents_1, components._id); + } + + @override + NSConnection init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSConnection._(_ret, _lib, retain: true, release: true); + } + + static NSConnection new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConnection1, _lib._sel_new1); + return NSConnection._(_ret, _lib, retain: false, release: true); + } + + static NSConnection allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSConnection1, _lib._sel_allocWithZone_1, zone); + return NSConnection._(_ret, _lib, retain: false, release: true); + } + + static NSConnection alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConnection1, _lib._sel_alloc1); + return NSConnection._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSConnection1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSConnection1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSConnection1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSConnection1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSConnection1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSConnection1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSConnection1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSConnection1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSConnection1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSPortNameServer extends NSObject { + NSPortNameServer._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSPortNameServer] that points to the same underlying object as [other]. + static NSPortNameServer castFrom(T other) { + return NSPortNameServer._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSPortNameServer] that wraps the given raw object pointer. + static NSPortNameServer castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSPortNameServer._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSPortNameServer]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSPortNameServer1); + } + + static NSPortNameServer systemDefaultPortNameServer( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_573( + _lib._class_NSPortNameServer1, _lib._sel_systemDefaultPortNameServer1); + return NSPortNameServer._(_ret, _lib, retain: true, release: true); + } + + NSPort? portForName_(NSString name) { + final _ret = _lib._objc_msgSend_574(_id, _lib._sel_portForName_1, name._id); + return _ret.address == 0 + ? null + : NSPort._(_ret, _lib, retain: true, release: true); + } + + NSPort? portForName_host_(NSString name, NSString? host) { + final _ret = _lib._objc_msgSend_575( + _id, _lib._sel_portForName_host_1, name._id, host?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSPort._(_ret, _lib, retain: true, release: true); + } + + bool registerPort_name_(NSPort port, NSString name) { + return _lib._objc_msgSend_576( + _id, _lib._sel_registerPort_name_1, port._id, name._id); + } + + bool removePortForName_(NSString name) { + return _lib._objc_msgSend_63(_id, _lib._sel_removePortForName_1, name._id); + } + + @override + NSPortNameServer init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSPortNameServer._(_ret, _lib, retain: true, release: true); + } + + static NSPortNameServer new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPortNameServer1, _lib._sel_new1); + return NSPortNameServer._(_ret, _lib, retain: false, release: true); + } + + static NSPortNameServer allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSPortNameServer1, _lib._sel_allocWithZone_1, zone); + return NSPortNameServer._(_ret, _lib, retain: false, release: true); + } + + static NSPortNameServer alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPortNameServer1, _lib._sel_alloc1); + return NSPortNameServer._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSPortNameServer1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSPortNameServer1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSPortNameServer1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSPortNameServer1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSPortNameServer1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSPortNameServer1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSPortNameServer1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSPortNameServer1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSPortNameServer1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSDistantObject extends NSProxy { + NSDistantObject._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDistantObject] that points to the same underlying object as [other]. + static NSDistantObject castFrom(T other) { + return NSDistantObject._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSDistantObject] that wraps the given raw object pointer. + static NSDistantObject castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDistantObject._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSDistantObject]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSDistantObject1); + } + + static NSObject? proxyWithTarget_connection_( + ThermionDartTexture1 _lib, NSObject target, NSConnection connection) { + final _ret = _lib._objc_msgSend_579(_lib._class_NSDistantObject1, + _lib._sel_proxyWithTarget_connection_1, target._id, connection._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSDistantObject? initWithTarget_connection_( + NSObject target, NSConnection connection) { + final _ret = _lib._objc_msgSend_579( + _id, _lib._sel_initWithTarget_connection_1, target._id, connection._id); + return _ret.address == 0 + ? null + : NSDistantObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject proxyWithLocal_connection_( + ThermionDartTexture1 _lib, NSObject target, NSConnection connection) { + final _ret = _lib._objc_msgSend_580(_lib._class_NSDistantObject1, + _lib._sel_proxyWithLocal_connection_1, target._id, connection._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSDistantObject initWithLocal_connection_( + NSObject target, NSConnection connection) { + final _ret = _lib._objc_msgSend_580( + _id, _lib._sel_initWithLocal_connection_1, target._id, connection._id); + return NSDistantObject._(_ret, _lib, retain: true, release: true); + } + + NSDistantObject? initWithCoder_(NSCoder inCoder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, inCoder._id); + return _ret.address == 0 + ? null + : NSDistantObject._(_ret, _lib, retain: true, release: true); + } + + void setProtocolForProxy_(Protocol? proto) { + _lib._objc_msgSend_581( + _id, _lib._sel_setProtocolForProxy_1, proto?._id ?? ffi.nullptr); + } + + NSConnection get connectionForProxy { + final _ret = _lib._objc_msgSend_571(_id, _lib._sel_connectionForProxy1); + return NSConnection._(_ret, _lib, retain: true, release: true); + } + + static NSObject alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDistantObject1, _lib._sel_alloc1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static bool respondsToSelector_( + ThermionDartTexture1 _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_4(_lib._class_NSDistantObject1, + _lib._sel_respondsToSelector_1, aSelector); + } +} + +class NSProxy extends _ObjCWrapper { + NSProxy._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSProxy] that points to the same underlying object as [other]. + static NSProxy castFrom(T other) { + return NSProxy._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSProxy] that wraps the given raw object pointer. + static NSProxy castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSProxy._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSProxy]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProxy1); + } + + static NSObject alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSProxy1, _lib._sel_alloc1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSProxy1, _lib._sel_allocWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject class1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSProxy1, _lib._sel_class1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void forwardInvocation_(NSInvocation invocation) { + _lib._objc_msgSend_420(_id, _lib._sel_forwardInvocation_1, invocation._id); + } + + NSMethodSignature? methodSignatureForSelector_(ffi.Pointer sel) { + final _ret = _lib._objc_msgSend_578( + _id, _lib._sel_methodSignatureForSelector_1, sel); + return _ret.address == 0 + ? null + : NSMethodSignature._(_ret, _lib, retain: true, release: true); + } + + void dealloc() { + _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); + } + + void finalize() { + _lib._objc_msgSend_1(_id, _lib._sel_finalize1); + } + + NSString get description { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get debugDescription { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_debugDescription1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static bool respondsToSelector_( + ThermionDartTexture1 _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_4( + _lib._class_NSProxy1, _lib._sel_respondsToSelector_1, aSelector); + } + + bool allowsWeakReference() { + return _lib._objc_msgSend_12(_id, _lib._sel_allowsWeakReference1); + } + + bool retainWeakReference() { + return _lib._objc_msgSend_12(_id, _lib._sel_retainWeakReference1); + } +} + +class NSClassDescription extends NSObject { + NSClassDescription._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSClassDescription] that points to the same underlying object as [other]. + static NSClassDescription castFrom(T other) { + return NSClassDescription._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSClassDescription] that wraps the given raw object pointer. + static NSClassDescription castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSClassDescription._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSClassDescription]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSClassDescription1); + } + + static void registerClassDescription_forClass_(ThermionDartTexture1 _lib, + NSClassDescription description, NSObject aClass) { + _lib._objc_msgSend_597( + _lib._class_NSClassDescription1, + _lib._sel_registerClassDescription_forClass_1, + description._id, + aClass._id); + } + + static void invalidateClassDescriptionCache(ThermionDartTexture1 _lib) { + _lib._objc_msgSend_1(_lib._class_NSClassDescription1, + _lib._sel_invalidateClassDescriptionCache1); + } + + static NSClassDescription? classDescriptionForClass_( + ThermionDartTexture1 _lib, NSObject aClass) { + final _ret = _lib._objc_msgSend_598(_lib._class_NSClassDescription1, + _lib._sel_classDescriptionForClass_1, aClass._id); + return _ret.address == 0 + ? null + : NSClassDescription._(_ret, _lib, retain: true, release: true); + } + + @override + NSArray get attributeKeys { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_attributeKeys1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + @override + NSArray get toOneRelationshipKeys { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_toOneRelationshipKeys1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + @override + NSArray get toManyRelationshipKeys { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_toManyRelationshipKeys1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + @override + NSString? inverseForRelationshipKey_(NSString relationshipKey) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_inverseForRelationshipKey_1, relationshipKey._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + @override + NSClassDescription init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSClassDescription._(_ret, _lib, retain: true, release: true); + } + + static NSClassDescription new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSClassDescription1, _lib._sel_new1); + return NSClassDescription._(_ret, _lib, retain: false, release: true); + } + + static NSClassDescription allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSClassDescription1, _lib._sel_allocWithZone_1, zone); + return NSClassDescription._(_ret, _lib, retain: false, release: true); + } + + static NSClassDescription alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSClassDescription1, _lib._sel_alloc1); + return NSClassDescription._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSClassDescription1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSClassDescription1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSClassDescription1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSClassDescription1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSClassDescription1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSClassDescription1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSClassDescription1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSClassDescription1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSClassDescription1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSScriptObjectSpecifier extends NSObject { + NSScriptObjectSpecifier._( + ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSScriptObjectSpecifier] that points to the same underlying object as [other]. + static NSScriptObjectSpecifier castFrom(T other) { + return NSScriptObjectSpecifier._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSScriptObjectSpecifier] that wraps the given raw object pointer. + static NSScriptObjectSpecifier castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSScriptObjectSpecifier._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSScriptObjectSpecifier]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSScriptObjectSpecifier1); + } + + static NSScriptObjectSpecifier? objectSpecifierWithDescriptor_( + ThermionDartTexture1 _lib, NSAppleEventDescriptor descriptor) { + final _ret = _lib._objc_msgSend_623(_lib._class_NSScriptObjectSpecifier1, + _lib._sel_objectSpecifierWithDescriptor_1, descriptor._id); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + } + + NSScriptObjectSpecifier initWithContainerSpecifier_key_( + NSScriptObjectSpecifier container, NSString property) { + final _ret = _lib._objc_msgSend_624( + _id, + _lib._sel_initWithContainerSpecifier_key_1, + container._id, + property._id); + return NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + } + + NSScriptObjectSpecifier + initWithContainerClassDescription_containerSpecifier_key_( + NSScriptClassDescription classDesc, + NSScriptObjectSpecifier? container, + NSString property) { + final _ret = _lib._objc_msgSend_644( + _id, + _lib._sel_initWithContainerClassDescription_containerSpecifier_key_1, + classDesc._id, + container?._id ?? ffi.nullptr, + property._id); + return NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + } + + NSScriptObjectSpecifier? initWithCoder_(NSCoder inCoder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, inCoder._id); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + } + + NSScriptObjectSpecifier? get childSpecifier { + final _ret = _lib._objc_msgSend_631(_id, _lib._sel_childSpecifier1); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + } + + set childSpecifier(NSScriptObjectSpecifier? value) { + return _lib._objc_msgSend_632( + _id, _lib._sel_setChildSpecifier_1, value?._id ?? ffi.nullptr); + } + + NSScriptObjectSpecifier? get containerSpecifier { + final _ret = _lib._objc_msgSend_631(_id, _lib._sel_containerSpecifier1); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + } + + set containerSpecifier(NSScriptObjectSpecifier? value) { + return _lib._objc_msgSend_632( + _id, _lib._sel_setContainerSpecifier_1, value?._id ?? ffi.nullptr); + } + + bool get containerIsObjectBeingTested { + return _lib._objc_msgSend_12(_id, _lib._sel_containerIsObjectBeingTested1); + } + + set containerIsObjectBeingTested(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setContainerIsObjectBeingTested_1, value); + } + + bool get containerIsRangeContainerObject { + return _lib._objc_msgSend_12( + _id, _lib._sel_containerIsRangeContainerObject1); + } + + set containerIsRangeContainerObject(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setContainerIsRangeContainerObject_1, value); + } + + NSString get key { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_key1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set key(NSString value) { + return _lib._objc_msgSend_645(_id, _lib._sel_setKey_1, value._id); + } + + NSScriptClassDescription? get containerClassDescription { + final _ret = + _lib._objc_msgSend_627(_id, _lib._sel_containerClassDescription1); + return _ret.address == 0 + ? null + : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + } + + set containerClassDescription(NSScriptClassDescription? value) { + return _lib._objc_msgSend_646(_id, _lib._sel_setContainerClassDescription_1, + value?._id ?? ffi.nullptr); + } + + NSScriptClassDescription? get keyClassDescription { + final _ret = _lib._objc_msgSend_627(_id, _lib._sel_keyClassDescription1); + return _ret.address == 0 + ? null + : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + } + + ffi.Pointer indicesOfObjectsByEvaluatingWithContainer_count_( + NSObject container, ffi.Pointer count) { + return _lib._objc_msgSend_647( + _id, + _lib._sel_indicesOfObjectsByEvaluatingWithContainer_count_1, + container._id, + count); + } + + NSObject? objectsByEvaluatingWithContainers_(NSObject containers) { + final _ret = _lib._objc_msgSend_16( + _id, _lib._sel_objectsByEvaluatingWithContainers_1, containers._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? get objectsByEvaluatingSpecifier { + final _ret = + _lib._objc_msgSend_17(_id, _lib._sel_objectsByEvaluatingSpecifier1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + int get evaluationErrorNumber { + return _lib._objc_msgSend_82(_id, _lib._sel_evaluationErrorNumber1); + } + + set evaluationErrorNumber(int value) { + return _lib._objc_msgSend_634( + _id, _lib._sel_setEvaluationErrorNumber_1, value); + } + + NSScriptObjectSpecifier? get evaluationErrorSpecifier { + final _ret = + _lib._objc_msgSend_631(_id, _lib._sel_evaluationErrorSpecifier1); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + } + + NSAppleEventDescriptor? get descriptor { + final _ret = _lib._objc_msgSend_635(_id, _lib._sel_descriptor1); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + @override + NSScriptObjectSpecifier init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + } + + static NSScriptObjectSpecifier new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSScriptObjectSpecifier1, _lib._sel_new1); + return NSScriptObjectSpecifier._(_ret, _lib, retain: false, release: true); + } + + static NSScriptObjectSpecifier allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSScriptObjectSpecifier1, _lib._sel_allocWithZone_1, zone); + return NSScriptObjectSpecifier._(_ret, _lib, retain: false, release: true); + } + + static NSScriptObjectSpecifier alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSScriptObjectSpecifier1, _lib._sel_alloc1); + return NSScriptObjectSpecifier._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSScriptObjectSpecifier1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSScriptObjectSpecifier1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSScriptObjectSpecifier1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSScriptObjectSpecifier1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSScriptObjectSpecifier1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSScriptObjectSpecifier1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSScriptObjectSpecifier1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSScriptObjectSpecifier1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSScriptObjectSpecifier1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSAppleEventDescriptor extends NSObject { + NSAppleEventDescriptor._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSAppleEventDescriptor] that points to the same underlying object as [other]. + static NSAppleEventDescriptor castFrom(T other) { + return NSAppleEventDescriptor._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSAppleEventDescriptor] that wraps the given raw object pointer. + static NSAppleEventDescriptor castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSAppleEventDescriptor._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSAppleEventDescriptor]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSAppleEventDescriptor1); + } + + static NSAppleEventDescriptor nullDescriptor(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_600( + _lib._class_NSAppleEventDescriptor1, _lib._sel_nullDescriptor1); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor? descriptorWithDescriptorType_bytes_length_( + ThermionDartTexture1 _lib, + int descriptorType, + ffi.Pointer bytes, + int byteCount) { + final _ret = _lib._objc_msgSend_601( + _lib._class_NSAppleEventDescriptor1, + _lib._sel_descriptorWithDescriptorType_bytes_length_1, + descriptorType, + bytes, + byteCount); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor? descriptorWithDescriptorType_data_( + ThermionDartTexture1 _lib, int descriptorType, NSData? data) { + final _ret = _lib._objc_msgSend_602( + _lib._class_NSAppleEventDescriptor1, + _lib._sel_descriptorWithDescriptorType_data_1, + descriptorType, + data?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithBoolean_( + ThermionDartTexture1 _lib, int boolean) { + final _ret = _lib._objc_msgSend_603(_lib._class_NSAppleEventDescriptor1, + _lib._sel_descriptorWithBoolean_1, boolean); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithEnumCode_( + ThermionDartTexture1 _lib, int enumerator) { + final _ret = _lib._objc_msgSend_604(_lib._class_NSAppleEventDescriptor1, + _lib._sel_descriptorWithEnumCode_1, enumerator); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithInt32_( + ThermionDartTexture1 _lib, int signedInt) { + final _ret = _lib._objc_msgSend_605(_lib._class_NSAppleEventDescriptor1, + _lib._sel_descriptorWithInt32_1, signedInt); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithDouble_( + ThermionDartTexture1 _lib, double doubleValue) { + final _ret = _lib._objc_msgSend_606(_lib._class_NSAppleEventDescriptor1, + _lib._sel_descriptorWithDouble_1, doubleValue); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithTypeCode_( + ThermionDartTexture1 _lib, int typeCode) { + final _ret = _lib._objc_msgSend_604(_lib._class_NSAppleEventDescriptor1, + _lib._sel_descriptorWithTypeCode_1, typeCode); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_607(_lib._class_NSAppleEventDescriptor1, + _lib._sel_descriptorWithString_1, string._id); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithDate_( + ThermionDartTexture1 _lib, NSDate date) { + final _ret = _lib._objc_msgSend_608(_lib._class_NSAppleEventDescriptor1, + _lib._sel_descriptorWithDate_1, date._id); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithFileURL_( + ThermionDartTexture1 _lib, NSURL fileURL) { + final _ret = _lib._objc_msgSend_609(_lib._class_NSAppleEventDescriptor1, + _lib._sel_descriptorWithFileURL_1, fileURL._id); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor + appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_( + ThermionDartTexture1 _lib, + int eventClass, + int eventID, + NSAppleEventDescriptor? targetDescriptor, + int returnID, + int transactionID) { + final _ret = _lib._objc_msgSend_610( + _lib._class_NSAppleEventDescriptor1, + _lib._sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_1, + eventClass, + eventID, + targetDescriptor?._id ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor listDescriptor(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_600( + _lib._class_NSAppleEventDescriptor1, _lib._sel_listDescriptor1); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor recordDescriptor(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_600( + _lib._class_NSAppleEventDescriptor1, _lib._sel_recordDescriptor1); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor currentProcessDescriptor( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_600(_lib._class_NSAppleEventDescriptor1, + _lib._sel_currentProcessDescriptor1); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithProcessIdentifier_( + ThermionDartTexture1 _lib, int processIdentifier) { + final _ret = _lib._objc_msgSend_605(_lib._class_NSAppleEventDescriptor1, + _lib._sel_descriptorWithProcessIdentifier_1, processIdentifier); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithBundleIdentifier_( + ThermionDartTexture1 _lib, NSString bundleIdentifier) { + final _ret = _lib._objc_msgSend_607(_lib._class_NSAppleEventDescriptor1, + _lib._sel_descriptorWithBundleIdentifier_1, bundleIdentifier._id); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithApplicationURL_( + ThermionDartTexture1 _lib, NSURL applicationURL) { + final _ret = _lib._objc_msgSend_609(_lib._class_NSAppleEventDescriptor1, + _lib._sel_descriptorWithApplicationURL_1, applicationURL._id); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + NSAppleEventDescriptor initWithAEDescNoCopy_(ffi.Pointer aeDesc) { + final _ret = + _lib._objc_msgSend_611(_id, _lib._sel_initWithAEDescNoCopy_1, aeDesc); + return NSAppleEventDescriptor._(_ret, _lib, retain: false, release: true); + } + + NSAppleEventDescriptor? initWithDescriptorType_bytes_length_( + int descriptorType, ffi.Pointer bytes, int byteCount) { + final _ret = _lib._objc_msgSend_612( + _id, + _lib._sel_initWithDescriptorType_bytes_length_1, + descriptorType, + bytes, + byteCount); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + NSAppleEventDescriptor? initWithDescriptorType_data_( + int descriptorType, NSData? data) { + final _ret = _lib._objc_msgSend_613( + _id, + _lib._sel_initWithDescriptorType_data_1, + descriptorType, + data?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + NSAppleEventDescriptor + initWithEventClass_eventID_targetDescriptor_returnID_transactionID_( + int eventClass, + int eventID, + NSAppleEventDescriptor? targetDescriptor, + int returnID, + int transactionID) { + final _ret = _lib._objc_msgSend_614( + _id, + _lib._sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_1, + eventClass, + eventID, + targetDescriptor?._id ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + NSAppleEventDescriptor initListDescriptor() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initListDescriptor1); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + NSAppleEventDescriptor initRecordDescriptor() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initRecordDescriptor1); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + ffi.Pointer get aeDesc { + return _lib._objc_msgSend_615(_id, _lib._sel_aeDesc1); + } + + int get descriptorType { + return _lib._objc_msgSend_213(_id, _lib._sel_descriptorType1); + } + + NSData get data { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_data1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + int get booleanValue { + return _lib._objc_msgSend_233(_id, _lib._sel_booleanValue1); + } + + int get enumCodeValue { + return _lib._objc_msgSend_213(_id, _lib._sel_enumCodeValue1); + } + + int get int32Value { + return _lib._objc_msgSend_236(_id, _lib._sel_int32Value1); + } + + double get doubleValue { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_doubleValue1) + : _lib._objc_msgSend_164(_id, _lib._sel_doubleValue1); + } + + int get typeCodeValue { + return _lib._objc_msgSend_213(_id, _lib._sel_typeCodeValue1); + } + + NSString? get stringValue { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_stringValue1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSDate? get dateValue { + final _ret = _lib._objc_msgSend_182(_id, _lib._sel_dateValue1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSURL? get fileURLValue { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_fileURLValue1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + int get eventClass { + return _lib._objc_msgSend_213(_id, _lib._sel_eventClass1); + } + + int get eventID { + return _lib._objc_msgSend_213(_id, _lib._sel_eventID1); + } + + int get returnID { + return _lib._objc_msgSend_234(_id, _lib._sel_returnID1); + } + + int get transactionID { + return _lib._objc_msgSend_236(_id, _lib._sel_transactionID1); + } + + void setParamDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _lib._objc_msgSend_616(_id, _lib._sel_setParamDescriptor_forKeyword_1, + descriptor._id, keyword); + } + + NSAppleEventDescriptor? paramDescriptorForKeyword_(int keyword) { + final _ret = _lib._objc_msgSend_617( + _id, _lib._sel_paramDescriptorForKeyword_1, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + void removeParamDescriptorWithKeyword_(int keyword) { + _lib._objc_msgSend_618( + _id, _lib._sel_removeParamDescriptorWithKeyword_1, keyword); + } + + void setAttributeDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _lib._objc_msgSend_616(_id, _lib._sel_setAttributeDescriptor_forKeyword_1, + descriptor._id, keyword); + } + + NSAppleEventDescriptor? attributeDescriptorForKeyword_(int keyword) { + final _ret = _lib._objc_msgSend_617( + _id, _lib._sel_attributeDescriptorForKeyword_1, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + NSAppleEventDescriptor? sendEventWithOptions_timeout_error_(int sendOptions, + double timeoutInSeconds, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_619( + _id, + _lib._sel_sendEventWithOptions_timeout_error_1, + sendOptions, + timeoutInSeconds, + error); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + bool get isRecordDescriptor { + return _lib._objc_msgSend_12(_id, _lib._sel_isRecordDescriptor1); + } + + int get numberOfItems { + return _lib._objc_msgSend_82(_id, _lib._sel_numberOfItems1); + } + + void insertDescriptor_atIndex_(NSAppleEventDescriptor descriptor, int index) { + _lib._objc_msgSend_620( + _id, _lib._sel_insertDescriptor_atIndex_1, descriptor._id, index); + } + + NSAppleEventDescriptor? descriptorAtIndex_(int index) { + final _ret = + _lib._objc_msgSend_621(_id, _lib._sel_descriptorAtIndex_1, index); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + void removeDescriptorAtIndex_(int index) { + _lib._objc_msgSend_422(_id, _lib._sel_removeDescriptorAtIndex_1, index); + } + + void setDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _lib._objc_msgSend_616( + _id, _lib._sel_setDescriptor_forKeyword_1, descriptor._id, keyword); + } + + NSAppleEventDescriptor? descriptorForKeyword_(int keyword) { + final _ret = + _lib._objc_msgSend_617(_id, _lib._sel_descriptorForKeyword_1, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + void removeDescriptorWithKeyword_(int keyword) { + _lib._objc_msgSend_618( + _id, _lib._sel_removeDescriptorWithKeyword_1, keyword); + } + + int keywordForDescriptorAtIndex_(int index) { + return _lib._objc_msgSend_622( + _id, _lib._sel_keywordForDescriptorAtIndex_1, index); + } + + NSAppleEventDescriptor? coerceToDescriptorType_(int descriptorType) { + final _ret = _lib._objc_msgSend_617( + _id, _lib._sel_coerceToDescriptorType_1, descriptorType); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + @override + NSAppleEventDescriptor init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + static NSAppleEventDescriptor new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSAppleEventDescriptor1, _lib._sel_new1); + return NSAppleEventDescriptor._(_ret, _lib, retain: false, release: true); + } + + static NSAppleEventDescriptor allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSAppleEventDescriptor1, _lib._sel_allocWithZone_1, zone); + return NSAppleEventDescriptor._(_ret, _lib, retain: false, release: true); + } + + static NSAppleEventDescriptor alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSAppleEventDescriptor1, _lib._sel_alloc1); + return NSAppleEventDescriptor._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSAppleEventDescriptor1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSAppleEventDescriptor1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSAppleEventDescriptor1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSAppleEventDescriptor1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSAppleEventDescriptor1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSAppleEventDescriptor1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSAppleEventDescriptor1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSAppleEventDescriptor1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSAppleEventDescriptor1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +@ffi.Packed(2) +final class AEDesc extends ffi.Struct { + @ffi.UnsignedInt() + external int descriptorType; + + external ffi.Pointer> dataHandle; +} + +final class OpaqueAEDataStorageType extends ffi.Opaque {} + +abstract class NSAppleEventSendOptions { + static const int NSAppleEventSendNoReply = 1; + static const int NSAppleEventSendQueueReply = 2; + static const int NSAppleEventSendWaitForReply = 3; + static const int NSAppleEventSendNeverInteract = 16; + static const int NSAppleEventSendCanInteract = 32; + static const int NSAppleEventSendAlwaysInteract = 48; + static const int NSAppleEventSendCanSwitchLayer = 64; + static const int NSAppleEventSendDontRecord = 4096; + static const int NSAppleEventSendDontExecute = 8192; + static const int NSAppleEventSendDontAnnotate = 65536; + static const int NSAppleEventSendDefaultOptions = 35; +} + +class NSScriptClassDescription extends NSClassDescription { + NSScriptClassDescription._( + ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSScriptClassDescription] that points to the same underlying object as [other]. + static NSScriptClassDescription castFrom(T other) { + return NSScriptClassDescription._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSScriptClassDescription] that wraps the given raw object pointer. + static NSScriptClassDescription castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSScriptClassDescription._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSScriptClassDescription]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSScriptClassDescription1); + } + + static NSScriptClassDescription? classDescriptionForClass_( + ThermionDartTexture1 _lib, NSObject aClass) { + final _ret = _lib._objc_msgSend_625(_lib._class_NSScriptClassDescription1, + _lib._sel_classDescriptionForClass_1, aClass._id); + return _ret.address == 0 + ? null + : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + } + + NSScriptClassDescription? initWithSuiteName_className_dictionary_( + NSString suiteName, NSString className, NSDictionary? classDeclaration) { + final _ret = _lib._objc_msgSend_626( + _id, + _lib._sel_initWithSuiteName_className_dictionary_1, + suiteName._id, + className._id, + classDeclaration?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + } + + NSString? get suiteName { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_suiteName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get className { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_className1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get implementationClassName { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_implementationClassName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSScriptClassDescription? get superclassDescription { + final _ret = _lib._objc_msgSend_627(_id, _lib._sel_superclassDescription1); + return _ret.address == 0 + ? null + : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + } + + int get appleEventCode { + return _lib._objc_msgSend_213(_id, _lib._sel_appleEventCode1); + } + + bool matchesAppleEventCode_(int appleEventCode) { + return _lib._objc_msgSend_193( + _id, _lib._sel_matchesAppleEventCode_1, appleEventCode); + } + + bool supportsCommand_(NSScriptCommandDescription commandDescription) { + return _lib._objc_msgSend_640( + _id, _lib._sel_supportsCommand_1, commandDescription._id); + } + + ffi.Pointer selectorForCommand_( + NSScriptCommandDescription commandDescription) { + return _lib._objc_msgSend_641( + _id, _lib._sel_selectorForCommand_1, commandDescription._id); + } + + NSString? typeForKey_(NSString key) { + final _ret = _lib._objc_msgSend_185(_id, _lib._sel_typeForKey_1, key._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSScriptClassDescription? classDescriptionForKey_(NSString key) { + final _ret = _lib._objc_msgSend_642( + _id, _lib._sel_classDescriptionForKey_1, key._id); + return _ret.address == 0 + ? null + : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + } + + int appleEventCodeForKey_(NSString key) { + return _lib._objc_msgSend_628( + _id, _lib._sel_appleEventCodeForKey_1, key._id); + } + + NSString? keyWithAppleEventCode_(int appleEventCode) { + final _ret = _lib._objc_msgSend_643( + _id, _lib._sel_keyWithAppleEventCode_1, appleEventCode); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get defaultSubcontainerAttributeKey { + final _ret = + _lib._objc_msgSend_43(_id, _lib._sel_defaultSubcontainerAttributeKey1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + bool isLocationRequiredToCreateForKey_(NSString toManyRelationshipKey) { + return _lib._objc_msgSend_63( + _id, + _lib._sel_isLocationRequiredToCreateForKey_1, + toManyRelationshipKey._id); + } + + bool hasPropertyForKey_(NSString key) { + return _lib._objc_msgSend_63(_id, _lib._sel_hasPropertyForKey_1, key._id); + } + + bool hasOrderedToManyRelationshipForKey_(NSString key) { + return _lib._objc_msgSend_63( + _id, _lib._sel_hasOrderedToManyRelationshipForKey_1, key._id); + } + + bool hasReadablePropertyForKey_(NSString key) { + return _lib._objc_msgSend_63( + _id, _lib._sel_hasReadablePropertyForKey_1, key._id); + } + + bool hasWritablePropertyForKey_(NSString key) { + return _lib._objc_msgSend_63( + _id, _lib._sel_hasWritablePropertyForKey_1, key._id); + } + + bool isReadOnlyKey_(NSString key) { + return _lib._objc_msgSend_63(_id, _lib._sel_isReadOnlyKey_1, key._id); + } + + static void registerClassDescription_forClass_(ThermionDartTexture1 _lib, + NSClassDescription description, NSObject aClass) { + _lib._objc_msgSend_597( + _lib._class_NSScriptClassDescription1, + _lib._sel_registerClassDescription_forClass_1, + description._id, + aClass._id); + } + + static void invalidateClassDescriptionCache(ThermionDartTexture1 _lib) { + _lib._objc_msgSend_1(_lib._class_NSScriptClassDescription1, + _lib._sel_invalidateClassDescriptionCache1); + } + + @override + NSScriptClassDescription init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + } + + static NSScriptClassDescription new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSScriptClassDescription1, _lib._sel_new1); + return NSScriptClassDescription._(_ret, _lib, retain: false, release: true); + } + + static NSScriptClassDescription allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSScriptClassDescription1, _lib._sel_allocWithZone_1, zone); + return NSScriptClassDescription._(_ret, _lib, retain: false, release: true); + } + + static NSScriptClassDescription alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSScriptClassDescription1, _lib._sel_alloc1); + return NSScriptClassDescription._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSScriptClassDescription1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSScriptClassDescription1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSScriptClassDescription1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSScriptClassDescription1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSScriptClassDescription1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSScriptClassDescription1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSScriptClassDescription1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSScriptClassDescription1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSScriptClassDescription1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSScriptCommandDescription extends NSObject { + NSScriptCommandDescription._( + ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSScriptCommandDescription] that points to the same underlying object as [other]. + static NSScriptCommandDescription castFrom(T other) { + return NSScriptCommandDescription._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSScriptCommandDescription] that wraps the given raw object pointer. + static NSScriptCommandDescription castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSScriptCommandDescription._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSScriptCommandDescription]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSScriptCommandDescription1); + } + + @override + NSObject init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSScriptCommandDescription? initWithSuiteName_commandName_dictionary_( + NSString suiteName, + NSString commandName, + NSDictionary? commandDeclaration) { + final _ret = _lib._objc_msgSend_626( + _id, + _lib._sel_initWithSuiteName_commandName_dictionary_1, + suiteName._id, + commandName._id, + commandDeclaration?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSScriptCommandDescription._(_ret, _lib, retain: true, release: true); + } + + NSScriptCommandDescription? initWithCoder_(NSCoder inCoder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, inCoder._id); + return _ret.address == 0 + ? null + : NSScriptCommandDescription._(_ret, _lib, retain: true, release: true); + } + + NSString get suiteName { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_suiteName1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get commandName { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_commandName1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + int get appleEventClassCode { + return _lib._objc_msgSend_213(_id, _lib._sel_appleEventClassCode1); + } + + int get appleEventCode { + return _lib._objc_msgSend_213(_id, _lib._sel_appleEventCode1); + } + + NSString get commandClassName { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_commandClassName1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get returnType { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_returnType1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + int get appleEventCodeForReturnType { + return _lib._objc_msgSend_213(_id, _lib._sel_appleEventCodeForReturnType1); + } + + NSArray get argumentNames { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_argumentNames1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? typeForArgumentWithName_(NSString argumentName) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_typeForArgumentWithName_1, argumentName._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + int appleEventCodeForArgumentWithName_(NSString argumentName) { + return _lib._objc_msgSend_628( + _id, _lib._sel_appleEventCodeForArgumentWithName_1, argumentName._id); + } + + bool isOptionalArgumentWithName_(NSString argumentName) { + return _lib._objc_msgSend_63( + _id, _lib._sel_isOptionalArgumentWithName_1, argumentName._id); + } + + NSScriptCommand createCommandInstance() { + final _ret = _lib._objc_msgSend_638(_id, _lib._sel_createCommandInstance1); + return NSScriptCommand._(_ret, _lib, retain: true, release: true); + } + + NSScriptCommand createCommandInstanceWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_639( + _id, _lib._sel_createCommandInstanceWithZone_1, zone); + return NSScriptCommand._(_ret, _lib, retain: true, release: true); + } + + static NSScriptCommandDescription new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSScriptCommandDescription1, _lib._sel_new1); + return NSScriptCommandDescription._(_ret, _lib, + retain: false, release: true); + } + + static NSScriptCommandDescription allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3(_lib._class_NSScriptCommandDescription1, + _lib._sel_allocWithZone_1, zone); + return NSScriptCommandDescription._(_ret, _lib, + retain: false, release: true); + } + + static NSScriptCommandDescription alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSScriptCommandDescription1, _lib._sel_alloc1); + return NSScriptCommandDescription._(_ret, _lib, + retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSScriptCommandDescription1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSScriptCommandDescription1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSScriptCommandDescription1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSScriptCommandDescription1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSScriptCommandDescription1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSScriptCommandDescription1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSScriptCommandDescription1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSScriptCommandDescription1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSScriptCommandDescription1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSScriptCommand extends NSObject { + NSScriptCommand._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSScriptCommand] that points to the same underlying object as [other]. + static NSScriptCommand castFrom(T other) { + return NSScriptCommand._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSScriptCommand] that wraps the given raw object pointer. + static NSScriptCommand castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSScriptCommand._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSScriptCommand]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSScriptCommand1); + } + + NSScriptCommand initWithCommandDescription_( + NSScriptCommandDescription commandDef) { + final _ret = _lib._objc_msgSend_629( + _id, _lib._sel_initWithCommandDescription_1, commandDef._id); + return NSScriptCommand._(_ret, _lib, retain: true, release: true); + } + + NSScriptCommand? initWithCoder_(NSCoder inCoder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, inCoder._id); + return _ret.address == 0 + ? null + : NSScriptCommand._(_ret, _lib, retain: true, release: true); + } + + NSScriptCommandDescription get commandDescription { + final _ret = _lib._objc_msgSend_630(_id, _lib._sel_commandDescription1); + return NSScriptCommandDescription._(_ret, _lib, + retain: true, release: true); + } + + NSObject? get directParameter { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_directParameter1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set directParameter(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setDirectParameter_1, value?._id ?? ffi.nullptr); + } + + NSScriptObjectSpecifier? get receiversSpecifier { + final _ret = _lib._objc_msgSend_631(_id, _lib._sel_receiversSpecifier1); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + } + + set receiversSpecifier(NSScriptObjectSpecifier? value) { + return _lib._objc_msgSend_632( + _id, _lib._sel_setReceiversSpecifier_1, value?._id ?? ffi.nullptr); + } + + NSObject? get evaluatedReceivers { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_evaluatedReceivers1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get arguments { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_arguments1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set arguments(NSDictionary? value) { + return _lib._objc_msgSend_633( + _id, _lib._sel_setArguments_1, value?._id ?? ffi.nullptr); + } + + NSDictionary? get evaluatedArguments { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_evaluatedArguments1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + bool get wellFormed { + return _lib._objc_msgSend_12(_id, _lib._sel_isWellFormed1); + } + + NSObject? performDefaultImplementation() { + final _ret = + _lib._objc_msgSend_17(_id, _lib._sel_performDefaultImplementation1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? executeCommand() { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_executeCommand1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + int get scriptErrorNumber { + return _lib._objc_msgSend_82(_id, _lib._sel_scriptErrorNumber1); + } + + set scriptErrorNumber(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setScriptErrorNumber_1, value); + } + + NSAppleEventDescriptor? get scriptErrorOffendingObjectDescriptor { + final _ret = _lib._objc_msgSend_635( + _id, _lib._sel_scriptErrorOffendingObjectDescriptor1); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + set scriptErrorOffendingObjectDescriptor(NSAppleEventDescriptor? value) { + return _lib._objc_msgSend_636( + _id, + _lib._sel_setScriptErrorOffendingObjectDescriptor_1, + value?._id ?? ffi.nullptr); + } + + NSAppleEventDescriptor? get scriptErrorExpectedTypeDescriptor { + final _ret = _lib._objc_msgSend_635( + _id, _lib._sel_scriptErrorExpectedTypeDescriptor1); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + set scriptErrorExpectedTypeDescriptor(NSAppleEventDescriptor? value) { + return _lib._objc_msgSend_636( + _id, + _lib._sel_setScriptErrorExpectedTypeDescriptor_1, + value?._id ?? ffi.nullptr); + } + + NSString? get scriptErrorString { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_scriptErrorString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set scriptErrorString(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setScriptErrorString_1, value?._id ?? ffi.nullptr); + } + + static NSScriptCommand? currentCommand(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_637( + _lib._class_NSScriptCommand1, _lib._sel_currentCommand1); + return _ret.address == 0 + ? null + : NSScriptCommand._(_ret, _lib, retain: true, release: true); + } + + NSAppleEventDescriptor? get appleEvent { + final _ret = _lib._objc_msgSend_635(_id, _lib._sel_appleEvent1); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + } + + void suspendExecution() { + _lib._objc_msgSend_1(_id, _lib._sel_suspendExecution1); + } + + void resumeExecutionWithResult_(NSObject? result) { + _lib._objc_msgSend_288( + _id, _lib._sel_resumeExecutionWithResult_1, result?._id ?? ffi.nullptr); + } + + @override + NSScriptCommand init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSScriptCommand._(_ret, _lib, retain: true, release: true); + } + + static NSScriptCommand new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSScriptCommand1, _lib._sel_new1); + return NSScriptCommand._(_ret, _lib, retain: false, release: true); + } + + static NSScriptCommand allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSScriptCommand1, _lib._sel_allocWithZone_1, zone); + return NSScriptCommand._(_ret, _lib, retain: false, release: true); + } + + static NSScriptCommand alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSScriptCommand1, _lib._sel_alloc1); + return NSScriptCommand._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSScriptCommand1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSScriptCommand1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSScriptCommand1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSScriptCommand1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSScriptCommand1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSScriptCommand1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSScriptCommand1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSScriptCommand1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSScriptCommand1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSItemProvider extends NSObject { + NSItemProvider._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSItemProvider] that points to the same underlying object as [other]. + static NSItemProvider castFrom(T other) { + return NSItemProvider._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSItemProvider] that wraps the given raw object pointer. + static NSItemProvider castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSItemProvider._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSItemProvider]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSItemProvider1); + } + + @override + NSItemProvider init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } + + void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( + NSString typeIdentifier, + int visibility, + ObjCBlock_NSProgress_ffiVoidNSDataNSError loadHandler) { + _lib._objc_msgSend_672( + _id, + _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, + typeIdentifier._id, + visibility, + loadHandler._id); + } + + void + registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( + NSString typeIdentifier, + int fileOptions, + int visibility, + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError loadHandler) { + _lib._objc_msgSend_673( + _id, + _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, + typeIdentifier._id, + fileOptions, + visibility, + loadHandler._id); + } + + NSArray get registeredTypeIdentifiers { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_registeredTypeIdentifiers1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { + final _ret = _lib._objc_msgSend_674( + _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + bool hasItemConformingToTypeIdentifier_(NSString typeIdentifier) { + return _lib._objc_msgSend_63( + _id, _lib._sel_hasItemConformingToTypeIdentifier_1, typeIdentifier._id); + } + + bool hasRepresentationConformingToTypeIdentifier_fileOptions_( + NSString typeIdentifier, int fileOptions) { + return _lib._objc_msgSend_675( + _id, + _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, + typeIdentifier._id, + fileOptions); + } + + NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( + NSString typeIdentifier, + ObjCBlock_ffiVoid_NSData_NSError completionHandler) { + final _ret = _lib._objc_msgSend_676( + _id, + _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier._id, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( + NSString typeIdentifier, + ObjCBlock_ffiVoid_NSURL_NSError completionHandler) { + final _ret = _lib._objc_msgSend_677( + _id, + _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier._id, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( + NSString typeIdentifier, + ObjCBlock_ffiVoid_NSURL_bool_NSError completionHandler) { + final _ret = _lib._objc_msgSend_678( + _id, + _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier._id, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + NSString? get suggestedName { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_suggestedName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set suggestedName(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); + } + + NSItemProvider initWithObject_(NSObject object) { + final _ret = + _lib._objc_msgSend_123(_id, _lib._sel_initWithObject_1, object._id); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } + + void registerObject_visibility_(NSObject object, int visibility) { + _lib._objc_msgSend_679( + _id, _lib._sel_registerObject_visibility_1, object._id, visibility); + } + + void registerObjectOfClass_visibility_loadHandler_( + NSObject aClass, + int visibility, + ObjCBlock_NSProgress_ffiVoidObjCObjectNSError loadHandler) { + _lib._objc_msgSend_680( + _id, + _lib._sel_registerObjectOfClass_visibility_loadHandler_1, + aClass._id, + visibility, + loadHandler._id); + } + + bool canLoadObjectOfClass_(NSObject aClass) { + return _lib._objc_msgSend_0( + _id, _lib._sel_canLoadObjectOfClass_1, aClass._id); + } + + NSProgress loadObjectOfClass_completionHandler_( + NSObject aClass, ObjCBlock_ffiVoid_ObjCObject_NSError completionHandler) { + final _ret = _lib._objc_msgSend_681( + _id, + _lib._sel_loadObjectOfClass_completionHandler_1, + aClass._id, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + NSItemProvider initWithItem_typeIdentifier_( + NSObject? item, NSString? typeIdentifier) { + final _ret = _lib._objc_msgSend_682( + _id, + _lib._sel_initWithItem_typeIdentifier_1, + item?._id ?? ffi.nullptr, + typeIdentifier?._id ?? ffi.nullptr); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } + + NSItemProvider? initWithContentsOfURL_(NSURL fileURL) { + final _ret = _lib._objc_msgSend_276( + _id, _lib._sel_initWithContentsOfURL_1, fileURL._id); + return _ret.address == 0 + ? null + : NSItemProvider._(_ret, _lib, retain: true, release: true); + } + + void registerItemForTypeIdentifier_loadHandler_( + NSString typeIdentifier, + ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary + loadHandler) { + _lib._objc_msgSend_683( + _id, + _lib._sel_registerItemForTypeIdentifier_loadHandler_1, + typeIdentifier._id, + loadHandler._id); + } + + void loadItemForTypeIdentifier_options_completionHandler_( + NSString typeIdentifier, + NSDictionary? options, + ObjCBlock_ffiVoid_ObjCObject_NSError1? completionHandler) { + _lib._objc_msgSend_684( + _id, + _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, + typeIdentifier._id, + options?._id ?? ffi.nullptr, + completionHandler?._id ?? ffi.nullptr); + } + + ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary? + get previewImageHandler { + final _ret = _lib._objc_msgSend_685(_id, _lib._sel_previewImageHandler1); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary._( + _ret, _lib, + retain: true, release: true); + } + + set previewImageHandler( + ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary? + value) { + return _lib._objc_msgSend_686( + _id, _lib._sel_setPreviewImageHandler_1, value?._id ?? ffi.nullptr); + } + + void loadPreviewImageWithOptions_completionHandler_(NSDictionary options, + ObjCBlock_ffiVoid_ObjCObject_NSError1 completionHandler) { + _lib._objc_msgSend_687( + _id, + _lib._sel_loadPreviewImageWithOptions_completionHandler_1, + options._id, + completionHandler._id); + } + + static NSItemProvider new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_new1); + return NSItemProvider._(_ret, _lib, retain: false, release: true); + } + + static NSItemProvider allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSItemProvider1, _lib._sel_allocWithZone_1, zone); + return NSItemProvider._(_ret, _lib, retain: false, release: true); + } + + static NSItemProvider alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_alloc1); + return NSItemProvider._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSItemProvider1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSItemProvider1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSItemProvider1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSItemProvider1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSItemProvider1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSItemProvider1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSItemProvider1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSItemProvider1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSItemProvider1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSItemProviderRepresentationVisibility { + static const int NSItemProviderRepresentationVisibilityAll = 0; + static const int NSItemProviderRepresentationVisibilityTeam = 1; + static const int NSItemProviderRepresentationVisibilityGroup = 2; + static const int NSItemProviderRepresentationVisibilityOwnProcess = 3; +} + +ffi.Pointer< + ObjCObject> _ObjCBlock_NSProgress_ffiVoidNSDataNSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock>)>()(arg0); +final _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry = + Function(ffi.Pointer<_ObjCBlock>)>{}; +int _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure( + ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { + final id = ++_ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex; + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[ + block.ref.target.address]!(arg0); + +class ObjCBlock_NSProgress_ffiVoidNSDataNSError extends _ObjCBlockBase { + ObjCBlock_NSProgress_ffiVoidNSDataNSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidNSDataNSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi + .NativeFunction< + ffi.Pointer< + ObjCObject> + Function(ffi.Pointer<_ObjCBlock> arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidNSDataNSError.fromFunction( + ThermionDartTexture1 lib, + NSProgress? Function(ObjCBlock_ffiVoid_NSData_NSError) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline) + .cast(), + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure((ffi + .Pointer<_ObjCBlock> + arg0) => + fn(ObjCBlock_ffiVoid_NSData_NSError._(arg0, lib, retain: true, release: true)) + ?._retainAndReturnId() ?? + ffi.nullptr)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + NSProgress? call(ObjCBlock_ffiVoid_NSData_NSError arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() + (_id, arg0._id) + .address == + 0 + ? null + : NSProgress._( + _id.ref.invoke + .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), + _lib, + retain: false, + release: true); +} + +class NSProgress extends NSObject { + NSProgress._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSProgress] that points to the same underlying object as [other]. + static NSProgress castFrom(T other) { + return NSProgress._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSProgress] that wraps the given raw object pointer. + static NSProgress castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSProgress._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSProgress]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); + } + + static NSProgress? currentProgress(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_658( + _lib._class_NSProgress1, _lib._sel_currentProgress1); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); + } + + static NSProgress progressWithTotalUnitCount_( + ThermionDartTexture1 _lib, int unitCount) { + final _ret = _lib._objc_msgSend_659(_lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + static NSProgress discreteProgressWithTotalUnitCount_( + ThermionDartTexture1 _lib, int unitCount) { + final _ret = _lib._objc_msgSend_659(_lib._class_NSProgress1, + _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( + ThermionDartTexture1 _lib, + int unitCount, + NSProgress parent, + int portionOfParentTotalUnitCount) { + final _ret = _lib._objc_msgSend_660( + _lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, + unitCount, + parent._id, + portionOfParentTotalUnitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + NSProgress initWithParent_userInfo_( + NSProgress? parentProgressOrNil, NSObject? userInfoOrNil) { + final _ret = _lib._objc_msgSend_661( + _id, + _lib._sel_initWithParent_userInfo_1, + parentProgressOrNil?._id ?? ffi.nullptr, + userInfoOrNil?._id ?? ffi.nullptr); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + void becomeCurrentWithPendingUnitCount_(int unitCount) { + _lib._objc_msgSend_662( + _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + } + + void performAsCurrentWithPendingUnitCount_usingBlock_( + int unitCount, ObjCBlock_ffiVoid work) { + _lib._objc_msgSend_663( + _id, + _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, + unitCount, + work._id); + } + + void resignCurrent() { + _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + } + + void addChild_withPendingUnitCount_(NSProgress child, int inUnitCount) { + _lib._objc_msgSend_664( + _id, _lib._sel_addChild_withPendingUnitCount_1, child._id, inUnitCount); + } + + int get totalUnitCount { + return _lib._objc_msgSend_665(_id, _lib._sel_totalUnitCount1); + } + + set totalUnitCount(int value) { + return _lib._objc_msgSend_666(_id, _lib._sel_setTotalUnitCount_1, value); + } + + int get completedUnitCount { + return _lib._objc_msgSend_665(_id, _lib._sel_completedUnitCount1); + } + + set completedUnitCount(int value) { + return _lib._objc_msgSend_666( + _id, _lib._sel_setCompletedUnitCount_1, value); + } + + NSString get localizedDescription { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_localizedDescription1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set localizedDescription(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setLocalizedDescription_1, value._id); + } + + NSString get localizedAdditionalDescription { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_localizedAdditionalDescription1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set localizedAdditionalDescription(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setLocalizedAdditionalDescription_1, value._id); + } + + bool get cancellable { + return _lib._objc_msgSend_12(_id, _lib._sel_isCancellable1); + } + + set cancellable(bool value) { + return _lib._objc_msgSend_526(_id, _lib._sel_setCancellable_1, value); + } + + bool get pausable { + return _lib._objc_msgSend_12(_id, _lib._sel_isPausable1); + } + + set pausable(bool value) { + return _lib._objc_msgSend_526(_id, _lib._sel_setPausable_1, value); + } + + bool get cancelled { + return _lib._objc_msgSend_12(_id, _lib._sel_isCancelled1); + } + + bool get paused { + return _lib._objc_msgSend_12(_id, _lib._sel_isPaused1); + } + + ObjCBlock_ffiVoid? get cancellationHandler { + final _ret = _lib._objc_msgSend_667(_id, _lib._sel_cancellationHandler1); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + } + + set cancellationHandler(ObjCBlock_ffiVoid? value) { + return _lib._objc_msgSend_668( + _id, _lib._sel_setCancellationHandler_1, value?._id ?? ffi.nullptr); + } + + ObjCBlock_ffiVoid? get pausingHandler { + final _ret = _lib._objc_msgSend_667(_id, _lib._sel_pausingHandler1); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + } + + set pausingHandler(ObjCBlock_ffiVoid? value) { + return _lib._objc_msgSend_668( + _id, _lib._sel_setPausingHandler_1, value?._id ?? ffi.nullptr); + } + + ObjCBlock_ffiVoid? get resumingHandler { + final _ret = _lib._objc_msgSend_667(_id, _lib._sel_resumingHandler1); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + } + + set resumingHandler(ObjCBlock_ffiVoid? value) { + return _lib._objc_msgSend_668( + _id, _lib._sel_setResumingHandler_1, value?._id ?? ffi.nullptr); + } + + void setUserInfoObject_forKey_(NSObject? objectOrNil, NSString key) { + _lib._objc_msgSend_134(_id, _lib._sel_setUserInfoObject_forKey_1, + objectOrNil?._id ?? ffi.nullptr, key._id); + } + + bool get indeterminate { + return _lib._objc_msgSend_12(_id, _lib._sel_isIndeterminate1); + } + + double get fractionCompleted { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_fractionCompleted1) + : _lib._objc_msgSend_164(_id, _lib._sel_fractionCompleted1); + } + + bool get finished { + return _lib._objc_msgSend_12(_id, _lib._sel_isFinished1); + } + + void cancel() { + _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + void pause() { + _lib._objc_msgSend_1(_id, _lib._sel_pause1); + } + + void resume() { + _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } + + NSObject get userInfo { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_userInfo1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSString? get kind { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_kind1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set kind(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setKind_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get estimatedTimeRemaining { + final _ret = _lib._objc_msgSend_214(_id, _lib._sel_estimatedTimeRemaining1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set estimatedTimeRemaining(NSNumber? value) { + return _lib._objc_msgSend_669( + _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get throughput { + final _ret = _lib._objc_msgSend_214(_id, _lib._sel_throughput1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set throughput(NSNumber? value) { + return _lib._objc_msgSend_669( + _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); + } + + NSString? get fileOperationKind { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_fileOperationKind1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set fileOperationKind(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setFileOperationKind_1, value?._id ?? ffi.nullptr); + } + + NSURL? get fileURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_fileURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + set fileURL(NSURL? value) { + return _lib._objc_msgSend_670( + _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get fileTotalCount { + final _ret = _lib._objc_msgSend_214(_id, _lib._sel_fileTotalCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set fileTotalCount(NSNumber? value) { + return _lib._objc_msgSend_669( + _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get fileCompletedCount { + final _ret = _lib._objc_msgSend_214(_id, _lib._sel_fileCompletedCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set fileCompletedCount(NSNumber? value) { + return _lib._objc_msgSend_669( + _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); + } + + void publish() { + _lib._objc_msgSend_1(_id, _lib._sel_publish1); + } + + void unpublish() { + _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); + } + + static NSObject addSubscriberForFileURL_withPublishingHandler_( + ThermionDartTexture1 _lib, + NSURL url, + ObjCBlock_ffiVoid_NSProgress publishingHandler) { + final _ret = _lib._objc_msgSend_671( + _lib._class_NSProgress1, + _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, + url._id, + publishingHandler._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static void removeSubscriber_( + ThermionDartTexture1 _lib, NSObject subscriber) { + _lib._objc_msgSend_15( + _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + } + + bool get old { + return _lib._objc_msgSend_12(_id, _lib._sel_isOld1); + } + + @override + NSProgress init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + static NSProgress new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } + + static NSProgress allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSProgress1, _lib._sel_allocWithZone_1, zone); + return NSProgress._(_ret, _lib, retain: false, release: true); + } + + static NSProgress alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSProgress1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSProgress1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSProgress1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSProgress1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSProgress1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSProgress1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSProgress1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSProgress1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSProgress1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +ffi.Pointer<_ObjCBlock> _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer<_ObjCBlock> Function(ffi.Pointer)>()(arg0); +final _ObjCBlock_ffiVoid_NSProgress_closureRegistry = + Function(ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSProgress_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_registerClosure( + ffi.Pointer<_ObjCBlock> Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSProgress_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSProgress_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer<_ObjCBlock> _ObjCBlock_ffiVoid_NSProgress_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSProgress_closureRegistry[block.ref.target.address]!( + arg0); + +class ObjCBlock_ffiVoid_NSProgress extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSProgress._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSProgress.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSProgress.fromFunction( + ThermionDartTexture1 lib, ObjCBlock_ffiVoid? Function(NSProgress) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSProgress_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSProgress_registerClosure( + (ffi.Pointer arg0) => + fn(NSProgress._(arg0, lib, retain: true, release: true)) + ?._retainAndReturnId() ?? + ffi.nullptr)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + ObjCBlock_ffiVoid? call(NSProgress arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>() + (_id, arg0._id) + .address == + 0 + ? null + : ObjCBlock_ffiVoid._( + _id.ref.invoke + .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>()(_id, arg0._id), + _lib, + retain: false, + release: true); +} + +void _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_NSData_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSData_NSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_NSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_NSError.fromFunction( + ThermionDartTexture1 lib, void Function(NSData?, NSError?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSData._(arg0, lib, retain: true, release: true), + arg1.address == 0 + ? null + : NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSData_NSError.listener( + ThermionDartTexture1 lib, void Function(NSData?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSData._(arg0, lib, retain: true, release: true), + arg1.address == 0 + ? null + : NSError._(arg1, lib, + retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSData? arg0, NSError? arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); +} + +abstract class NSItemProviderFileOptions { + static const int NSItemProviderFileOptionOpenInPlace = 1; +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock>)>()(arg0); +final _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry = + Function(ffi.Pointer<_ObjCBlock>)>{}; +int _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( + ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { + final id = + ++_ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex; + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[ + block.ref.target.address]!(arg0); + +class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError extends _ObjCBlockBase { + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError.fromFunction( + ThermionDartTexture1 lib, + NSProgress? Function(ObjCBlock_ffiVoid_NSURL_bool_NSError) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline) + .cast(), + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( + (ffi.Pointer<_ObjCBlock> arg0) => + fn(ObjCBlock_ffiVoid_NSURL_bool_NSError._(arg0, lib, retain: true, release: true)) + ?._retainAndReturnId() ?? + ffi.nullptr)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + NSProgress? call(ObjCBlock_ffiVoid_NSURL_bool_NSError arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() + (_id, arg0._id) + .address == + 0 + ? null + : NSProgress._( + _id.ref.invoke + .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), + _lib, + retain: false, + release: true); +} + +void _ObjCBlock_ffiVoid_NSURL_bool_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( + void Function(ffi.Pointer, bool, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSURL_bool_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSURL_bool_NSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_bool_NSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_bool_NSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_bool_NSError.fromFunction( + ThermionDartTexture1 lib, void Function(NSURL?, bool, NSError?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Bool, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( + arg0.address == 0 + ? null + : NSURL._(arg0, lib, retain: true, release: true), + arg1, + arg2.address == 0 + ? null + : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURL_bool_NSError.listener( + ThermionDartTexture1 lib, void Function(NSURL?, bool, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Bool, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( + arg0.address == 0 + ? null + : NSURL._(arg0, lib, retain: true, release: true), + arg1, + arg2.address == 0 + ? null + : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURL? arg0, bool arg1, NSError? arg2) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + bool, ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1, arg2?._id ?? ffi.nullptr); +} + +void _ObjCBlock_ffiVoid_NSURL_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[block.ref.target.address]!( + arg0, arg1); + +class ObjCBlock_ffiVoid_NSURL_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSURL_NSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_NSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_NSError.fromFunction( + ThermionDartTexture1 lib, void Function(NSURL?, NSError?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURL._(arg0, lib, retain: true, release: true), + arg1.address == 0 + ? null + : NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURL_NSError.listener( + ThermionDartTexture1 lib, void Function(NSURL?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURL._(arg0, lib, retain: true, release: true), + arg1.address == 0 + ? null + : NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURL? arg0, NSError? arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock>)>()(arg0); +final _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry = + Function(ffi.Pointer<_ObjCBlock>)>{}; +int _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_registerClosure( + ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { + final id = + ++_ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistryIndex; + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry[ + block.ref.target.address]!(arg0); + +class ObjCBlock_NSProgress_ffiVoidObjCObjectNSError extends _ObjCBlockBase { + ObjCBlock_NSProgress_ffiVoidObjCObjectNSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidObjCObjectNSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidObjCObjectNSError.fromFunction( + ThermionDartTexture1 lib, + NSProgress? Function(ObjCBlock_ffiVoid_ObjCObject_NSError) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureTrampoline) + .cast(), + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_registerClosure( + (ffi.Pointer<_ObjCBlock> arg0) => + fn(ObjCBlock_ffiVoid_ObjCObject_NSError._(arg0, lib, retain: true, release: true)) + ?._retainAndReturnId() ?? + ffi.nullptr)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + NSProgress? call(ObjCBlock_ffiVoid_ObjCObject_NSError arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() + (_id, arg0._id) + .address == + 0 + ? null + : NSProgress._( + _id.ref.invoke + .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), + _lib, + retain: false, + release: true); +} + +void _ObjCBlock_ffiVoid_ObjCObject_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_ObjCObject_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ObjCObject_NSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_NSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_NSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_NSError.fromFunction( + ThermionDartTexture1 lib, void Function(NSObject?, NSError?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ObjCObject_NSError.listener( + ThermionDartTexture1 lib, void Function(NSObject?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi + .NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSObject._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject? arg0, NSError? arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); +} + +void + _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistry = + , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_registerClosure( + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistry[ + id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary + extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary.fromFunction( + ThermionDartTexture1 lib, + void Function(ObjCBlock_ffiVoid_ObjCObject_NSError1, NSObject, NSDictionary) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_registerClosure( + (ffi.Pointer<_ObjCBlock> arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + ObjCBlock_ffiVoid_ObjCObject_NSError1._(arg0, lib, retain: true, release: true), + NSObject._(arg1, lib, retain: true, release: true), + NSDictionary._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary.listener( + ThermionDartTexture1 lib, + void Function(ObjCBlock_ffiVoid_ObjCObject_NSError1, NSObject, NSDictionary) + fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_registerClosure( + (ffi.Pointer<_ObjCBlock> arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + ObjCBlock_ffiVoid_ObjCObject_NSError1._(arg0, lib, retain: true, release: true), + NSObject._(arg1, lib, retain: true, release: true), + NSDictionary._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(ObjCBlock_ffiVoid_ObjCObject_NSError1 arg0, NSObject arg1, + NSDictionary arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>()( + _id, arg0._id, arg1._id, arg2._id); +} + +void _ObjCBlock_ffiVoid_ObjCObject_NSError1_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistryIndex; + _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_ObjCObject_NSError1 extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ObjCObject_NSError1._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_NSError1.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_NSError1_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_NSError1.fromFunction( + ThermionDartTexture1 lib, void Function(NSObject?, NSError) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), + NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ObjCObject_NSError1.listener( + ThermionDartTexture1 lib, void Function(NSObject?, NSError) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi + .NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSObject._(arg0, lib, retain: true, release: true), + NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject? arg0, NSError arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1._id); +} + +class NSMutableString extends NSString { + NSMutableString._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableString] that points to the same underlying object as [other]. + static NSMutableString castFrom(T other) { + return NSMutableString._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableString] that wraps the given raw object pointer. + static NSMutableString castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableString._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableString1); + } + + void replaceCharactersInRange_withString_(_NSRange range, NSString aString) { + _lib._objc_msgSend_688(_id, _lib._sel_replaceCharactersInRange_withString_1, + range, aString._id); + } + + void insertString_atIndex_(NSString aString, int loc) { + _lib._objc_msgSend_689( + _id, _lib._sel_insertString_atIndex_1, aString._id, loc); + } + + void deleteCharactersInRange_(_NSRange range) { + _lib._objc_msgSend_475(_id, _lib._sel_deleteCharactersInRange_1, range); + } + + void appendString_(NSString aString) { + _lib._objc_msgSend_247(_id, _lib._sel_appendString_1, aString._id); + } + + void appendFormat_(NSString format) { + _lib._objc_msgSend_247(_id, _lib._sel_appendFormat_1, format._id); + } + + void setString_(NSString aString) { + _lib._objc_msgSend_247(_id, _lib._sel_setString_1, aString._id); + } + + int replaceOccurrencesOfString_withString_options_range_(NSString target, + NSString replacement, int options, _NSRange searchRange) { + return _lib._objc_msgSend_690( + _id, + _lib._sel_replaceOccurrencesOfString_withString_options_range_1, + target._id, + replacement._id, + options, + searchRange); + } + + bool applyTransform_reverse_range_updatedRange_(NSString transform, + bool reverse, _NSRange range, ffi.Pointer<_NSRange> resultingRange) { + return _lib._objc_msgSend_691( + _id, + _lib._sel_applyTransform_reverse_range_updatedRange_1, + transform._id, + reverse, + range, + resultingRange); + } + + NSMutableString initWithCapacity_(int capacity) { + final _ret = + _lib._objc_msgSend_692(_id, _lib._sel_initWithCapacity_1, capacity); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithCapacity_( + ThermionDartTexture1 _lib, int capacity) { + final _ret = _lib._objc_msgSend_692( + _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static ffi.Pointer getAvailableStringEncodings( + ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_356( + _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); + } + + static NSString localizedNameOfStringEncoding_( + ThermionDartTexture1 _lib, int encoding) { + final _ret = _lib._objc_msgSend_331(_lib._class_NSMutableString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static int getDefaultCStringEncoding(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_10( + _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); + } + + @override + NSMutableString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, int length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_368( + _id, + _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, + characters, + length, + freeBuffer); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, + int len, + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { + final _ret = _lib._objc_msgSend_369( + _id, + _lib._sel_initWithCharactersNoCopy_length_deallocator_1, + chars, + len, + deallocator?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableString initWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_370( + _id, _lib._sel_initWithCharacters_length_1, characters, length); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithUTF8String_( + ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_371( + _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString initWithString_(NSString aString) { + final _ret = + _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, aString._id); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_(NSString format) { + final _ret = + _lib._objc_msgSend_31(_id, _lib._sel_initWithFormat_1, format._id); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_arguments_( + NSString format, ffi.Pointer argList) { + final _ret = _lib._objc_msgSend_372( + _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_locale_(NSString format, NSObject? locale) { + final _ret = _lib._objc_msgSend_373(_id, _lib._sel_initWithFormat_locale_1, + format._id, locale?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_locale_arguments_( + NSString format, NSObject? locale, ffi.Pointer argList) { + final _ret = _lib._objc_msgSend_374( + _id, + _lib._sel_initWithFormat_locale_arguments_1, + format._id, + locale?._id ?? ffi.nullptr, + argList); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_375( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, + format._id, + validFormatSpecifiers._id, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_376( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, + format._id, + validFormatSpecifiers._id, + locale?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? + initWithValidatedFormat_validFormatSpecifiers_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_377( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, + format._id, + validFormatSpecifiers._id, + argList, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? + initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_378( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, + format._id, + validFormatSpecifiers._id, + locale?._id ?? ffi.nullptr, + argList, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithData_encoding_(NSData data, int encoding) { + final _ret = _lib._objc_msgSend_379( + _id, _lib._sel_initWithData_encoding_1, data._id, encoding); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithBytes_length_encoding_( + ffi.Pointer bytes, int len, int encoding) { + final _ret = _lib._objc_msgSend_380( + _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { + final _ret = _lib._objc_msgSend_381( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, + bytes, + len, + encoding, + freeBuffer); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableString? initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + int len, + int encoding, + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { + final _ret = _lib._objc_msgSend_382( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, + bytes, + len, + encoding, + deallocator?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: false, release: true); + } + + static NSMutableString string(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_string1); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSMutableString1, _lib._sel_stringWithString_1, string._id); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithCharacters_length_(ThermionDartTexture1 _lib, + ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_370(_lib._class_NSMutableString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString? stringWithUTF8String_( + ThermionDartTexture1 _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_371(_lib._class_NSMutableString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithFormat_( + ThermionDartTexture1 _lib, NSString format) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSMutableString1, _lib._sel_stringWithFormat_1, format._id); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString localizedStringWithFormat_( + ThermionDartTexture1 _lib, NSString format) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSMutableString1, + _lib._sel_localizedStringWithFormat_1, format._id); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString? + stringWithValidatedFormat_validFormatSpecifiers_error_( + ThermionDartTexture1 _lib, + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_375( + _lib._class_NSMutableString1, + _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, + format._id, + validFormatSpecifiers._id, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString? + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + ThermionDartTexture1 _lib, + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_375( + _lib._class_NSMutableString1, + _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, + format._id, + validFormatSpecifiers._id, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, int encoding) { + final _ret = _lib._objc_msgSend_383(_id, + _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString? stringWithCString_encoding_( + ThermionDartTexture1 _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_383(_lib._class_NSMutableString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfURL_encoding_error_( + NSURL url, int enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_384(_id, + _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfFile_encoding_error_( + NSString path, int enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_385( + _id, + _lib._sel_initWithContentsOfFile_encoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString? stringWithContentsOfURL_encoding_error_( + ThermionDartTexture1 _lib, + NSURL url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_384( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url._id, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString? stringWithContentsOfFile_encoding_error_( + ThermionDartTexture1 _lib, + NSString path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_385( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfURL_usedEncoding_error_( + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_386( + _id, + _lib._sel_initWithContentsOfURL_usedEncoding_error_1, + url._id, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfFile_usedEncoding_error_( + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_387( + _id, + _lib._sel_initWithContentsOfFile_usedEncoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString? stringWithContentsOfURL_usedEncoding_error_( + ThermionDartTexture1 _lib, + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_386( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url._id, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString? stringWithContentsOfFile_usedEncoding_error_( + ThermionDartTexture1 _lib, + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_387( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + ThermionDartTexture1 _lib, + NSData data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_388( + _lib._class_NSMutableString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data._id, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } + + static NSObject? stringWithContentsOfFile_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? stringWithContentsOfURL_( + ThermionDartTexture1 _lib, NSURL url) { + final _ret = _lib._objc_msgSend_276(_lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? stringWithCString_length_( + ThermionDartTexture1 _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_383(_lib._class_NSMutableString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? stringWithCString_( + ThermionDartTexture1 _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_371( + _lib._class_NSMutableString1, _lib._sel_stringWithCString_1, bytes); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSString pathWithComponents_( + ThermionDartTexture1 _lib, NSArray components) { + final _ret = _lib._objc_msgSend_395(_lib._class_NSMutableString1, + _lib._sel_pathWithComponents_1, components._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_new1); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } + + static NSMutableString allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableString1, _lib._sel_allocWithZone_1, zone); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } + + static NSMutableString alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_alloc1); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSMutableString1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSMutableString1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSMutableString1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableString1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSMutableString1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSMutableString1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSMutableString1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSMutableString1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableString1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSNotification extends NSObject { + NSNotification._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNotification] that points to the same underlying object as [other]. + static NSNotification castFrom(T other) { + return NSNotification._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSNotification] that wraps the given raw object pointer. + static NSNotification castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNotification._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNotification]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSNotification1); + } + + NSString get name { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSObject? get object { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_object1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSNotification initWithName_object_userInfo_( + NSString name, NSObject? object, NSDictionary? userInfo) { + final _ret = _lib._objc_msgSend_693( + _id, + _lib._sel_initWithName_object_userInfo_1, + name._id, + object?._id ?? ffi.nullptr, + userInfo?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + NSNotification? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSNotification._(_ret, _lib, retain: true, release: true); + } + + static NSNotification notificationWithName_object_( + ThermionDartTexture1 _lib, NSString aName, NSObject? anObject) { + final _ret = _lib._objc_msgSend_373( + _lib._class_NSNotification1, + _lib._sel_notificationWithName_object_1, + aName._id, + anObject?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + static NSNotification notificationWithName_object_userInfo_( + ThermionDartTexture1 _lib, + NSString aName, + NSObject? anObject, + NSDictionary? aUserInfo) { + final _ret = _lib._objc_msgSend_693( + _lib._class_NSNotification1, + _lib._sel_notificationWithName_object_userInfo_1, + aName._id, + anObject?._id ?? ffi.nullptr, + aUserInfo?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + @override + NSNotification init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + static NSNotification new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_new1); + return NSNotification._(_ret, _lib, retain: false, release: true); + } + + static NSNotification allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSNotification1, _lib._sel_allocWithZone_1, zone); + return NSNotification._(_ret, _lib, retain: false, release: true); + } + + static NSNotification alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); + return NSNotification._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSNotification1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSNotification1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSNotification1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSNotification1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSNotification1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSNotification1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSNotification1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSNotification1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSNotification1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSBundle extends NSObject { + NSBundle._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSBundle] that points to the same underlying object as [other]. + static NSBundle castFrom(T other) { + return NSBundle._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSBundle] that wraps the given raw object pointer. + static NSBundle castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSBundle._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSBundle]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSBundle1); + } + + static NSBundle getMainBundle(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_694(_lib._class_NSBundle1, _lib._sel_mainBundle1); + return NSBundle._(_ret, _lib, retain: true, release: true); + } + + static NSBundle? bundleWithPath_(ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_38( + _lib._class_NSBundle1, _lib._sel_bundleWithPath_1, path._id); + return _ret.address == 0 + ? null + : NSBundle._(_ret, _lib, retain: true, release: true); + } + + NSBundle? initWithPath_(NSString path) { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_initWithPath_1, path._id); + return _ret.address == 0 + ? null + : NSBundle._(_ret, _lib, retain: true, release: true); + } + + static NSBundle? bundleWithURL_(ThermionDartTexture1 _lib, NSURL url) { + final _ret = _lib._objc_msgSend_276( + _lib._class_NSBundle1, _lib._sel_bundleWithURL_1, url._id); + return _ret.address == 0 + ? null + : NSBundle._(_ret, _lib, retain: true, release: true); + } + + NSBundle? initWithURL_(NSURL url) { + final _ret = _lib._objc_msgSend_276(_id, _lib._sel_initWithURL_1, url._id); + return _ret.address == 0 + ? null + : NSBundle._(_ret, _lib, retain: true, release: true); + } + + static NSBundle bundleForClass_(ThermionDartTexture1 _lib, NSObject aClass) { + final _ret = _lib._objc_msgSend_695( + _lib._class_NSBundle1, _lib._sel_bundleForClass_1, aClass._id); + return NSBundle._(_ret, _lib, retain: true, release: true); + } + + static NSBundle? bundleWithIdentifier_( + ThermionDartTexture1 _lib, NSString identifier) { + final _ret = _lib._objc_msgSend_696(_lib._class_NSBundle1, + _lib._sel_bundleWithIdentifier_1, identifier._id); + return _ret.address == 0 + ? null + : NSBundle._(_ret, _lib, retain: true, release: true); + } + + static NSArray getAllBundles(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_84(_lib._class_NSBundle1, _lib._sel_allBundles1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray getAllFrameworks(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_84(_lib._class_NSBundle1, _lib._sel_allFrameworks1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + bool load() { + return _lib._objc_msgSend_12(_id, _lib._sel_load1); + } + + bool get loaded { + return _lib._objc_msgSend_12(_id, _lib._sel_isLoaded1); + } + + bool unload() { + return _lib._objc_msgSend_12(_id, _lib._sel_unload1); + } + + bool preflightAndReturnError_(ffi.Pointer> error) { + return _lib._objc_msgSend_242( + _id, _lib._sel_preflightAndReturnError_1, error); + } + + bool loadAndReturnError_(ffi.Pointer> error) { + return _lib._objc_msgSend_242(_id, _lib._sel_loadAndReturnError_1, error); + } + + NSURL get bundleURL { + final _ret = _lib._objc_msgSend_465(_id, _lib._sel_bundleURL1); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get resourceURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_resourceURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get executableURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_executableURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? URLForAuxiliaryExecutable_(NSString executableName) { + final _ret = _lib._objc_msgSend_256( + _id, _lib._sel_URLForAuxiliaryExecutable_1, executableName._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get privateFrameworksURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_privateFrameworksURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get sharedFrameworksURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_sharedFrameworksURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get sharedSupportURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_sharedSupportURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get builtInPlugInsURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_builtInPlugInsURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get appStoreReceiptURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_appStoreReceiptURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSString get bundlePath { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_bundlePath1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get resourcePath { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_resourcePath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get executablePath { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_executablePath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? pathForAuxiliaryExecutable_(NSString executableName) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_pathForAuxiliaryExecutable_1, executableName._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get privateFrameworksPath { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_privateFrameworksPath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get sharedFrameworksPath { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_sharedFrameworksPath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get sharedSupportPath { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_sharedSupportPath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get builtInPlugInsPath { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_builtInPlugInsPath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSURL? URLForResource_withExtension_subdirectory_inBundleWithURL_( + ThermionDartTexture1 _lib, + NSString? name, + NSString? ext, + NSString? subpath, + NSURL bundleURL) { + final _ret = _lib._objc_msgSend_697( + _lib._class_NSBundle1, + _lib._sel_URLForResource_withExtension_subdirectory_inBundleWithURL_1, + name?._id ?? ffi.nullptr, + ext?._id ?? ffi.nullptr, + subpath?._id ?? ffi.nullptr, + bundleURL._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSArray? URLsForResourcesWithExtension_subdirectory_inBundleWithURL_( + ThermionDartTexture1 _lib, + NSString? ext, + NSString? subpath, + NSURL bundleURL) { + final _ret = _lib._objc_msgSend_698( + _lib._class_NSBundle1, + _lib._sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_1, + ext?._id ?? ffi.nullptr, + subpath?._id ?? ffi.nullptr, + bundleURL._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSURL? URLForResource_withExtension_(NSString? name, NSString? ext) { + final _ret = _lib._objc_msgSend_699( + _id, + _lib._sel_URLForResource_withExtension_1, + name?._id ?? ffi.nullptr, + ext?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? URLForResource_withExtension_subdirectory_( + NSString? name, NSString? ext, NSString? subpath) { + final _ret = _lib._objc_msgSend_700( + _id, + _lib._sel_URLForResource_withExtension_subdirectory_1, + name?._id ?? ffi.nullptr, + ext?._id ?? ffi.nullptr, + subpath?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? URLForResource_withExtension_subdirectory_localization_(NSString? name, + NSString? ext, NSString? subpath, NSString? localizationName) { + final _ret = _lib._objc_msgSend_701( + _id, + _lib._sel_URLForResource_withExtension_subdirectory_localization_1, + name?._id ?? ffi.nullptr, + ext?._id ?? ffi.nullptr, + subpath?._id ?? ffi.nullptr, + localizationName?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSArray? URLsForResourcesWithExtension_subdirectory_( + NSString? ext, NSString? subpath) { + final _ret = _lib._objc_msgSend_702( + _id, + _lib._sel_URLsForResourcesWithExtension_subdirectory_1, + ext?._id ?? ffi.nullptr, + subpath?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray? URLsForResourcesWithExtension_subdirectory_localization_( + NSString? ext, NSString? subpath, NSString? localizationName) { + final _ret = _lib._objc_msgSend_703( + _id, + _lib._sel_URLsForResourcesWithExtension_subdirectory_localization_1, + ext?._id ?? ffi.nullptr, + subpath?._id ?? ffi.nullptr, + localizationName?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSString? pathForResource_ofType_inDirectory_( + ThermionDartTexture1 _lib, + NSString? name, + NSString? ext, + NSString bundlePath) { + final _ret = _lib._objc_msgSend_704( + _lib._class_NSBundle1, + _lib._sel_pathForResource_ofType_inDirectory_1, + name?._id ?? ffi.nullptr, + ext?._id ?? ffi.nullptr, + bundlePath._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSArray pathsForResourcesOfType_inDirectory_( + ThermionDartTexture1 _lib, NSString? ext, NSString bundlePath) { + final _ret = _lib._objc_msgSend_705( + _lib._class_NSBundle1, + _lib._sel_pathsForResourcesOfType_inDirectory_1, + ext?._id ?? ffi.nullptr, + bundlePath._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? pathForResource_ofType_(NSString? name, NSString? ext) { + final _ret = _lib._objc_msgSend_706(_id, _lib._sel_pathForResource_ofType_1, + name?._id ?? ffi.nullptr, ext?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? pathForResource_ofType_inDirectory_forLocalization_(NSString? name, + NSString? ext, NSString? subpath, NSString? localizationName) { + final _ret = _lib._objc_msgSend_707( + _id, + _lib._sel_pathForResource_ofType_inDirectory_forLocalization_1, + name?._id ?? ffi.nullptr, + ext?._id ?? ffi.nullptr, + subpath?._id ?? ffi.nullptr, + localizationName?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray pathsForResourcesOfType_inDirectory_forLocalization_( + NSString? ext, NSString? subpath, NSString? localizationName) { + final _ret = _lib._objc_msgSend_708( + _id, + _lib._sel_pathsForResourcesOfType_inDirectory_forLocalization_1, + ext?._id ?? ffi.nullptr, + subpath?._id ?? ffi.nullptr, + localizationName?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString localizedStringForKey_value_table_( + NSString key, NSString? value, NSString? tableName) { + final _ret = _lib._objc_msgSend_709( + _id, + _lib._sel_localizedStringForKey_value_table_1, + key._id, + value?._id ?? ffi.nullptr, + tableName?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSAttributedString localizedAttributedStringForKey_value_table_( + NSString key, NSString? value, NSString? tableName) { + final _ret = _lib._objc_msgSend_731( + _id, + _lib._sel_localizedAttributedStringForKey_value_table_1, + key._id, + value?._id ?? ffi.nullptr, + tableName?._id ?? ffi.nullptr); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + NSString? get bundleIdentifier { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_bundleIdentifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get infoDictionary { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_infoDictionary1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get localizedInfoDictionary { + final _ret = + _lib._objc_msgSend_389(_id, _lib._sel_localizedInfoDictionary1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSObject? objectForInfoDictionaryKey_(NSString key) { + final _ret = _lib._objc_msgSend_38( + _id, _lib._sel_objectForInfoDictionaryKey_1, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? classNamed_(NSString className) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_classNamed_1, className._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? get principalClass { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_principalClass1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSArray get preferredLocalizations { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_preferredLocalizations1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get localizations { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_localizations1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? get developmentLocalization { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_developmentLocalization1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSArray preferredLocalizationsFromArray_( + ThermionDartTexture1 _lib, NSArray localizationsArray) { + final _ret = _lib._objc_msgSend_67(_lib._class_NSBundle1, + _lib._sel_preferredLocalizationsFromArray_1, localizationsArray._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray preferredLocalizationsFromArray_forPreferences_( + ThermionDartTexture1 _lib, + NSArray localizationsArray, + NSArray? preferencesArray) { + final _ret = _lib._objc_msgSend_732( + _lib._class_NSBundle1, + _lib._sel_preferredLocalizationsFromArray_forPreferences_1, + localizationsArray._id, + preferencesArray?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray? get executableArchitectures { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_executableArchitectures1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + void setPreservationPriority_forTags_(double priority, NSSet tags) { + _lib._objc_msgSend_733( + _id, _lib._sel_setPreservationPriority_forTags_1, priority, tags._id); + } + + double preservationPriorityForTag_(NSString tag) { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_307_fpret( + _id, _lib._sel_preservationPriorityForTag_1, tag._id) + : _lib._objc_msgSend_307( + _id, _lib._sel_preservationPriorityForTag_1, tag._id); + } + + @override + NSBundle init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSBundle._(_ret, _lib, retain: true, release: true); + } + + static NSBundle new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSBundle1, _lib._sel_new1); + return NSBundle._(_ret, _lib, retain: false, release: true); + } + + static NSBundle allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSBundle1, _lib._sel_allocWithZone_1, zone); + return NSBundle._(_ret, _lib, retain: false, release: true); + } + + static NSBundle alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSBundle1, _lib._sel_alloc1); + return NSBundle._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSBundle1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSBundle1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSBundle1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSBundle1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSBundle1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSBundle1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSBundle1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSBundle1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSBundle1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSAttributedString extends NSObject { + NSAttributedString._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSAttributedString] that points to the same underlying object as [other]. + static NSAttributedString castFrom(T other) { + return NSAttributedString._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSAttributedString] that wraps the given raw object pointer. + static NSAttributedString castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSAttributedString._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSAttributedString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSAttributedString1); + } + + NSString get string { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_string1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSDictionary attributesAtIndex_effectiveRange_( + int location, ffi.Pointer<_NSRange> range) { + final _ret = _lib._objc_msgSend_710( + _id, _lib._sel_attributesAtIndex_effectiveRange_1, location, range); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + int get length { + return _lib._objc_msgSend_10(_id, _lib._sel_length1); + } + + NSObject? attribute_atIndex_effectiveRange_( + NSString attrName, int location, ffi.Pointer<_NSRange> range) { + final _ret = _lib._objc_msgSend_711( + _id, + _lib._sel_attribute_atIndex_effectiveRange_1, + attrName._id, + location, + range); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSAttributedString attributedSubstringFromRange_(_NSRange range) { + final _ret = _lib._objc_msgSend_712( + _id, _lib._sel_attributedSubstringFromRange_1, range); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + NSDictionary attributesAtIndex_longestEffectiveRange_inRange_( + int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { + final _ret = _lib._objc_msgSend_713( + _id, + _lib._sel_attributesAtIndex_longestEffectiveRange_inRange_1, + location, + range, + rangeLimit); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSObject? attribute_atIndex_longestEffectiveRange_inRange_(NSString attrName, + int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { + final _ret = _lib._objc_msgSend_714( + _id, + _lib._sel_attribute_atIndex_longestEffectiveRange_inRange_1, + attrName._id, + location, + range, + rangeLimit); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + bool isEqualToAttributedString_(NSAttributedString other) { + return _lib._objc_msgSend_715( + _id, _lib._sel_isEqualToAttributedString_1, other._id); + } + + NSAttributedString initWithString_(NSString str) { + final _ret = + _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, str._id); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + NSAttributedString initWithString_attributes_( + NSString str, NSDictionary? attrs) { + final _ret = _lib._objc_msgSend_716( + _id, + _lib._sel_initWithString_attributes_1, + str._id, + attrs?._id ?? ffi.nullptr); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + NSAttributedString initWithAttributedString_(NSAttributedString attrStr) { + final _ret = _lib._objc_msgSend_717( + _id, _lib._sel_initWithAttributedString_1, attrStr._id); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + void enumerateAttributesInRange_options_usingBlock_(_NSRange enumerationRange, + int opts, ObjCBlock_ffiVoid_NSDictionary_NSRange_bool block) { + _lib._objc_msgSend_718( + _id, + _lib._sel_enumerateAttributesInRange_options_usingBlock_1, + enumerationRange, + opts, + block._id); + } + + void enumerateAttribute_inRange_options_usingBlock_( + NSString attrName, + _NSRange enumerationRange, + int opts, + ObjCBlock_ffiVoid_ObjCObject_NSRange_bool block) { + _lib._objc_msgSend_719( + _id, + _lib._sel_enumerateAttribute_inRange_options_usingBlock_1, + attrName._id, + enumerationRange, + opts, + block._id); + } + + NSAttributedString? + initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( + NSURL markdownFile, + NSAttributedStringMarkdownParsingOptions? options, + NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_724( + _id, + _lib._sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_1, + markdownFile._id, + options?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + NSAttributedString? initWithMarkdown_options_baseURL_error_( + NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_725( + _id, + _lib._sel_initWithMarkdown_options_baseURL_error_1, + markdown._id, + options?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + NSAttributedString? initWithMarkdownString_options_baseURL_error_( + NSString markdownString, + NSAttributedStringMarkdownParsingOptions? options, + NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_726( + _id, + _lib._sel_initWithMarkdownString_options_baseURL_error_1, + markdownString._id, + options?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + NSAttributedString initWithFormat_options_locale_( + NSAttributedString format, int options, NSLocale? locale) { + final _ret = _lib._objc_msgSend_727( + _id, + _lib._sel_initWithFormat_options_locale_1, + format._id, + options, + locale?._id ?? ffi.nullptr); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + NSAttributedString initWithFormat_options_locale_arguments_( + NSAttributedString format, + int options, + NSLocale? locale, + ffi.Pointer arguments) { + final _ret = _lib._objc_msgSend_728( + _id, + _lib._sel_initWithFormat_options_locale_arguments_1, + format._id, + options, + locale?._id ?? ffi.nullptr, + arguments); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + static NSAttributedString localizedAttributedStringWithFormat_( + ThermionDartTexture1 _lib, NSAttributedString format) { + final _ret = _lib._objc_msgSend_717(_lib._class_NSAttributedString1, + _lib._sel_localizedAttributedStringWithFormat_1, format._id); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + static NSAttributedString localizedAttributedStringWithFormat_options_( + ThermionDartTexture1 _lib, NSAttributedString format, int options) { + final _ret = _lib._objc_msgSend_729( + _lib._class_NSAttributedString1, + _lib._sel_localizedAttributedStringWithFormat_options_1, + format._id, + options); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + NSAttributedString attributedStringByInflectingString() { + final _ret = _lib._objc_msgSend_730( + _id, _lib._sel_attributedStringByInflectingString1); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + @override + NSAttributedString init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + static NSAttributedString new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSAttributedString1, _lib._sel_new1); + return NSAttributedString._(_ret, _lib, retain: false, release: true); + } + + static NSAttributedString allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSAttributedString1, _lib._sel_allocWithZone_1, zone); + return NSAttributedString._(_ret, _lib, retain: false, release: true); + } + + static NSAttributedString alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSAttributedString1, _lib._sel_alloc1); + return NSAttributedString._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSAttributedString1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSAttributedString1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSAttributedString1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSAttributedString1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSAttributedString1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSAttributedString1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSAttributedString1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSAttributedString1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSAttributedString1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSAttributedStringEnumerationOptions { + static const int NSAttributedStringEnumerationReverse = 2; + static const int + NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1048576; +} + +void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + void Function(ffi.Pointer, _NSRange, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSDictionary_NSRange_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunction( + ThermionDartTexture1 lib, + void Function(NSDictionary, _NSRange, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(NSDictionary._(arg0, lib, retain: true, release: true), arg1, arg2))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.listener(ThermionDartTexture1 lib, + void Function(NSDictionary, _NSRange, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(NSDictionary._(arg0, lib, retain: true, release: true), arg1, arg2))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSDictionary arg0, _NSRange arg1, ffi.Pointer arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + ffi.Pointer)>()(_id, arg0._id, arg1, arg2); +} + +void _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_registerClosure( + void Function(ffi.Pointer, _NSRange, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_ObjCObject_NSRange_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ObjCObject_NSRange_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_NSRange_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_NSRange_bool.fromFunction( + ThermionDartTexture1 lib, + void Function(NSObject?, _NSRange, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ObjCObject_NSRange_bool.listener(ThermionDartTexture1 lib, + void Function(NSObject?, _NSRange, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject? arg0, _NSRange arg1, ffi.Pointer arg2) => _id + .ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + _NSRange, ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1, arg2); +} + +class NSAttributedStringMarkdownParsingOptions extends NSObject { + NSAttributedStringMarkdownParsingOptions._( + ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSAttributedStringMarkdownParsingOptions] that points to the same underlying object as [other]. + static NSAttributedStringMarkdownParsingOptions + castFrom(T other) { + return NSAttributedStringMarkdownParsingOptions._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSAttributedStringMarkdownParsingOptions] that wraps the given raw object pointer. + static NSAttributedStringMarkdownParsingOptions castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSAttributedStringMarkdownParsingOptions._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSAttributedStringMarkdownParsingOptions]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSAttributedStringMarkdownParsingOptions1); + } + + @override + NSAttributedStringMarkdownParsingOptions init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSAttributedStringMarkdownParsingOptions._(_ret, _lib, + retain: true, release: true); + } + + bool get allowsExtendedAttributes { + return _lib._objc_msgSend_12(_id, _lib._sel_allowsExtendedAttributes1); + } + + set allowsExtendedAttributes(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setAllowsExtendedAttributes_1, value); + } + + int get interpretedSyntax { + return _lib._objc_msgSend_720(_id, _lib._sel_interpretedSyntax1); + } + + set interpretedSyntax(int value) { + return _lib._objc_msgSend_721(_id, _lib._sel_setInterpretedSyntax_1, value); + } + + int get failurePolicy { + return _lib._objc_msgSend_722(_id, _lib._sel_failurePolicy1); + } + + set failurePolicy(int value) { + return _lib._objc_msgSend_723(_id, _lib._sel_setFailurePolicy_1, value); + } + + NSString? get languageCode { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_languageCode1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set languageCode(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setLanguageCode_1, value?._id ?? ffi.nullptr); + } + + bool get appliesSourcePositionAttributes { + return _lib._objc_msgSend_12( + _id, _lib._sel_appliesSourcePositionAttributes1); + } + + set appliesSourcePositionAttributes(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setAppliesSourcePositionAttributes_1, value); + } + + static NSAttributedStringMarkdownParsingOptions new1( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSAttributedStringMarkdownParsingOptions1, _lib._sel_new1); + return NSAttributedStringMarkdownParsingOptions._(_ret, _lib, + retain: false, release: true); + } + + static NSAttributedStringMarkdownParsingOptions allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSAttributedStringMarkdownParsingOptions1, + _lib._sel_allocWithZone_1, + zone); + return NSAttributedStringMarkdownParsingOptions._(_ret, _lib, + retain: false, release: true); + } + + static NSAttributedStringMarkdownParsingOptions alloc( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSAttributedStringMarkdownParsingOptions1, + _lib._sel_alloc1); + return NSAttributedStringMarkdownParsingOptions._(_ret, _lib, + retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSAttributedStringMarkdownParsingOptions1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSAttributedStringMarkdownParsingOptions1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSAttributedStringMarkdownParsingOptions1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSAttributedStringMarkdownParsingOptions1, + _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62( + _lib._class_NSAttributedStringMarkdownParsingOptions1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, + key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63( + _lib._class_NSAttributedStringMarkdownParsingOptions1, + _lib._sel_automaticallyNotifiesObserversForKey_1, + key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSAttributedStringMarkdownParsingOptions1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSAttributedStringMarkdownParsingOptions1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSAttributedStringMarkdownParsingOptions1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSAttributedStringMarkdownInterpretedSyntax { + static const int NSAttributedStringMarkdownInterpretedSyntaxFull = 0; + static const int NSAttributedStringMarkdownInterpretedSyntaxInlineOnly = 1; + static const int + NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace = + 2; +} + +abstract class NSAttributedStringMarkdownParsingFailurePolicy { + static const int NSAttributedStringMarkdownParsingFailureReturnError = 0; + static const int + NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible = + 1; +} + +abstract class NSAttributedStringFormattingOptions { + static const int + NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1; + static const int NSAttributedStringFormattingApplyReplacementIndexAttribute = + 2; +} + +class NSMutableAttributedString extends NSAttributedString { + NSMutableAttributedString._( + ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableAttributedString] that points to the same underlying object as [other]. + static NSMutableAttributedString castFrom(T other) { + return NSMutableAttributedString._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableAttributedString] that wraps the given raw object pointer. + static NSMutableAttributedString castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableAttributedString._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableAttributedString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableAttributedString1); + } + + void replaceCharactersInRange_withString_(_NSRange range, NSString str) { + _lib._objc_msgSend_688( + _id, _lib._sel_replaceCharactersInRange_withString_1, range, str._id); + } + + void setAttributes_range_(NSDictionary? attrs, _NSRange range) { + _lib._objc_msgSend_734( + _id, _lib._sel_setAttributes_range_1, attrs?._id ?? ffi.nullptr, range); + } + + NSMutableString get mutableString { + final _ret = _lib._objc_msgSend_735(_id, _lib._sel_mutableString1); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + void addAttribute_value_range_( + NSString name, NSObject value, _NSRange range) { + _lib._objc_msgSend_736( + _id, _lib._sel_addAttribute_value_range_1, name._id, value._id, range); + } + + void addAttributes_range_(NSDictionary attrs, _NSRange range) { + _lib._objc_msgSend_737( + _id, _lib._sel_addAttributes_range_1, attrs._id, range); + } + + void removeAttribute_range_(NSString name, _NSRange range) { + _lib._objc_msgSend_738( + _id, _lib._sel_removeAttribute_range_1, name._id, range); + } + + void replaceCharactersInRange_withAttributedString_( + _NSRange range, NSAttributedString attrString) { + _lib._objc_msgSend_739( + _id, + _lib._sel_replaceCharactersInRange_withAttributedString_1, + range, + attrString._id); + } + + void insertAttributedString_atIndex_(NSAttributedString attrString, int loc) { + _lib._objc_msgSend_740( + _id, _lib._sel_insertAttributedString_atIndex_1, attrString._id, loc); + } + + void appendAttributedString_(NSAttributedString attrString) { + _lib._objc_msgSend_741( + _id, _lib._sel_appendAttributedString_1, attrString._id); + } + + void deleteCharactersInRange_(_NSRange range) { + _lib._objc_msgSend_475(_id, _lib._sel_deleteCharactersInRange_1, range); + } + + void setAttributedString_(NSAttributedString attrString) { + _lib._objc_msgSend_741( + _id, _lib._sel_setAttributedString_1, attrString._id); + } + + void beginEditing() { + _lib._objc_msgSend_1(_id, _lib._sel_beginEditing1); + } + + void endEditing() { + _lib._objc_msgSend_1(_id, _lib._sel_endEditing1); + } + + void appendLocalizedFormat_(NSAttributedString format) { + _lib._objc_msgSend_741(_id, _lib._sel_appendLocalizedFormat_1, format._id); + } + + @override + NSMutableAttributedString initWithString_(NSString str) { + final _ret = + _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, str._id); + return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableAttributedString initWithString_attributes_( + NSString str, NSDictionary? attrs) { + final _ret = _lib._objc_msgSend_716( + _id, + _lib._sel_initWithString_attributes_1, + str._id, + attrs?._id ?? ffi.nullptr); + return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableAttributedString initWithAttributedString_( + NSAttributedString attrStr) { + final _ret = _lib._objc_msgSend_717( + _id, _lib._sel_initWithAttributedString_1, attrStr._id); + return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableAttributedString? + initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( + NSURL markdownFile, + NSAttributedStringMarkdownParsingOptions? options, + NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_724( + _id, + _lib._sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_1, + markdownFile._id, + options?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableAttributedString? initWithMarkdown_options_baseURL_error_( + NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_725( + _id, + _lib._sel_initWithMarkdown_options_baseURL_error_1, + markdown._id, + options?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableAttributedString? initWithMarkdownString_options_baseURL_error_( + NSString markdownString, + NSAttributedStringMarkdownParsingOptions? options, + NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_726( + _id, + _lib._sel_initWithMarkdownString_options_baseURL_error_1, + markdownString._id, + options?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableAttributedString initWithFormat_options_locale_( + NSAttributedString format, int options, NSLocale? locale) { + final _ret = _lib._objc_msgSend_727( + _id, + _lib._sel_initWithFormat_options_locale_1, + format._id, + options, + locale?._id ?? ffi.nullptr); + return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableAttributedString initWithFormat_options_locale_arguments_( + NSAttributedString format, + int options, + NSLocale? locale, + ffi.Pointer arguments) { + final _ret = _lib._objc_msgSend_728( + _id, + _lib._sel_initWithFormat_options_locale_arguments_1, + format._id, + options, + locale?._id ?? ffi.nullptr, + arguments); + return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableAttributedString localizedAttributedStringWithFormat_( + ThermionDartTexture1 _lib, NSAttributedString format) { + final _ret = _lib._objc_msgSend_717(_lib._class_NSMutableAttributedString1, + _lib._sel_localizedAttributedStringWithFormat_1, format._id); + return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableAttributedString localizedAttributedStringWithFormat_options_( + ThermionDartTexture1 _lib, NSAttributedString format, int options) { + final _ret = _lib._objc_msgSend_729( + _lib._class_NSMutableAttributedString1, + _lib._sel_localizedAttributedStringWithFormat_options_1, + format._id, + options); + return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableAttributedString init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableAttributedString new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableAttributedString1, _lib._sel_new1); + return NSMutableAttributedString._(_ret, _lib, + retain: false, release: true); + } + + static NSMutableAttributedString allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3(_lib._class_NSMutableAttributedString1, + _lib._sel_allocWithZone_1, zone); + return NSMutableAttributedString._(_ret, _lib, + retain: false, release: true); + } + + static NSMutableAttributedString alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableAttributedString1, _lib._sel_alloc1); + return NSMutableAttributedString._(_ret, _lib, + retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSMutableAttributedString1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSMutableAttributedString1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSMutableAttributedString1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableAttributedString1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSMutableAttributedString1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSMutableAttributedString1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSMutableAttributedString1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSMutableAttributedString1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSMutableAttributedString1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSDateFormatter extends NSFormatter { + NSDateFormatter._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDateFormatter] that points to the same underlying object as [other]. + static NSDateFormatter castFrom(T other) { + return NSDateFormatter._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSDateFormatter] that wraps the given raw object pointer. + static NSDateFormatter castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDateFormatter._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSDateFormatter]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSDateFormatter1); + } + + int get formattingContext { + return _lib._objc_msgSend_747(_id, _lib._sel_formattingContext1); + } + + set formattingContext(int value) { + return _lib._objc_msgSend_748(_id, _lib._sel_setFormattingContext_1, value); + } + + bool getObjectValue_forString_range_error_( + ffi.Pointer> obj, + NSString string, + ffi.Pointer<_NSRange> rangep, + ffi.Pointer> error) { + return _lib._objc_msgSend_749( + _id, + _lib._sel_getObjectValue_forString_range_error_1, + obj, + string._id, + rangep, + error); + } + + NSString stringFromDate_(NSDate date) { + final _ret = + _lib._objc_msgSend_750(_id, _lib._sel_stringFromDate_1, date._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSDate? dateFromString_(NSString string) { + final _ret = + _lib._objc_msgSend_563(_id, _lib._sel_dateFromString_1, string._id); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSString localizedStringFromDate_dateStyle_timeStyle_( + ThermionDartTexture1 _lib, NSDate date, int dstyle, int tstyle) { + final _ret = _lib._objc_msgSend_751( + _lib._class_NSDateFormatter1, + _lib._sel_localizedStringFromDate_dateStyle_timeStyle_1, + date._id, + dstyle, + tstyle); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? dateFormatFromTemplate_options_locale_( + ThermionDartTexture1 _lib, NSString tmplate, int opts, NSLocale? locale) { + final _ret = _lib._objc_msgSend_752( + _lib._class_NSDateFormatter1, + _lib._sel_dateFormatFromTemplate_options_locale_1, + tmplate._id, + opts, + locale?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static int getDefaultFormatterBehavior(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_753( + _lib._class_NSDateFormatter1, _lib._sel_defaultFormatterBehavior1); + } + + static void setDefaultFormatterBehavior( + ThermionDartTexture1 _lib, int value) { + return _lib._objc_msgSend_754(_lib._class_NSDateFormatter1, + _lib._sel_setDefaultFormatterBehavior_1, value); + } + + void setLocalizedDateFormatFromTemplate_(NSString dateFormatTemplate) { + _lib._objc_msgSend_247(_id, _lib._sel_setLocalizedDateFormatFromTemplate_1, + dateFormatTemplate._id); + } + + NSString get dateFormat { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_dateFormat1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set dateFormat(NSString value) { + return _lib._objc_msgSend_645(_id, _lib._sel_setDateFormat_1, value._id); + } + + int get dateStyle { + return _lib._objc_msgSend_755(_id, _lib._sel_dateStyle1); + } + + set dateStyle(int value) { + return _lib._objc_msgSend_756(_id, _lib._sel_setDateStyle_1, value); + } + + int get timeStyle { + return _lib._objc_msgSend_755(_id, _lib._sel_timeStyle1); + } + + set timeStyle(int value) { + return _lib._objc_msgSend_756(_id, _lib._sel_setTimeStyle_1, value); + } + + NSLocale get locale { + final _ret = _lib._objc_msgSend_196(_id, _lib._sel_locale1); + return NSLocale._(_ret, _lib, retain: true, release: true); + } + + set locale(NSLocale value) { + return _lib._objc_msgSend_757(_id, _lib._sel_setLocale_1, value._id); + } + + bool get generatesCalendarDates { + return _lib._objc_msgSend_12(_id, _lib._sel_generatesCalendarDates1); + } + + set generatesCalendarDates(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setGeneratesCalendarDates_1, value); + } + + int get formatterBehavior { + return _lib._objc_msgSend_753(_id, _lib._sel_formatterBehavior1); + } + + set formatterBehavior(int value) { + return _lib._objc_msgSend_754(_id, _lib._sel_setFormatterBehavior_1, value); + } + + NSTimeZone get timeZone { + final _ret = _lib._objc_msgSend_178(_id, _lib._sel_timeZone1); + return NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + set timeZone(NSTimeZone value) { + return _lib._objc_msgSend_179(_id, _lib._sel_setTimeZone_1, value._id); + } + + NSCalendar get calendar { + final _ret = _lib._objc_msgSend_758(_id, _lib._sel_calendar1); + return NSCalendar._(_ret, _lib, retain: true, release: true); + } + + set calendar(NSCalendar value) { + return _lib._objc_msgSend_794(_id, _lib._sel_setCalendar_1, value._id); + } + + bool get lenient { + return _lib._objc_msgSend_12(_id, _lib._sel_isLenient1); + } + + set lenient(bool value) { + return _lib._objc_msgSend_526(_id, _lib._sel_setLenient_1, value); + } + + NSDate? get twoDigitStartDate { + final _ret = _lib._objc_msgSend_182(_id, _lib._sel_twoDigitStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + set twoDigitStartDate(NSDate? value) { + return _lib._objc_msgSend_795( + _id, _lib._sel_setTwoDigitStartDate_1, value?._id ?? ffi.nullptr); + } + + NSDate? get defaultDate { + final _ret = _lib._objc_msgSend_182(_id, _lib._sel_defaultDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + set defaultDate(NSDate? value) { + return _lib._objc_msgSend_795( + _id, _lib._sel_setDefaultDate_1, value?._id ?? ffi.nullptr); + } + + NSArray get eraSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_eraSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set eraSymbols(NSArray value) { + return _lib._objc_msgSend_796(_id, _lib._sel_setEraSymbols_1, value._id); + } + + NSArray get monthSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_monthSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set monthSymbols(NSArray value) { + return _lib._objc_msgSend_796(_id, _lib._sel_setMonthSymbols_1, value._id); + } + + NSArray get shortMonthSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_shortMonthSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set shortMonthSymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setShortMonthSymbols_1, value._id); + } + + NSArray get weekdaySymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_weekdaySymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set weekdaySymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setWeekdaySymbols_1, value._id); + } + + NSArray get shortWeekdaySymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_shortWeekdaySymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set shortWeekdaySymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setShortWeekdaySymbols_1, value._id); + } + + NSString get AMSymbol { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_AMSymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set AMSymbol(NSString value) { + return _lib._objc_msgSend_645(_id, _lib._sel_setAMSymbol_1, value._id); + } + + NSString get PMSymbol { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_PMSymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set PMSymbol(NSString value) { + return _lib._objc_msgSend_645(_id, _lib._sel_setPMSymbol_1, value._id); + } + + NSArray get longEraSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_longEraSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set longEraSymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setLongEraSymbols_1, value._id); + } + + NSArray get veryShortMonthSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_veryShortMonthSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set veryShortMonthSymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setVeryShortMonthSymbols_1, value._id); + } + + NSArray get standaloneMonthSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_standaloneMonthSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set standaloneMonthSymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setStandaloneMonthSymbols_1, value._id); + } + + NSArray get shortStandaloneMonthSymbols { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_shortStandaloneMonthSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set shortStandaloneMonthSymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setShortStandaloneMonthSymbols_1, value._id); + } + + NSArray get veryShortStandaloneMonthSymbols { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_veryShortStandaloneMonthSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set veryShortStandaloneMonthSymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setVeryShortStandaloneMonthSymbols_1, value._id); + } + + NSArray get veryShortWeekdaySymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_veryShortWeekdaySymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set veryShortWeekdaySymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setVeryShortWeekdaySymbols_1, value._id); + } + + NSArray get standaloneWeekdaySymbols { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_standaloneWeekdaySymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set standaloneWeekdaySymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setStandaloneWeekdaySymbols_1, value._id); + } + + NSArray get shortStandaloneWeekdaySymbols { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_shortStandaloneWeekdaySymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set shortStandaloneWeekdaySymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setShortStandaloneWeekdaySymbols_1, value._id); + } + + NSArray get veryShortStandaloneWeekdaySymbols { + final _ret = _lib._objc_msgSend_84( + _id, _lib._sel_veryShortStandaloneWeekdaySymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set veryShortStandaloneWeekdaySymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setVeryShortStandaloneWeekdaySymbols_1, value._id); + } + + NSArray get quarterSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_quarterSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set quarterSymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setQuarterSymbols_1, value._id); + } + + NSArray get shortQuarterSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_shortQuarterSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set shortQuarterSymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setShortQuarterSymbols_1, value._id); + } + + NSArray get standaloneQuarterSymbols { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_standaloneQuarterSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set standaloneQuarterSymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setStandaloneQuarterSymbols_1, value._id); + } + + NSArray get shortStandaloneQuarterSymbols { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_shortStandaloneQuarterSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + set shortStandaloneQuarterSymbols(NSArray value) { + return _lib._objc_msgSend_796( + _id, _lib._sel_setShortStandaloneQuarterSymbols_1, value._id); + } + + NSDate? get gregorianStartDate { + final _ret = _lib._objc_msgSend_182(_id, _lib._sel_gregorianStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + set gregorianStartDate(NSDate? value) { + return _lib._objc_msgSend_795( + _id, _lib._sel_setGregorianStartDate_1, value?._id ?? ffi.nullptr); + } + + bool get doesRelativeDateFormatting { + return _lib._objc_msgSend_12(_id, _lib._sel_doesRelativeDateFormatting1); + } + + set doesRelativeDateFormatting(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setDoesRelativeDateFormatting_1, value); + } + + NSObject initWithDateFormat_allowNaturalLanguage_( + NSString format, bool flag) { + final _ret = _lib._objc_msgSend_30(_id, + _lib._sel_initWithDateFormat_allowNaturalLanguage_1, format._id, flag); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + bool allowsNaturalLanguage() { + return _lib._objc_msgSend_12(_id, _lib._sel_allowsNaturalLanguage1); + } + + @override + NSDateFormatter init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDateFormatter._(_ret, _lib, retain: true, release: true); + } + + static NSDateFormatter new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDateFormatter1, _lib._sel_new1); + return NSDateFormatter._(_ret, _lib, retain: false, release: true); + } + + static NSDateFormatter allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSDateFormatter1, _lib._sel_allocWithZone_1, zone); + return NSDateFormatter._(_ret, _lib, retain: false, release: true); + } + + static NSDateFormatter alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDateFormatter1, _lib._sel_alloc1); + return NSDateFormatter._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSDateFormatter1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSDateFormatter1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSDateFormatter1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSDateFormatter1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSDateFormatter1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSDateFormatter1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSDateFormatter1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSDateFormatter1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSDateFormatter1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSFormatter extends NSObject { + NSFormatter._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSFormatter] that points to the same underlying object as [other]. + static NSFormatter castFrom(T other) { + return NSFormatter._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSFormatter] that wraps the given raw object pointer. + static NSFormatter castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSFormatter._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSFormatter]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSFormatter1); + } + + NSString? stringForObjectValue_(NSObject? obj) { + final _ret = _lib._objc_msgSend_742( + _id, _lib._sel_stringForObjectValue_1, obj?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSAttributedString? attributedStringForObjectValue_withDefaultAttributes_( + NSObject obj, NSDictionary? attrs) { + final _ret = _lib._objc_msgSend_743( + _id, + _lib._sel_attributedStringForObjectValue_withDefaultAttributes_1, + obj._id, + attrs?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + NSString? editingStringForObjectValue_(NSObject obj) { + final _ret = _lib._objc_msgSend_525( + _id, _lib._sel_editingStringForObjectValue_1, obj._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + bool getObjectValue_forString_errorDescription_( + ffi.Pointer> obj, + NSString string, + ffi.Pointer> error) { + return _lib._objc_msgSend_744( + _id, + _lib._sel_getObjectValue_forString_errorDescription_1, + obj, + string._id, + error); + } + + bool isPartialStringValid_newEditingString_errorDescription_( + NSString partialString, + ffi.Pointer> newString, + ffi.Pointer> error) { + return _lib._objc_msgSend_745( + _id, + _lib._sel_isPartialStringValid_newEditingString_errorDescription_1, + partialString._id, + newString, + error); + } + + bool + isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_( + ffi.Pointer> partialStringPtr, + ffi.Pointer<_NSRange> proposedSelRangePtr, + NSString origString, + _NSRange origSelRange, + ffi.Pointer> error) { + return _lib._objc_msgSend_746( + _id, + _lib._sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_1, + partialStringPtr, + proposedSelRangePtr, + origString._id, + origSelRange, + error); + } + + @override + NSFormatter init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSFormatter._(_ret, _lib, retain: true, release: true); + } + + static NSFormatter new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSFormatter1, _lib._sel_new1); + return NSFormatter._(_ret, _lib, retain: false, release: true); + } + + static NSFormatter allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSFormatter1, _lib._sel_allocWithZone_1, zone); + return NSFormatter._(_ret, _lib, retain: false, release: true); + } + + static NSFormatter alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFormatter1, _lib._sel_alloc1); + return NSFormatter._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSFormatter1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSFormatter1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSFormatter1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSFormatter1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSFormatter1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSFormatter1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSFormatter1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSFormatter1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSFormatter1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSFormattingContext { + static const int NSFormattingContextUnknown = 0; + static const int NSFormattingContextDynamic = 1; + static const int NSFormattingContextStandalone = 2; + static const int NSFormattingContextListItem = 3; + static const int NSFormattingContextBeginningOfSentence = 4; + static const int NSFormattingContextMiddleOfSentence = 5; +} + +abstract class NSDateFormatterStyle { + static const int NSDateFormatterNoStyle = 0; + static const int NSDateFormatterShortStyle = 1; + static const int NSDateFormatterMediumStyle = 2; + static const int NSDateFormatterLongStyle = 3; + static const int NSDateFormatterFullStyle = 4; +} + +abstract class NSDateFormatterBehavior { + static const int NSDateFormatterBehaviorDefault = 0; + static const int NSDateFormatterBehavior10_0 = 1000; + static const int NSDateFormatterBehavior10_4 = 1040; +} + +class NSCalendar extends NSObject { + NSCalendar._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSCalendar] that points to the same underlying object as [other]. + static NSCalendar castFrom(T other) { + return NSCalendar._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSCalendar] that wraps the given raw object pointer. + static NSCalendar castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCalendar._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSCalendar]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCalendar1); + } + + static NSCalendar getCurrentCalendar(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_758( + _lib._class_NSCalendar1, _lib._sel_currentCalendar1); + return NSCalendar._(_ret, _lib, retain: true, release: true); + } + + static NSCalendar getAutoupdatingCurrentCalendar(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_758( + _lib._class_NSCalendar1, _lib._sel_autoupdatingCurrentCalendar1); + return NSCalendar._(_ret, _lib, retain: true, release: true); + } + + static NSCalendar? calendarWithIdentifier_( + ThermionDartTexture1 _lib, NSString calendarIdentifierConstant) { + final _ret = _lib._objc_msgSend_759(_lib._class_NSCalendar1, + _lib._sel_calendarWithIdentifier_1, calendarIdentifierConstant._id); + return _ret.address == 0 + ? null + : NSCalendar._(_ret, _lib, retain: true, release: true); + } + + @override + NSCalendar init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSCalendar._(_ret, _lib, retain: true, release: true); + } + + NSObject? initWithCalendarIdentifier_(NSString ident) { + final _ret = _lib._objc_msgSend_38( + _id, _lib._sel_initWithCalendarIdentifier_1, ident._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSString get calendarIdentifier { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_calendarIdentifier1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSLocale? get locale { + final _ret = _lib._objc_msgSend_760(_id, _lib._sel_locale1); + return _ret.address == 0 + ? null + : NSLocale._(_ret, _lib, retain: true, release: true); + } + + set locale(NSLocale? value) { + return _lib._objc_msgSend_761( + _id, _lib._sel_setLocale_1, value?._id ?? ffi.nullptr); + } + + NSTimeZone get timeZone { + final _ret = _lib._objc_msgSend_178(_id, _lib._sel_timeZone1); + return NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + set timeZone(NSTimeZone value) { + return _lib._objc_msgSend_179(_id, _lib._sel_setTimeZone_1, value._id); + } + + int get firstWeekday { + return _lib._objc_msgSend_10(_id, _lib._sel_firstWeekday1); + } + + set firstWeekday(int value) { + return _lib._objc_msgSend_515(_id, _lib._sel_setFirstWeekday_1, value); + } + + int get minimumDaysInFirstWeek { + return _lib._objc_msgSend_10(_id, _lib._sel_minimumDaysInFirstWeek1); + } + + set minimumDaysInFirstWeek(int value) { + return _lib._objc_msgSend_515( + _id, _lib._sel_setMinimumDaysInFirstWeek_1, value); + } + + NSArray get eraSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_eraSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get longEraSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_longEraSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get monthSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_monthSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get shortMonthSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_shortMonthSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get veryShortMonthSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_veryShortMonthSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get standaloneMonthSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_standaloneMonthSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get shortStandaloneMonthSymbols { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_shortStandaloneMonthSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get veryShortStandaloneMonthSymbols { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_veryShortStandaloneMonthSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get weekdaySymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_weekdaySymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get shortWeekdaySymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_shortWeekdaySymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get veryShortWeekdaySymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_veryShortWeekdaySymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get standaloneWeekdaySymbols { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_standaloneWeekdaySymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get shortStandaloneWeekdaySymbols { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_shortStandaloneWeekdaySymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get veryShortStandaloneWeekdaySymbols { + final _ret = _lib._objc_msgSend_84( + _id, _lib._sel_veryShortStandaloneWeekdaySymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get quarterSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_quarterSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get shortQuarterSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_shortQuarterSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get standaloneQuarterSymbols { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_standaloneQuarterSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get shortStandaloneQuarterSymbols { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_shortStandaloneQuarterSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString get AMSymbol { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_AMSymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get PMSymbol { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_PMSymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + void minimumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_762_stret( + stret, _id, _lib._sel_minimumRangeOfUnit_1, unit) + : stret.ref = + _lib._objc_msgSend_762(_id, _lib._sel_minimumRangeOfUnit_1, unit); + } + + void maximumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_762_stret( + stret, _id, _lib._sel_maximumRangeOfUnit_1, unit) + : stret.ref = + _lib._objc_msgSend_762(_id, _lib._sel_maximumRangeOfUnit_1, unit); + } + + void rangeOfUnit_inUnit_forDate_( + ffi.Pointer<_NSRange> stret, int smaller, int larger, NSDate date) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_763_stret(stret, _id, + _lib._sel_rangeOfUnit_inUnit_forDate_1, smaller, larger, date._id) + : stret.ref = _lib._objc_msgSend_763(_id, + _lib._sel_rangeOfUnit_inUnit_forDate_1, smaller, larger, date._id); + } + + int ordinalityOfUnit_inUnit_forDate_(int smaller, int larger, NSDate date) { + return _lib._objc_msgSend_764(_id, + _lib._sel_ordinalityOfUnit_inUnit_forDate_1, smaller, larger, date._id); + } + + bool rangeOfUnit_startDate_interval_forDate_( + int unit, + ffi.Pointer> datep, + ffi.Pointer tip, + NSDate date) { + return _lib._objc_msgSend_765( + _id, + _lib._sel_rangeOfUnit_startDate_interval_forDate_1, + unit, + datep, + tip, + date._id); + } + + NSDate? dateFromComponents_(NSDateComponents comps) { + final _ret = + _lib._objc_msgSend_773(_id, _lib._sel_dateFromComponents_1, comps._id); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDateComponents components_fromDate_(int unitFlags, NSDate date) { + final _ret = _lib._objc_msgSend_774( + _id, _lib._sel_components_fromDate_1, unitFlags, date._id); + return NSDateComponents._(_ret, _lib, retain: true, release: true); + } + + NSDate? dateByAddingComponents_toDate_options_( + NSDateComponents comps, NSDate date, int opts) { + final _ret = _lib._objc_msgSend_775( + _id, + _lib._sel_dateByAddingComponents_toDate_options_1, + comps._id, + date._id, + opts); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDateComponents components_fromDate_toDate_options_( + int unitFlags, NSDate startingDate, NSDate resultDate, int opts) { + final _ret = _lib._objc_msgSend_776( + _id, + _lib._sel_components_fromDate_toDate_options_1, + unitFlags, + startingDate._id, + resultDate._id, + opts); + return NSDateComponents._(_ret, _lib, retain: true, release: true); + } + + void getEra_year_month_day_fromDate_( + ffi.Pointer eraValuePointer, + ffi.Pointer yearValuePointer, + ffi.Pointer monthValuePointer, + ffi.Pointer dayValuePointer, + NSDate date) { + _lib._objc_msgSend_777( + _id, + _lib._sel_getEra_year_month_day_fromDate_1, + eraValuePointer, + yearValuePointer, + monthValuePointer, + dayValuePointer, + date._id); + } + + void getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_( + ffi.Pointer eraValuePointer, + ffi.Pointer yearValuePointer, + ffi.Pointer weekValuePointer, + ffi.Pointer weekdayValuePointer, + NSDate date) { + _lib._objc_msgSend_777( + _id, + _lib._sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_1, + eraValuePointer, + yearValuePointer, + weekValuePointer, + weekdayValuePointer, + date._id); + } + + void getHour_minute_second_nanosecond_fromDate_( + ffi.Pointer hourValuePointer, + ffi.Pointer minuteValuePointer, + ffi.Pointer secondValuePointer, + ffi.Pointer nanosecondValuePointer, + NSDate date) { + _lib._objc_msgSend_777( + _id, + _lib._sel_getHour_minute_second_nanosecond_fromDate_1, + hourValuePointer, + minuteValuePointer, + secondValuePointer, + nanosecondValuePointer, + date._id); + } + + int component_fromDate_(int unit, NSDate date) { + return _lib._objc_msgSend_778( + _id, _lib._sel_component_fromDate_1, unit, date._id); + } + + NSDate? dateWithEra_year_month_day_hour_minute_second_nanosecond_( + int eraValue, + int yearValue, + int monthValue, + int dayValue, + int hourValue, + int minuteValue, + int secondValue, + int nanosecondValue) { + final _ret = _lib._objc_msgSend_779( + _id, + _lib._sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_1, + eraValue, + yearValue, + monthValue, + dayValue, + hourValue, + minuteValue, + secondValue, + nanosecondValue); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate? + dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_( + int eraValue, + int yearValue, + int weekValue, + int weekdayValue, + int hourValue, + int minuteValue, + int secondValue, + int nanosecondValue) { + final _ret = _lib._objc_msgSend_779( + _id, + _lib._sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_1, + eraValue, + yearValue, + weekValue, + weekdayValue, + hourValue, + minuteValue, + secondValue, + nanosecondValue); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate startOfDayForDate_(NSDate date) { + final _ret = + _lib._objc_msgSend_167(_id, _lib._sel_startOfDayForDate_1, date._id); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDateComponents componentsInTimeZone_fromDate_( + NSTimeZone timezone, NSDate date) { + final _ret = _lib._objc_msgSend_780( + _id, _lib._sel_componentsInTimeZone_fromDate_1, timezone._id, date._id); + return NSDateComponents._(_ret, _lib, retain: true, release: true); + } + + int compareDate_toDate_toUnitGranularity_( + NSDate date1, NSDate date2, int unit) { + return _lib._objc_msgSend_781( + _id, + _lib._sel_compareDate_toDate_toUnitGranularity_1, + date1._id, + date2._id, + unit); + } + + bool isDate_equalToDate_toUnitGranularity_( + NSDate date1, NSDate date2, int unit) { + return _lib._objc_msgSend_782( + _id, + _lib._sel_isDate_equalToDate_toUnitGranularity_1, + date1._id, + date2._id, + unit); + } + + bool isDate_inSameDayAsDate_(NSDate date1, NSDate date2) { + return _lib._objc_msgSend_783( + _id, _lib._sel_isDate_inSameDayAsDate_1, date1._id, date2._id); + } + + bool isDateInToday_(NSDate date) { + return _lib._objc_msgSend_169(_id, _lib._sel_isDateInToday_1, date._id); + } + + bool isDateInYesterday_(NSDate date) { + return _lib._objc_msgSend_169(_id, _lib._sel_isDateInYesterday_1, date._id); + } + + bool isDateInTomorrow_(NSDate date) { + return _lib._objc_msgSend_169(_id, _lib._sel_isDateInTomorrow_1, date._id); + } + + bool isDateInWeekend_(NSDate date) { + return _lib._objc_msgSend_169(_id, _lib._sel_isDateInWeekend_1, date._id); + } + + bool rangeOfWeekendStartDate_interval_containingDate_( + ffi.Pointer> datep, + ffi.Pointer tip, + NSDate date) { + return _lib._objc_msgSend_784( + _id, + _lib._sel_rangeOfWeekendStartDate_interval_containingDate_1, + datep, + tip, + date._id); + } + + bool nextWeekendStartDate_interval_options_afterDate_( + ffi.Pointer> datep, + ffi.Pointer tip, + int options, + NSDate date) { + return _lib._objc_msgSend_785( + _id, + _lib._sel_nextWeekendStartDate_interval_options_afterDate_1, + datep, + tip, + options, + date._id); + } + + NSDateComponents components_fromDateComponents_toDateComponents_options_( + int unitFlags, + NSDateComponents startingDateComp, + NSDateComponents resultDateComp, + int options) { + final _ret = _lib._objc_msgSend_786( + _id, + _lib._sel_components_fromDateComponents_toDateComponents_options_1, + unitFlags, + startingDateComp._id, + resultDateComp._id, + options); + return NSDateComponents._(_ret, _lib, retain: true, release: true); + } + + NSDate? dateByAddingUnit_value_toDate_options_( + int unit, int value, NSDate date, int options) { + final _ret = _lib._objc_msgSend_787( + _id, + _lib._sel_dateByAddingUnit_value_toDate_options_1, + unit, + value, + date._id, + options); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + void enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_( + NSDate start, + NSDateComponents comps, + int opts, + ObjCBlock_ffiVoid_NSDate_bool_bool block) { + _lib._objc_msgSend_788( + _id, + _lib._sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_1, + start._id, + comps._id, + opts, + block._id); + } + + NSDate? nextDateAfterDate_matchingComponents_options_( + NSDate date, NSDateComponents comps, int options) { + final _ret = _lib._objc_msgSend_789( + _id, + _lib._sel_nextDateAfterDate_matchingComponents_options_1, + date._id, + comps._id, + options); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate? nextDateAfterDate_matchingUnit_value_options_( + NSDate date, int unit, int value, int options) { + final _ret = _lib._objc_msgSend_790( + _id, + _lib._sel_nextDateAfterDate_matchingUnit_value_options_1, + date._id, + unit, + value, + options); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate? nextDateAfterDate_matchingHour_minute_second_options_(NSDate date, + int hourValue, int minuteValue, int secondValue, int options) { + final _ret = _lib._objc_msgSend_791( + _id, + _lib._sel_nextDateAfterDate_matchingHour_minute_second_options_1, + date._id, + hourValue, + minuteValue, + secondValue, + options); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate? dateBySettingUnit_value_ofDate_options_( + int unit, int v, NSDate date, int opts) { + final _ret = _lib._objc_msgSend_787( + _id, + _lib._sel_dateBySettingUnit_value_ofDate_options_1, + unit, + v, + date._id, + opts); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate? dateBySettingHour_minute_second_ofDate_options_( + int h, int m, int s, NSDate date, int opts) { + final _ret = _lib._objc_msgSend_792( + _id, + _lib._sel_dateBySettingHour_minute_second_ofDate_options_1, + h, + m, + s, + date._id, + opts); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + bool date_matchesComponents_(NSDate date, NSDateComponents components) { + return _lib._objc_msgSend_793( + _id, _lib._sel_date_matchesComponents_1, date._id, components._id); + } + + static NSCalendar new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSCalendar1, _lib._sel_new1); + return NSCalendar._(_ret, _lib, retain: false, release: true); + } + + static NSCalendar allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSCalendar1, _lib._sel_allocWithZone_1, zone); + return NSCalendar._(_ret, _lib, retain: false, release: true); + } + + static NSCalendar alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCalendar1, _lib._sel_alloc1); + return NSCalendar._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSCalendar1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSCalendar1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSCalendar1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSCalendar1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSCalendar1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSCalendar1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSCalendar1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSCalendar1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSCalendar1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSCalendarUnit { + static const int NSCalendarUnitEra = 2; + static const int NSCalendarUnitYear = 4; + static const int NSCalendarUnitMonth = 8; + static const int NSCalendarUnitDay = 16; + static const int NSCalendarUnitHour = 32; + static const int NSCalendarUnitMinute = 64; + static const int NSCalendarUnitSecond = 128; + static const int NSCalendarUnitWeekday = 512; + static const int NSCalendarUnitWeekdayOrdinal = 1024; + static const int NSCalendarUnitQuarter = 2048; + static const int NSCalendarUnitWeekOfMonth = 4096; + static const int NSCalendarUnitWeekOfYear = 8192; + static const int NSCalendarUnitYearForWeekOfYear = 16384; + static const int NSCalendarUnitNanosecond = 32768; + static const int NSCalendarUnitCalendar = 1048576; + static const int NSCalendarUnitTimeZone = 2097152; + static const int NSEraCalendarUnit = 2; + static const int NSYearCalendarUnit = 4; + static const int NSMonthCalendarUnit = 8; + static const int NSDayCalendarUnit = 16; + static const int NSHourCalendarUnit = 32; + static const int NSMinuteCalendarUnit = 64; + static const int NSSecondCalendarUnit = 128; + static const int NSWeekCalendarUnit = 256; + static const int NSWeekdayCalendarUnit = 512; + static const int NSWeekdayOrdinalCalendarUnit = 1024; + static const int NSQuarterCalendarUnit = 2048; + static const int NSWeekOfMonthCalendarUnit = 4096; + static const int NSWeekOfYearCalendarUnit = 8192; + static const int NSYearForWeekOfYearCalendarUnit = 16384; + static const int NSCalendarCalendarUnit = 1048576; + static const int NSTimeZoneCalendarUnit = 2097152; +} + +class NSDateComponents extends NSObject { + NSDateComponents._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDateComponents] that points to the same underlying object as [other]. + static NSDateComponents castFrom(T other) { + return NSDateComponents._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSDateComponents] that wraps the given raw object pointer. + static NSDateComponents castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDateComponents._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSDateComponents]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSDateComponents1); + } + + NSCalendar? get calendar { + final _ret = _lib._objc_msgSend_766(_id, _lib._sel_calendar1); + return _ret.address == 0 + ? null + : NSCalendar._(_ret, _lib, retain: true, release: true); + } + + set calendar(NSCalendar? value) { + return _lib._objc_msgSend_767( + _id, _lib._sel_setCalendar_1, value?._id ?? ffi.nullptr); + } + + NSTimeZone? get timeZone { + final _ret = _lib._objc_msgSend_768(_id, _lib._sel_timeZone1); + return _ret.address == 0 + ? null + : NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + set timeZone(NSTimeZone? value) { + return _lib._objc_msgSend_769( + _id, _lib._sel_setTimeZone_1, value?._id ?? ffi.nullptr); + } + + int get era { + return _lib._objc_msgSend_82(_id, _lib._sel_era1); + } + + set era(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setEra_1, value); + } + + int get year { + return _lib._objc_msgSend_82(_id, _lib._sel_year1); + } + + set year(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setYear_1, value); + } + + int get month { + return _lib._objc_msgSend_82(_id, _lib._sel_month1); + } + + set month(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setMonth_1, value); + } + + int get day { + return _lib._objc_msgSend_82(_id, _lib._sel_day1); + } + + set day(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setDay_1, value); + } + + int get hour { + return _lib._objc_msgSend_82(_id, _lib._sel_hour1); + } + + set hour(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setHour_1, value); + } + + int get minute { + return _lib._objc_msgSend_82(_id, _lib._sel_minute1); + } + + set minute(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setMinute_1, value); + } + + int get second { + return _lib._objc_msgSend_82(_id, _lib._sel_second1); + } + + set second(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setSecond_1, value); + } + + int get nanosecond { + return _lib._objc_msgSend_82(_id, _lib._sel_nanosecond1); + } + + set nanosecond(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setNanosecond_1, value); + } + + int get weekday { + return _lib._objc_msgSend_82(_id, _lib._sel_weekday1); + } + + set weekday(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setWeekday_1, value); + } + + int get weekdayOrdinal { + return _lib._objc_msgSend_82(_id, _lib._sel_weekdayOrdinal1); + } + + set weekdayOrdinal(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setWeekdayOrdinal_1, value); + } + + int get quarter { + return _lib._objc_msgSend_82(_id, _lib._sel_quarter1); + } + + set quarter(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setQuarter_1, value); + } + + int get weekOfMonth { + return _lib._objc_msgSend_82(_id, _lib._sel_weekOfMonth1); + } + + set weekOfMonth(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setWeekOfMonth_1, value); + } + + int get weekOfYear { + return _lib._objc_msgSend_82(_id, _lib._sel_weekOfYear1); + } + + set weekOfYear(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setWeekOfYear_1, value); + } + + int get yearForWeekOfYear { + return _lib._objc_msgSend_82(_id, _lib._sel_yearForWeekOfYear1); + } + + set yearForWeekOfYear(int value) { + return _lib._objc_msgSend_634(_id, _lib._sel_setYearForWeekOfYear_1, value); + } + + bool get leapMonth { + return _lib._objc_msgSend_12(_id, _lib._sel_isLeapMonth1); + } + + set leapMonth(bool value) { + return _lib._objc_msgSend_526(_id, _lib._sel_setLeapMonth_1, value); + } + + NSDate? get date { + final _ret = _lib._objc_msgSend_182(_id, _lib._sel_date1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + int week() { + return _lib._objc_msgSend_82(_id, _lib._sel_week1); + } + + void setWeek_(int v) { + _lib._objc_msgSend_422(_id, _lib._sel_setWeek_1, v); + } + + void setValue_forComponent_(int value, int unit) { + _lib._objc_msgSend_770(_id, _lib._sel_setValue_forComponent_1, value, unit); + } + + int valueForComponent_(int unit) { + return _lib._objc_msgSend_771(_id, _lib._sel_valueForComponent_1, unit); + } + + bool get validDate { + return _lib._objc_msgSend_12(_id, _lib._sel_isValidDate1); + } + + bool isValidDateInCalendar_(NSCalendar calendar) { + return _lib._objc_msgSend_772( + _id, _lib._sel_isValidDateInCalendar_1, calendar._id); + } + + @override + NSDateComponents init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDateComponents._(_ret, _lib, retain: true, release: true); + } + + static NSDateComponents new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDateComponents1, _lib._sel_new1); + return NSDateComponents._(_ret, _lib, retain: false, release: true); + } + + static NSDateComponents allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSDateComponents1, _lib._sel_allocWithZone_1, zone); + return NSDateComponents._(_ret, _lib, retain: false, release: true); + } + + static NSDateComponents alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDateComponents1, _lib._sel_alloc1); + return NSDateComponents._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSDateComponents1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSDateComponents1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSDateComponents1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSDateComponents1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSDateComponents1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSDateComponents1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSDateComponents1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSDateComponents1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSDateComponents1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSCalendarOptions { + static const int NSCalendarWrapComponents = 1; + static const int NSCalendarMatchStrictly = 2; + static const int NSCalendarSearchBackwards = 4; + static const int NSCalendarMatchPreviousTimePreservingSmallerUnits = 256; + static const int NSCalendarMatchNextTimePreservingSmallerUnits = 512; + static const int NSCalendarMatchNextTime = 1024; + static const int NSCalendarMatchFirst = 4096; + static const int NSCalendarMatchLast = 8192; +} + +void _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + void Function(ffi.Pointer, bool, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSDate_bool_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSDate_bool_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunction(ThermionDartTexture1 lib, + void Function(NSDate?, bool, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSDate._(arg0, lib, retain: true, release: true), arg1, arg2))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSDate_bool_bool.listener(ThermionDartTexture1 lib, + void Function(NSDate?, bool, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSDate._(arg0, lib, retain: true, release: true), arg1, arg2))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSDate? arg0, bool arg1, ffi.Pointer arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer, bool, ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1, arg2); +} + +class NSNumberFormatter extends NSFormatter { + NSNumberFormatter._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNumberFormatter] that points to the same underlying object as [other]. + static NSNumberFormatter castFrom(T other) { + return NSNumberFormatter._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSNumberFormatter] that wraps the given raw object pointer. + static NSNumberFormatter castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNumberFormatter._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNumberFormatter]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSNumberFormatter1); + } + + int get formattingContext { + return _lib._objc_msgSend_747(_id, _lib._sel_formattingContext1); + } + + set formattingContext(int value) { + return _lib._objc_msgSend_748(_id, _lib._sel_setFormattingContext_1, value); + } + + bool getObjectValue_forString_range_error_( + ffi.Pointer> obj, + NSString string, + ffi.Pointer<_NSRange> rangep, + ffi.Pointer> error) { + return _lib._objc_msgSend_749( + _id, + _lib._sel_getObjectValue_forString_range_error_1, + obj, + string._id, + rangep, + error); + } + + NSString? stringFromNumber_(NSNumber number) { + final _ret = + _lib._objc_msgSend_797(_id, _lib._sel_stringFromNumber_1, number._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSNumber? numberFromString_(NSString string) { + final _ret = + _lib._objc_msgSend_798(_id, _lib._sel_numberFromString_1, string._id); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSString localizedStringFromNumber_numberStyle_( + ThermionDartTexture1 _lib, NSNumber num, int nstyle) { + final _ret = _lib._objc_msgSend_799(_lib._class_NSNumberFormatter1, + _lib._sel_localizedStringFromNumber_numberStyle_1, num._id, nstyle); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static int defaultFormatterBehavior(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_800( + _lib._class_NSNumberFormatter1, _lib._sel_defaultFormatterBehavior1); + } + + static void setDefaultFormatterBehavior_( + ThermionDartTexture1 _lib, int behavior) { + _lib._objc_msgSend_801(_lib._class_NSNumberFormatter1, + _lib._sel_setDefaultFormatterBehavior_1, behavior); + } + + int get numberStyle { + return _lib._objc_msgSend_802(_id, _lib._sel_numberStyle1); + } + + set numberStyle(int value) { + return _lib._objc_msgSend_803(_id, _lib._sel_setNumberStyle_1, value); + } + + NSLocale get locale { + final _ret = _lib._objc_msgSend_196(_id, _lib._sel_locale1); + return NSLocale._(_ret, _lib, retain: true, release: true); + } + + set locale(NSLocale value) { + return _lib._objc_msgSend_757(_id, _lib._sel_setLocale_1, value._id); + } + + bool get generatesDecimalNumbers { + return _lib._objc_msgSend_12(_id, _lib._sel_generatesDecimalNumbers1); + } + + set generatesDecimalNumbers(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setGeneratesDecimalNumbers_1, value); + } + + int get formatterBehavior { + return _lib._objc_msgSend_800(_id, _lib._sel_formatterBehavior1); + } + + set formatterBehavior(int value) { + return _lib._objc_msgSend_804(_id, _lib._sel_setFormatterBehavior_1, value); + } + + NSString get negativeFormat { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_negativeFormat1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set negativeFormat(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setNegativeFormat_1, value._id); + } + + NSDictionary? get textAttributesForNegativeValues { + final _ret = + _lib._objc_msgSend_389(_id, _lib._sel_textAttributesForNegativeValues1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set textAttributesForNegativeValues(NSDictionary? value) { + return _lib._objc_msgSend_633( + _id, + _lib._sel_setTextAttributesForNegativeValues_1, + value?._id ?? ffi.nullptr); + } + + NSString get positiveFormat { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_positiveFormat1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set positiveFormat(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setPositiveFormat_1, value._id); + } + + NSDictionary? get textAttributesForPositiveValues { + final _ret = + _lib._objc_msgSend_389(_id, _lib._sel_textAttributesForPositiveValues1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set textAttributesForPositiveValues(NSDictionary? value) { + return _lib._objc_msgSend_633( + _id, + _lib._sel_setTextAttributesForPositiveValues_1, + value?._id ?? ffi.nullptr); + } + + bool get allowsFloats { + return _lib._objc_msgSend_12(_id, _lib._sel_allowsFloats1); + } + + set allowsFloats(bool value) { + return _lib._objc_msgSend_526(_id, _lib._sel_setAllowsFloats_1, value); + } + + NSString get decimalSeparator { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_decimalSeparator1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set decimalSeparator(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setDecimalSeparator_1, value._id); + } + + bool get alwaysShowsDecimalSeparator { + return _lib._objc_msgSend_12(_id, _lib._sel_alwaysShowsDecimalSeparator1); + } + + set alwaysShowsDecimalSeparator(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setAlwaysShowsDecimalSeparator_1, value); + } + + NSString get currencyDecimalSeparator { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_currencyDecimalSeparator1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set currencyDecimalSeparator(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setCurrencyDecimalSeparator_1, value._id); + } + + bool get usesGroupingSeparator { + return _lib._objc_msgSend_12(_id, _lib._sel_usesGroupingSeparator1); + } + + set usesGroupingSeparator(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setUsesGroupingSeparator_1, value); + } + + NSString get groupingSeparator { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_groupingSeparator1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set groupingSeparator(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setGroupingSeparator_1, value._id); + } + + NSString? get zeroSymbol { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_zeroSymbol1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set zeroSymbol(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setZeroSymbol_1, value?._id ?? ffi.nullptr); + } + + NSDictionary? get textAttributesForZero { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_textAttributesForZero1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set textAttributesForZero(NSDictionary? value) { + return _lib._objc_msgSend_633( + _id, _lib._sel_setTextAttributesForZero_1, value?._id ?? ffi.nullptr); + } + + NSString get nilSymbol { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_nilSymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set nilSymbol(NSString value) { + return _lib._objc_msgSend_645(_id, _lib._sel_setNilSymbol_1, value._id); + } + + NSDictionary? get textAttributesForNil { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_textAttributesForNil1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set textAttributesForNil(NSDictionary? value) { + return _lib._objc_msgSend_633( + _id, _lib._sel_setTextAttributesForNil_1, value?._id ?? ffi.nullptr); + } + + NSString get notANumberSymbol { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_notANumberSymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set notANumberSymbol(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setNotANumberSymbol_1, value._id); + } + + NSDictionary? get textAttributesForNotANumber { + final _ret = + _lib._objc_msgSend_389(_id, _lib._sel_textAttributesForNotANumber1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set textAttributesForNotANumber(NSDictionary? value) { + return _lib._objc_msgSend_633(_id, + _lib._sel_setTextAttributesForNotANumber_1, value?._id ?? ffi.nullptr); + } + + NSString get positiveInfinitySymbol { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_positiveInfinitySymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set positiveInfinitySymbol(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setPositiveInfinitySymbol_1, value._id); + } + + NSDictionary? get textAttributesForPositiveInfinity { + final _ret = _lib._objc_msgSend_389( + _id, _lib._sel_textAttributesForPositiveInfinity1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set textAttributesForPositiveInfinity(NSDictionary? value) { + return _lib._objc_msgSend_633( + _id, + _lib._sel_setTextAttributesForPositiveInfinity_1, + value?._id ?? ffi.nullptr); + } + + NSString get negativeInfinitySymbol { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_negativeInfinitySymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set negativeInfinitySymbol(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setNegativeInfinitySymbol_1, value._id); + } + + NSDictionary? get textAttributesForNegativeInfinity { + final _ret = _lib._objc_msgSend_389( + _id, _lib._sel_textAttributesForNegativeInfinity1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set textAttributesForNegativeInfinity(NSDictionary? value) { + return _lib._objc_msgSend_633( + _id, + _lib._sel_setTextAttributesForNegativeInfinity_1, + value?._id ?? ffi.nullptr); + } + + NSString get positivePrefix { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_positivePrefix1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set positivePrefix(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setPositivePrefix_1, value._id); + } + + NSString get positiveSuffix { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_positiveSuffix1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set positiveSuffix(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setPositiveSuffix_1, value._id); + } + + NSString get negativePrefix { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_negativePrefix1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set negativePrefix(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setNegativePrefix_1, value._id); + } + + NSString get negativeSuffix { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_negativeSuffix1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set negativeSuffix(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setNegativeSuffix_1, value._id); + } + + NSString get currencyCode { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currencyCode1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set currencyCode(NSString value) { + return _lib._objc_msgSend_645(_id, _lib._sel_setCurrencyCode_1, value._id); + } + + NSString get currencySymbol { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currencySymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set currencySymbol(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setCurrencySymbol_1, value._id); + } + + NSString get internationalCurrencySymbol { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_internationalCurrencySymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set internationalCurrencySymbol(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setInternationalCurrencySymbol_1, value._id); + } + + NSString get percentSymbol { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_percentSymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set percentSymbol(NSString value) { + return _lib._objc_msgSend_645(_id, _lib._sel_setPercentSymbol_1, value._id); + } + + NSString get perMillSymbol { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_perMillSymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set perMillSymbol(NSString value) { + return _lib._objc_msgSend_645(_id, _lib._sel_setPerMillSymbol_1, value._id); + } + + NSString get minusSign { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_minusSign1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set minusSign(NSString value) { + return _lib._objc_msgSend_645(_id, _lib._sel_setMinusSign_1, value._id); + } + + NSString get plusSign { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_plusSign1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set plusSign(NSString value) { + return _lib._objc_msgSend_645(_id, _lib._sel_setPlusSign_1, value._id); + } + + NSString get exponentSymbol { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_exponentSymbol1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set exponentSymbol(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setExponentSymbol_1, value._id); + } + + int get groupingSize { + return _lib._objc_msgSend_10(_id, _lib._sel_groupingSize1); + } + + set groupingSize(int value) { + return _lib._objc_msgSend_515(_id, _lib._sel_setGroupingSize_1, value); + } + + int get secondaryGroupingSize { + return _lib._objc_msgSend_10(_id, _lib._sel_secondaryGroupingSize1); + } + + set secondaryGroupingSize(int value) { + return _lib._objc_msgSend_515( + _id, _lib._sel_setSecondaryGroupingSize_1, value); + } + + NSNumber? get multiplier { + final _ret = _lib._objc_msgSend_214(_id, _lib._sel_multiplier1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set multiplier(NSNumber? value) { + return _lib._objc_msgSend_669( + _id, _lib._sel_setMultiplier_1, value?._id ?? ffi.nullptr); + } + + int get formatWidth { + return _lib._objc_msgSend_10(_id, _lib._sel_formatWidth1); + } + + set formatWidth(int value) { + return _lib._objc_msgSend_515(_id, _lib._sel_setFormatWidth_1, value); + } + + NSString get paddingCharacter { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_paddingCharacter1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set paddingCharacter(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setPaddingCharacter_1, value._id); + } + + int get paddingPosition { + return _lib._objc_msgSend_805(_id, _lib._sel_paddingPosition1); + } + + set paddingPosition(int value) { + return _lib._objc_msgSend_806(_id, _lib._sel_setPaddingPosition_1, value); + } + + int get roundingMode { + return _lib._objc_msgSend_807(_id, _lib._sel_roundingMode1); + } + + set roundingMode(int value) { + return _lib._objc_msgSend_808(_id, _lib._sel_setRoundingMode_1, value); + } + + NSNumber get roundingIncrement { + final _ret = _lib._objc_msgSend_809(_id, _lib._sel_roundingIncrement1); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + set roundingIncrement(NSNumber value) { + return _lib._objc_msgSend_810( + _id, _lib._sel_setRoundingIncrement_1, value._id); + } + + int get minimumIntegerDigits { + return _lib._objc_msgSend_10(_id, _lib._sel_minimumIntegerDigits1); + } + + set minimumIntegerDigits(int value) { + return _lib._objc_msgSend_515( + _id, _lib._sel_setMinimumIntegerDigits_1, value); + } + + int get maximumIntegerDigits { + return _lib._objc_msgSend_10(_id, _lib._sel_maximumIntegerDigits1); + } + + set maximumIntegerDigits(int value) { + return _lib._objc_msgSend_515( + _id, _lib._sel_setMaximumIntegerDigits_1, value); + } + + int get minimumFractionDigits { + return _lib._objc_msgSend_10(_id, _lib._sel_minimumFractionDigits1); + } + + set minimumFractionDigits(int value) { + return _lib._objc_msgSend_515( + _id, _lib._sel_setMinimumFractionDigits_1, value); + } + + int get maximumFractionDigits { + return _lib._objc_msgSend_10(_id, _lib._sel_maximumFractionDigits1); + } + + set maximumFractionDigits(int value) { + return _lib._objc_msgSend_515( + _id, _lib._sel_setMaximumFractionDigits_1, value); + } + + NSNumber? get minimum { + final _ret = _lib._objc_msgSend_214(_id, _lib._sel_minimum1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set minimum(NSNumber? value) { + return _lib._objc_msgSend_669( + _id, _lib._sel_setMinimum_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get maximum { + final _ret = _lib._objc_msgSend_214(_id, _lib._sel_maximum1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set maximum(NSNumber? value) { + return _lib._objc_msgSend_669( + _id, _lib._sel_setMaximum_1, value?._id ?? ffi.nullptr); + } + + NSString get currencyGroupingSeparator { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_currencyGroupingSeparator1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set currencyGroupingSeparator(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setCurrencyGroupingSeparator_1, value._id); + } + + bool get lenient { + return _lib._objc_msgSend_12(_id, _lib._sel_isLenient1); + } + + set lenient(bool value) { + return _lib._objc_msgSend_526(_id, _lib._sel_setLenient_1, value); + } + + bool get usesSignificantDigits { + return _lib._objc_msgSend_12(_id, _lib._sel_usesSignificantDigits1); + } + + set usesSignificantDigits(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setUsesSignificantDigits_1, value); + } + + int get minimumSignificantDigits { + return _lib._objc_msgSend_10(_id, _lib._sel_minimumSignificantDigits1); + } + + set minimumSignificantDigits(int value) { + return _lib._objc_msgSend_515( + _id, _lib._sel_setMinimumSignificantDigits_1, value); + } + + int get maximumSignificantDigits { + return _lib._objc_msgSend_10(_id, _lib._sel_maximumSignificantDigits1); + } + + set maximumSignificantDigits(int value) { + return _lib._objc_msgSend_515( + _id, _lib._sel_setMaximumSignificantDigits_1, value); + } + + bool get partialStringValidationEnabled { + return _lib._objc_msgSend_12( + _id, _lib._sel_isPartialStringValidationEnabled1); + } + + set partialStringValidationEnabled(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setPartialStringValidationEnabled_1, value); + } + + bool get hasThousandSeparators { + return _lib._objc_msgSend_12(_id, _lib._sel_hasThousandSeparators1); + } + + set hasThousandSeparators(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setHasThousandSeparators_1, value); + } + + NSString get thousandSeparator { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_thousandSeparator1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set thousandSeparator(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setThousandSeparator_1, value._id); + } + + bool get localizesFormat { + return _lib._objc_msgSend_12(_id, _lib._sel_localizesFormat1); + } + + set localizesFormat(bool value) { + return _lib._objc_msgSend_526(_id, _lib._sel_setLocalizesFormat_1, value); + } + + NSString get format { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_format1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set format(NSString value) { + return _lib._objc_msgSend_645(_id, _lib._sel_setFormat_1, value._id); + } + + NSAttributedString get attributedStringForZero { + final _ret = + _lib._objc_msgSend_730(_id, _lib._sel_attributedStringForZero1); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + set attributedStringForZero(NSAttributedString value) { + return _lib._objc_msgSend_811( + _id, _lib._sel_setAttributedStringForZero_1, value._id); + } + + NSAttributedString get attributedStringForNil { + final _ret = _lib._objc_msgSend_730(_id, _lib._sel_attributedStringForNil1); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + set attributedStringForNil(NSAttributedString value) { + return _lib._objc_msgSend_811( + _id, _lib._sel_setAttributedStringForNil_1, value._id); + } + + NSAttributedString get attributedStringForNotANumber { + final _ret = + _lib._objc_msgSend_730(_id, _lib._sel_attributedStringForNotANumber1); + return NSAttributedString._(_ret, _lib, retain: true, release: true); + } + + set attributedStringForNotANumber(NSAttributedString value) { + return _lib._objc_msgSend_811( + _id, _lib._sel_setAttributedStringForNotANumber_1, value._id); + } + + NSDecimalNumberHandler get roundingBehavior { + final _ret = _lib._objc_msgSend_812(_id, _lib._sel_roundingBehavior1); + return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + } + + set roundingBehavior(NSDecimalNumberHandler value) { + return _lib._objc_msgSend_814( + _id, _lib._sel_setRoundingBehavior_1, value._id); + } + + @override + NSNumberFormatter init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSNumberFormatter._(_ret, _lib, retain: true, release: true); + } + + static NSNumberFormatter new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNumberFormatter1, _lib._sel_new1); + return NSNumberFormatter._(_ret, _lib, retain: false, release: true); + } + + static NSNumberFormatter allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSNumberFormatter1, _lib._sel_allocWithZone_1, zone); + return NSNumberFormatter._(_ret, _lib, retain: false, release: true); + } + + static NSNumberFormatter alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNumberFormatter1, _lib._sel_alloc1); + return NSNumberFormatter._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSNumberFormatter1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSNumberFormatter1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSNumberFormatter1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSNumberFormatter1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSNumberFormatter1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSNumberFormatter1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSNumberFormatter1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSNumberFormatter1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSNumberFormatter1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSNumberFormatterStyle { + static const int NSNumberFormatterNoStyle = 0; + static const int NSNumberFormatterDecimalStyle = 1; + static const int NSNumberFormatterCurrencyStyle = 2; + static const int NSNumberFormatterPercentStyle = 3; + static const int NSNumberFormatterScientificStyle = 4; + static const int NSNumberFormatterSpellOutStyle = 5; + static const int NSNumberFormatterOrdinalStyle = 6; + static const int NSNumberFormatterCurrencyISOCodeStyle = 8; + static const int NSNumberFormatterCurrencyPluralStyle = 9; + static const int NSNumberFormatterCurrencyAccountingStyle = 10; +} + +abstract class NSNumberFormatterBehavior { + static const int NSNumberFormatterBehaviorDefault = 0; + static const int NSNumberFormatterBehavior10_0 = 1000; + static const int NSNumberFormatterBehavior10_4 = 1040; +} + +abstract class NSNumberFormatterPadPosition { + static const int NSNumberFormatterPadBeforePrefix = 0; + static const int NSNumberFormatterPadAfterPrefix = 1; + static const int NSNumberFormatterPadBeforeSuffix = 2; + static const int NSNumberFormatterPadAfterSuffix = 3; +} + +abstract class NSNumberFormatterRoundingMode { + static const int NSNumberFormatterRoundCeiling = 0; + static const int NSNumberFormatterRoundFloor = 1; + static const int NSNumberFormatterRoundDown = 2; + static const int NSNumberFormatterRoundUp = 3; + static const int NSNumberFormatterRoundHalfEven = 4; + static const int NSNumberFormatterRoundHalfDown = 5; + static const int NSNumberFormatterRoundHalfUp = 6; +} + +class NSDecimalNumberHandler extends NSObject { + NSDecimalNumberHandler._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDecimalNumberHandler] that points to the same underlying object as [other]. + static NSDecimalNumberHandler castFrom(T other) { + return NSDecimalNumberHandler._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSDecimalNumberHandler] that wraps the given raw object pointer. + static NSDecimalNumberHandler castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDecimalNumberHandler._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSDecimalNumberHandler]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSDecimalNumberHandler1); + } + + static NSDecimalNumberHandler getDefaultDecimalNumberHandler( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_812(_lib._class_NSDecimalNumberHandler1, + _lib._sel_defaultDecimalNumberHandler1); + return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + } + + NSDecimalNumberHandler + initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + int roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _lib._objc_msgSend_813( + _id, + _lib._sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_1, + roundingMode, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + } + + static NSDecimalNumberHandler + decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + ThermionDartTexture1 _lib, + int roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _lib._objc_msgSend_813( + _lib._class_NSDecimalNumberHandler1, + _lib._sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_1, + roundingMode, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + } + + @override + NSDecimalNumberHandler init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + } + + static NSDecimalNumberHandler new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSDecimalNumberHandler1, _lib._sel_new1); + return NSDecimalNumberHandler._(_ret, _lib, retain: false, release: true); + } + + static NSDecimalNumberHandler allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSDecimalNumberHandler1, _lib._sel_allocWithZone_1, zone); + return NSDecimalNumberHandler._(_ret, _lib, retain: false, release: true); + } + + static NSDecimalNumberHandler alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSDecimalNumberHandler1, _lib._sel_alloc1); + return NSDecimalNumberHandler._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSDecimalNumberHandler1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSDecimalNumberHandler1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSDecimalNumberHandler1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSDecimalNumberHandler1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSDecimalNumberHandler1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSDecimalNumberHandler1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSDecimalNumberHandler1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSDecimalNumberHandler1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDecimalNumberHandler1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSRoundingMode { + static const int NSRoundPlain = 0; + static const int NSRoundDown = 1; + static const int NSRoundUp = 2; + static const int NSRoundBankers = 3; +} + +class NSScanner extends NSObject { + NSScanner._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSScanner] that points to the same underlying object as [other]. + static NSScanner castFrom(T other) { + return NSScanner._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSScanner] that wraps the given raw object pointer. + static NSScanner castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSScanner._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSScanner]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSScanner1); + } + + NSString get string { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_string1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + int get scanLocation { + return _lib._objc_msgSend_10(_id, _lib._sel_scanLocation1); + } + + set scanLocation(int value) { + return _lib._objc_msgSend_515(_id, _lib._sel_setScanLocation_1, value); + } + + NSCharacterSet? get charactersToBeSkipped { + final _ret = _lib._objc_msgSend_815(_id, _lib._sel_charactersToBeSkipped1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + set charactersToBeSkipped(NSCharacterSet? value) { + return _lib._objc_msgSend_816( + _id, _lib._sel_setCharactersToBeSkipped_1, value?._id ?? ffi.nullptr); + } + + bool get caseSensitive { + return _lib._objc_msgSend_12(_id, _lib._sel_caseSensitive1); + } + + set caseSensitive(bool value) { + return _lib._objc_msgSend_526(_id, _lib._sel_setCaseSensitive_1, value); + } + + NSObject? get locale { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_locale1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set locale(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setLocale_1, value?._id ?? ffi.nullptr); + } + + NSScanner initWithString_(NSString string) { + final _ret = + _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, string._id); + return NSScanner._(_ret, _lib, retain: true, release: true); + } + + bool scanInt_(ffi.Pointer result) { + return _lib._objc_msgSend_817(_id, _lib._sel_scanInt_1, result); + } + + bool scanInteger_(ffi.Pointer result) { + return _lib._objc_msgSend_818(_id, _lib._sel_scanInteger_1, result); + } + + bool scanLongLong_(ffi.Pointer result) { + return _lib._objc_msgSend_819(_id, _lib._sel_scanLongLong_1, result); + } + + bool scanUnsignedLongLong_(ffi.Pointer result) { + return _lib._objc_msgSend_820( + _id, _lib._sel_scanUnsignedLongLong_1, result); + } + + bool scanFloat_(ffi.Pointer result) { + return _lib._objc_msgSend_821(_id, _lib._sel_scanFloat_1, result); + } + + bool scanDouble_(ffi.Pointer result) { + return _lib._objc_msgSend_822(_id, _lib._sel_scanDouble_1, result); + } + + bool scanHexInt_(ffi.Pointer result) { + return _lib._objc_msgSend_823(_id, _lib._sel_scanHexInt_1, result); + } + + bool scanHexLongLong_(ffi.Pointer result) { + return _lib._objc_msgSend_820(_id, _lib._sel_scanHexLongLong_1, result); + } + + bool scanHexFloat_(ffi.Pointer result) { + return _lib._objc_msgSend_821(_id, _lib._sel_scanHexFloat_1, result); + } + + bool scanHexDouble_(ffi.Pointer result) { + return _lib._objc_msgSend_822(_id, _lib._sel_scanHexDouble_1, result); + } + + bool scanString_intoString_( + NSString string, ffi.Pointer> result) { + return _lib._objc_msgSend_824( + _id, _lib._sel_scanString_intoString_1, string._id, result); + } + + bool scanCharactersFromSet_intoString_( + NSCharacterSet set, ffi.Pointer> result) { + return _lib._objc_msgSend_825( + _id, _lib._sel_scanCharactersFromSet_intoString_1, set._id, result); + } + + bool scanUpToString_intoString_( + NSString string, ffi.Pointer> result) { + return _lib._objc_msgSend_824( + _id, _lib._sel_scanUpToString_intoString_1, string._id, result); + } + + bool scanUpToCharactersFromSet_intoString_( + NSCharacterSet set, ffi.Pointer> result) { + return _lib._objc_msgSend_825( + _id, _lib._sel_scanUpToCharactersFromSet_intoString_1, set._id, result); + } + + bool get atEnd { + return _lib._objc_msgSend_12(_id, _lib._sel_isAtEnd1); + } + + static NSScanner scannerWithString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSScanner1, _lib._sel_scannerWithString_1, string._id); + return NSScanner._(_ret, _lib, retain: true, release: true); + } + + static NSObject localizedScannerWithString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSScanner1, + _lib._sel_localizedScannerWithString_1, string._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + bool scanDecimal_(ffi.Pointer dcm) { + return _lib._objc_msgSend_826(_id, _lib._sel_scanDecimal_1, dcm); + } + + @override + NSScanner init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSScanner._(_ret, _lib, retain: true, release: true); + } + + static NSScanner new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSScanner1, _lib._sel_new1); + return NSScanner._(_ret, _lib, retain: false, release: true); + } + + static NSScanner allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSScanner1, _lib._sel_allocWithZone_1, zone); + return NSScanner._(_ret, _lib, retain: false, release: true); + } + + static NSScanner alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSScanner1, _lib._sel_alloc1); + return NSScanner._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSScanner1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSScanner1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSScanner1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSScanner1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSScanner1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSScanner1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSScanner1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSScanner1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSScanner1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +final class NSDecimal extends ffi.Opaque {} + +class NSException extends NSObject { + NSException._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSException] that points to the same underlying object as [other]. + static NSException castFrom(T other) { + return NSException._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSException] that wraps the given raw object pointer. + static NSException castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSException._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSException]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSException1); + } + + static NSException exceptionWithName_reason_userInfo_( + ThermionDartTexture1 _lib, + NSString name, + NSString? reason, + NSDictionary? userInfo) { + final _ret = _lib._objc_msgSend_827( + _lib._class_NSException1, + _lib._sel_exceptionWithName_reason_userInfo_1, + name._id, + reason?._id ?? ffi.nullptr, + userInfo?._id ?? ffi.nullptr); + return NSException._(_ret, _lib, retain: true, release: true); + } + + NSException initWithName_reason_userInfo_( + NSString aName, NSString? aReason, NSDictionary? aUserInfo) { + final _ret = _lib._objc_msgSend_828( + _id, + _lib._sel_initWithName_reason_userInfo_1, + aName._id, + aReason?._id ?? ffi.nullptr, + aUserInfo?._id ?? ffi.nullptr); + return NSException._(_ret, _lib, retain: true, release: true); + } + + NSString get name { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get reason { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_reason1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSArray get callStackReturnAddresses { + final _ret = + _lib._objc_msgSend_84(_id, _lib._sel_callStackReturnAddresses1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get callStackSymbols { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_callStackSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + void raise() { + _lib._objc_msgSend_1(_id, _lib._sel_raise1); + } + + static void raise_format_( + ThermionDartTexture1 _lib, NSString name, NSString format) { + _lib._objc_msgSend_550(_lib._class_NSException1, _lib._sel_raise_format_1, + name._id, format._id); + } + + static void raise_format_arguments_(ThermionDartTexture1 _lib, NSString name, + NSString format, ffi.Pointer argList) { + _lib._objc_msgSend_829(_lib._class_NSException1, + _lib._sel_raise_format_arguments_1, name._id, format._id, argList); + } + + @override + NSException init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSException._(_ret, _lib, retain: true, release: true); + } + + static NSException new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_new1); + return NSException._(_ret, _lib, retain: false, release: true); + } + + static NSException allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSException1, _lib._sel_allocWithZone_1, zone); + return NSException._(_ret, _lib, retain: false, release: true); + } + + static NSException alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_alloc1); + return NSException._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSException1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSException1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSException1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSException1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSException1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSException1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSException1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSException1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSException1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSFileHandle extends NSObject { + NSFileHandle._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSFileHandle] that points to the same underlying object as [other]. + static NSFileHandle castFrom(T other) { + return NSFileHandle._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSFileHandle] that wraps the given raw object pointer. + static NSFileHandle castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSFileHandle._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSFileHandle]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSFileHandle1); + } + + NSData get availableData { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_availableData1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSFileHandle initWithFileDescriptor_closeOnDealloc_(int fd, bool closeopt) { + final _ret = _lib._objc_msgSend_830( + _id, _lib._sel_initWithFileDescriptor_closeOnDealloc_1, fd, closeopt); + return NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + NSFileHandle? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + NSData? readDataToEndOfFileAndReturnError_( + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_831( + _id, _lib._sel_readDataToEndOfFileAndReturnError_1, error); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSData? readDataUpToLength_error_( + int length, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_832( + _id, _lib._sel_readDataUpToLength_error_1, length, error); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + bool writeData_error_( + NSData data, ffi.Pointer> error) { + return _lib._objc_msgSend_833( + _id, _lib._sel_writeData_error_1, data._id, error); + } + + bool getOffset_error_(ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _lib._objc_msgSend_834( + _id, _lib._sel_getOffset_error_1, offsetInFile, error); + } + + bool seekToEndReturningOffset_error_( + ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _lib._objc_msgSend_834( + _id, _lib._sel_seekToEndReturningOffset_error_1, offsetInFile, error); + } + + bool seekToOffset_error_( + int offset, ffi.Pointer> error) { + return _lib._objc_msgSend_835( + _id, _lib._sel_seekToOffset_error_1, offset, error); + } + + bool truncateAtOffset_error_( + int offset, ffi.Pointer> error) { + return _lib._objc_msgSend_835( + _id, _lib._sel_truncateAtOffset_error_1, offset, error); + } + + bool synchronizeAndReturnError_(ffi.Pointer> error) { + return _lib._objc_msgSend_242( + _id, _lib._sel_synchronizeAndReturnError_1, error); + } + + bool closeAndReturnError_(ffi.Pointer> error) { + return _lib._objc_msgSend_242(_id, _lib._sel_closeAndReturnError_1, error); + } + + static NSFileHandle getFileHandleWithStandardInput( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_836( + _lib._class_NSFileHandle1, _lib._sel_fileHandleWithStandardInput1); + return NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + static NSFileHandle getFileHandleWithStandardOutput( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_836( + _lib._class_NSFileHandle1, _lib._sel_fileHandleWithStandardOutput1); + return NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + static NSFileHandle getFileHandleWithStandardError( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_836( + _lib._class_NSFileHandle1, _lib._sel_fileHandleWithStandardError1); + return NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + static NSFileHandle getFileHandleWithNullDevice(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_836( + _lib._class_NSFileHandle1, _lib._sel_fileHandleWithNullDevice1); + return NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + static NSFileHandle? fileHandleForReadingAtPath_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSFileHandle1, + _lib._sel_fileHandleForReadingAtPath_1, path._id); + return _ret.address == 0 + ? null + : NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + static NSFileHandle? fileHandleForWritingAtPath_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSFileHandle1, + _lib._sel_fileHandleForWritingAtPath_1, path._id); + return _ret.address == 0 + ? null + : NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + static NSFileHandle? fileHandleForUpdatingAtPath_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSFileHandle1, + _lib._sel_fileHandleForUpdatingAtPath_1, path._id); + return _ret.address == 0 + ? null + : NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + static NSFileHandle? fileHandleForReadingFromURL_error_( + ThermionDartTexture1 _lib, + NSURL url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_837(_lib._class_NSFileHandle1, + _lib._sel_fileHandleForReadingFromURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + static NSFileHandle? fileHandleForWritingToURL_error_( + ThermionDartTexture1 _lib, + NSURL url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_837(_lib._class_NSFileHandle1, + _lib._sel_fileHandleForWritingToURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + static NSFileHandle? fileHandleForUpdatingURL_error_( + ThermionDartTexture1 _lib, + NSURL url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_837(_lib._class_NSFileHandle1, + _lib._sel_fileHandleForUpdatingURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + void readInBackgroundAndNotifyForModes_(NSArray? modes) { + _lib._objc_msgSend_838(_id, _lib._sel_readInBackgroundAndNotifyForModes_1, + modes?._id ?? ffi.nullptr); + } + + void readInBackgroundAndNotify() { + _lib._objc_msgSend_1(_id, _lib._sel_readInBackgroundAndNotify1); + } + + void readToEndOfFileInBackgroundAndNotifyForModes_(NSArray? modes) { + _lib._objc_msgSend_838( + _id, + _lib._sel_readToEndOfFileInBackgroundAndNotifyForModes_1, + modes?._id ?? ffi.nullptr); + } + + void readToEndOfFileInBackgroundAndNotify() { + _lib._objc_msgSend_1(_id, _lib._sel_readToEndOfFileInBackgroundAndNotify1); + } + + void acceptConnectionInBackgroundAndNotifyForModes_(NSArray? modes) { + _lib._objc_msgSend_838( + _id, + _lib._sel_acceptConnectionInBackgroundAndNotifyForModes_1, + modes?._id ?? ffi.nullptr); + } + + void acceptConnectionInBackgroundAndNotify() { + _lib._objc_msgSend_1(_id, _lib._sel_acceptConnectionInBackgroundAndNotify1); + } + + void waitForDataInBackgroundAndNotifyForModes_(NSArray? modes) { + _lib._objc_msgSend_838( + _id, + _lib._sel_waitForDataInBackgroundAndNotifyForModes_1, + modes?._id ?? ffi.nullptr); + } + + void waitForDataInBackgroundAndNotify() { + _lib._objc_msgSend_1(_id, _lib._sel_waitForDataInBackgroundAndNotify1); + } + + ObjCBlock_ffiVoid_NSFileHandle? get readabilityHandler { + final _ret = _lib._objc_msgSend_839(_id, _lib._sel_readabilityHandler1); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSFileHandle._(_ret, _lib, + retain: true, release: true); + } + + set readabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { + return _lib._objc_msgSend_840( + _id, _lib._sel_setReadabilityHandler_1, value?._id ?? ffi.nullptr); + } + + ObjCBlock_ffiVoid_NSFileHandle? get writeabilityHandler { + final _ret = _lib._objc_msgSend_839(_id, _lib._sel_writeabilityHandler1); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSFileHandle._(_ret, _lib, + retain: true, release: true); + } + + set writeabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { + return _lib._objc_msgSend_840( + _id, _lib._sel_setWriteabilityHandler_1, value?._id ?? ffi.nullptr); + } + + NSFileHandle initWithFileDescriptor_(int fd) { + final _ret = + _lib._objc_msgSend_841(_id, _lib._sel_initWithFileDescriptor_1, fd); + return NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + int get fileDescriptor { + return _lib._objc_msgSend_236(_id, _lib._sel_fileDescriptor1); + } + + NSData readDataToEndOfFile() { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_readDataToEndOfFile1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData readDataOfLength_(int length) { + final _ret = + _lib._objc_msgSend_842(_id, _lib._sel_readDataOfLength_1, length); + return NSData._(_ret, _lib, retain: true, release: true); + } + + void writeData_(NSData data) { + _lib._objc_msgSend_284(_id, _lib._sel_writeData_1, data._id); + } + + int get offsetInFile { + return _lib._objc_msgSend_163(_id, _lib._sel_offsetInFile1); + } + + int seekToEndOfFile() { + return _lib._objc_msgSend_163(_id, _lib._sel_seekToEndOfFile1); + } + + void seekToFileOffset_(int offset) { + _lib._objc_msgSend_843(_id, _lib._sel_seekToFileOffset_1, offset); + } + + void truncateFileAtOffset_(int offset) { + _lib._objc_msgSend_843(_id, _lib._sel_truncateFileAtOffset_1, offset); + } + + void synchronizeFile() { + _lib._objc_msgSend_1(_id, _lib._sel_synchronizeFile1); + } + + void closeFile() { + _lib._objc_msgSend_1(_id, _lib._sel_closeFile1); + } + + @override + NSFileHandle init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSFileHandle._(_ret, _lib, retain: true, release: true); + } + + static NSFileHandle new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileHandle1, _lib._sel_new1); + return NSFileHandle._(_ret, _lib, retain: false, release: true); + } + + static NSFileHandle allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSFileHandle1, _lib._sel_allocWithZone_1, zone); + return NSFileHandle._(_ret, _lib, retain: false, release: true); + } + + static NSFileHandle alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileHandle1, _lib._sel_alloc1); + return NSFileHandle._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSFileHandle1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSFileHandle1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSFileHandle1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSFileHandle1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSFileHandle1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSFileHandle1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSFileHandle1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSFileHandle1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSFileHandle1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +void _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[block.ref.target.address]!( + arg0); + +class ObjCBlock_ffiVoid_NSFileHandle extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSFileHandle._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSFileHandle.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSFileHandle.fromFunction( + ThermionDartTexture1 lib, void Function(NSFileHandle) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSFileHandle_registerClosure((ffi + .Pointer + arg0) => + fn(NSFileHandle._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSFileHandle.listener( + ThermionDartTexture1 lib, void Function(NSFileHandle) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + (ffi.Pointer arg0) => fn(NSFileHandle._( + arg0, lib, + retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSFileHandle arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0._id); +} + +class NSHTTPCookieStorage extends NSObject { + NSHTTPCookieStorage._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. + static NSHTTPCookieStorage castFrom(T other) { + return NSHTTPCookieStorage._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. + static NSHTTPCookieStorage castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPCookieStorage._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSHTTPCookieStorage1); + } + + static NSHTTPCookieStorage getSharedHTTPCookieStorage( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_844( + _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); + return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } + + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + ThermionDartTexture1 _lib, NSString identifier) { + final _ret = _lib._objc_msgSend_845( + _lib._class_NSHTTPCookieStorage1, + _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, + identifier._id); + return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } + + NSArray? get cookies { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_cookies1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + void setCookie_(NSHTTPCookie cookie) { + _lib._objc_msgSend_849(_id, _lib._sel_setCookie_1, cookie._id); + } + + void deleteCookie_(NSHTTPCookie cookie) { + _lib._objc_msgSend_849(_id, _lib._sel_deleteCookie_1, cookie._id); + } + + void removeCookiesSinceDate_(NSDate date) { + _lib._objc_msgSend_539(_id, _lib._sel_removeCookiesSinceDate_1, date._id); + } + + NSArray? cookiesForURL_(NSURL URL) { + final _ret = + _lib._objc_msgSend_132(_id, _lib._sel_cookiesForURL_1, URL._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + void setCookies_forURL_mainDocumentURL_( + NSArray cookies, NSURL? URL, NSURL? mainDocumentURL) { + _lib._objc_msgSend_850( + _id, + _lib._sel_setCookies_forURL_mainDocumentURL_1, + cookies._id, + URL?._id ?? ffi.nullptr, + mainDocumentURL?._id ?? ffi.nullptr); + } + + int get cookieAcceptPolicy { + return _lib._objc_msgSend_851(_id, _lib._sel_cookieAcceptPolicy1); + } + + set cookieAcceptPolicy(int value) { + return _lib._objc_msgSend_852( + _id, _lib._sel_setCookieAcceptPolicy_1, value); + } + + NSArray sortedCookiesUsingDescriptors_(NSArray sortOrder) { + final _ret = _lib._objc_msgSend_67( + _id, _lib._sel_sortedCookiesUsingDescriptors_1, sortOrder._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + void storeCookies_forTask_(NSArray cookies, NSURLSessionTask task) { + _lib._objc_msgSend_878( + _id, _lib._sel_storeCookies_forTask_1, cookies._id, task._id); + } + + void getCookiesForTask_completionHandler_( + NSURLSessionTask task, ObjCBlock_ffiVoid_NSArray completionHandler) { + _lib._objc_msgSend_879(_id, _lib._sel_getCookiesForTask_completionHandler_1, + task._id, completionHandler._id); + } + + @override + NSHTTPCookieStorage init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } + + static NSHTTPCookieStorage new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPCookieStorage1, _lib._sel_new1); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + } + + static NSHTTPCookieStorage allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSHTTPCookieStorage1, _lib._sel_allocWithZone_1, zone); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + } + + static NSHTTPCookieStorage alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSHTTPCookieStorage1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSHTTPCookieStorage1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSHTTPCookieStorage1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSHTTPCookieStorage1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSHTTPCookieStorage1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSHTTPCookieStorage1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSHTTPCookieStorage1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSHTTPCookieStorage1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSHTTPCookieStorage1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSHTTPCookie extends NSObject { + NSHTTPCookie._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. + static NSHTTPCookie castFrom(T other) { + return NSHTTPCookie._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. + static NSHTTPCookie castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPCookie._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSHTTPCookie]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHTTPCookie1); + } + + NSHTTPCookie? initWithProperties_(NSDictionary properties) { + final _ret = _lib._objc_msgSend_846( + _id, _lib._sel_initWithProperties_1, properties._id); + return _ret.address == 0 + ? null + : NSHTTPCookie._(_ret, _lib, retain: true, release: true); + } + + static NSHTTPCookie? cookieWithProperties_( + ThermionDartTexture1 _lib, NSDictionary properties) { + final _ret = _lib._objc_msgSend_847(_lib._class_NSHTTPCookie1, + _lib._sel_cookieWithProperties_1, properties._id); + return _ret.address == 0 + ? null + : NSHTTPCookie._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary requestHeaderFieldsWithCookies_( + ThermionDartTexture1 _lib, NSArray cookies) { + final _ret = _lib._objc_msgSend_507(_lib._class_NSHTTPCookie1, + _lib._sel_requestHeaderFieldsWithCookies_1, cookies._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSArray cookiesWithResponseHeaderFields_forURL_( + ThermionDartTexture1 _lib, NSDictionary headerFields, NSURL URL) { + final _ret = _lib._objc_msgSend_848( + _lib._class_NSHTTPCookie1, + _lib._sel_cookiesWithResponseHeaderFields_forURL_1, + headerFields._id, + URL._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get properties { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_properties1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + int get version { + return _lib._objc_msgSend_10(_id, _lib._sel_version1); + } + + NSString get name { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get value { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_value1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSDate? get expiresDate { + final _ret = _lib._objc_msgSend_182(_id, _lib._sel_expiresDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + bool get sessionOnly { + return _lib._objc_msgSend_12(_id, _lib._sel_isSessionOnly1); + } + + NSString get domain { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_domain1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get path { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_path1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool get secure { + return _lib._objc_msgSend_12(_id, _lib._sel_isSecure1); + } + + bool get HTTPOnly { + return _lib._objc_msgSend_12(_id, _lib._sel_isHTTPOnly1); + } + + NSString? get comment { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_comment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSURL? get commentURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_commentURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSArray? get portList { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_portList1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? get sameSitePolicy { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_sameSitePolicy1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + @override + NSHTTPCookie init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSHTTPCookie._(_ret, _lib, retain: true, release: true); + } + + static NSHTTPCookie new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPCookie1, _lib._sel_new1); + return NSHTTPCookie._(_ret, _lib, retain: false, release: true); + } + + static NSHTTPCookie allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSHTTPCookie1, _lib._sel_allocWithZone_1, zone); + return NSHTTPCookie._(_ret, _lib, retain: false, release: true); + } + + static NSHTTPCookie alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPCookie1, _lib._sel_alloc1); + return NSHTTPCookie._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSHTTPCookie1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSHTTPCookie1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSHTTPCookie1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSHTTPCookie1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSHTTPCookie1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSHTTPCookie1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSHTTPCookie1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSHTTPCookie1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSHTTPCookie1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSHTTPCookieAcceptPolicy { + static const int NSHTTPCookieAcceptPolicyAlways = 0; + static const int NSHTTPCookieAcceptPolicyNever = 1; + static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; +} + +class NSURLSessionTask extends NSObject { + NSURLSessionTask._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. + static NSURLSessionTask castFrom(T other) { + return NSURLSessionTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. + static NSURLSessionTask castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionTask._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionTask1); + } + + int get taskIdentifier { + return _lib._objc_msgSend_10(_id, _lib._sel_taskIdentifier1); + } + + NSURLRequest? get originalRequest { + final _ret = _lib._objc_msgSend_872(_id, _lib._sel_originalRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + NSURLRequest? get currentRequest { + final _ret = _lib._objc_msgSend_872(_id, _lib._sel_currentRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_874(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + NSObject? get delegate { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set delegate(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + } + + NSProgress get progress { + final _ret = _lib._objc_msgSend_875(_id, _lib._sel_progress1); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + NSDate? get earliestBeginDate { + final _ret = _lib._objc_msgSend_182(_id, _lib._sel_earliestBeginDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + set earliestBeginDate(NSDate? value) { + return _lib._objc_msgSend_795( + _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); + } + + int get countOfBytesClientExpectsToSend { + return _lib._objc_msgSend_665( + _id, _lib._sel_countOfBytesClientExpectsToSend1); + } + + set countOfBytesClientExpectsToSend(int value) { + return _lib._objc_msgSend_666( + _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); + } + + int get countOfBytesClientExpectsToReceive { + return _lib._objc_msgSend_665( + _id, _lib._sel_countOfBytesClientExpectsToReceive1); + } + + set countOfBytesClientExpectsToReceive(int value) { + return _lib._objc_msgSend_666( + _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); + } + + int get countOfBytesSent { + return _lib._objc_msgSend_665(_id, _lib._sel_countOfBytesSent1); + } + + int get countOfBytesReceived { + return _lib._objc_msgSend_665(_id, _lib._sel_countOfBytesReceived1); + } + + int get countOfBytesExpectedToSend { + return _lib._objc_msgSend_665(_id, _lib._sel_countOfBytesExpectedToSend1); + } + + int get countOfBytesExpectedToReceive { + return _lib._objc_msgSend_665( + _id, _lib._sel_countOfBytesExpectedToReceive1); + } + + NSString? get taskDescription { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_taskDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set taskDescription(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); + } + + void cancel() { + _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + int get state { + return _lib._objc_msgSend_876(_id, _lib._sel_state1); + } + + NSError? get error { + final _ret = _lib._objc_msgSend_321(_id, _lib._sel_error1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } + + void suspend() { + _lib._objc_msgSend_1(_id, _lib._sel_suspend1); + } + + void resume() { + _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } + + double get priority { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_238_fpret(_id, _lib._sel_priority1) + : _lib._objc_msgSend_238(_id, _lib._sel_priority1); + } + + set priority(double value) { + return _lib._objc_msgSend_877(_id, _lib._sel_setPriority_1, value); + } + + bool get prefersIncrementalDelivery { + return _lib._objc_msgSend_12(_id, _lib._sel_prefersIncrementalDelivery1); + } + + set prefersIncrementalDelivery(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setPrefersIncrementalDelivery_1, value); + } + + @override + NSURLSessionTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionTask new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionTask allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSessionTask1, _lib._sel_allocWithZone_1, zone); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionTask alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLSessionTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLSessionTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSURLSessionTask1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLSessionTask1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLSessionTask1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLSessionTask1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLSessionTask1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSURLSessionTask1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionTask1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSURLRequest extends NSObject { + NSURLRequest._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLRequest] that points to the same underlying object as [other]. + static NSURLRequest castFrom(T other) { + return NSURLRequest._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLRequest] that wraps the given raw object pointer. + static NSURLRequest castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLRequest._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLRequest]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLRequest1); + } + + static NSURLRequest requestWithURL_(ThermionDartTexture1 _lib, NSURL URL) { + final _ret = _lib._objc_msgSend_261( + _lib._class_NSURLRequest1, _lib._sel_requestWithURL_1, URL._id); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + static bool getSupportsSecureCoding(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); + } + + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( + ThermionDartTexture1 _lib, + NSURL URL, + int cachePolicy, + double timeoutInterval) { + final _ret = _lib._objc_msgSend_853( + _lib._class_NSURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL._id, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + NSURLRequest initWithURL_(NSURL URL) { + final _ret = _lib._objc_msgSend_261(_id, _lib._sel_initWithURL_1, URL._id); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + NSURLRequest initWithURL_cachePolicy_timeoutInterval_( + NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _lib._objc_msgSend_853( + _id, + _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, + URL._id, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + NSURL? get URL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + int get cachePolicy { + return _lib._objc_msgSend_854(_id, _lib._sel_cachePolicy1); + } + + double get timeoutInterval { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_timeoutInterval1) + : _lib._objc_msgSend_164(_id, _lib._sel_timeoutInterval1); + } + + NSURL? get mainDocumentURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_mainDocumentURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + int get networkServiceType { + return _lib._objc_msgSend_855(_id, _lib._sel_networkServiceType1); + } + + bool get allowsCellularAccess { + return _lib._objc_msgSend_12(_id, _lib._sel_allowsCellularAccess1); + } + + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_12(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } + + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_12( + _id, _lib._sel_allowsConstrainedNetworkAccess1); + } + + bool get assumesHTTP3Capable { + return _lib._objc_msgSend_12(_id, _lib._sel_assumesHTTP3Capable1); + } + + int get attribution { + return _lib._objc_msgSend_856(_id, _lib._sel_attribution1); + } + + bool get requiresDNSSECValidation { + return _lib._objc_msgSend_12(_id, _lib._sel_requiresDNSSECValidation1); + } + + NSString? get HTTPMethod { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_HTTPMethod1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get allHTTPHeaderFields { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_allHTTPHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSString? valueForHTTPHeaderField_(NSString field) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_valueForHTTPHeaderField_1, field._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSData? get HTTPBody { + final _ret = _lib._objc_msgSend_285(_id, _lib._sel_HTTPBody1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSInputStream? get HTTPBodyStream { + final _ret = _lib._objc_msgSend_871(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } + + bool get HTTPShouldHandleCookies { + return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldHandleCookies1); + } + + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldUsePipelining1); + } + + @override + NSURLRequest init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + static NSURLRequest new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); + } + + static NSURLRequest allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLRequest1, _lib._sel_allocWithZone_1, zone); + return NSURLRequest._(_ret, _lib, retain: false, release: true); + } + + static NSURLRequest alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLRequest1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLRequest1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLRequest1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLRequest1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLRequest1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLRequest1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLRequest1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSURLRequest1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLRequest1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSURLRequestCachePolicy { + static const int NSURLRequestUseProtocolCachePolicy = 0; + static const int NSURLRequestReloadIgnoringLocalCacheData = 1; + static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; + static const int NSURLRequestReloadIgnoringCacheData = 1; + static const int NSURLRequestReturnCacheDataElseLoad = 2; + static const int NSURLRequestReturnCacheDataDontLoad = 3; + static const int NSURLRequestReloadRevalidatingCacheData = 5; +} + +abstract class NSURLRequestNetworkServiceType { + static const int NSURLNetworkServiceTypeDefault = 0; + static const int NSURLNetworkServiceTypeVoIP = 1; + static const int NSURLNetworkServiceTypeVideo = 2; + static const int NSURLNetworkServiceTypeBackground = 3; + static const int NSURLNetworkServiceTypeVoice = 4; + static const int NSURLNetworkServiceTypeResponsiveData = 6; + static const int NSURLNetworkServiceTypeAVStreaming = 8; + static const int NSURLNetworkServiceTypeResponsiveAV = 9; + static const int NSURLNetworkServiceTypeCallSignaling = 11; +} + +abstract class NSURLRequestAttribution { + static const int NSURLRequestAttributionDeveloper = 0; + static const int NSURLRequestAttributionUser = 1; +} + +class NSInputStream extends NSStream { + NSInputStream._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSInputStream] that points to the same underlying object as [other]. + static NSInputStream castFrom(T other) { + return NSInputStream._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSInputStream] that wraps the given raw object pointer. + static NSInputStream castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInputStream._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSInputStream]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); + } + + int read_maxLength_(ffi.Pointer buffer, int len) { + return _lib._objc_msgSend_859(_id, _lib._sel_read_maxLength_1, buffer, len); + } + + bool getBuffer_length_(ffi.Pointer> buffer, + ffi.Pointer len) { + return _lib._objc_msgSend_869( + _id, _lib._sel_getBuffer_length_1, buffer, len); + } + + bool get hasBytesAvailable { + return _lib._objc_msgSend_12(_id, _lib._sel_hasBytesAvailable1); + } + + NSInputStream initWithData_(NSData data) { + final _ret = + _lib._objc_msgSend_278(_id, _lib._sel_initWithData_1, data._id); + return NSInputStream._(_ret, _lib, retain: true, release: true); + } + + NSInputStream? initWithURL_(NSURL url) { + final _ret = _lib._objc_msgSend_276(_id, _lib._sel_initWithURL_1, url._id); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } + + NSInputStream? initWithFileAtPath_(NSString path) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_initWithFileAtPath_1, path._id); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } + + static NSInputStream? inputStreamWithData_( + ThermionDartTexture1 _lib, NSData data) { + final _ret = _lib._objc_msgSend_870( + _lib._class_NSInputStream1, _lib._sel_inputStreamWithData_1, data._id); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } + + static NSInputStream? inputStreamWithFileAtPath_( + ThermionDartTexture1 _lib, NSString path) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSInputStream1, + _lib._sel_inputStreamWithFileAtPath_1, path._id); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } + + static NSInputStream? inputStreamWithURL_( + ThermionDartTexture1 _lib, NSURL url) { + final _ret = _lib._objc_msgSend_276( + _lib._class_NSInputStream1, _lib._sel_inputStreamWithURL_1, url._id); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } + + static void getStreamsToHostWithName_port_inputStream_outputStream_( + ThermionDartTexture1 _lib, + NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _lib._objc_msgSend_863( + _lib._class_NSInputStream1, + _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, + hostname._id, + port, + inputStream, + outputStream); + } + + static void getStreamsToHost_port_inputStream_outputStream_( + ThermionDartTexture1 _lib, + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _lib._objc_msgSend_867( + _lib._class_NSInputStream1, + _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, + host._id, + port, + inputStream, + outputStream); + } + + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + ThermionDartTexture1 _lib, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _lib._objc_msgSend_868( + _lib._class_NSInputStream1, + _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, + bufferSize, + inputStream, + outputStream); + } + + @override + NSInputStream init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSInputStream._(_ret, _lib, retain: true, release: true); + } + + static NSInputStream new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_new1); + return NSInputStream._(_ret, _lib, retain: false, release: true); + } + + static NSInputStream allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSInputStream1, _lib._sel_allocWithZone_1, zone); + return NSInputStream._(_ret, _lib, retain: false, release: true); + } + + static NSInputStream alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_alloc1); + return NSInputStream._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSInputStream1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSInputStream1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSInputStream1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSInputStream1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSInputStream1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSInputStream1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSInputStream1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSInputStream1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSInputStream1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSStream extends NSObject { + NSStream._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSStream] that points to the same underlying object as [other]. + static NSStream castFrom(T other) { + return NSStream._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSStream] that wraps the given raw object pointer. + static NSStream castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSStream._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSStream]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSStream1); + } + + void open() { + _lib._objc_msgSend_1(_id, _lib._sel_open1); + } + + void close() { + _lib._objc_msgSend_1(_id, _lib._sel_close1); + } + + NSObject? get delegate { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set delegate(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + } + + NSObject? propertyForKey_(NSString key) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_propertyForKey_1, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + bool setProperty_forKey_(NSObject? property, NSString key) { + return _lib._objc_msgSend_857(_id, _lib._sel_setProperty_forKey_1, + property?._id ?? ffi.nullptr, key._id); + } + + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { + _lib._objc_msgSend_568( + _id, _lib._sel_scheduleInRunLoop_forMode_1, aRunLoop._id, mode._id); + } + + void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { + _lib._objc_msgSend_568( + _id, _lib._sel_removeFromRunLoop_forMode_1, aRunLoop._id, mode._id); + } + + int get streamStatus { + return _lib._objc_msgSend_858(_id, _lib._sel_streamStatus1); + } + + NSError? get streamError { + final _ret = _lib._objc_msgSend_321(_id, _lib._sel_streamError1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } + + static void getStreamsToHostWithName_port_inputStream_outputStream_( + ThermionDartTexture1 _lib, + NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _lib._objc_msgSend_863( + _lib._class_NSStream1, + _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, + hostname._id, + port, + inputStream, + outputStream); + } + + static void getStreamsToHost_port_inputStream_outputStream_( + ThermionDartTexture1 _lib, + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _lib._objc_msgSend_867( + _lib._class_NSStream1, + _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, + host._id, + port, + inputStream, + outputStream); + } + + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + ThermionDartTexture1 _lib, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _lib._objc_msgSend_868( + _lib._class_NSStream1, + _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, + bufferSize, + inputStream, + outputStream); + } + + @override + NSStream init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSStream._(_ret, _lib, retain: true, release: true); + } + + static NSStream new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_new1); + return NSStream._(_ret, _lib, retain: false, release: true); + } + + static NSStream allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSStream1, _lib._sel_allocWithZone_1, zone); + return NSStream._(_ret, _lib, retain: false, release: true); + } + + static NSStream alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_alloc1); + return NSStream._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSStream1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSStream1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSStream1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSStream1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSStream1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSStream1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSStream1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSStream1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSStream1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSStreamStatus { + static const int NSStreamStatusNotOpen = 0; + static const int NSStreamStatusOpening = 1; + static const int NSStreamStatusOpen = 2; + static const int NSStreamStatusReading = 3; + static const int NSStreamStatusWriting = 4; + static const int NSStreamStatusAtEnd = 5; + static const int NSStreamStatusClosed = 6; + static const int NSStreamStatusError = 7; +} + +class NSOutputStream extends NSStream { + NSOutputStream._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOutputStream] that points to the same underlying object as [other]. + static NSOutputStream castFrom(T other) { + return NSOutputStream._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSOutputStream] that wraps the given raw object pointer. + static NSOutputStream castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOutputStream._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSOutputStream]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOutputStream1); + } + + int write_maxLength_(ffi.Pointer buffer, int len) { + return _lib._objc_msgSend_859( + _id, _lib._sel_write_maxLength_1, buffer, len); + } + + bool get hasSpaceAvailable { + return _lib._objc_msgSend_12(_id, _lib._sel_hasSpaceAvailable1); + } + + NSOutputStream initToMemory() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initToMemory1); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + NSOutputStream initToBuffer_capacity_( + ffi.Pointer buffer, int capacity) { + final _ret = _lib._objc_msgSend_860( + _id, _lib._sel_initToBuffer_capacity_1, buffer, capacity); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + NSOutputStream? initWithURL_append_(NSURL url, bool shouldAppend) { + final _ret = _lib._objc_msgSend_861( + _id, _lib._sel_initWithURL_append_1, url._id, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + NSOutputStream? initToFileAtPath_append_(NSString path, bool shouldAppend) { + final _ret = _lib._objc_msgSend_862( + _id, _lib._sel_initToFileAtPath_append_1, path._id, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static NSOutputStream outputStreamToMemory(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOutputStream1, _lib._sel_outputStreamToMemory1); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static NSOutputStream outputStreamToBuffer_capacity_( + ThermionDartTexture1 _lib, ffi.Pointer buffer, int capacity) { + final _ret = _lib._objc_msgSend_860(_lib._class_NSOutputStream1, + _lib._sel_outputStreamToBuffer_capacity_1, buffer, capacity); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static NSOutputStream outputStreamToFileAtPath_append_( + ThermionDartTexture1 _lib, NSString path, bool shouldAppend) { + final _ret = _lib._objc_msgSend_30(_lib._class_NSOutputStream1, + _lib._sel_outputStreamToFileAtPath_append_1, path._id, shouldAppend); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static NSOutputStream? outputStreamWithURL_append_( + ThermionDartTexture1 _lib, NSURL url, bool shouldAppend) { + final _ret = _lib._objc_msgSend_861(_lib._class_NSOutputStream1, + _lib._sel_outputStreamWithURL_append_1, url._id, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static void getStreamsToHostWithName_port_inputStream_outputStream_( + ThermionDartTexture1 _lib, + NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _lib._objc_msgSend_863( + _lib._class_NSOutputStream1, + _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, + hostname._id, + port, + inputStream, + outputStream); + } + + static void getStreamsToHost_port_inputStream_outputStream_( + ThermionDartTexture1 _lib, + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _lib._objc_msgSend_867( + _lib._class_NSOutputStream1, + _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, + host._id, + port, + inputStream, + outputStream); + } + + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + ThermionDartTexture1 _lib, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _lib._objc_msgSend_868( + _lib._class_NSOutputStream1, + _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, + bufferSize, + inputStream, + outputStream); + } + + @override + NSOutputStream init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static NSOutputStream new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_new1); + return NSOutputStream._(_ret, _lib, retain: false, release: true); + } + + static NSOutputStream allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSOutputStream1, _lib._sel_allocWithZone_1, zone); + return NSOutputStream._(_ret, _lib, retain: false, release: true); + } + + static NSOutputStream alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_alloc1); + return NSOutputStream._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSOutputStream1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSOutputStream1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSOutputStream1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSOutputStream1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSOutputStream1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSOutputStream1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSOutputStream1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSOutputStream1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOutputStream1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSHost extends NSObject { + NSHost._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSHost] that points to the same underlying object as [other]. + static NSHost castFrom(T other) { + return NSHost._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSHost] that wraps the given raw object pointer. + static NSHost castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHost._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSHost]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHost1); + } + + static NSHost currentHost(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHost1, _lib._sel_currentHost1); + return NSHost._(_ret, _lib, retain: true, release: true); + } + + static NSHost hostWithName_(ThermionDartTexture1 _lib, NSString? name) { + final _ret = _lib._objc_msgSend_864(_lib._class_NSHost1, + _lib._sel_hostWithName_1, name?._id ?? ffi.nullptr); + return NSHost._(_ret, _lib, retain: true, release: true); + } + + static NSHost hostWithAddress_(ThermionDartTexture1 _lib, NSString address) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSHost1, _lib._sel_hostWithAddress_1, address._id); + return NSHost._(_ret, _lib, retain: true, release: true); + } + + bool isEqualToHost_(NSHost aHost) { + return _lib._objc_msgSend_865(_id, _lib._sel_isEqualToHost_1, aHost._id); + } + + NSString? get name { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray get names { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_names1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? get address { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_address1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray get addresses { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_addresses1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? get localizedName { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_localizedName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static void setHostCacheEnabled_(ThermionDartTexture1 _lib, bool flag) { + _lib._objc_msgSend_866( + _lib._class_NSHost1, _lib._sel_setHostCacheEnabled_1, flag); + } + + static bool isHostCacheEnabled(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSHost1, _lib._sel_isHostCacheEnabled1); + } + + static void flushHostCache(ThermionDartTexture1 _lib) { + _lib._objc_msgSend_1(_lib._class_NSHost1, _lib._sel_flushHostCache1); + } + + @override + NSHost init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSHost._(_ret, _lib, retain: true, release: true); + } + + static NSHost new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSHost1, _lib._sel_new1); + return NSHost._(_ret, _lib, retain: false, release: true); + } + + static NSHost allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSHost1, _lib._sel_allocWithZone_1, zone); + return NSHost._(_ret, _lib, retain: false, release: true); + } + + static NSHost alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSHost1, _lib._sel_alloc1); + return NSHost._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSHost1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSHost1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSHost1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSHost1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSHost1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSHost1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSHost1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSHost1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSHost1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSURLResponse extends NSObject { + NSURLResponse._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLResponse] that points to the same underlying object as [other]. + static NSURLResponse castFrom(T other) { + return NSURLResponse._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLResponse] that wraps the given raw object pointer. + static NSURLResponse castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLResponse._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); + } + + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + NSURL URL, NSString? MIMEType, int length, NSString? name) { + final _ret = _lib._objc_msgSend_873( + _id, + _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, + URL._id, + MIMEType?._id ?? ffi.nullptr, + length, + name?._id ?? ffi.nullptr); + return NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + NSURL? get URL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSString? get MIMEType { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_MIMEType1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + int get expectedContentLength { + return _lib._objc_msgSend_237(_id, _lib._sel_expectedContentLength1); + } + + NSString? get textEncodingName { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_textEncodingName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get suggestedFilename { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_suggestedFilename1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLResponse init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + static NSURLResponse new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); + } + + static NSURLResponse allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLResponse1, _lib._sel_allocWithZone_1, zone); + return NSURLResponse._(_ret, _lib, retain: false, release: true); + } + + static NSURLResponse alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLResponse1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLResponse1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLResponse1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLResponse1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLResponse1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLResponse1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLResponse1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSURLResponse1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLResponse1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSURLSessionTaskState { + static const int NSURLSessionTaskStateRunning = 0; + static const int NSURLSessionTaskStateSuspended = 1; + static const int NSURLSessionTaskStateCanceling = 2; + static const int NSURLSessionTaskStateCompleted = 3; +} + +void _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSArray_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSArray_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSArray_closureRegistry[block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSArray extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSArray._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray.fromFunction( + ThermionDartTexture1 lib, void Function(NSArray?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSArray._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSArray.listener( + ThermionDartTexture1 lib, void Function(NSArray?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSArray._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSArray? arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); +} + +class NSIndexPath extends NSObject { + NSIndexPath._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSIndexPath] that points to the same underlying object as [other]. + static NSIndexPath castFrom(T other) { + return NSIndexPath._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSIndexPath] that wraps the given raw object pointer. + static NSIndexPath castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSIndexPath._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSIndexPath]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexPath1); + } + + static NSIndexPath indexPathWithIndex_(ThermionDartTexture1 _lib, int index) { + final _ret = _lib._objc_msgSend_64( + _lib._class_NSIndexPath1, _lib._sel_indexPathWithIndex_1, index); + return NSIndexPath._(_ret, _lib, retain: true, release: true); + } + + static NSIndexPath indexPathWithIndexes_length_(ThermionDartTexture1 _lib, + ffi.Pointer indexes, int length) { + final _ret = _lib._objc_msgSend_880(_lib._class_NSIndexPath1, + _lib._sel_indexPathWithIndexes_length_1, indexes, length); + return NSIndexPath._(_ret, _lib, retain: true, release: true); + } + + NSIndexPath initWithIndexes_length_( + ffi.Pointer indexes, int length) { + final _ret = _lib._objc_msgSend_880( + _id, _lib._sel_initWithIndexes_length_1, indexes, length); + return NSIndexPath._(_ret, _lib, retain: true, release: true); + } + + NSIndexPath initWithIndex_(int index) { + final _ret = _lib._objc_msgSend_64(_id, _lib._sel_initWithIndex_1, index); + return NSIndexPath._(_ret, _lib, retain: true, release: true); + } + + NSIndexPath indexPathByAddingIndex_(int index) { + final _ret = + _lib._objc_msgSend_881(_id, _lib._sel_indexPathByAddingIndex_1, index); + return NSIndexPath._(_ret, _lib, retain: true, release: true); + } + + NSIndexPath indexPathByRemovingLastIndex() { + final _ret = + _lib._objc_msgSend_882(_id, _lib._sel_indexPathByRemovingLastIndex1); + return NSIndexPath._(_ret, _lib, retain: true, release: true); + } + + int indexAtPosition_(int position) { + return _lib._objc_msgSend_93(_id, _lib._sel_indexAtPosition_1, position); + } + + int get length { + return _lib._objc_msgSend_10(_id, _lib._sel_length1); + } + + void getIndexes_range_( + ffi.Pointer indexes, _NSRange positionRange) { + _lib._objc_msgSend_883( + _id, _lib._sel_getIndexes_range_1, indexes, positionRange); + } + + int compare_(NSIndexPath otherObject) { + return _lib._objc_msgSend_884(_id, _lib._sel_compare_1, otherObject._id); + } + + void getIndexes_(ffi.Pointer indexes) { + _lib._objc_msgSend_885(_id, _lib._sel_getIndexes_1, indexes); + } + + @override + NSIndexPath init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSIndexPath._(_ret, _lib, retain: true, release: true); + } + + static NSIndexPath new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexPath1, _lib._sel_new1); + return NSIndexPath._(_ret, _lib, retain: false, release: true); + } + + static NSIndexPath allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSIndexPath1, _lib._sel_allocWithZone_1, zone); + return NSIndexPath._(_ret, _lib, retain: false, release: true); + } + + static NSIndexPath alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSIndexPath1, _lib._sel_alloc1); + return NSIndexPath._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSIndexPath1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSIndexPath1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSIndexPath1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSIndexPath1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSIndexPath1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSIndexPath1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSIndexPath1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSIndexPath1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSIndexPath1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSInflectionRule extends NSObject { + NSInflectionRule._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSInflectionRule] that points to the same underlying object as [other]. + static NSInflectionRule castFrom(T other) { + return NSInflectionRule._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSInflectionRule] that wraps the given raw object pointer. + static NSInflectionRule castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInflectionRule._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSInflectionRule]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSInflectionRule1); + } + + @override + NSObject init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSInflectionRule getAutomaticRule(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_886( + _lib._class_NSInflectionRule1, _lib._sel_automaticRule1); + return NSInflectionRule._(_ret, _lib, retain: true, release: true); + } + + static bool canInflectLanguage_( + ThermionDartTexture1 _lib, NSString language) { + return _lib._objc_msgSend_63(_lib._class_NSInflectionRule1, + _lib._sel_canInflectLanguage_1, language._id); + } + + static bool getCanInflectPreferredLocalization(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSInflectionRule1, + _lib._sel_canInflectPreferredLocalization1); + } + + static NSInflectionRule new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSInflectionRule1, _lib._sel_new1); + return NSInflectionRule._(_ret, _lib, retain: false, release: true); + } + + static NSInflectionRule allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSInflectionRule1, _lib._sel_allocWithZone_1, zone); + return NSInflectionRule._(_ret, _lib, retain: false, release: true); + } + + static NSInflectionRule alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSInflectionRule1, _lib._sel_alloc1); + return NSInflectionRule._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSInflectionRule1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSInflectionRule1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSInflectionRule1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSInflectionRule1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSInflectionRule1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSInflectionRule1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSInflectionRule1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSInflectionRule1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSInflectionRule1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSMorphology extends NSObject { + NSMorphology._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMorphology] that points to the same underlying object as [other]. + static NSMorphology castFrom(T other) { + return NSMorphology._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSMorphology] that wraps the given raw object pointer. + static NSMorphology castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMorphology._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMorphology]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMorphology1); + } + + int get grammaticalGender { + return _lib._objc_msgSend_887(_id, _lib._sel_grammaticalGender1); + } + + set grammaticalGender(int value) { + return _lib._objc_msgSend_888(_id, _lib._sel_setGrammaticalGender_1, value); + } + + int get partOfSpeech { + return _lib._objc_msgSend_889(_id, _lib._sel_partOfSpeech1); + } + + set partOfSpeech(int value) { + return _lib._objc_msgSend_890(_id, _lib._sel_setPartOfSpeech_1, value); + } + + int get number { + return _lib._objc_msgSend_891(_id, _lib._sel_number1); + } + + set number(int value) { + return _lib._objc_msgSend_892(_id, _lib._sel_setNumber_1, value); + } + + NSMorphologyCustomPronoun? customPronounForLanguage_(NSString language) { + final _ret = _lib._objc_msgSend_893( + _id, _lib._sel_customPronounForLanguage_1, language._id); + return _ret.address == 0 + ? null + : NSMorphologyCustomPronoun._(_ret, _lib, retain: true, release: true); + } + + bool setCustomPronoun_forLanguage_error_(NSMorphologyCustomPronoun? features, + NSString language, ffi.Pointer> error) { + return _lib._objc_msgSend_894( + _id, + _lib._sel_setCustomPronoun_forLanguage_error_1, + features?._id ?? ffi.nullptr, + language._id, + error); + } + + bool get unspecified { + return _lib._objc_msgSend_12(_id, _lib._sel_isUnspecified1); + } + + static NSMorphology getUserMorphology(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_895( + _lib._class_NSMorphology1, _lib._sel_userMorphology1); + return NSMorphology._(_ret, _lib, retain: true, release: true); + } + + @override + NSMorphology init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMorphology._(_ret, _lib, retain: true, release: true); + } + + static NSMorphology new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMorphology1, _lib._sel_new1); + return NSMorphology._(_ret, _lib, retain: false, release: true); + } + + static NSMorphology allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMorphology1, _lib._sel_allocWithZone_1, zone); + return NSMorphology._(_ret, _lib, retain: false, release: true); + } + + static NSMorphology alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMorphology1, _lib._sel_alloc1); + return NSMorphology._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSMorphology1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSMorphology1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMorphology1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMorphology1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSMorphology1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSMorphology1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSMorphology1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSMorphology1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMorphology1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSGrammaticalGender { + static const int NSGrammaticalGenderNotSet = 0; + static const int NSGrammaticalGenderFeminine = 1; + static const int NSGrammaticalGenderMasculine = 2; + static const int NSGrammaticalGenderNeuter = 3; +} + +abstract class NSGrammaticalPartOfSpeech { + static const int NSGrammaticalPartOfSpeechNotSet = 0; + static const int NSGrammaticalPartOfSpeechDeterminer = 1; + static const int NSGrammaticalPartOfSpeechPronoun = 2; + static const int NSGrammaticalPartOfSpeechLetter = 3; + static const int NSGrammaticalPartOfSpeechAdverb = 4; + static const int NSGrammaticalPartOfSpeechParticle = 5; + static const int NSGrammaticalPartOfSpeechAdjective = 6; + static const int NSGrammaticalPartOfSpeechAdposition = 7; + static const int NSGrammaticalPartOfSpeechVerb = 8; + static const int NSGrammaticalPartOfSpeechNoun = 9; + static const int NSGrammaticalPartOfSpeechConjunction = 10; + static const int NSGrammaticalPartOfSpeechNumeral = 11; + static const int NSGrammaticalPartOfSpeechInterjection = 12; + static const int NSGrammaticalPartOfSpeechPreposition = 13; + static const int NSGrammaticalPartOfSpeechAbbreviation = 14; +} + +abstract class NSGrammaticalNumber { + static const int NSGrammaticalNumberNotSet = 0; + static const int NSGrammaticalNumberSingular = 1; + static const int NSGrammaticalNumberZero = 2; + static const int NSGrammaticalNumberPlural = 3; + static const int NSGrammaticalNumberPluralTwo = 4; + static const int NSGrammaticalNumberPluralFew = 5; + static const int NSGrammaticalNumberPluralMany = 6; +} + +class NSMorphologyCustomPronoun extends NSObject { + NSMorphologyCustomPronoun._( + ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMorphologyCustomPronoun] that points to the same underlying object as [other]. + static NSMorphologyCustomPronoun castFrom(T other) { + return NSMorphologyCustomPronoun._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMorphologyCustomPronoun] that wraps the given raw object pointer. + static NSMorphologyCustomPronoun castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMorphologyCustomPronoun._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMorphologyCustomPronoun]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMorphologyCustomPronoun1); + } + + static bool isSupportedForLanguage_( + ThermionDartTexture1 _lib, NSString language) { + return _lib._objc_msgSend_63(_lib._class_NSMorphologyCustomPronoun1, + _lib._sel_isSupportedForLanguage_1, language._id); + } + + static NSArray requiredKeysForLanguage_( + ThermionDartTexture1 _lib, NSString language) { + final _ret = _lib._objc_msgSend_357(_lib._class_NSMorphologyCustomPronoun1, + _lib._sel_requiredKeysForLanguage_1, language._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? get subjectForm { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_subjectForm1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set subjectForm(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setSubjectForm_1, value?._id ?? ffi.nullptr); + } + + NSString? get objectForm { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_objectForm1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set objectForm(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setObjectForm_1, value?._id ?? ffi.nullptr); + } + + NSString? get possessiveForm { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_possessiveForm1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set possessiveForm(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setPossessiveForm_1, value?._id ?? ffi.nullptr); + } + + NSString? get possessiveAdjectiveForm { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_possessiveAdjectiveForm1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set possessiveAdjectiveForm(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setPossessiveAdjectiveForm_1, value?._id ?? ffi.nullptr); + } + + NSString? get reflexiveForm { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_reflexiveForm1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set reflexiveForm(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setReflexiveForm_1, value?._id ?? ffi.nullptr); + } + + @override + NSMorphologyCustomPronoun init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMorphologyCustomPronoun._(_ret, _lib, retain: true, release: true); + } + + static NSMorphologyCustomPronoun new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMorphologyCustomPronoun1, _lib._sel_new1); + return NSMorphologyCustomPronoun._(_ret, _lib, + retain: false, release: true); + } + + static NSMorphologyCustomPronoun allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3(_lib._class_NSMorphologyCustomPronoun1, + _lib._sel_allocWithZone_1, zone); + return NSMorphologyCustomPronoun._(_ret, _lib, + retain: false, release: true); + } + + static NSMorphologyCustomPronoun alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMorphologyCustomPronoun1, _lib._sel_alloc1); + return NSMorphologyCustomPronoun._(_ret, _lib, + retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSMorphologyCustomPronoun1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSMorphologyCustomPronoun1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSMorphologyCustomPronoun1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMorphologyCustomPronoun1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSMorphologyCustomPronoun1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSMorphologyCustomPronoun1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSMorphologyCustomPronoun1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSMorphologyCustomPronoun1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSMorphologyCustomPronoun1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSOperationQueue extends NSObject { + NSOperationQueue._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. + static NSOperationQueue castFrom(T other) { + return NSOperationQueue._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSOperationQueue] that wraps the given raw object pointer. + static NSOperationQueue castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOperationQueue._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSOperationQueue]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOperationQueue1); + } + + NSProgress get progress { + final _ret = _lib._objc_msgSend_875(_id, _lib._sel_progress1); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + void addOperation_(NSOperation op) { + _lib._objc_msgSend_896(_id, _lib._sel_addOperation_1, op._id); + } + + void addOperations_waitUntilFinished_(NSArray ops, bool wait) { + _lib._objc_msgSend_899( + _id, _lib._sel_addOperations_waitUntilFinished_1, ops._id, wait); + } + + void addOperationWithBlock_(ObjCBlock_ffiVoid block) { + _lib._objc_msgSend_531(_id, _lib._sel_addOperationWithBlock_1, block._id); + } + + void addBarrierBlock_(ObjCBlock_ffiVoid barrier) { + _lib._objc_msgSend_531(_id, _lib._sel_addBarrierBlock_1, barrier._id); + } + + int get maxConcurrentOperationCount { + return _lib._objc_msgSend_82(_id, _lib._sel_maxConcurrentOperationCount1); + } + + set maxConcurrentOperationCount(int value) { + return _lib._objc_msgSend_634( + _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + } + + bool get suspended { + return _lib._objc_msgSend_12(_id, _lib._sel_isSuspended1); + } + + set suspended(bool value) { + return _lib._objc_msgSend_526(_id, _lib._sel_setSuspended_1, value); + } + + NSString? get name { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set name(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } + + int get qualityOfService { + return _lib._objc_msgSend_542(_id, _lib._sel_qualityOfService1); + } + + set qualityOfService(int value) { + return _lib._objc_msgSend_543(_id, _lib._sel_setQualityOfService_1, value); + } + + NSObject? get underlyingQueue { + final _ret = _lib._objc_msgSend_900(_id, _lib._sel_underlyingQueue1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set underlyingQueue(NSObject? value) { + return _lib._objc_msgSend_901( + _id, _lib._sel_setUnderlyingQueue_1, value?._id ?? ffi.nullptr); + } + + void cancelAllOperations() { + _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); + } + + void waitUntilAllOperationsAreFinished() { + _lib._objc_msgSend_1(_id, _lib._sel_waitUntilAllOperationsAreFinished1); + } + + static NSOperationQueue? getCurrentQueue(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_902( + _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); + } + + static NSOperationQueue getMainQueue(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_903( + _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); + return NSOperationQueue._(_ret, _lib, retain: true, release: true); + } + + NSArray get operations { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_operations1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + int get operationCount { + return _lib._objc_msgSend_10(_id, _lib._sel_operationCount1); + } + + @override + NSOperationQueue init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSOperationQueue._(_ret, _lib, retain: true, release: true); + } + + static NSOperationQueue new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } + + static NSOperationQueue allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSOperationQueue1, _lib._sel_allocWithZone_1, zone); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } + + static NSOperationQueue alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSOperationQueue1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSOperationQueue1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSOperationQueue1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSOperationQueue1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSOperationQueue1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSOperationQueue1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSOperationQueue1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSOperationQueue1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOperationQueue1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSOperation extends NSObject { + NSOperation._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOperation] that points to the same underlying object as [other]. + static NSOperation castFrom(T other) { + return NSOperation._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSOperation] that wraps the given raw object pointer. + static NSOperation castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOperation._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); + } + + void start() { + _lib._objc_msgSend_1(_id, _lib._sel_start1); + } + + void main() { + _lib._objc_msgSend_1(_id, _lib._sel_main1); + } + + bool get cancelled { + return _lib._objc_msgSend_12(_id, _lib._sel_isCancelled1); + } + + void cancel() { + _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + bool get executing { + return _lib._objc_msgSend_12(_id, _lib._sel_isExecuting1); + } + + bool get finished { + return _lib._objc_msgSend_12(_id, _lib._sel_isFinished1); + } + + bool get concurrent { + return _lib._objc_msgSend_12(_id, _lib._sel_isConcurrent1); + } + + bool get asynchronous { + return _lib._objc_msgSend_12(_id, _lib._sel_isAsynchronous1); + } + + bool get ready { + return _lib._objc_msgSend_12(_id, _lib._sel_isReady1); + } + + void addDependency_(NSOperation op) { + _lib._objc_msgSend_896(_id, _lib._sel_addDependency_1, op._id); + } + + void removeDependency_(NSOperation op) { + _lib._objc_msgSend_896(_id, _lib._sel_removeDependency_1, op._id); + } + + NSArray get dependencies { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_dependencies1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + int get queuePriority { + return _lib._objc_msgSend_897(_id, _lib._sel_queuePriority1); + } + + set queuePriority(int value) { + return _lib._objc_msgSend_898(_id, _lib._sel_setQueuePriority_1, value); + } + + ObjCBlock_ffiVoid? get completionBlock { + final _ret = _lib._objc_msgSend_667(_id, _lib._sel_completionBlock1); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + } + + set completionBlock(ObjCBlock_ffiVoid? value) { + return _lib._objc_msgSend_668( + _id, _lib._sel_setCompletionBlock_1, value?._id ?? ffi.nullptr); + } + + void waitUntilFinished() { + _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); + } + + double get threadPriority { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_threadPriority1) + : _lib._objc_msgSend_164(_id, _lib._sel_threadPriority1); + } + + set threadPriority(double value) { + return _lib._objc_msgSend_541(_id, _lib._sel_setThreadPriority_1, value); + } + + int get qualityOfService { + return _lib._objc_msgSend_542(_id, _lib._sel_qualityOfService1); + } + + set qualityOfService(int value) { + return _lib._objc_msgSend_543(_id, _lib._sel_setQualityOfService_1, value); + } + + NSString? get name { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set name(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } + + @override + NSOperation init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSOperation._(_ret, _lib, retain: true, release: true); + } + + static NSOperation new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); + return NSOperation._(_ret, _lib, retain: false, release: true); + } + + static NSOperation allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSOperation1, _lib._sel_allocWithZone_1, zone); + return NSOperation._(_ret, _lib, retain: false, release: true); + } + + static NSOperation alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); + return NSOperation._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSOperation1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSOperation1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSOperation1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSOperation1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSOperation1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSOperation1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSOperation1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSOperation1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOperation1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSOperationQueuePriority { + static const int NSOperationQueuePriorityVeryLow = -8; + static const int NSOperationQueuePriorityLow = -4; + static const int NSOperationQueuePriorityNormal = 0; + static const int NSOperationQueuePriorityHigh = 4; + static const int NSOperationQueuePriorityVeryHigh = 8; +} + +class NSPointerArray extends NSObject { + NSPointerArray._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSPointerArray] that points to the same underlying object as [other]. + static NSPointerArray castFrom(T other) { + return NSPointerArray._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSPointerArray] that wraps the given raw object pointer. + static NSPointerArray castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSPointerArray._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSPointerArray]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSPointerArray1); + } + + NSPointerArray initWithOptions_(int options) { + final _ret = + _lib._objc_msgSend_904(_id, _lib._sel_initWithOptions_1, options); + return NSPointerArray._(_ret, _lib, retain: true, release: true); + } + + NSPointerArray initWithPointerFunctions_(NSPointerFunctions functions) { + final _ret = _lib._objc_msgSend_918( + _id, _lib._sel_initWithPointerFunctions_1, functions._id); + return NSPointerArray._(_ret, _lib, retain: true, release: true); + } + + static NSPointerArray pointerArrayWithOptions_( + ThermionDartTexture1 _lib, int options) { + final _ret = _lib._objc_msgSend_919(_lib._class_NSPointerArray1, + _lib._sel_pointerArrayWithOptions_1, options); + return NSPointerArray._(_ret, _lib, retain: true, release: true); + } + + static NSPointerArray pointerArrayWithPointerFunctions_( + ThermionDartTexture1 _lib, NSPointerFunctions functions) { + final _ret = _lib._objc_msgSend_920(_lib._class_NSPointerArray1, + _lib._sel_pointerArrayWithPointerFunctions_1, functions._id); + return NSPointerArray._(_ret, _lib, retain: true, release: true); + } + + NSPointerFunctions get pointerFunctions { + final _ret = _lib._objc_msgSend_921(_id, _lib._sel_pointerFunctions1); + return NSPointerFunctions._(_ret, _lib, retain: true, release: true); + } + + ffi.Pointer pointerAtIndex_(int index) { + return _lib._objc_msgSend_922(_id, _lib._sel_pointerAtIndex_1, index); + } + + void addPointer_(ffi.Pointer pointer) { + _lib._objc_msgSend_51(_id, _lib._sel_addPointer_1, pointer); + } + + void removePointerAtIndex_(int index) { + _lib._objc_msgSend_469(_id, _lib._sel_removePointerAtIndex_1, index); + } + + void insertPointer_atIndex_(ffi.Pointer item, int index) { + _lib._objc_msgSend_22(_id, _lib._sel_insertPointer_atIndex_1, item, index); + } + + void replacePointerAtIndex_withPointer_( + int index, ffi.Pointer item) { + _lib._objc_msgSend_923( + _id, _lib._sel_replacePointerAtIndex_withPointer_1, index, item); + } + + void compact() { + _lib._objc_msgSend_1(_id, _lib._sel_compact1); + } + + int get count { + return _lib._objc_msgSend_10(_id, _lib._sel_count1); + } + + set count(int value) { + return _lib._objc_msgSend_515(_id, _lib._sel_setCount_1, value); + } + + static NSObject pointerArrayWithStrongObjects(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSPointerArray1, _lib._sel_pointerArrayWithStrongObjects1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject pointerArrayWithWeakObjects(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSPointerArray1, _lib._sel_pointerArrayWithWeakObjects1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSPointerArray strongObjectsPointerArray(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_924( + _lib._class_NSPointerArray1, _lib._sel_strongObjectsPointerArray1); + return NSPointerArray._(_ret, _lib, retain: true, release: true); + } + + static NSPointerArray weakObjectsPointerArray(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_924( + _lib._class_NSPointerArray1, _lib._sel_weakObjectsPointerArray1); + return NSPointerArray._(_ret, _lib, retain: true, release: true); + } + + NSArray get allObjects { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_allObjects1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + @override + NSPointerArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSPointerArray._(_ret, _lib, retain: true, release: true); + } + + static NSPointerArray new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPointerArray1, _lib._sel_new1); + return NSPointerArray._(_ret, _lib, retain: false, release: true); + } + + static NSPointerArray allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSPointerArray1, _lib._sel_allocWithZone_1, zone); + return NSPointerArray._(_ret, _lib, retain: false, release: true); + } + + static NSPointerArray alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPointerArray1, _lib._sel_alloc1); + return NSPointerArray._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSPointerArray1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSPointerArray1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSPointerArray1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSPointerArray1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSPointerArray1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSPointerArray1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSPointerArray1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSPointerArray1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSPointerArray1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSPointerFunctionsOptions { + static const int NSPointerFunctionsStrongMemory = 0; + static const int NSPointerFunctionsZeroingWeakMemory = 1; + static const int NSPointerFunctionsOpaqueMemory = 2; + static const int NSPointerFunctionsMallocMemory = 3; + static const int NSPointerFunctionsMachVirtualMemory = 4; + static const int NSPointerFunctionsWeakMemory = 5; + static const int NSPointerFunctionsObjectPersonality = 0; + static const int NSPointerFunctionsOpaquePersonality = 256; + static const int NSPointerFunctionsObjectPointerPersonality = 512; + static const int NSPointerFunctionsCStringPersonality = 768; + static const int NSPointerFunctionsStructPersonality = 1024; + static const int NSPointerFunctionsIntegerPersonality = 1280; + static const int NSPointerFunctionsCopyIn = 65536; +} + +class NSPointerFunctions extends NSObject { + NSPointerFunctions._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSPointerFunctions] that points to the same underlying object as [other]. + static NSPointerFunctions castFrom(T other) { + return NSPointerFunctions._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSPointerFunctions] that wraps the given raw object pointer. + static NSPointerFunctions castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSPointerFunctions._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSPointerFunctions]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSPointerFunctions1); + } + + NSPointerFunctions initWithOptions_(int options) { + final _ret = + _lib._objc_msgSend_904(_id, _lib._sel_initWithOptions_1, options); + return NSPointerFunctions._(_ret, _lib, retain: true, release: true); + } + + static NSPointerFunctions pointerFunctionsWithOptions_( + ThermionDartTexture1 _lib, int options) { + final _ret = _lib._objc_msgSend_905(_lib._class_NSPointerFunctions1, + _lib._sel_pointerFunctionsWithOptions_1, options); + return NSPointerFunctions._(_ret, _lib, retain: true, release: true); + } + + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get hashFunction { + return _lib._objc_msgSend_906(_id, _lib._sel_hashFunction1); + } + + set hashFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value) { + return _lib._objc_msgSend_907(_id, _lib._sel_setHashFunction_1, value); + } + + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get isEqualFunction { + return _lib._objc_msgSend_908(_id, _lib._sel_isEqualFunction1); + } + + set isEqualFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value) { + return _lib._objc_msgSend_909(_id, _lib._sel_setIsEqualFunction_1, value); + } + + ffi.Pointer< + ffi.NativeFunction)>> + get sizeFunction { + return _lib._objc_msgSend_910(_id, _lib._sel_sizeFunction1); + } + + set sizeFunction( + ffi.Pointer< + ffi + .NativeFunction)>> + value) { + return _lib._objc_msgSend_911(_id, _lib._sel_setSizeFunction_1, value); + } + + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + get descriptionFunction { + return _lib._objc_msgSend_912(_id, _lib._sel_descriptionFunction1); + } + + set descriptionFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + value) { + return _lib._objc_msgSend_913( + _id, _lib._sel_setDescriptionFunction_1, value); + } + + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get relinquishFunction { + return _lib._objc_msgSend_914(_id, _lib._sel_relinquishFunction1); + } + + set relinquishFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value) { + return _lib._objc_msgSend_915( + _id, _lib._sel_setRelinquishFunction_1, value); + } + + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>, + ffi.Bool)>> get acquireFunction { + return _lib._objc_msgSend_916(_id, _lib._sel_acquireFunction1); + } + + set acquireFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>, + ffi.Bool)>> + value) { + return _lib._objc_msgSend_917(_id, _lib._sel_setAcquireFunction_1, value); + } + + bool get usesStrongWriteBarrier { + return _lib._objc_msgSend_12(_id, _lib._sel_usesStrongWriteBarrier1); + } + + set usesStrongWriteBarrier(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setUsesStrongWriteBarrier_1, value); + } + + bool get usesWeakReadAndWriteBarriers { + return _lib._objc_msgSend_12(_id, _lib._sel_usesWeakReadAndWriteBarriers1); + } + + set usesWeakReadAndWriteBarriers(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setUsesWeakReadAndWriteBarriers_1, value); + } + + @override + NSPointerFunctions init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSPointerFunctions._(_ret, _lib, retain: true, release: true); + } + + static NSPointerFunctions new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPointerFunctions1, _lib._sel_new1); + return NSPointerFunctions._(_ret, _lib, retain: false, release: true); + } + + static NSPointerFunctions allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSPointerFunctions1, _lib._sel_allocWithZone_1, zone); + return NSPointerFunctions._(_ret, _lib, retain: false, release: true); + } + + static NSPointerFunctions alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPointerFunctions1, _lib._sel_alloc1); + return NSPointerFunctions._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSPointerFunctions1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSPointerFunctions1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSPointerFunctions1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSPointerFunctions1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSPointerFunctions1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSPointerFunctions1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSPointerFunctions1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSPointerFunctions1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSPointerFunctions1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSProcessInfo extends NSObject { + NSProcessInfo._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSProcessInfo] that points to the same underlying object as [other]. + static NSProcessInfo castFrom(T other) { + return NSProcessInfo._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSProcessInfo] that wraps the given raw object pointer. + static NSProcessInfo castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSProcessInfo._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSProcessInfo]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProcessInfo1); + } + + static NSProcessInfo getProcessInfo(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_925( + _lib._class_NSProcessInfo1, _lib._sel_processInfo1); + return NSProcessInfo._(_ret, _lib, retain: true, release: true); + } + + NSDictionary get environment { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_environment1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSArray get arguments { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_arguments1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString get hostName { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_hostName1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get processName { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_processName1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set processName(NSString value) { + return _lib._objc_msgSend_645(_id, _lib._sel_setProcessName_1, value._id); + } + + int get processIdentifier { + return _lib._objc_msgSend_236(_id, _lib._sel_processIdentifier1); + } + + NSString get globallyUniqueString { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_globallyUniqueString1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + int operatingSystem() { + return _lib._objc_msgSend_10(_id, _lib._sel_operatingSystem1); + } + + NSString operatingSystemName() { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_operatingSystemName1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get operatingSystemVersionString { + final _ret = + _lib._objc_msgSend_21(_id, _lib._sel_operatingSystemVersionString1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + void getOperatingSystemVersion(ffi.Pointer stret) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_926_stret( + stret, _id, _lib._sel_operatingSystemVersion1) + : stret.ref = + _lib._objc_msgSend_926(_id, _lib._sel_operatingSystemVersion1); + } + + int get processorCount { + return _lib._objc_msgSend_10(_id, _lib._sel_processorCount1); + } + + int get activeProcessorCount { + return _lib._objc_msgSend_10(_id, _lib._sel_activeProcessorCount1); + } + + int get physicalMemory { + return _lib._objc_msgSend_163(_id, _lib._sel_physicalMemory1); + } + + bool isOperatingSystemAtLeastVersion_(NSOperatingSystemVersion version) { + return _lib._objc_msgSend_927( + _id, _lib._sel_isOperatingSystemAtLeastVersion_1, version); + } + + double get systemUptime { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_systemUptime1) + : _lib._objc_msgSend_164(_id, _lib._sel_systemUptime1); + } + + void disableSuddenTermination() { + _lib._objc_msgSend_1(_id, _lib._sel_disableSuddenTermination1); + } + + void enableSuddenTermination() { + _lib._objc_msgSend_1(_id, _lib._sel_enableSuddenTermination1); + } + + void disableAutomaticTermination_(NSString reason) { + _lib._objc_msgSend_247( + _id, _lib._sel_disableAutomaticTermination_1, reason._id); + } + + void enableAutomaticTermination_(NSString reason) { + _lib._objc_msgSend_247( + _id, _lib._sel_enableAutomaticTermination_1, reason._id); + } + + bool get automaticTerminationSupportEnabled { + return _lib._objc_msgSend_12( + _id, _lib._sel_automaticTerminationSupportEnabled1); + } + + set automaticTerminationSupportEnabled(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setAutomaticTerminationSupportEnabled_1, value); + } + + NSObject beginActivityWithOptions_reason_(int options, NSString reason) { + final _ret = _lib._objc_msgSend_928( + _id, _lib._sel_beginActivityWithOptions_reason_1, options, reason._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void endActivity_(NSObject activity) { + _lib._objc_msgSend_15(_id, _lib._sel_endActivity_1, activity._id); + } + + void performActivityWithOptions_reason_usingBlock_( + int options, NSString reason, ObjCBlock_ffiVoid block) { + _lib._objc_msgSend_929( + _id, + _lib._sel_performActivityWithOptions_reason_usingBlock_1, + options, + reason._id, + block._id); + } + + void performExpiringActivityWithReason_usingBlock_( + NSString reason, ObjCBlock_ffiVoid_bool block) { + _lib._objc_msgSend_930( + _id, + _lib._sel_performExpiringActivityWithReason_usingBlock_1, + reason._id, + block._id); + } + + NSString get userName { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_userName1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get fullUserName { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_fullUserName1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + int get thermalState { + return _lib._objc_msgSend_931(_id, _lib._sel_thermalState1); + } + + bool get lowPowerModeEnabled { + return _lib._objc_msgSend_12(_id, _lib._sel_isLowPowerModeEnabled1); + } + + bool get macCatalystApp { + return _lib._objc_msgSend_12(_id, _lib._sel_isMacCatalystApp1); + } + + bool get iOSAppOnMac { + return _lib._objc_msgSend_12(_id, _lib._sel_isiOSAppOnMac1); + } + + @override + NSProcessInfo init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSProcessInfo._(_ret, _lib, retain: true, release: true); + } + + static NSProcessInfo new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSProcessInfo1, _lib._sel_new1); + return NSProcessInfo._(_ret, _lib, retain: false, release: true); + } + + static NSProcessInfo allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSProcessInfo1, _lib._sel_allocWithZone_1, zone); + return NSProcessInfo._(_ret, _lib, retain: false, release: true); + } + + static NSProcessInfo alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSProcessInfo1, _lib._sel_alloc1); + return NSProcessInfo._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSProcessInfo1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSProcessInfo1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSProcessInfo1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSProcessInfo1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSProcessInfo1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSProcessInfo1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSProcessInfo1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSProcessInfo1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSProcessInfo1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +final class NSOperatingSystemVersion extends ffi.Struct { + @ffi.Long() + external int majorVersion; + + @ffi.Long() + external int minorVersion; + + @ffi.Long() + external int patchVersion; +} + +abstract class NSActivityOptions { + static const int NSActivityIdleDisplaySleepDisabled = 1099511627776; + static const int NSActivityIdleSystemSleepDisabled = 1048576; + static const int NSActivitySuddenTerminationDisabled = 16384; + static const int NSActivityAutomaticTerminationDisabled = 32768; + static const int NSActivityAnimationTrackingEnabled = 35184372088832; + static const int NSActivityTrackingEnabled = 70368744177664; + static const int NSActivityUserInitiated = 16777215; + static const int NSActivityUserInitiatedAllowingIdleSystemSleep = 15728639; + static const int NSActivityBackground = 255; + static const int NSActivityLatencyCritical = 1095216660480; + static const int NSActivityUserInteractive = 1095233437695; +} + +void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, bool arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +final _ObjCBlock_ffiVoid_bool_closureRegistry = {}; +int _ObjCBlock_ffiVoid_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_bool_registerClosure( + void Function(bool) fn) { + final id = ++_ObjCBlock_ffiVoid_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, bool arg0) => + _ObjCBlock_ffiVoid_bool_closureRegistry[block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_bool._(ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_bool.fromFunctionPointer(ThermionDartTexture1 lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_bool.fromFunction( + ThermionDartTexture1 lib, void Function(bool) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Bool)>( + _ObjCBlock_ffiVoid_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_bool_registerClosure( + (bool arg0) => fn(arg0))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_bool.listener( + ThermionDartTexture1 lib, void Function(bool) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Bool)>.listener( + _ObjCBlock_ffiVoid_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_bool_registerClosure( + (bool arg0) => fn(arg0))), + lib); + static ffi + .NativeCallable, ffi.Bool)>? + _dartFuncListenerTrampoline; + + void call(bool arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0)>>() + .asFunction, bool)>()(_id, arg0); +} + +abstract class NSProcessInfoThermalState { + static const int NSProcessInfoThermalStateNominal = 0; + static const int NSProcessInfoThermalStateFair = 1; + static const int NSProcessInfoThermalStateSerious = 2; + static const int NSProcessInfoThermalStateCritical = 3; +} + +class NSTextCheckingResult extends NSObject { + NSTextCheckingResult._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSTextCheckingResult] that points to the same underlying object as [other]. + static NSTextCheckingResult castFrom(T other) { + return NSTextCheckingResult._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSTextCheckingResult] that wraps the given raw object pointer. + static NSTextCheckingResult castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSTextCheckingResult._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSTextCheckingResult]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSTextCheckingResult1); + } + + int get resultType { + return _lib._objc_msgSend_932(_id, _lib._sel_resultType1); + } + + void getRange(ffi.Pointer<_NSRange> stret) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_53_stret(stret, _id, _lib._sel_range1) + : stret.ref = _lib._objc_msgSend_53(_id, _lib._sel_range1); + } + + NSOrthography? get orthography { + final _ret = _lib._objc_msgSend_933(_id, _lib._sel_orthography1); + return _ret.address == 0 + ? null + : NSOrthography._(_ret, _lib, retain: true, release: true); + } + + NSArray? get grammarDetails { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_grammarDetails1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSDate? get date { + final _ret = _lib._objc_msgSend_182(_id, _lib._sel_date1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSTimeZone? get timeZone { + final _ret = _lib._objc_msgSend_768(_id, _lib._sel_timeZone1); + return _ret.address == 0 + ? null + : NSTimeZone._(_ret, _lib, retain: true, release: true); + } + + double get duration { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_duration1) + : _lib._objc_msgSend_164(_id, _lib._sel_duration1); + } + + NSDictionary? get components { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_components1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSURL? get URL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSString? get replacementString { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_replacementString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray? get alternativeStrings { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_alternativeStrings1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSRegularExpression? get regularExpression { + final _ret = _lib._objc_msgSend_945(_id, _lib._sel_regularExpression1); + return _ret.address == 0 + ? null + : NSRegularExpression._(_ret, _lib, retain: true, release: true); + } + + NSString? get phoneNumber { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_phoneNumber1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + int get numberOfRanges { + return _lib._objc_msgSend_10(_id, _lib._sel_numberOfRanges1); + } + + void rangeAtIndex_(ffi.Pointer<_NSRange> stret, int idx) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_346_stret( + stret, _id, _lib._sel_rangeAtIndex_1, idx) + : stret.ref = + _lib._objc_msgSend_346(_id, _lib._sel_rangeAtIndex_1, idx); + } + + void rangeWithName_(ffi.Pointer<_NSRange> stret, NSString name) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_339_stret( + stret, _id, _lib._sel_rangeWithName_1, name._id) + : stret.ref = + _lib._objc_msgSend_339(_id, _lib._sel_rangeWithName_1, name._id); + } + + NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { + final _ret = _lib._objc_msgSend_946( + _id, _lib._sel_resultByAdjustingRangesWithOffset_1, offset); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get addressComponents { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_addressComponents1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult orthographyCheckingResultWithRange_orthography_( + ThermionDartTexture1 _lib, _NSRange range, NSOrthography orthography) { + final _ret = _lib._objc_msgSend_947( + _lib._class_NSTextCheckingResult1, + _lib._sel_orthographyCheckingResultWithRange_orthography_1, + range, + orthography._id); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult spellCheckingResultWithRange_( + ThermionDartTexture1 _lib, _NSRange range) { + final _ret = _lib._objc_msgSend_948(_lib._class_NSTextCheckingResult1, + _lib._sel_spellCheckingResultWithRange_1, range); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult grammarCheckingResultWithRange_details_( + ThermionDartTexture1 _lib, _NSRange range, NSArray details) { + final _ret = _lib._objc_msgSend_949(_lib._class_NSTextCheckingResult1, + _lib._sel_grammarCheckingResultWithRange_details_1, range, details._id); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult dateCheckingResultWithRange_date_( + ThermionDartTexture1 _lib, _NSRange range, NSDate date) { + final _ret = _lib._objc_msgSend_950(_lib._class_NSTextCheckingResult1, + _lib._sel_dateCheckingResultWithRange_date_1, range, date._id); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult + dateCheckingResultWithRange_date_timeZone_duration_( + ThermionDartTexture1 _lib, + _NSRange range, + NSDate date, + NSTimeZone timeZone, + double duration) { + final _ret = _lib._objc_msgSend_951( + _lib._class_NSTextCheckingResult1, + _lib._sel_dateCheckingResultWithRange_date_timeZone_duration_1, + range, + date._id, + timeZone._id, + duration); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult addressCheckingResultWithRange_components_( + ThermionDartTexture1 _lib, _NSRange range, NSDictionary components) { + final _ret = _lib._objc_msgSend_952( + _lib._class_NSTextCheckingResult1, + _lib._sel_addressCheckingResultWithRange_components_1, + range, + components._id); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult linkCheckingResultWithRange_URL_( + ThermionDartTexture1 _lib, _NSRange range, NSURL url) { + final _ret = _lib._objc_msgSend_953(_lib._class_NSTextCheckingResult1, + _lib._sel_linkCheckingResultWithRange_URL_1, range, url._id); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult quoteCheckingResultWithRange_replacementString_( + ThermionDartTexture1 _lib, _NSRange range, NSString replacementString) { + final _ret = _lib._objc_msgSend_954( + _lib._class_NSTextCheckingResult1, + _lib._sel_quoteCheckingResultWithRange_replacementString_1, + range, + replacementString._id); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult dashCheckingResultWithRange_replacementString_( + ThermionDartTexture1 _lib, _NSRange range, NSString replacementString) { + final _ret = _lib._objc_msgSend_954( + _lib._class_NSTextCheckingResult1, + _lib._sel_dashCheckingResultWithRange_replacementString_1, + range, + replacementString._id); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult + replacementCheckingResultWithRange_replacementString_( + ThermionDartTexture1 _lib, + _NSRange range, + NSString replacementString) { + final _ret = _lib._objc_msgSend_954( + _lib._class_NSTextCheckingResult1, + _lib._sel_replacementCheckingResultWithRange_replacementString_1, + range, + replacementString._id); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_( + ThermionDartTexture1 _lib, + _NSRange range, + NSString replacementString) { + final _ret = _lib._objc_msgSend_954( + _lib._class_NSTextCheckingResult1, + _lib._sel_correctionCheckingResultWithRange_replacementString_1, + range, + replacementString._id); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_alternativeStrings_( + ThermionDartTexture1 _lib, + _NSRange range, + NSString replacementString, + NSArray alternativeStrings) { + final _ret = _lib._objc_msgSend_955( + _lib._class_NSTextCheckingResult1, + _lib._sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_1, + range, + replacementString._id, + alternativeStrings._id); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult + regularExpressionCheckingResultWithRanges_count_regularExpression_( + ThermionDartTexture1 _lib, + ffi.Pointer<_NSRange> ranges, + int count, + NSRegularExpression regularExpression) { + final _ret = _lib._objc_msgSend_956( + _lib._class_NSTextCheckingResult1, + _lib._sel_regularExpressionCheckingResultWithRanges_count_regularExpression_1, + ranges, + count, + regularExpression._id); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_( + ThermionDartTexture1 _lib, _NSRange range, NSString phoneNumber) { + final _ret = _lib._objc_msgSend_954( + _lib._class_NSTextCheckingResult1, + _lib._sel_phoneNumberCheckingResultWithRange_phoneNumber_1, + range, + phoneNumber._id); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult + transitInformationCheckingResultWithRange_components_( + ThermionDartTexture1 _lib, _NSRange range, NSDictionary components) { + final _ret = _lib._objc_msgSend_952( + _lib._class_NSTextCheckingResult1, + _lib._sel_transitInformationCheckingResultWithRange_components_1, + range, + components._id); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + @override + NSTextCheckingResult init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + static NSTextCheckingResult new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSTextCheckingResult1, _lib._sel_new1); + return NSTextCheckingResult._(_ret, _lib, retain: false, release: true); + } + + static NSTextCheckingResult allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSTextCheckingResult1, _lib._sel_allocWithZone_1, zone); + return NSTextCheckingResult._(_ret, _lib, retain: false, release: true); + } + + static NSTextCheckingResult alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSTextCheckingResult1, _lib._sel_alloc1); + return NSTextCheckingResult._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSTextCheckingResult1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSTextCheckingResult1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSTextCheckingResult1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSTextCheckingResult1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSTextCheckingResult1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSTextCheckingResult1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSTextCheckingResult1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSTextCheckingResult1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSTextCheckingResult1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSTextCheckingType { + static const int NSTextCheckingTypeOrthography = 1; + static const int NSTextCheckingTypeSpelling = 2; + static const int NSTextCheckingTypeGrammar = 4; + static const int NSTextCheckingTypeDate = 8; + static const int NSTextCheckingTypeAddress = 16; + static const int NSTextCheckingTypeLink = 32; + static const int NSTextCheckingTypeQuote = 64; + static const int NSTextCheckingTypeDash = 128; + static const int NSTextCheckingTypeReplacement = 256; + static const int NSTextCheckingTypeCorrection = 512; + static const int NSTextCheckingTypeRegularExpression = 1024; + static const int NSTextCheckingTypePhoneNumber = 2048; + static const int NSTextCheckingTypeTransitInformation = 4096; +} + +class NSRegularExpression extends NSObject { + NSRegularExpression._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSRegularExpression] that points to the same underlying object as [other]. + static NSRegularExpression castFrom(T other) { + return NSRegularExpression._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSRegularExpression] that wraps the given raw object pointer. + static NSRegularExpression castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSRegularExpression._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSRegularExpression]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSRegularExpression1); + } + + static NSRegularExpression? regularExpressionWithPattern_options_error_( + ThermionDartTexture1 _lib, + NSString pattern, + int options, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_934( + _lib._class_NSRegularExpression1, + _lib._sel_regularExpressionWithPattern_options_error_1, + pattern._id, + options, + error); + return _ret.address == 0 + ? null + : NSRegularExpression._(_ret, _lib, retain: true, release: true); + } + + NSRegularExpression? initWithPattern_options_error_(NSString pattern, + int options, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_935(_id, + _lib._sel_initWithPattern_options_error_1, pattern._id, options, error); + return _ret.address == 0 + ? null + : NSRegularExpression._(_ret, _lib, retain: true, release: true); + } + + NSString get pattern { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_pattern1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + int get options { + return _lib._objc_msgSend_936(_id, _lib._sel_options1); + } + + int get numberOfCaptureGroups { + return _lib._objc_msgSend_10(_id, _lib._sel_numberOfCaptureGroups1); + } + + static NSString escapedPatternForString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_68(_lib._class_NSRegularExpression1, + _lib._sel_escapedPatternForString_1, string._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + void enumerateMatchesInString_options_range_usingBlock_( + NSString string, + int options, + _NSRange range, + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool block) { + _lib._objc_msgSend_937( + _id, + _lib._sel_enumerateMatchesInString_options_range_usingBlock_1, + string._id, + options, + range, + block._id); + } + + NSArray matchesInString_options_range_( + NSString string, int options, _NSRange range) { + final _ret = _lib._objc_msgSend_938(_id, + _lib._sel_matchesInString_options_range_1, string._id, options, range); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + int numberOfMatchesInString_options_range_( + NSString string, int options, _NSRange range) { + return _lib._objc_msgSend_939( + _id, + _lib._sel_numberOfMatchesInString_options_range_1, + string._id, + options, + range); + } + + NSTextCheckingResult? firstMatchInString_options_range_( + NSString string, int options, _NSRange range) { + final _ret = _lib._objc_msgSend_940( + _id, + _lib._sel_firstMatchInString_options_range_1, + string._id, + options, + range); + return _ret.address == 0 + ? null + : NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + } + + void rangeOfFirstMatchInString_options_range_(ffi.Pointer<_NSRange> stret, + NSString string, int options, _NSRange range) { + _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_941_stret( + stret, + _id, + _lib._sel_rangeOfFirstMatchInString_options_range_1, + string._id, + options, + range) + : stret.ref = _lib._objc_msgSend_941( + _id, + _lib._sel_rangeOfFirstMatchInString_options_range_1, + string._id, + options, + range); + } + + NSString stringByReplacingMatchesInString_options_range_withTemplate_( + NSString string, int options, _NSRange range, NSString templ) { + final _ret = _lib._objc_msgSend_942( + _id, + _lib._sel_stringByReplacingMatchesInString_options_range_withTemplate_1, + string._id, + options, + range, + templ._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + int replaceMatchesInString_options_range_withTemplate_( + NSMutableString string, int options, _NSRange range, NSString templ) { + return _lib._objc_msgSend_943( + _id, + _lib._sel_replaceMatchesInString_options_range_withTemplate_1, + string._id, + options, + range, + templ._id); + } + + NSString replacementStringForResult_inString_offset_template_( + NSTextCheckingResult result, + NSString string, + int offset, + NSString templ) { + final _ret = _lib._objc_msgSend_944( + _id, + _lib._sel_replacementStringForResult_inString_offset_template_1, + result._id, + string._id, + offset, + templ._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString escapedTemplateForString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_68(_lib._class_NSRegularExpression1, + _lib._sel_escapedTemplateForString_1, string._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + @override + NSRegularExpression init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSRegularExpression._(_ret, _lib, retain: true, release: true); + } + + static NSRegularExpression new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSRegularExpression1, _lib._sel_new1); + return NSRegularExpression._(_ret, _lib, retain: false, release: true); + } + + static NSRegularExpression allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSRegularExpression1, _lib._sel_allocWithZone_1, zone); + return NSRegularExpression._(_ret, _lib, retain: false, release: true); + } + + static NSRegularExpression alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSRegularExpression1, _lib._sel_alloc1); + return NSRegularExpression._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSRegularExpression1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSRegularExpression1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSRegularExpression1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSRegularExpression1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSRegularExpression1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSRegularExpression1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSRegularExpression1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSRegularExpression1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSRegularExpression1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSRegularExpressionOptions { + static const int NSRegularExpressionCaseInsensitive = 1; + static const int NSRegularExpressionAllowCommentsAndWhitespace = 2; + static const int NSRegularExpressionIgnoreMetacharacters = 4; + static const int NSRegularExpressionDotMatchesLineSeparators = 8; + static const int NSRegularExpressionAnchorsMatchLines = 16; + static const int NSRegularExpressionUseUnixLineSeparators = 32; + static const int NSRegularExpressionUseUnicodeWordBoundaries = 64; +} + +abstract class NSMatchingOptions { + static const int NSMatchingReportProgress = 1; + static const int NSMatchingReportCompletion = 2; + static const int NSMatchingAnchored = 4; + static const int NSMatchingWithTransparentBounds = 8; + static const int NSMatchingWithoutAnchoringBounds = 16; +} + +void + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Int32 arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + void Function(ffi.Pointer, int, ffi.Pointer) fn) { + final id = + ++_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ + id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool + extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Int32 arg1, ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunction( + ThermionDartTexture1 lib, + void Function(NSTextCheckingResult?, int, ffi.Pointer) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSTextCheckingResult._(arg0, lib, retain: true, release: true), arg1, arg2))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.listener( + ThermionDartTexture1 lib, + void Function(NSTextCheckingResult?, int, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSTextCheckingResult._(arg0, lib, retain: true, release: true), arg1, arg2))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Int32, ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSTextCheckingResult? arg0, int arg1, ffi.Pointer arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Int32 arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer, int, ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1, arg2); +} + +abstract class NSMatchingFlags { + static const int NSMatchingProgress = 1; + static const int NSMatchingCompleted = 2; + static const int NSMatchingHitEnd = 4; + static const int NSMatchingRequiredEnd = 8; + static const int NSMatchingInternalError = 16; +} + +class NSURLCache extends NSObject { + NSURLCache._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLCache] that points to the same underlying object as [other]. + static NSURLCache castFrom(T other) { + return NSURLCache._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLCache] that wraps the given raw object pointer. + static NSURLCache castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLCache._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLCache]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLCache1); + } + + static NSURLCache getSharedURLCache(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_957( + _lib._class_NSURLCache1, _lib._sel_sharedURLCache1); + return NSURLCache._(_ret, _lib, retain: true, release: true); + } + + static void setSharedURLCache(ThermionDartTexture1 _lib, NSURLCache value) { + return _lib._objc_msgSend_958( + _lib._class_NSURLCache1, _lib._sel_setSharedURLCache_1, value._id); + } + + NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( + int memoryCapacity, int diskCapacity, NSString? path) { + final _ret = _lib._objc_msgSend_959( + _id, + _lib._sel_initWithMemoryCapacity_diskCapacity_diskPath_1, + memoryCapacity, + diskCapacity, + path?._id ?? ffi.nullptr); + return NSURLCache._(_ret, _lib, retain: true, release: true); + } + + NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( + int memoryCapacity, int diskCapacity, NSURL? directoryURL) { + final _ret = _lib._objc_msgSend_960( + _id, + _lib._sel_initWithMemoryCapacity_diskCapacity_directoryURL_1, + memoryCapacity, + diskCapacity, + directoryURL?._id ?? ffi.nullptr); + return NSURLCache._(_ret, _lib, retain: true, release: true); + } + + NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { + final _ret = _lib._objc_msgSend_965( + _id, _lib._sel_cachedResponseForRequest_1, request._id); + return _ret.address == 0 + ? null + : NSCachedURLResponse._(_ret, _lib, retain: true, release: true); + } + + void storeCachedResponse_forRequest_( + NSCachedURLResponse cachedResponse, NSURLRequest request) { + _lib._objc_msgSend_966(_id, _lib._sel_storeCachedResponse_forRequest_1, + cachedResponse._id, request._id); + } + + void removeCachedResponseForRequest_(NSURLRequest request) { + _lib._objc_msgSend_967( + _id, _lib._sel_removeCachedResponseForRequest_1, request._id); + } + + void removeAllCachedResponses() { + _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResponses1); + } + + void removeCachedResponsesSinceDate_(NSDate date) { + _lib._objc_msgSend_539( + _id, _lib._sel_removeCachedResponsesSinceDate_1, date._id); + } + + int get memoryCapacity { + return _lib._objc_msgSend_10(_id, _lib._sel_memoryCapacity1); + } + + set memoryCapacity(int value) { + return _lib._objc_msgSend_515(_id, _lib._sel_setMemoryCapacity_1, value); + } + + int get diskCapacity { + return _lib._objc_msgSend_10(_id, _lib._sel_diskCapacity1); + } + + set diskCapacity(int value) { + return _lib._objc_msgSend_515(_id, _lib._sel_setDiskCapacity_1, value); + } + + int get currentMemoryUsage { + return _lib._objc_msgSend_10(_id, _lib._sel_currentMemoryUsage1); + } + + int get currentDiskUsage { + return _lib._objc_msgSend_10(_id, _lib._sel_currentDiskUsage1); + } + + void storeCachedResponse_forDataTask_( + NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { + _lib._objc_msgSend_968(_id, _lib._sel_storeCachedResponse_forDataTask_1, + cachedResponse._id, dataTask._id); + } + + void getCachedResponseForDataTask_completionHandler_( + NSURLSessionDataTask dataTask, + ObjCBlock_ffiVoid_NSCachedURLResponse completionHandler) { + _lib._objc_msgSend_969( + _id, + _lib._sel_getCachedResponseForDataTask_completionHandler_1, + dataTask._id, + completionHandler._id); + } + + void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { + _lib._objc_msgSend_970( + _id, _lib._sel_removeCachedResponseForDataTask_1, dataTask._id); + } + + @override + NSURLCache init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLCache._(_ret, _lib, retain: true, release: true); + } + + static NSURLCache new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLCache1, _lib._sel_new1); + return NSURLCache._(_ret, _lib, retain: false, release: true); + } + + static NSURLCache allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLCache1, _lib._sel_allocWithZone_1, zone); + return NSURLCache._(_ret, _lib, retain: false, release: true); + } + + static NSURLCache alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLCache1, _lib._sel_alloc1); + return NSURLCache._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLCache1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLCache1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLCache1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLCache1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLCache1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLCache1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLCache1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSURLCache1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLCache1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSCachedURLResponse extends NSObject { + NSCachedURLResponse._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSCachedURLResponse] that points to the same underlying object as [other]. + static NSCachedURLResponse castFrom(T other) { + return NSCachedURLResponse._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSCachedURLResponse] that wraps the given raw object pointer. + static NSCachedURLResponse castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCachedURLResponse._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSCachedURLResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSCachedURLResponse1); + } + + NSCachedURLResponse initWithResponse_data_( + NSURLResponse response, NSData data) { + final _ret = _lib._objc_msgSend_961( + _id, _lib._sel_initWithResponse_data_1, response._id, data._id); + return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); + } + + NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( + NSURLResponse response, + NSData data, + NSDictionary? userInfo, + int storagePolicy) { + final _ret = _lib._objc_msgSend_962( + _id, + _lib._sel_initWithResponse_data_userInfo_storagePolicy_1, + response._id, + data._id, + userInfo?._id ?? ffi.nullptr, + storagePolicy); + return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); + } + + NSURLResponse get response { + final _ret = _lib._objc_msgSend_963(_id, _lib._sel_response1); + return NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + NSData get data { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_data1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + int get storagePolicy { + return _lib._objc_msgSend_964(_id, _lib._sel_storagePolicy1); + } + + @override + NSCachedURLResponse init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); + } + + static NSCachedURLResponse new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCachedURLResponse1, _lib._sel_new1); + return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); + } + + static NSCachedURLResponse allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSCachedURLResponse1, _lib._sel_allocWithZone_1, zone); + return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); + } + + static NSCachedURLResponse alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSCachedURLResponse1, _lib._sel_alloc1); + return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSCachedURLResponse1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSCachedURLResponse1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSCachedURLResponse1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSCachedURLResponse1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSCachedURLResponse1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSCachedURLResponse1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSCachedURLResponse1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSCachedURLResponse1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSCachedURLResponse1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSURLCacheStoragePolicy { + static const int NSURLCacheStorageAllowed = 0; + static const int NSURLCacheStorageAllowedInMemoryOnly = 1; + static const int NSURLCacheStorageNotAllowed = 2; +} + +class NSURLSessionDataTask extends NSURLSessionTask { + NSURLSessionDataTask._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionDataTask] that points to the same underlying object as [other]. + static NSURLSessionDataTask castFrom(T other) { + return NSURLSessionDataTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. + static NSURLSessionDataTask castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionDataTask._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionDataTask1); + } + + @override + NSURLSessionDataTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionDataTask new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionDataTask allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSessionDataTask1, _lib._sel_allocWithZone_1, zone); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionDataTask alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLSessionDataTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLSessionDataTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSURLSessionDataTask1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLSessionDataTask1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLSessionDataTask1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLSessionDataTask1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLSessionDataTask1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSURLSessionDataTask1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDataTask1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[ + block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSCachedURLResponse extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSCachedURLResponse._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunction( + ThermionDartTexture1 lib, void Function(NSCachedURLResponse?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSCachedURLResponse.listener( + ThermionDartTexture1 lib, void Function(NSCachedURLResponse?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + (ffi.Pointer arg0) => fn( + arg0.address == 0 ? null : NSCachedURLResponse._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSCachedURLResponse? arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); +} + +class NSURLConnection extends NSObject { + NSURLConnection._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLConnection] that points to the same underlying object as [other]. + static NSURLConnection castFrom(T other) { + return NSURLConnection._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLConnection] that wraps the given raw object pointer. + static NSURLConnection castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLConnection._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLConnection]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLConnection1); + } + + NSURLConnection? initWithRequest_delegate_startImmediately_( + NSURLRequest request, NSObject? delegate, bool startImmediately) { + final _ret = _lib._objc_msgSend_971( + _id, + _lib._sel_initWithRequest_delegate_startImmediately_1, + request._id, + delegate?._id ?? ffi.nullptr, + startImmediately); + return _ret.address == 0 + ? null + : NSURLConnection._(_ret, _lib, retain: true, release: true); + } + + NSURLConnection? initWithRequest_delegate_( + NSURLRequest request, NSObject? delegate) { + final _ret = _lib._objc_msgSend_972( + _id, + _lib._sel_initWithRequest_delegate_1, + request._id, + delegate?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURLConnection._(_ret, _lib, retain: true, release: true); + } + + static NSURLConnection? connectionWithRequest_delegate_( + ThermionDartTexture1 _lib, NSURLRequest request, NSObject? delegate) { + final _ret = _lib._objc_msgSend_973( + _lib._class_NSURLConnection1, + _lib._sel_connectionWithRequest_delegate_1, + request._id, + delegate?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURLConnection._(_ret, _lib, retain: true, release: true); + } + + NSURLRequest get originalRequest { + final _ret = _lib._objc_msgSend_974(_id, _lib._sel_originalRequest1); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + NSURLRequest get currentRequest { + final _ret = _lib._objc_msgSend_974(_id, _lib._sel_currentRequest1); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + void start() { + _lib._objc_msgSend_1(_id, _lib._sel_start1); + } + + void cancel() { + _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { + _lib._objc_msgSend_568( + _id, _lib._sel_scheduleInRunLoop_forMode_1, aRunLoop._id, mode._id); + } + + void unscheduleFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { + _lib._objc_msgSend_568( + _id, _lib._sel_unscheduleFromRunLoop_forMode_1, aRunLoop._id, mode._id); + } + + void setDelegateQueue_(NSOperationQueue? queue) { + _lib._objc_msgSend_975( + _id, _lib._sel_setDelegateQueue_1, queue?._id ?? ffi.nullptr); + } + + static bool canHandleRequest_( + ThermionDartTexture1 _lib, NSURLRequest request) { + return _lib._objc_msgSend_976(_lib._class_NSURLConnection1, + _lib._sel_canHandleRequest_1, request._id); + } + + static NSData? sendSynchronousRequest_returningResponse_error_( + ThermionDartTexture1 _lib, + NSURLRequest request, + ffi.Pointer> response, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_977( + _lib._class_NSURLConnection1, + _lib._sel_sendSynchronousRequest_returningResponse_error_1, + request._id, + response, + error); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + static void sendAsynchronousRequest_queue_completionHandler_( + ThermionDartTexture1 _lib, + NSURLRequest request, + NSOperationQueue queue, + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError handler) { + _lib._objc_msgSend_978( + _lib._class_NSURLConnection1, + _lib._sel_sendAsynchronousRequest_queue_completionHandler_1, + request._id, + queue._id, + handler._id); + } + + @override + NSURLConnection init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLConnection._(_ret, _lib, retain: true, release: true); + } + + static NSURLConnection new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLConnection1, _lib._sel_new1); + return NSURLConnection._(_ret, _lib, retain: false, release: true); + } + + static NSURLConnection allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLConnection1, _lib._sel_allocWithZone_1, zone); + return NSURLConnection._(_ret, _lib, retain: false, release: true); + } + + static NSURLConnection alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLConnection1, _lib._sel_alloc1); + return NSURLConnection._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLConnection1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLConnection1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSURLConnection1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLConnection1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLConnection1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLConnection1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLConnection1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSURLConnection1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLConnection1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunction( + ThermionDartTexture1 lib, + void Function(NSURLResponse?, NSData?, NSError?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : NSURLResponse._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSData._(arg1, lib, retain: true, release: true), + arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.listener( + ThermionDartTexture1 lib, + void Function(NSURLResponse?, NSData?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : NSURLResponse._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSData._(arg1, lib, retain: true, release: true), + arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURLResponse? arg0, NSData? arg1, NSError? arg2) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>()( + _id, + arg0?._id ?? ffi.nullptr, + arg1?._id ?? ffi.nullptr, + arg2?._id ?? ffi.nullptr); +} + +class NSURLCredential extends NSObject { + NSURLCredential._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLCredential] that points to the same underlying object as [other]. + static NSURLCredential castFrom(T other) { + return NSURLCredential._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLCredential] that wraps the given raw object pointer. + static NSURLCredential castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLCredential._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLCredential]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLCredential1); + } + + int get persistence { + return _lib._objc_msgSend_979(_id, _lib._sel_persistence1); + } + + NSURLCredential initWithUser_password_persistence_( + NSString user, NSString password, int persistence) { + final _ret = _lib._objc_msgSend_980( + _id, + _lib._sel_initWithUser_password_persistence_1, + user._id, + password._id, + persistence); + return NSURLCredential._(_ret, _lib, retain: true, release: true); + } + + static NSURLCredential credentialWithUser_password_persistence_( + ThermionDartTexture1 _lib, + NSString user, + NSString password, + int persistence) { + final _ret = _lib._objc_msgSend_981( + _lib._class_NSURLCredential1, + _lib._sel_credentialWithUser_password_persistence_1, + user._id, + password._id, + persistence); + return NSURLCredential._(_ret, _lib, retain: true, release: true); + } + + NSString? get user { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_user1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get password { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_password1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + bool get hasPassword { + return _lib._objc_msgSend_12(_id, _lib._sel_hasPassword1); + } + + NSURLCredential initWithIdentity_certificates_persistence_( + ffi.Pointer<__SecIdentity> identity, + NSArray? certArray, + int persistence) { + final _ret = _lib._objc_msgSend_982( + _id, + _lib._sel_initWithIdentity_certificates_persistence_1, + identity, + certArray?._id ?? ffi.nullptr, + persistence); + return NSURLCredential._(_ret, _lib, retain: true, release: true); + } + + static NSURLCredential credentialWithIdentity_certificates_persistence_( + ThermionDartTexture1 _lib, + ffi.Pointer<__SecIdentity> identity, + NSArray? certArray, + int persistence) { + final _ret = _lib._objc_msgSend_983( + _lib._class_NSURLCredential1, + _lib._sel_credentialWithIdentity_certificates_persistence_1, + identity, + certArray?._id ?? ffi.nullptr, + persistence); + return NSURLCredential._(_ret, _lib, retain: true, release: true); + } + + ffi.Pointer<__SecIdentity> get identity { + return _lib._objc_msgSend_984(_id, _lib._sel_identity1); + } + + NSArray get certificates { + final _ret = _lib._objc_msgSend_84(_id, _lib._sel_certificates1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSURLCredential initWithTrust_(ffi.Pointer<__SecTrust> trust) { + final _ret = _lib._objc_msgSend_985(_id, _lib._sel_initWithTrust_1, trust); + return NSURLCredential._(_ret, _lib, retain: true, release: true); + } + + static NSURLCredential credentialForTrust_( + ThermionDartTexture1 _lib, ffi.Pointer<__SecTrust> trust) { + final _ret = _lib._objc_msgSend_986( + _lib._class_NSURLCredential1, _lib._sel_credentialForTrust_1, trust); + return NSURLCredential._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLCredential init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLCredential._(_ret, _lib, retain: true, release: true); + } + + static NSURLCredential new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLCredential1, _lib._sel_new1); + return NSURLCredential._(_ret, _lib, retain: false, release: true); + } + + static NSURLCredential allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLCredential1, _lib._sel_allocWithZone_1, zone); + return NSURLCredential._(_ret, _lib, retain: false, release: true); + } + + static NSURLCredential alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLCredential1, _lib._sel_alloc1); + return NSURLCredential._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLCredential1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLCredential1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSURLCredential1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLCredential1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLCredential1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLCredential1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLCredential1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSURLCredential1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLCredential1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSURLCredentialPersistence { + static const int NSURLCredentialPersistenceNone = 0; + static const int NSURLCredentialPersistenceForSession = 1; + static const int NSURLCredentialPersistencePermanent = 2; + static const int NSURLCredentialPersistenceSynchronizable = 3; +} + +final class __SecIdentity extends ffi.Opaque {} + +final class __SecTrust extends ffi.Opaque {} + +class NSURLProtectionSpace extends NSObject { + NSURLProtectionSpace._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLProtectionSpace] that points to the same underlying object as [other]. + static NSURLProtectionSpace castFrom(T other) { + return NSURLProtectionSpace._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLProtectionSpace] that wraps the given raw object pointer. + static NSURLProtectionSpace castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLProtectionSpace._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLProtectionSpace]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLProtectionSpace1); + } + + NSURLProtectionSpace initWithHost_port_protocol_realm_authenticationMethod_( + NSString host, + int port, + NSString? protocol, + NSString? realm, + NSString? authenticationMethod) { + final _ret = _lib._objc_msgSend_987( + _id, + _lib._sel_initWithHost_port_protocol_realm_authenticationMethod_1, + host._id, + port, + protocol?._id ?? ffi.nullptr, + realm?._id ?? ffi.nullptr, + authenticationMethod?._id ?? ffi.nullptr); + return NSURLProtectionSpace._(_ret, _lib, retain: true, release: true); + } + + NSURLProtectionSpace initWithProxyHost_port_type_realm_authenticationMethod_( + NSString host, + int port, + NSString? type, + NSString? realm, + NSString? authenticationMethod) { + final _ret = _lib._objc_msgSend_987( + _id, + _lib._sel_initWithProxyHost_port_type_realm_authenticationMethod_1, + host._id, + port, + type?._id ?? ffi.nullptr, + realm?._id ?? ffi.nullptr, + authenticationMethod?._id ?? ffi.nullptr); + return NSURLProtectionSpace._(_ret, _lib, retain: true, release: true); + } + + NSString? get realm { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_realm1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + bool get receivesCredentialSecurely { + return _lib._objc_msgSend_12(_id, _lib._sel_receivesCredentialSecurely1); + } + + bool get isProxy { + return _lib._objc_msgSend_12(_id, _lib._sel_isProxy1); + } + + NSString get host { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_host1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + int get port { + return _lib._objc_msgSend_82(_id, _lib._sel_port1); + } + + NSString? get proxyType { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_proxyType1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get protocol { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_protocol1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get authenticationMethod { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_authenticationMethod1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray? get distinguishedNames { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_distinguishedNames1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + ffi.Pointer<__SecTrust> get serverTrust { + return _lib._objc_msgSend_988(_id, _lib._sel_serverTrust1); + } + + @override + NSURLProtectionSpace init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLProtectionSpace._(_ret, _lib, retain: true, release: true); + } + + static NSURLProtectionSpace new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLProtectionSpace1, _lib._sel_new1); + return NSURLProtectionSpace._(_ret, _lib, retain: false, release: true); + } + + static NSURLProtectionSpace allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLProtectionSpace1, _lib._sel_allocWithZone_1, zone); + return NSURLProtectionSpace._(_ret, _lib, retain: false, release: true); + } + + static NSURLProtectionSpace alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLProtectionSpace1, _lib._sel_alloc1); + return NSURLProtectionSpace._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLProtectionSpace1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLProtectionSpace1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSURLProtectionSpace1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLProtectionSpace1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLProtectionSpace1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLProtectionSpace1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLProtectionSpace1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSURLProtectionSpace1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLProtectionSpace1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSURLCredentialStorage extends NSObject { + NSURLCredentialStorage._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLCredentialStorage] that points to the same underlying object as [other]. + static NSURLCredentialStorage castFrom(T other) { + return NSURLCredentialStorage._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLCredentialStorage] that wraps the given raw object pointer. + static NSURLCredentialStorage castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLCredentialStorage._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLCredentialStorage1); + } + + static NSURLCredentialStorage getSharedCredentialStorage( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_989(_lib._class_NSURLCredentialStorage1, + _lib._sel_sharedCredentialStorage1); + return NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? credentialsForProtectionSpace_(NSURLProtectionSpace space) { + final _ret = _lib._objc_msgSend_990( + _id, _lib._sel_credentialsForProtectionSpace_1, space._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary get allCredentials { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allCredentials1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + void setCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _lib._objc_msgSend_991(_id, _lib._sel_setCredential_forProtectionSpace_1, + credential._id, space._id); + } + + void removeCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _lib._objc_msgSend_991(_id, _lib._sel_removeCredential_forProtectionSpace_1, + credential._id, space._id); + } + + void removeCredential_forProtectionSpace_options_(NSURLCredential credential, + NSURLProtectionSpace space, NSDictionary? options) { + _lib._objc_msgSend_992( + _id, + _lib._sel_removeCredential_forProtectionSpace_options_1, + credential._id, + space._id, + options?._id ?? ffi.nullptr); + } + + NSURLCredential? defaultCredentialForProtectionSpace_( + NSURLProtectionSpace space) { + final _ret = _lib._objc_msgSend_993( + _id, _lib._sel_defaultCredentialForProtectionSpace_1, space._id); + return _ret.address == 0 + ? null + : NSURLCredential._(_ret, _lib, retain: true, release: true); + } + + void setDefaultCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _lib._objc_msgSend_991( + _id, + _lib._sel_setDefaultCredential_forProtectionSpace_1, + credential._id, + space._id); + } + + void getCredentialsForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace protectionSpace, + NSURLSessionTask task, + ObjCBlock_ffiVoid_NSDictionary completionHandler) { + _lib._objc_msgSend_994( + _id, + _lib._sel_getCredentialsForProtectionSpace_task_completionHandler_1, + protectionSpace._id, + task._id, + completionHandler._id); + } + + void setCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _lib._objc_msgSend_995( + _id, + _lib._sel_setCredential_forProtectionSpace_task_1, + credential._id, + protectionSpace._id, + task._id); + } + + void removeCredential_forProtectionSpace_options_task_( + NSURLCredential credential, + NSURLProtectionSpace protectionSpace, + NSDictionary? options, + NSURLSessionTask task) { + _lib._objc_msgSend_996( + _id, + _lib._sel_removeCredential_forProtectionSpace_options_task_1, + credential._id, + protectionSpace._id, + options?._id ?? ffi.nullptr, + task._id); + } + + void getDefaultCredentialForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace space, + NSURLSessionTask task, + ObjCBlock_ffiVoid_NSURLCredential completionHandler) { + _lib._objc_msgSend_997( + _id, + _lib._sel_getDefaultCredentialForProtectionSpace_task_completionHandler_1, + space._id, + task._id, + completionHandler._id); + } + + void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _lib._objc_msgSend_995( + _id, + _lib._sel_setDefaultCredential_forProtectionSpace_task_1, + credential._id, + protectionSpace._id, + task._id); + } + + @override + NSURLCredentialStorage init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); + } + + static NSURLCredentialStorage new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLCredentialStorage1, _lib._sel_new1); + return NSURLCredentialStorage._(_ret, _lib, retain: false, release: true); + } + + static NSURLCredentialStorage allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLCredentialStorage1, _lib._sel_allocWithZone_1, zone); + return NSURLCredentialStorage._(_ret, _lib, retain: false, release: true); + } + + static NSURLCredentialStorage alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLCredentialStorage1, _lib._sel_alloc1); + return NSURLCredentialStorage._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLCredentialStorage1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLCredentialStorage1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSURLCredentialStorage1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLCredentialStorage1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLCredentialStorage1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLCredentialStorage1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLCredentialStorage1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSURLCredentialStorage1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLCredentialStorage1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +void _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSDictionary_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[block.ref.target.address]!( + arg0); + +class ObjCBlock_ffiVoid_NSDictionary extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSDictionary._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary.fromFunction( + ThermionDartTexture1 lib, void Function(NSDictionary?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSDictionary._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSDictionary.listener( + ThermionDartTexture1 lib, void Function(NSDictionary?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSDictionary._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSDictionary? arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); +} + +void _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[ + block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSURLCredential extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSURLCredential._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLCredential.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLCredential.fromFunction( + ThermionDartTexture1 lib, void Function(NSURLCredential?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSURLCredential._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURLCredential.listener( + ThermionDartTexture1 lib, void Function(NSURLCredential?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( + (ffi.Pointer arg0) => fn( + arg0.address == 0 ? null : NSURLCredential._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSURLCredential? arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); +} + +class NSURLProtocol extends NSObject { + NSURLProtocol._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLProtocol] that points to the same underlying object as [other]. + static NSURLProtocol castFrom(T other) { + return NSURLProtocol._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLProtocol] that wraps the given raw object pointer. + static NSURLProtocol castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLProtocol._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLProtocol]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLProtocol1); + } + + NSURLProtocol initWithRequest_cachedResponse_client_(NSURLRequest request, + NSCachedURLResponse? cachedResponse, NSObject? client) { + final _ret = _lib._objc_msgSend_998( + _id, + _lib._sel_initWithRequest_cachedResponse_client_1, + request._id, + cachedResponse?._id ?? ffi.nullptr, + client?._id ?? ffi.nullptr); + return NSURLProtocol._(_ret, _lib, retain: true, release: true); + } + + NSObject? get client { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_client1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSURLRequest get request { + final _ret = _lib._objc_msgSend_974(_id, _lib._sel_request1); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + NSCachedURLResponse? get cachedResponse { + final _ret = _lib._objc_msgSend_999(_id, _lib._sel_cachedResponse1); + return _ret.address == 0 + ? null + : NSCachedURLResponse._(_ret, _lib, retain: true, release: true); + } + + static bool canInitWithRequest_( + ThermionDartTexture1 _lib, NSURLRequest request) { + return _lib._objc_msgSend_976(_lib._class_NSURLProtocol1, + _lib._sel_canInitWithRequest_1, request._id); + } + + static NSURLRequest canonicalRequestForRequest_( + ThermionDartTexture1 _lib, NSURLRequest request) { + final _ret = _lib._objc_msgSend_1000(_lib._class_NSURLProtocol1, + _lib._sel_canonicalRequestForRequest_1, request._id); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + static bool requestIsCacheEquivalent_toRequest_( + ThermionDartTexture1 _lib, NSURLRequest a, NSURLRequest b) { + return _lib._objc_msgSend_1001(_lib._class_NSURLProtocol1, + _lib._sel_requestIsCacheEquivalent_toRequest_1, a._id, b._id); + } + + void startLoading() { + _lib._objc_msgSend_1(_id, _lib._sel_startLoading1); + } + + void stopLoading() { + _lib._objc_msgSend_1(_id, _lib._sel_stopLoading1); + } + + static NSObject? propertyForKey_inRequest_( + ThermionDartTexture1 _lib, NSString key, NSURLRequest request) { + final _ret = _lib._objc_msgSend_1002(_lib._class_NSURLProtocol1, + _lib._sel_propertyForKey_inRequest_1, key._id, request._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static void setProperty_forKey_inRequest_(ThermionDartTexture1 _lib, + NSObject value, NSString key, NSMutableURLRequest request) { + _lib._objc_msgSend_1009( + _lib._class_NSURLProtocol1, + _lib._sel_setProperty_forKey_inRequest_1, + value._id, + key._id, + request._id); + } + + static void removePropertyForKey_inRequest_( + ThermionDartTexture1 _lib, NSString key, NSMutableURLRequest request) { + _lib._objc_msgSend_1010(_lib._class_NSURLProtocol1, + _lib._sel_removePropertyForKey_inRequest_1, key._id, request._id); + } + + static bool registerClass_( + ThermionDartTexture1 _lib, NSObject protocolClass) { + return _lib._objc_msgSend_0(_lib._class_NSURLProtocol1, + _lib._sel_registerClass_1, protocolClass._id); + } + + static void unregisterClass_( + ThermionDartTexture1 _lib, NSObject protocolClass) { + _lib._objc_msgSend_15(_lib._class_NSURLProtocol1, + _lib._sel_unregisterClass_1, protocolClass._id); + } + + static bool canInitWithTask_( + ThermionDartTexture1 _lib, NSURLSessionTask task) { + return _lib._objc_msgSend_1011( + _lib._class_NSURLProtocol1, _lib._sel_canInitWithTask_1, task._id); + } + + NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, + NSCachedURLResponse? cachedResponse, NSObject? client) { + final _ret = _lib._objc_msgSend_1012( + _id, + _lib._sel_initWithTask_cachedResponse_client_1, + task._id, + cachedResponse?._id ?? ffi.nullptr, + client?._id ?? ffi.nullptr); + return NSURLProtocol._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionTask? get task { + final _ret = _lib._objc_msgSend_1013(_id, _lib._sel_task1); + return _ret.address == 0 + ? null + : NSURLSessionTask._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLProtocol init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLProtocol._(_ret, _lib, retain: true, release: true); + } + + static NSURLProtocol new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLProtocol1, _lib._sel_new1); + return NSURLProtocol._(_ret, _lib, retain: false, release: true); + } + + static NSURLProtocol allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLProtocol1, _lib._sel_allocWithZone_1, zone); + return NSURLProtocol._(_ret, _lib, retain: false, release: true); + } + + static NSURLProtocol alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLProtocol1, _lib._sel_alloc1); + return NSURLProtocol._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLProtocol1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLProtocol1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLProtocol1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLProtocol1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLProtocol1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLProtocol1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLProtocol1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSURLProtocol1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLProtocol1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSMutableURLRequest extends NSURLRequest { + NSMutableURLRequest._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableURLRequest] that points to the same underlying object as [other]. + static NSMutableURLRequest castFrom(T other) { + return NSMutableURLRequest._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. + static NSMutableURLRequest castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableURLRequest._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableURLRequest]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableURLRequest1); + } + + @override + NSURL? get URL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + set URL(NSURL? value) { + return _lib._objc_msgSend_670( + _id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); + } + + @override + int get cachePolicy { + return _lib._objc_msgSend_854(_id, _lib._sel_cachePolicy1); + } + + set cachePolicy(int value) { + return _lib._objc_msgSend_1003(_id, _lib._sel_setCachePolicy_1, value); + } + + @override + double get timeoutInterval { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret(_id, _lib._sel_timeoutInterval1) + : _lib._objc_msgSend_164(_id, _lib._sel_timeoutInterval1); + } + + set timeoutInterval(double value) { + return _lib._objc_msgSend_541(_id, _lib._sel_setTimeoutInterval_1, value); + } + + @override + NSURL? get mainDocumentURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_mainDocumentURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + set mainDocumentURL(NSURL? value) { + return _lib._objc_msgSend_670( + _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); + } + + @override + int get networkServiceType { + return _lib._objc_msgSend_855(_id, _lib._sel_networkServiceType1); + } + + set networkServiceType(int value) { + return _lib._objc_msgSend_1004( + _id, _lib._sel_setNetworkServiceType_1, value); + } + + @override + bool get allowsCellularAccess { + return _lib._objc_msgSend_12(_id, _lib._sel_allowsCellularAccess1); + } + + set allowsCellularAccess(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setAllowsCellularAccess_1, value); + } + + @override + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_12(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } + + set allowsExpensiveNetworkAccess(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + } + + @override + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_12( + _id, _lib._sel_allowsConstrainedNetworkAccess1); + } + + set allowsConstrainedNetworkAccess(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + } + + @override + bool get assumesHTTP3Capable { + return _lib._objc_msgSend_12(_id, _lib._sel_assumesHTTP3Capable1); + } + + set assumesHTTP3Capable(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setAssumesHTTP3Capable_1, value); + } + + @override + int get attribution { + return _lib._objc_msgSend_856(_id, _lib._sel_attribution1); + } + + set attribution(int value) { + return _lib._objc_msgSend_1005(_id, _lib._sel_setAttribution_1, value); + } + + @override + bool get requiresDNSSECValidation { + return _lib._objc_msgSend_12(_id, _lib._sel_requiresDNSSECValidation1); + } + + set requiresDNSSECValidation(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setRequiresDNSSECValidation_1, value); + } + + NSString get HTTPMethod { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_HTTPMethod1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set HTTPMethod(NSString value) { + return _lib._objc_msgSend_645(_id, _lib._sel_setHTTPMethod_1, value._id); + } + + @override + NSDictionary? get allHTTPHeaderFields { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_allHTTPHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set allHTTPHeaderFields(NSDictionary? value) { + return _lib._objc_msgSend_633( + _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); + } + + void setValue_forHTTPHeaderField_(NSString? value, NSString field) { + _lib._objc_msgSend_1006(_id, _lib._sel_setValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field._id); + } + + void addValue_forHTTPHeaderField_(NSString value, NSString field) { + _lib._objc_msgSend_550( + _id, _lib._sel_addValue_forHTTPHeaderField_1, value._id, field._id); + } + + @override + NSData? get HTTPBody { + final _ret = _lib._objc_msgSend_285(_id, _lib._sel_HTTPBody1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + set HTTPBody(NSData? value) { + return _lib._objc_msgSend_1007( + _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); + } + + @override + NSInputStream? get HTTPBodyStream { + final _ret = _lib._objc_msgSend_871(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } + + set HTTPBodyStream(NSInputStream? value) { + return _lib._objc_msgSend_1008( + _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); + } + + @override + bool get HTTPShouldHandleCookies { + return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldHandleCookies1); + } + + set HTTPShouldHandleCookies(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setHTTPShouldHandleCookies_1, value); + } + + @override + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldUsePipelining1); + } + + set HTTPShouldUsePipelining(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setHTTPShouldUsePipelining_1, value); + } + + static NSMutableURLRequest requestWithURL_( + ThermionDartTexture1 _lib, NSURL URL) { + final _ret = _lib._objc_msgSend_261( + _lib._class_NSMutableURLRequest1, _lib._sel_requestWithURL_1, URL._id); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } + + static bool getSupportsSecureCoding(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableURLRequest1, _lib._sel_supportsSecureCoding1); + } + + static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( + ThermionDartTexture1 _lib, + NSURL URL, + int cachePolicy, + double timeoutInterval) { + final _ret = _lib._objc_msgSend_853( + _lib._class_NSMutableURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL._id, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableURLRequest initWithURL_(NSURL URL) { + final _ret = _lib._objc_msgSend_261(_id, _lib._sel_initWithURL_1, URL._id); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_( + NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _lib._objc_msgSend_853( + _id, + _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, + URL._id, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableURLRequest init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } + + static NSMutableURLRequest new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + } + + static NSMutableURLRequest allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableURLRequest1, _lib._sel_allocWithZone_1, zone); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + } + + static NSMutableURLRequest alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSMutableURLRequest1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSMutableURLRequest1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSMutableURLRequest1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableURLRequest1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSMutableURLRequest1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSMutableURLRequest1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSMutableURLRequest1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSMutableURLRequest1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableURLRequest1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSXMLParser extends NSObject { + NSXMLParser._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSXMLParser] that points to the same underlying object as [other]. + static NSXMLParser castFrom(T other) { + return NSXMLParser._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSXMLParser] that wraps the given raw object pointer. + static NSXMLParser castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSXMLParser._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSXMLParser]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLParser1); + } + + NSXMLParser? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_276(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSXMLParser._(_ret, _lib, retain: true, release: true); + } + + NSXMLParser initWithData_(NSData data) { + final _ret = + _lib._objc_msgSend_278(_id, _lib._sel_initWithData_1, data._id); + return NSXMLParser._(_ret, _lib, retain: true, release: true); + } + + NSXMLParser initWithStream_(NSInputStream stream) { + final _ret = + _lib._objc_msgSend_1014(_id, _lib._sel_initWithStream_1, stream._id); + return NSXMLParser._(_ret, _lib, retain: true, release: true); + } + + NSObject? get delegate { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set delegate(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + } + + bool get shouldProcessNamespaces { + return _lib._objc_msgSend_12(_id, _lib._sel_shouldProcessNamespaces1); + } + + set shouldProcessNamespaces(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setShouldProcessNamespaces_1, value); + } + + bool get shouldReportNamespacePrefixes { + return _lib._objc_msgSend_12(_id, _lib._sel_shouldReportNamespacePrefixes1); + } + + set shouldReportNamespacePrefixes(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setShouldReportNamespacePrefixes_1, value); + } + + int get externalEntityResolvingPolicy { + return _lib._objc_msgSend_1015( + _id, _lib._sel_externalEntityResolvingPolicy1); + } + + set externalEntityResolvingPolicy(int value) { + return _lib._objc_msgSend_1016( + _id, _lib._sel_setExternalEntityResolvingPolicy_1, value); + } + + NSSet? get allowedExternalEntityURLs { + final _ret = + _lib._objc_msgSend_318(_id, _lib._sel_allowedExternalEntityURLs1); + return _ret.address == 0 + ? null + : NSSet._(_ret, _lib, retain: true, release: true); + } + + set allowedExternalEntityURLs(NSSet? value) { + return _lib._objc_msgSend_1017(_id, + _lib._sel_setAllowedExternalEntityURLs_1, value?._id ?? ffi.nullptr); + } + + bool parse() { + return _lib._objc_msgSend_12(_id, _lib._sel_parse1); + } + + void abortParsing() { + _lib._objc_msgSend_1(_id, _lib._sel_abortParsing1); + } + + NSError? get parserError { + final _ret = _lib._objc_msgSend_321(_id, _lib._sel_parserError1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } + + bool get shouldResolveExternalEntities { + return _lib._objc_msgSend_12(_id, _lib._sel_shouldResolveExternalEntities1); + } + + set shouldResolveExternalEntities(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setShouldResolveExternalEntities_1, value); + } + + NSString? get publicID { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_publicID1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get systemID { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_systemID1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + int get lineNumber { + return _lib._objc_msgSend_82(_id, _lib._sel_lineNumber1); + } + + int get columnNumber { + return _lib._objc_msgSend_82(_id, _lib._sel_columnNumber1); + } + + @override + NSXMLParser init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSXMLParser._(_ret, _lib, retain: true, release: true); + } + + static NSXMLParser new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLParser1, _lib._sel_new1); + return NSXMLParser._(_ret, _lib, retain: false, release: true); + } + + static NSXMLParser allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSXMLParser1, _lib._sel_allocWithZone_1, zone); + return NSXMLParser._(_ret, _lib, retain: false, release: true); + } + + static NSXMLParser alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSXMLParser1, _lib._sel_alloc1); + return NSXMLParser._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSXMLParser1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSXMLParser1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSXMLParser1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSXMLParser1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSXMLParser1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSXMLParser1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSXMLParser1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSXMLParser1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSXMLParser1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSXMLParserExternalEntityResolvingPolicy { + static const int NSXMLParserResolveExternalEntitiesNever = 0; + static const int NSXMLParserResolveExternalEntitiesNoNetwork = 1; + static const int NSXMLParserResolveExternalEntitiesSameOriginOnly = 2; + static const int NSXMLParserResolveExternalEntitiesAlways = 3; +} + +class NSFileWrapper extends NSObject { + NSFileWrapper._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSFileWrapper] that points to the same underlying object as [other]. + static NSFileWrapper castFrom(T other) { + return NSFileWrapper._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSFileWrapper] that wraps the given raw object pointer. + static NSFileWrapper castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSFileWrapper._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSFileWrapper]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSFileWrapper1); + } + + NSFileWrapper? initWithURL_options_error_( + NSURL url, int options, ffi.Pointer> outError) { + final _ret = _lib._objc_msgSend_1018( + _id, _lib._sel_initWithURL_options_error_1, url._id, options, outError); + return _ret.address == 0 + ? null + : NSFileWrapper._(_ret, _lib, retain: true, release: true); + } + + NSFileWrapper initDirectoryWithFileWrappers_( + NSDictionary childrenByPreferredName) { + final _ret = _lib._objc_msgSend_158(_id, + _lib._sel_initDirectoryWithFileWrappers_1, childrenByPreferredName._id); + return NSFileWrapper._(_ret, _lib, retain: true, release: true); + } + + NSFileWrapper initRegularFileWithContents_(NSData contents) { + final _ret = _lib._objc_msgSend_278( + _id, _lib._sel_initRegularFileWithContents_1, contents._id); + return NSFileWrapper._(_ret, _lib, retain: true, release: true); + } + + NSFileWrapper initSymbolicLinkWithDestinationURL_(NSURL url) { + final _ret = _lib._objc_msgSend_261( + _id, _lib._sel_initSymbolicLinkWithDestinationURL_1, url._id); + return NSFileWrapper._(_ret, _lib, retain: true, release: true); + } + + NSFileWrapper? initWithSerializedRepresentation_( + NSData serializeRepresentation) { + final _ret = _lib._objc_msgSend_870( + _id, + _lib._sel_initWithSerializedRepresentation_1, + serializeRepresentation._id); + return _ret.address == 0 + ? null + : NSFileWrapper._(_ret, _lib, retain: true, release: true); + } + + NSFileWrapper? initWithCoder_(NSCoder inCoder) { + final _ret = + _lib._objc_msgSend_46(_id, _lib._sel_initWithCoder_1, inCoder._id); + return _ret.address == 0 + ? null + : NSFileWrapper._(_ret, _lib, retain: true, release: true); + } + + bool get directory { + return _lib._objc_msgSend_12(_id, _lib._sel_isDirectory1); + } + + bool get regularFile { + return _lib._objc_msgSend_12(_id, _lib._sel_isRegularFile1); + } + + bool get symbolicLink { + return _lib._objc_msgSend_12(_id, _lib._sel_isSymbolicLink1); + } + + NSString? get preferredFilename { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_preferredFilename1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set preferredFilename(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setPreferredFilename_1, value?._id ?? ffi.nullptr); + } + + NSString? get filename { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_filename1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set filename(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setFilename_1, value?._id ?? ffi.nullptr); + } + + NSDictionary get fileAttributes { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_fileAttributes1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set fileAttributes(NSDictionary value) { + return _lib._objc_msgSend_181( + _id, _lib._sel_setFileAttributes_1, value._id); + } + + bool matchesContentsOfURL_(NSURL url) { + return _lib._objc_msgSend_264( + _id, _lib._sel_matchesContentsOfURL_1, url._id); + } + + bool readFromURL_options_error_( + NSURL url, int options, ffi.Pointer> outError) { + return _lib._objc_msgSend_1019( + _id, _lib._sel_readFromURL_options_error_1, url._id, options, outError); + } + + bool writeToURL_options_originalContentsURL_error_( + NSURL url, + int options, + NSURL? originalContentsURL, + ffi.Pointer> outError) { + return _lib._objc_msgSend_1020( + _id, + _lib._sel_writeToURL_options_originalContentsURL_error_1, + url._id, + options, + originalContentsURL?._id ?? ffi.nullptr, + outError); + } + + NSData? get serializedRepresentation { + final _ret = + _lib._objc_msgSend_285(_id, _lib._sel_serializedRepresentation1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSString addFileWrapper_(NSFileWrapper child) { + final _ret = + _lib._objc_msgSend_1021(_id, _lib._sel_addFileWrapper_1, child._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString addRegularFileWithContents_preferredFilename_( + NSData data, NSString fileName) { + final _ret = _lib._objc_msgSend_1022( + _id, + _lib._sel_addRegularFileWithContents_preferredFilename_1, + data._id, + fileName._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + void removeFileWrapper_(NSFileWrapper child) { + _lib._objc_msgSend_1023(_id, _lib._sel_removeFileWrapper_1, child._id); + } + + NSDictionary? get fileWrappers { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_fileWrappers1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSString? keyForFileWrapper_(NSFileWrapper child) { + final _ret = + _lib._objc_msgSend_1024(_id, _lib._sel_keyForFileWrapper_1, child._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSData? get regularFileContents { + final _ret = _lib._objc_msgSend_285(_id, _lib._sel_regularFileContents1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSURL? get symbolicLinkDestinationURL { + final _ret = + _lib._objc_msgSend_44(_id, _lib._sel_symbolicLinkDestinationURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSObject? initWithPath_(NSString path) { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_initWithPath_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject initSymbolicLinkWithDestination_(NSString path) { + final _ret = _lib._objc_msgSend_31( + _id, _lib._sel_initSymbolicLinkWithDestination_1, path._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + bool needsToBeUpdatedFromPath_(NSString path) { + return _lib._objc_msgSend_63( + _id, _lib._sel_needsToBeUpdatedFromPath_1, path._id); + } + + bool updateFromPath_(NSString path) { + return _lib._objc_msgSend_63(_id, _lib._sel_updateFromPath_1, path._id); + } + + bool writeToFile_atomically_updateFilenames_( + NSString path, bool atomicFlag, bool updateFilenamesFlag) { + return _lib._objc_msgSend_1025( + _id, + _lib._sel_writeToFile_atomically_updateFilenames_1, + path._id, + atomicFlag, + updateFilenamesFlag); + } + + NSString addFileWithPath_(NSString path) { + final _ret = + _lib._objc_msgSend_68(_id, _lib._sel_addFileWithPath_1, path._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString addSymbolicLinkWithDestination_preferredFilename_( + NSString path, NSString filename) { + final _ret = _lib._objc_msgSend_363( + _id, + _lib._sel_addSymbolicLinkWithDestination_preferredFilename_1, + path._id, + filename._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString symbolicLinkDestination() { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_symbolicLinkDestination1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + @override + NSFileWrapper init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSFileWrapper._(_ret, _lib, retain: true, release: true); + } + + static NSFileWrapper new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileWrapper1, _lib._sel_new1); + return NSFileWrapper._(_ret, _lib, retain: false, release: true); + } + + static NSFileWrapper allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSFileWrapper1, _lib._sel_allocWithZone_1, zone); + return NSFileWrapper._(_ret, _lib, retain: false, release: true); + } + + static NSFileWrapper alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileWrapper1, _lib._sel_alloc1); + return NSFileWrapper._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSFileWrapper1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSFileWrapper1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSFileWrapper1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSFileWrapper1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSFileWrapper1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSFileWrapper1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSFileWrapper1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSFileWrapper1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSFileWrapper1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSFileWrapperReadingOptions { + static const int NSFileWrapperReadingImmediate = 1; + static const int NSFileWrapperReadingWithoutMapping = 2; +} + +abstract class NSFileWrapperWritingOptions { + static const int NSFileWrapperWritingAtomic = 1; + static const int NSFileWrapperWritingWithNameUpdating = 2; +} + +class NSURLSession extends NSObject { + NSURLSession._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSession] that points to the same underlying object as [other]. + static NSURLSession castFrom(T other) { + return NSURLSession._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLSession] that wraps the given raw object pointer. + static NSURLSession castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSession._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSession]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLSession1); + } + + static NSURLSession getSharedSession(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_1026( + _lib._class_NSURLSession1, _lib._sel_sharedSession1); + return NSURLSession._(_ret, _lib, retain: true, release: true); + } + + static NSURLSession sessionWithConfiguration_( + ThermionDartTexture1 _lib, NSURLSessionConfiguration configuration) { + final _ret = _lib._objc_msgSend_1042(_lib._class_NSURLSession1, + _lib._sel_sessionWithConfiguration_1, configuration._id); + return NSURLSession._(_ret, _lib, retain: true, release: true); + } + + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + ThermionDartTexture1 _lib, + NSURLSessionConfiguration configuration, + NSObject? delegate, + NSOperationQueue? queue) { + final _ret = _lib._objc_msgSend_1043( + _lib._class_NSURLSession1, + _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, + configuration._id, + delegate?._id ?? ffi.nullptr, + queue?._id ?? ffi.nullptr); + return NSURLSession._(_ret, _lib, retain: true, release: true); + } + + NSOperationQueue get delegateQueue { + final _ret = _lib._objc_msgSend_903(_id, _lib._sel_delegateQueue1); + return NSOperationQueue._(_ret, _lib, retain: true, release: true); + } + + NSObject? get delegate { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionConfiguration get configuration { + final _ret = _lib._objc_msgSend_1027(_id, _lib._sel_configuration1); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + NSString? get sessionDescription { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_sessionDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set sessionDescription(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); + } + + void finishTasksAndInvalidate() { + _lib._objc_msgSend_1(_id, _lib._sel_finishTasksAndInvalidate1); + } + + void invalidateAndCancel() { + _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); + } + + void resetWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { + _lib._objc_msgSend_531( + _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._id); + } + + void flushWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { + _lib._objc_msgSend_531( + _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._id); + } + + void getTasksWithCompletionHandler_( + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray completionHandler) { + _lib._objc_msgSend_1044( + _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._id); + } + + void getAllTasksWithCompletionHandler_( + ObjCBlock_ffiVoid_NSArray1 completionHandler) { + _lib._objc_msgSend_1045(_id, _lib._sel_getAllTasksWithCompletionHandler_1, + completionHandler._id); + } + + NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { + final _ret = _lib._objc_msgSend_1046( + _id, _lib._sel_dataTaskWithRequest_1, request._id); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDataTask dataTaskWithURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_1047(_id, _lib._sel_dataTaskWithURL_1, url._id); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( + NSURLRequest request, NSURL fileURL) { + final _ret = _lib._objc_msgSend_1048(_id, + _lib._sel_uploadTaskWithRequest_fromFile_1, request._id, fileURL._id); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionUploadTask uploadTaskWithRequest_fromData_( + NSURLRequest request, NSData bodyData) { + final _ret = _lib._objc_msgSend_1049(_id, + _lib._sel_uploadTaskWithRequest_fromData_1, request._id, bodyData._id); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { + final _ret = _lib._objc_msgSend_1050( + _id, _lib._sel_uploadTaskWithStreamedRequest_1, request._id); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { + final _ret = _lib._objc_msgSend_1052( + _id, _lib._sel_downloadTaskWithRequest_1, request._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDownloadTask downloadTaskWithURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_1053(_id, _lib._sel_downloadTaskWithURL_1, url._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData resumeData) { + final _ret = _lib._objc_msgSend_1054( + _id, _lib._sel_downloadTaskWithResumeData_1, resumeData._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionStreamTask streamTaskWithHostName_port_( + NSString hostname, int port) { + final _ret = _lib._objc_msgSend_1057( + _id, _lib._sel_streamTaskWithHostName_port_1, hostname._id, port); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { + final _ret = _lib._objc_msgSend_1065( + _id, _lib._sel_streamTaskWithNetService_1, service._id); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_1072(_id, _lib._sel_webSocketTaskWithURL_1, url._id); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( + NSURL url, NSArray protocols) { + final _ret = _lib._objc_msgSend_1073(_id, + _lib._sel_webSocketTaskWithURL_protocols_1, url._id, protocols._id); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { + final _ret = _lib._objc_msgSend_1074( + _id, _lib._sel_webSocketTaskWithRequest_1, request._id); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLSession init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSession._(_ret, _lib, retain: true, release: true); + } + + static NSURLSession new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_new1); + return NSURLSession._(_ret, _lib, retain: false, release: true); + } + + NSURLSessionDataTask dataTaskWithRequest_completionHandler_( + NSURLRequest request, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_1075( + _id, + _lib._sel_dataTaskWithRequest_completionHandler_1, + request._id, + completionHandler._id); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDataTask dataTaskWithURL_completionHandler_(NSURL url, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_1076( + _id, + _lib._sel_dataTaskWithURL_completionHandler_1, + url._id, + completionHandler._id); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( + NSURLRequest request, + NSURL fileURL, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_1077( + _id, + _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, + request._id, + fileURL._id, + completionHandler._id); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( + NSURLRequest request, + NSData? bodyData, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_1078( + _id, + _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, + request._id, + bodyData?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( + NSURLRequest request, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_1079( + _id, + _lib._sel_downloadTaskWithRequest_completionHandler_1, + request._id, + completionHandler._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_(NSURL url, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_1080( + _id, + _lib._sel_downloadTaskWithURL_completionHandler_1, + url._id, + completionHandler._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( + NSData resumeData, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_1081( + _id, + _lib._sel_downloadTaskWithResumeData_completionHandler_1, + resumeData._id, + completionHandler._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSession allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSession1, _lib._sel_allocWithZone_1, zone); + return NSURLSession._(_ret, _lib, retain: false, release: true); + } + + static NSURLSession alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_alloc1); + return NSURLSession._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLSession1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLSession1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLSession1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLSession1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLSession1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLSession1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLSession1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSURLSession1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSession1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSURLSessionConfiguration extends NSObject { + NSURLSessionConfiguration._( + ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionConfiguration] that points to the same underlying object as [other]. + static NSURLSessionConfiguration castFrom(T other) { + return NSURLSessionConfiguration._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionConfiguration] that wraps the given raw object pointer. + static NSURLSessionConfiguration castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionConfiguration._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionConfiguration1); + } + + static NSURLSessionConfiguration getDefaultSessionConfiguration( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_1027(_lib._class_NSURLSessionConfiguration1, + _lib._sel_defaultSessionConfiguration1); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionConfiguration getEphemeralSessionConfiguration( + ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_1027(_lib._class_NSURLSessionConfiguration1, + _lib._sel_ephemeralSessionConfiguration1); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionConfiguration + backgroundSessionConfigurationWithIdentifier_( + ThermionDartTexture1 _lib, NSString identifier) { + final _ret = _lib._objc_msgSend_1028( + _lib._class_NSURLSessionConfiguration1, + _lib._sel_backgroundSessionConfigurationWithIdentifier_1, + identifier._id); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + NSString? get identifier { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_identifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + int get requestCachePolicy { + return _lib._objc_msgSend_854(_id, _lib._sel_requestCachePolicy1); + } + + set requestCachePolicy(int value) { + return _lib._objc_msgSend_1003( + _id, _lib._sel_setRequestCachePolicy_1, value); + } + + double get timeoutIntervalForRequest { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret( + _id, _lib._sel_timeoutIntervalForRequest1) + : _lib._objc_msgSend_164(_id, _lib._sel_timeoutIntervalForRequest1); + } + + set timeoutIntervalForRequest(double value) { + return _lib._objc_msgSend_541( + _id, _lib._sel_setTimeoutIntervalForRequest_1, value); + } + + double get timeoutIntervalForResource { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_164_fpret( + _id, _lib._sel_timeoutIntervalForResource1) + : _lib._objc_msgSend_164(_id, _lib._sel_timeoutIntervalForResource1); + } + + set timeoutIntervalForResource(double value) { + return _lib._objc_msgSend_541( + _id, _lib._sel_setTimeoutIntervalForResource_1, value); + } + + int get networkServiceType { + return _lib._objc_msgSend_855(_id, _lib._sel_networkServiceType1); + } + + set networkServiceType(int value) { + return _lib._objc_msgSend_1004( + _id, _lib._sel_setNetworkServiceType_1, value); + } + + bool get allowsCellularAccess { + return _lib._objc_msgSend_12(_id, _lib._sel_allowsCellularAccess1); + } + + set allowsCellularAccess(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setAllowsCellularAccess_1, value); + } + + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_12(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } + + set allowsExpensiveNetworkAccess(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + } + + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_12( + _id, _lib._sel_allowsConstrainedNetworkAccess1); + } + + set allowsConstrainedNetworkAccess(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + } + + bool get requiresDNSSECValidation { + return _lib._objc_msgSend_12(_id, _lib._sel_requiresDNSSECValidation1); + } + + set requiresDNSSECValidation(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setRequiresDNSSECValidation_1, value); + } + + bool get waitsForConnectivity { + return _lib._objc_msgSend_12(_id, _lib._sel_waitsForConnectivity1); + } + + set waitsForConnectivity(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setWaitsForConnectivity_1, value); + } + + bool get discretionary { + return _lib._objc_msgSend_12(_id, _lib._sel_isDiscretionary1); + } + + set discretionary(bool value) { + return _lib._objc_msgSend_526(_id, _lib._sel_setDiscretionary_1, value); + } + + NSString? get sharedContainerIdentifier { + final _ret = + _lib._objc_msgSend_43(_id, _lib._sel_sharedContainerIdentifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set sharedContainerIdentifier(NSString? value) { + return _lib._objc_msgSend_544(_id, _lib._sel_setSharedContainerIdentifier_1, + value?._id ?? ffi.nullptr); + } + + bool get sessionSendsLaunchEvents { + return _lib._objc_msgSend_12(_id, _lib._sel_sessionSendsLaunchEvents1); + } + + set sessionSendsLaunchEvents(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setSessionSendsLaunchEvents_1, value); + } + + NSDictionary? get connectionProxyDictionary { + final _ret = + _lib._objc_msgSend_389(_id, _lib._sel_connectionProxyDictionary1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set connectionProxyDictionary(NSDictionary? value) { + return _lib._objc_msgSend_633(_id, _lib._sel_setConnectionProxyDictionary_1, + value?._id ?? ffi.nullptr); + } + + int get TLSMinimumSupportedProtocol { + return _lib._objc_msgSend_1029(_id, _lib._sel_TLSMinimumSupportedProtocol1); + } + + set TLSMinimumSupportedProtocol(int value) { + return _lib._objc_msgSend_1030( + _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); + } + + int get TLSMaximumSupportedProtocol { + return _lib._objc_msgSend_1029(_id, _lib._sel_TLSMaximumSupportedProtocol1); + } + + set TLSMaximumSupportedProtocol(int value) { + return _lib._objc_msgSend_1030( + _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); + } + + int get TLSMinimumSupportedProtocolVersion { + return _lib._objc_msgSend_1031( + _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); + } + + set TLSMinimumSupportedProtocolVersion(int value) { + return _lib._objc_msgSend_1032( + _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); + } + + int get TLSMaximumSupportedProtocolVersion { + return _lib._objc_msgSend_1031( + _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); + } + + set TLSMaximumSupportedProtocolVersion(int value) { + return _lib._objc_msgSend_1032( + _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); + } + + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldUsePipelining1); + } + + set HTTPShouldUsePipelining(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setHTTPShouldUsePipelining_1, value); + } + + bool get HTTPShouldSetCookies { + return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldSetCookies1); + } + + set HTTPShouldSetCookies(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setHTTPShouldSetCookies_1, value); + } + + int get HTTPCookieAcceptPolicy { + return _lib._objc_msgSend_851(_id, _lib._sel_HTTPCookieAcceptPolicy1); + } + + set HTTPCookieAcceptPolicy(int value) { + return _lib._objc_msgSend_852( + _id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); + } + + NSDictionary? get HTTPAdditionalHeaders { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_HTTPAdditionalHeaders1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set HTTPAdditionalHeaders(NSDictionary? value) { + return _lib._objc_msgSend_633( + _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); + } + + int get HTTPMaximumConnectionsPerHost { + return _lib._objc_msgSend_82(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); + } + + set HTTPMaximumConnectionsPerHost(int value) { + return _lib._objc_msgSend_634( + _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); + } + + NSHTTPCookieStorage? get HTTPCookieStorage { + final _ret = _lib._objc_msgSend_1033(_id, _lib._sel_HTTPCookieStorage1); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } + + set HTTPCookieStorage(NSHTTPCookieStorage? value) { + return _lib._objc_msgSend_1034( + _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); + } + + NSURLCredentialStorage? get URLCredentialStorage { + final _ret = _lib._objc_msgSend_1035(_id, _lib._sel_URLCredentialStorage1); + return _ret.address == 0 + ? null + : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); + } + + set URLCredentialStorage(NSURLCredentialStorage? value) { + return _lib._objc_msgSend_1036( + _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); + } + + NSURLCache? get URLCache { + final _ret = _lib._objc_msgSend_1037(_id, _lib._sel_URLCache1); + return _ret.address == 0 + ? null + : NSURLCache._(_ret, _lib, retain: true, release: true); + } + + set URLCache(NSURLCache? value) { + return _lib._objc_msgSend_1038( + _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); + } + + bool get shouldUseExtendedBackgroundIdleMode { + return _lib._objc_msgSend_12( + _id, _lib._sel_shouldUseExtendedBackgroundIdleMode1); + } + + set shouldUseExtendedBackgroundIdleMode(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); + } + + NSArray? get protocolClasses { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_protocolClasses1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + set protocolClasses(NSArray? value) { + return _lib._objc_msgSend_1039( + _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); + } + + int get multipathServiceType { + return _lib._objc_msgSend_1040(_id, _lib._sel_multipathServiceType1); + } + + set multipathServiceType(int value) { + return _lib._objc_msgSend_1041( + _id, _lib._sel_setMultipathServiceType_1, value); + } + + @override + NSURLSessionConfiguration init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionConfiguration new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionConfiguration1, _lib._sel_new1); + return NSURLSessionConfiguration._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionConfiguration backgroundSessionConfiguration_( + ThermionDartTexture1 _lib, NSString identifier) { + final _ret = _lib._objc_msgSend_1028(_lib._class_NSURLSessionConfiguration1, + _lib._sel_backgroundSessionConfiguration_1, identifier._id); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionConfiguration allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionConfiguration1, + _lib._sel_allocWithZone_1, zone); + return NSURLSessionConfiguration._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionConfiguration alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionConfiguration1, _lib._sel_alloc1); + return NSURLSessionConfiguration._(_ret, _lib, + retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLSessionConfiguration1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLSessionConfiguration1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSURLSessionConfiguration1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLSessionConfiguration1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLSessionConfiguration1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLSessionConfiguration1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLSessionConfiguration1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSURLSessionConfiguration1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionConfiguration1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class SSLProtocol { + static const int kSSLProtocolUnknown = 0; + static const int kTLSProtocol1 = 4; + static const int kTLSProtocol11 = 7; + static const int kTLSProtocol12 = 8; + static const int kDTLSProtocol1 = 9; + static const int kTLSProtocol13 = 10; + static const int kDTLSProtocol12 = 11; + static const int kTLSProtocolMaxSupported = 999; + static const int kSSLProtocol2 = 1; + static const int kSSLProtocol3 = 2; + static const int kSSLProtocol3Only = 3; + static const int kTLSProtocol1Only = 5; + static const int kSSLProtocolAll = 6; +} + +abstract class tls_protocol_version_t { + static const int tls_protocol_version_TLSv10 = 769; + static const int tls_protocol_version_TLSv11 = 770; + static const int tls_protocol_version_TLSv12 = 771; + static const int tls_protocol_version_TLSv13 = 772; + static const int tls_protocol_version_DTLSv10 = -257; + static const int tls_protocol_version_DTLSv12 = -259; +} + +abstract class NSURLSessionMultipathServiceType { + static const int NSURLSessionMultipathServiceTypeNone = 0; + static const int NSURLSessionMultipathServiceTypeHandover = 1; + static const int NSURLSessionMultipathServiceTypeInteractive = 2; + static const int NSURLSessionMultipathServiceTypeAggregate = 3; +} + +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunction(ThermionDartTexture1 lib, void Function(NSArray, NSArray, NSArray) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + NSArray._(arg0, lib, retain: true, release: true), + NSArray._(arg1, lib, retain: true, release: true), + NSArray._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.listener(ThermionDartTexture1 lib, void Function(NSArray, NSArray, NSArray) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + NSArray._(arg0, lib, retain: true, release: true), + NSArray._(arg1, lib, retain: true, release: true), + NSArray._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSArray arg0, NSArray arg1, NSArray arg2) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2._id); +} + +void _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSArray1_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray1_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSArray1_closureRegistry[block.ref.target.address]!( + arg0); + +class ObjCBlock_ffiVoid_NSArray1 extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSArray1._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray1.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray1.fromFunction( + ThermionDartTexture1 lib, void Function(NSArray) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray1_registerClosure( + (ffi.Pointer arg0) => + fn(NSArray._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSArray1.listener( + ThermionDartTexture1 lib, void Function(NSArray) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray1_registerClosure( + (ffi.Pointer arg0) => + fn(NSArray._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSArray arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0._id); +} + +class NSURLSessionUploadTask extends NSURLSessionDataTask { + NSURLSessionUploadTask._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionUploadTask] that points to the same underlying object as [other]. + static NSURLSessionUploadTask castFrom(T other) { + return NSURLSessionUploadTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionUploadTask] that wraps the given raw object pointer. + static NSURLSessionUploadTask castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionUploadTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionUploadTask1); + } + + @override + NSURLSessionUploadTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionUploadTask new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionUploadTask1, _lib._sel_new1); + return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionUploadTask allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSessionUploadTask1, _lib._sel_allocWithZone_1, zone); + return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionUploadTask alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionUploadTask1, _lib._sel_alloc1); + return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLSessionUploadTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLSessionUploadTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSURLSessionUploadTask1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLSessionUploadTask1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLSessionUploadTask1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLSessionUploadTask1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLSessionUploadTask1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSURLSessionUploadTask1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionUploadTask1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSURLSessionDownloadTask extends NSURLSessionTask { + NSURLSessionDownloadTask._( + ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. + static NSURLSessionDownloadTask castFrom(T other) { + return NSURLSessionDownloadTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionDownloadTask] that wraps the given raw object pointer. + static NSURLSessionDownloadTask castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionDownloadTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionDownloadTask1); + } + + void cancelByProducingResumeData_( + ObjCBlock_ffiVoid_NSData completionHandler) { + _lib._objc_msgSend_1051( + _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); + } + + @override + NSURLSessionDownloadTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionDownloadTask new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDownloadTask1, _lib._sel_new1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionDownloadTask allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSessionDownloadTask1, _lib._sel_allocWithZone_1, zone); + return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionDownloadTask alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDownloadTask1, _lib._sel_alloc1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLSessionDownloadTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLSessionDownloadTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSURLSessionDownloadTask1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLSessionDownloadTask1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLSessionDownloadTask1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLSessionDownloadTask1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLSessionDownloadTask1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSURLSessionDownloadTask1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionDownloadTask1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSData_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSData_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSData_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSData_closureRegistry[block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSData extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSData._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData.fromFunction( + ThermionDartTexture1 lib, void Function(NSData?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSData._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSData.listener( + ThermionDartTexture1 lib, void Function(NSData?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSData._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSData? arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); +} + +class NSURLSessionStreamTask extends NSURLSessionTask { + NSURLSessionStreamTask._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionStreamTask] that points to the same underlying object as [other]. + static NSURLSessionStreamTask castFrom(T other) { + return NSURLSessionStreamTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionStreamTask] that wraps the given raw object pointer. + static NSURLSessionStreamTask castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionStreamTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionStreamTask1); + } + + void readDataOfMinLength_maxLength_timeout_completionHandler_( + int minBytes, + int maxBytes, + double timeout, + ObjCBlock_ffiVoid_NSData_bool_NSError completionHandler) { + _lib._objc_msgSend_1055( + _id, + _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, + minBytes, + maxBytes, + timeout, + completionHandler._id); + } + + void writeData_timeout_completionHandler_(NSData data, double timeout, + ObjCBlock_ffiVoid_NSError completionHandler) { + _lib._objc_msgSend_1056( + _id, + _lib._sel_writeData_timeout_completionHandler_1, + data._id, + timeout, + completionHandler._id); + } + + void captureStreams() { + _lib._objc_msgSend_1(_id, _lib._sel_captureStreams1); + } + + void closeWrite() { + _lib._objc_msgSend_1(_id, _lib._sel_closeWrite1); + } + + void closeRead() { + _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); + } + + void startSecureConnection() { + _lib._objc_msgSend_1(_id, _lib._sel_startSecureConnection1); + } + + void stopSecureConnection() { + _lib._objc_msgSend_1(_id, _lib._sel_stopSecureConnection1); + } + + @override + NSURLSessionStreamTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionStreamTask new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionStreamTask1, _lib._sel_new1); + return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionStreamTask allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSessionStreamTask1, _lib._sel_allocWithZone_1, zone); + return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionStreamTask alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionStreamTask1, _lib._sel_alloc1); + return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLSessionStreamTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLSessionStreamTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSURLSessionStreamTask1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLSessionStreamTask1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLSessionStreamTask1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLSessionStreamTask1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLSessionStreamTask1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSURLSessionStreamTask1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionStreamTask1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +void _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + void Function(ffi.Pointer, bool, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSData_bool_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSData_bool_NSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunction( + ThermionDartTexture1 lib, void Function(NSData, bool, NSError?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn(NSData._(arg0, lib, retain: true, release: true), arg1, arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSData_bool_NSError.listener( + ThermionDartTexture1 lib, void Function(NSData, bool, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn(NSData._(arg0, lib, retain: true, release: true), arg1, arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSData arg0, bool arg1, NSError? arg2) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + bool, ffi.Pointer)>()( + _id, arg0._id, arg1, arg2?._id ?? ffi.nullptr); +} + +class NSNetService extends NSObject { + NSNetService._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNetService] that points to the same underlying object as [other]. + static NSNetService castFrom(T other) { + return NSNetService._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSNetService] that wraps the given raw object pointer. + static NSNetService castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNetService._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNetService]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNetService1); + } + + NSNetService initWithDomain_type_name_port_( + NSString domain, NSString type, NSString name, int port) { + final _ret = _lib._objc_msgSend_1058( + _id, + _lib._sel_initWithDomain_type_name_port_1, + domain._id, + type._id, + name._id, + port); + return NSNetService._(_ret, _lib, retain: true, release: true); + } + + NSNetService initWithDomain_type_name_( + NSString domain, NSString type, NSString name) { + final _ret = _lib._objc_msgSend_1059(_id, + _lib._sel_initWithDomain_type_name_1, domain._id, type._id, name._id); + return NSNetService._(_ret, _lib, retain: true, release: true); + } + + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { + _lib._objc_msgSend_568( + _id, _lib._sel_scheduleInRunLoop_forMode_1, aRunLoop._id, mode._id); + } + + void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { + _lib._objc_msgSend_568( + _id, _lib._sel_removeFromRunLoop_forMode_1, aRunLoop._id, mode._id); + } + + NSObject? get delegate { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set delegate(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + } + + bool get includesPeerToPeer { + return _lib._objc_msgSend_12(_id, _lib._sel_includesPeerToPeer1); + } + + set includesPeerToPeer(bool value) { + return _lib._objc_msgSend_526( + _id, _lib._sel_setIncludesPeerToPeer_1, value); + } + + NSString get name { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get type { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_type1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get domain { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_domain1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get hostName { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_hostName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray? get addresses { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_addresses1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + int get port { + return _lib._objc_msgSend_82(_id, _lib._sel_port1); + } + + void publish() { + _lib._objc_msgSend_1(_id, _lib._sel_publish1); + } + + void publishWithOptions_(int options) { + _lib._objc_msgSend_1060(_id, _lib._sel_publishWithOptions_1, options); + } + + void resolve() { + _lib._objc_msgSend_1(_id, _lib._sel_resolve1); + } + + void stop() { + _lib._objc_msgSend_1(_id, _lib._sel_stop1); + } + + static NSDictionary dictionaryFromTXTRecordData_( + ThermionDartTexture1 _lib, NSData txtData) { + final _ret = _lib._objc_msgSend_1061(_lib._class_NSNetService1, + _lib._sel_dictionaryFromTXTRecordData_1, txtData._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSData dataFromTXTRecordDictionary_( + ThermionDartTexture1 _lib, NSDictionary txtDictionary) { + final _ret = _lib._objc_msgSend_1062(_lib._class_NSNetService1, + _lib._sel_dataFromTXTRecordDictionary_1, txtDictionary._id); + return NSData._(_ret, _lib, retain: true, release: true); + } + + void resolveWithTimeout_(double timeout) { + _lib._objc_msgSend_540(_id, _lib._sel_resolveWithTimeout_1, timeout); + } + + bool getInputStream_outputStream_( + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_1063(_id, _lib._sel_getInputStream_outputStream_1, + inputStream, outputStream); + } + + bool setTXTRecordData_(NSData? recordData) { + return _lib._objc_msgSend_1064( + _id, _lib._sel_setTXTRecordData_1, recordData?._id ?? ffi.nullptr); + } + + NSData? TXTRecordData() { + final _ret = _lib._objc_msgSend_285(_id, _lib._sel_TXTRecordData1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + void startMonitoring() { + _lib._objc_msgSend_1(_id, _lib._sel_startMonitoring1); + } + + void stopMonitoring() { + _lib._objc_msgSend_1(_id, _lib._sel_stopMonitoring1); + } + + @override + NSNetService init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSNetService._(_ret, _lib, retain: true, release: true); + } + + static NSNetService new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNetService1, _lib._sel_new1); + return NSNetService._(_ret, _lib, retain: false, release: true); + } + + static NSNetService allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSNetService1, _lib._sel_allocWithZone_1, zone); + return NSNetService._(_ret, _lib, retain: false, release: true); + } + + static NSNetService alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNetService1, _lib._sel_alloc1); + return NSNetService._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSNetService1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSNetService1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSNetService1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSNetService1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSNetService1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSNetService1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSNetService1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSNetService1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSNetService1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSNetServiceOptions { + static const int NSNetServiceNoAutoRename = 1; + static const int NSNetServiceListenForConnections = 2; +} + +class NSURLSessionWebSocketTask extends NSURLSessionTask { + NSURLSessionWebSocketTask._( + ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. + static NSURLSessionWebSocketTask castFrom(T other) { + return NSURLSessionWebSocketTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. + static NSURLSessionWebSocketTask castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionWebSocketTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionWebSocketTask1); + } + + void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, + ObjCBlock_ffiVoid_NSError completionHandler) { + _lib._objc_msgSend_1067(_id, _lib._sel_sendMessage_completionHandler_1, + message._id, completionHandler._id); + } + + void receiveMessageWithCompletionHandler_( + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError + completionHandler) { + _lib._objc_msgSend_1068(_id, + _lib._sel_receiveMessageWithCompletionHandler_1, completionHandler._id); + } + + void sendPingWithPongReceiveHandler_( + ObjCBlock_ffiVoid_NSError pongReceiveHandler) { + _lib._objc_msgSend_1069(_id, _lib._sel_sendPingWithPongReceiveHandler_1, + pongReceiveHandler._id); + } + + void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { + _lib._objc_msgSend_1070(_id, _lib._sel_cancelWithCloseCode_reason_1, + closeCode, reason?._id ?? ffi.nullptr); + } + + int get maximumMessageSize { + return _lib._objc_msgSend_82(_id, _lib._sel_maximumMessageSize1); + } + + set maximumMessageSize(int value) { + return _lib._objc_msgSend_634( + _id, _lib._sel_setMaximumMessageSize_1, value); + } + + int get closeCode { + return _lib._objc_msgSend_1071(_id, _lib._sel_closeCode1); + } + + NSData? get closeReason { + final _ret = _lib._objc_msgSend_285(_id, _lib._sel_closeReason1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLSessionWebSocketTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionWebSocketTask new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionWebSocketTask1, _lib._sel_new1); + return NSURLSessionWebSocketTask._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionWebSocketTask allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionWebSocketTask1, + _lib._sel_allocWithZone_1, zone); + return NSURLSessionWebSocketTask._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionWebSocketTask alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionWebSocketTask1, _lib._sel_alloc1); + return NSURLSessionWebSocketTask._(_ret, _lib, + retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLSessionWebSocketTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLSessionWebSocketTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSURLSessionWebSocketTask1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSURLSessionWebSocketTask1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSURLSessionWebSocketTask1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLSessionWebSocketTask1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLSessionWebSocketTask1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_NSURLSessionWebSocketTask1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionWebSocketTask1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSURLSessionWebSocketMessage extends NSObject { + NSURLSessionWebSocketMessage._( + ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. + static NSURLSessionWebSocketMessage castFrom( + T other) { + return NSURLSessionWebSocketMessage._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. + static NSURLSessionWebSocketMessage castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionWebSocketMessage._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionWebSocketMessage1); + } + + NSURLSessionWebSocketMessage initWithData_(NSData data) { + final _ret = + _lib._objc_msgSend_278(_id, _lib._sel_initWithData_1, data._id); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); + } + + NSURLSessionWebSocketMessage initWithString_(NSString string) { + final _ret = + _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, string._id); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); + } + + int get type { + return _lib._objc_msgSend_1066(_id, _lib._sel_type1); + } + + NSData? get data { + final _ret = _lib._objc_msgSend_285(_id, _lib._sel_data1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSString? get string { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_string1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLSessionWebSocketMessage init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); + } + + static NSURLSessionWebSocketMessage new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_new1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionWebSocketMessage allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionWebSocketMessage1, + _lib._sel_allocWithZone_1, zone); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionWebSocketMessage alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_alloc1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSURLSessionWebSocketMessage1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSURLSessionWebSocketMessage1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSURLSessionWebSocketMessage1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_NSURLSessionWebSocketMessage1, + _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62( + _lib._class_NSURLSessionWebSocketMessage1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, + key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSURLSessionWebSocketMessage1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSURLSessionWebSocketMessage1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSURLSessionWebSocketMessage1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionWebSocketMessage1, + _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSURLSessionWebSocketMessageType { + static const int NSURLSessionWebSocketMessageTypeData = 0; + static const int NSURLSessionWebSocketMessageTypeString = 1; +} + +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[id] = + fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError + extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunction( + ThermionDartTexture1 lib, + void Function(NSURLSessionWebSocketMessage?, NSError?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 ? null : NSURLSessionWebSocketMessage._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.listener( + ThermionDartTexture1 lib, + void Function(NSURLSessionWebSocketMessage?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURLSessionWebSocketMessage._(arg0, lib, + retain: true, release: true), + arg1.address == 0 + ? null + : NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURLSessionWebSocketMessage? arg0, NSError? arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); +} + +abstract class NSURLSessionWebSocketCloseCode { + static const int NSURLSessionWebSocketCloseCodeInvalid = 0; + static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; + static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; + static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; + static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; + static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; + static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; + static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; + static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; + static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; + static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = + 1010; + static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; + static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; +} + +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunction( + ThermionDartTexture1 lib, + void Function(NSData?, NSURLResponse?, NSError?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : NSData._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse._(arg1, lib, retain: true, release: true), + arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.listener( + ThermionDartTexture1 lib, + void Function(NSData?, NSURLResponse?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure((ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : NSData._(arg0, lib, retain: true, release: true), + arg1.address == 0 + ? null + : NSURLResponse._(arg1, lib, retain: true, release: true), + arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSData? arg0, NSURLResponse? arg1, NSError? arg2) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>()( + _id, + arg0?._id ?? ffi.nullptr, + arg1?._id ?? ffi.nullptr, + arg2?._id ?? ffi.nullptr); +} + +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunction( + ThermionDartTexture1 lib, + void Function(NSURL?, NSURLResponse?, NSError?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : NSURL._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse._(arg1, lib, retain: true, release: true), + arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.listener( + ThermionDartTexture1 lib, + void Function(NSURL?, NSURLResponse?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure((ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : NSURL._(arg0, lib, retain: true, release: true), + arg1.address == 0 + ? null + : NSURLResponse._(arg1, lib, retain: true, release: true), + arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURL? arg0, NSURLResponse? arg1, NSError? arg2) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>()( + _id, + arg0?._id ?? ffi.nullptr, + arg1?._id ?? ffi.nullptr, + arg2?._id ?? ffi.nullptr); +} + +class NSProtocolChecker extends NSProxy { + NSProtocolChecker._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSProtocolChecker] that points to the same underlying object as [other]. + static NSProtocolChecker castFrom(T other) { + return NSProtocolChecker._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSProtocolChecker] that wraps the given raw object pointer. + static NSProtocolChecker castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSProtocolChecker._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSProtocolChecker]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSProtocolChecker1); + } + + Protocol get protocol { + final _ret = _lib._objc_msgSend_1082(_id, _lib._sel_protocol1); + return Protocol._(_ret, _lib, retain: true, release: true); + } + + NSObject? get target { + final _ret = _lib._objc_msgSend_900(_id, _lib._sel_target1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSProtocolChecker protocolCheckerWithTarget_protocol_( + ThermionDartTexture1 _lib, NSObject anObject, Protocol aProtocol) { + final _ret = _lib._objc_msgSend_1083( + _lib._class_NSProtocolChecker1, + _lib._sel_protocolCheckerWithTarget_protocol_1, + anObject._id, + aProtocol._id); + return NSProtocolChecker._(_ret, _lib, retain: true, release: true); + } + + NSProtocolChecker initWithTarget_protocol_( + NSObject anObject, Protocol aProtocol) { + final _ret = _lib._objc_msgSend_1083( + _id, _lib._sel_initWithTarget_protocol_1, anObject._id, aProtocol._id); + return NSProtocolChecker._(_ret, _lib, retain: true, release: true); + } + + static NSObject alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSProtocolChecker1, _lib._sel_alloc1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static bool respondsToSelector_( + ThermionDartTexture1 _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_4(_lib._class_NSProtocolChecker1, + _lib._sel_respondsToSelector_1, aSelector); + } +} + +class NSTask extends NSObject { + NSTask._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSTask] that points to the same underlying object as [other]. + static NSTask castFrom(T other) { + return NSTask._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSTask] that wraps the given raw object pointer. + static NSTask castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSTask._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSTask1); + } + + @override + NSTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSTask._(_ret, _lib, retain: true, release: true); + } + + NSURL? get executableURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_executableURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + set executableURL(NSURL? value) { + return _lib._objc_msgSend_670( + _id, _lib._sel_setExecutableURL_1, value?._id ?? ffi.nullptr); + } + + NSArray? get arguments { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_arguments1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + set arguments(NSArray? value) { + return _lib._objc_msgSend_1039( + _id, _lib._sel_setArguments_1, value?._id ?? ffi.nullptr); + } + + NSDictionary? get environment { + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_environment1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + set environment(NSDictionary? value) { + return _lib._objc_msgSend_633( + _id, _lib._sel_setEnvironment_1, value?._id ?? ffi.nullptr); + } + + NSURL? get currentDirectoryURL { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_currentDirectoryURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + set currentDirectoryURL(NSURL? value) { + return _lib._objc_msgSend_670( + _id, _lib._sel_setCurrentDirectoryURL_1, value?._id ?? ffi.nullptr); + } + + NSObject? get standardInput { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_standardInput1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set standardInput(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setStandardInput_1, value?._id ?? ffi.nullptr); + } + + NSObject? get standardOutput { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_standardOutput1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set standardOutput(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setStandardOutput_1, value?._id ?? ffi.nullptr); + } + + NSObject? get standardError { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_standardError1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set standardError(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setStandardError_1, value?._id ?? ffi.nullptr); + } + + bool launchAndReturnError_(ffi.Pointer> error) { + return _lib._objc_msgSend_242(_id, _lib._sel_launchAndReturnError_1, error); + } + + void interrupt() { + _lib._objc_msgSend_1(_id, _lib._sel_interrupt1); + } + + void terminate() { + _lib._objc_msgSend_1(_id, _lib._sel_terminate1); + } + + bool suspend() { + return _lib._objc_msgSend_12(_id, _lib._sel_suspend1); + } + + bool resume() { + return _lib._objc_msgSend_12(_id, _lib._sel_resume1); + } + + int get processIdentifier { + return _lib._objc_msgSend_236(_id, _lib._sel_processIdentifier1); + } + + bool get running { + return _lib._objc_msgSend_12(_id, _lib._sel_isRunning1); + } + + int get terminationStatus { + return _lib._objc_msgSend_236(_id, _lib._sel_terminationStatus1); + } + + int get terminationReason { + return _lib._objc_msgSend_1084(_id, _lib._sel_terminationReason1); + } + + ObjCBlock_ffiVoid_NSTask? get terminationHandler { + final _ret = _lib._objc_msgSend_1085(_id, _lib._sel_terminationHandler1); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSTask._(_ret, _lib, retain: true, release: true); + } + + set terminationHandler(ObjCBlock_ffiVoid_NSTask? value) { + return _lib._objc_msgSend_1086( + _id, _lib._sel_setTerminationHandler_1, value?._id ?? ffi.nullptr); + } + + int get qualityOfService { + return _lib._objc_msgSend_542(_id, _lib._sel_qualityOfService1); + } + + set qualityOfService(int value) { + return _lib._objc_msgSend_543(_id, _lib._sel_setQualityOfService_1, value); + } + + static NSTask? + launchedTaskWithExecutableURL_arguments_error_terminationHandler_( + ThermionDartTexture1 _lib, + NSURL url, + NSArray arguments, + ffi.Pointer> error, + ObjCBlock_ffiVoid_NSTask? terminationHandler) { + final _ret = _lib._objc_msgSend_1087( + _lib._class_NSTask1, + _lib._sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_1, + url._id, + arguments._id, + error, + terminationHandler?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSTask._(_ret, _lib, retain: true, release: true); + } + + void waitUntilExit() { + _lib._objc_msgSend_1(_id, _lib._sel_waitUntilExit1); + } + + NSString? get launchPath { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_launchPath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set launchPath(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setLaunchPath_1, value?._id ?? ffi.nullptr); + } + + NSString get currentDirectoryPath { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currentDirectoryPath1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + set currentDirectoryPath(NSString value) { + return _lib._objc_msgSend_645( + _id, _lib._sel_setCurrentDirectoryPath_1, value._id); + } + + void launch() { + _lib._objc_msgSend_1(_id, _lib._sel_launch1); + } + + static NSTask launchedTaskWithLaunchPath_arguments_( + ThermionDartTexture1 _lib, NSString path, NSArray arguments) { + final _ret = _lib._objc_msgSend_1088( + _lib._class_NSTask1, + _lib._sel_launchedTaskWithLaunchPath_arguments_1, + path._id, + arguments._id); + return NSTask._(_ret, _lib, retain: true, release: true); + } + + static NSTask new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSTask1, _lib._sel_new1); + return NSTask._(_ret, _lib, retain: false, release: true); + } + + static NSTask allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSTask1, _lib._sel_allocWithZone_1, zone); + return NSTask._(_ret, _lib, retain: false, release: true); + } + + static NSTask alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSTask1, _lib._sel_alloc1); + return NSTask._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSTask1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSTask1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSTask1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSTask1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSTask1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSTask1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSTask1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSTask1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSTaskTerminationReason { + static const int NSTaskTerminationReasonExit = 1; + static const int NSTaskTerminationReasonUncaughtSignal = 2; +} + +void _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSTask_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSTask_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSTask_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSTask_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTask_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSTask_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSTask_closureRegistry[block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSTask extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSTask._( + ffi.Pointer<_ObjCBlock> id, ThermionDartTexture1 lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTask.fromFunctionPointer( + ThermionDartTexture1 lib, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTask.fromFunction( + ThermionDartTexture1 lib, void Function(NSTask) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTask_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSTask_registerClosure( + (ffi.Pointer arg0) => + fn(NSTask._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSTask.listener( + ThermionDartTexture1 lib, void Function(NSTask) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTask_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSTask_registerClosure( + (ffi.Pointer arg0) => + fn(NSTask._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSTask arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0._id); +} + +class NSXMLElement extends NSXMLNode { + NSXMLElement._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSXMLElement] that points to the same underlying object as [other]. + static NSXMLElement castFrom(T other) { + return NSXMLElement._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSXMLElement] that wraps the given raw object pointer. + static NSXMLElement castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSXMLElement._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSXMLElement]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLElement1); + } + + NSXMLElement initWithName_(NSString name) { + final _ret = _lib._objc_msgSend_31(_id, _lib._sel_initWithName_1, name._id); + return NSXMLElement._(_ret, _lib, retain: true, release: true); + } + + NSXMLElement initWithName_URI_(NSString name, NSString? URI) { + final _ret = _lib._objc_msgSend_1125( + _id, _lib._sel_initWithName_URI_1, name._id, URI?._id ?? ffi.nullptr); + return NSXMLElement._(_ret, _lib, retain: true, release: true); + } + + NSXMLElement initWithName_stringValue_(NSString name, NSString? string) { + final _ret = _lib._objc_msgSend_1125( + _id, + _lib._sel_initWithName_stringValue_1, + name._id, + string?._id ?? ffi.nullptr); + return NSXMLElement._(_ret, _lib, retain: true, release: true); + } + + NSXMLElement? initWithXMLString_error_( + NSString string, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_302( + _id, _lib._sel_initWithXMLString_error_1, string._id, error); + return _ret.address == 0 + ? null + : NSXMLElement._(_ret, _lib, retain: true, release: true); + } + + @override + NSXMLElement initWithKind_options_(int kind, int options) { + final _ret = _lib._objc_msgSend_1090( + _id, _lib._sel_initWithKind_options_1, kind, options); + return NSXMLElement._(_ret, _lib, retain: true, release: true); + } + + NSArray elementsForName_(NSString name) { + final _ret = + _lib._objc_msgSend_357(_id, _lib._sel_elementsForName_1, name._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray elementsForLocalName_URI_(NSString localName, NSString? URI) { + final _ret = _lib._objc_msgSend_1126( + _id, + _lib._sel_elementsForLocalName_URI_1, + localName._id, + URI?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + void addAttribute_(NSXMLNode attribute) { + _lib._objc_msgSend_1104(_id, _lib._sel_addAttribute_1, attribute._id); + } + + void removeAttributeForName_(NSString name) { + _lib._objc_msgSend_247(_id, _lib._sel_removeAttributeForName_1, name._id); + } + + NSArray? get attributes { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_attributes1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + set attributes(NSArray? value) { + return _lib._objc_msgSend_1039( + _id, _lib._sel_setAttributes_1, value?._id ?? ffi.nullptr); + } + + void setAttributesWithDictionary_(NSDictionary attributes) { + _lib._objc_msgSend_508( + _id, _lib._sel_setAttributesWithDictionary_1, attributes._id); + } + + NSXMLNode? attributeForName_(NSString name) { + final _ret = + _lib._objc_msgSend_1108(_id, _lib._sel_attributeForName_1, name._id); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + NSXMLNode? attributeForLocalName_URI_(NSString localName, NSString? URI) { + final _ret = _lib._objc_msgSend_1127( + _id, + _lib._sel_attributeForLocalName_URI_1, + localName._id, + URI?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + void addNamespace_(NSXMLNode aNamespace) { + _lib._objc_msgSend_1104(_id, _lib._sel_addNamespace_1, aNamespace._id); + } + + void removeNamespaceForPrefix_(NSString name) { + _lib._objc_msgSend_247(_id, _lib._sel_removeNamespaceForPrefix_1, name._id); + } + + NSArray? get namespaces { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_namespaces1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + set namespaces(NSArray? value) { + return _lib._objc_msgSend_1039( + _id, _lib._sel_setNamespaces_1, value?._id ?? ffi.nullptr); + } + + NSXMLNode? namespaceForPrefix_(NSString name) { + final _ret = + _lib._objc_msgSend_1108(_id, _lib._sel_namespaceForPrefix_1, name._id); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + NSXMLNode? resolveNamespaceForName_(NSString name) { + final _ret = _lib._objc_msgSend_1108( + _id, _lib._sel_resolveNamespaceForName_1, name._id); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + NSString? resolvePrefixForNamespaceURI_(NSString namespaceURI) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_resolvePrefixForNamespaceURI_1, namespaceURI._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + void insertChild_atIndex_(NSXMLNode child, int index) { + _lib._objc_msgSend_1102( + _id, _lib._sel_insertChild_atIndex_1, child._id, index); + } + + void insertChildren_atIndex_(NSArray children, int index) { + _lib._objc_msgSend_1103( + _id, _lib._sel_insertChildren_atIndex_1, children._id, index); + } + + void removeChildAtIndex_(int index) { + _lib._objc_msgSend_469(_id, _lib._sel_removeChildAtIndex_1, index); + } + + void setChildren_(NSArray? children) { + _lib._objc_msgSend_838( + _id, _lib._sel_setChildren_1, children?._id ?? ffi.nullptr); + } + + void addChild_(NSXMLNode child) { + _lib._objc_msgSend_1104(_id, _lib._sel_addChild_1, child._id); + } + + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _lib._objc_msgSend_1105( + _id, _lib._sel_replaceChildAtIndex_withNode_1, index, node._id); + } + + void normalizeAdjacentTextNodesPreservingCDATA_(bool preserve) { + _lib._objc_msgSend_866( + _id, _lib._sel_normalizeAdjacentTextNodesPreservingCDATA_1, preserve); + } + + void setAttributesAsDictionary_(NSDictionary attributes) { + _lib._objc_msgSend_508( + _id, _lib._sel_setAttributesAsDictionary_1, attributes._id); + } + + @override + NSXMLElement init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSXMLElement._(_ret, _lib, retain: true, release: true); + } + + @override + NSXMLElement initWithKind_(int kind) { + final _ret = _lib._objc_msgSend_1089(_id, _lib._sel_initWithKind_1, kind); + return NSXMLElement._(_ret, _lib, retain: true, release: true); + } + + static NSObject document(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSXMLElement1, _lib._sel_document1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject documentWithRootElement_( + ThermionDartTexture1 _lib, NSXMLElement element) { + final _ret = _lib._objc_msgSend_1091(_lib._class_NSXMLElement1, + _lib._sel_documentWithRootElement_1, element._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSXMLElement1, _lib._sel_elementWithName_1, name._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_URI_( + ThermionDartTexture1 _lib, NSString name, NSString URI) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLElement1, + _lib._sel_elementWithName_URI_1, name._id, URI._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString string) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLElement1, + _lib._sel_elementWithName_stringValue_1, name._id, string._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_children_attributes_( + ThermionDartTexture1 _lib, + NSString name, + NSArray? children, + NSArray? attributes) { + final _ret = _lib._objc_msgSend_1093( + _lib._class_NSXMLElement1, + _lib._sel_elementWithName_children_attributes_1, + name._id, + children?._id ?? ffi.nullptr, + attributes?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject attributeWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLElement1, + _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject attributeWithName_URI_stringValue_(ThermionDartTexture1 _lib, + NSString name, NSString URI, NSString stringValue) { + final _ret = _lib._objc_msgSend_1059( + _lib._class_NSXMLElement1, + _lib._sel_attributeWithName_URI_stringValue_1, + name._id, + URI._id, + stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject namespaceWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLElement1, + _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject processingInstructionWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092( + _lib._class_NSXMLElement1, + _lib._sel_processingInstructionWithName_stringValue_1, + name._id, + stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject commentWithStringValue_( + ThermionDartTexture1 _lib, NSString stringValue) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLElement1, + _lib._sel_commentWithStringValue_1, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject textWithStringValue_( + ThermionDartTexture1 _lib, NSString stringValue) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLElement1, + _lib._sel_textWithStringValue_1, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? DTDNodeWithXMLString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSXMLElement1, + _lib._sel_DTDNodeWithXMLString_1, string._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSString localNameForName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_68( + _lib._class_NSXMLElement1, _lib._sel_localNameForName_1, name._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? prefixForName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_185( + _lib._class_NSXMLElement1, _lib._sel_prefixForName_1, name._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSXMLNode? predefinedNamespaceForPrefix_( + ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLElement1, + _lib._sel_predefinedNamespaceForPrefix_1, name._id); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + static NSXMLElement new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSXMLElement1, _lib._sel_new1); + return NSXMLElement._(_ret, _lib, retain: false, release: true); + } + + static NSXMLElement allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSXMLElement1, _lib._sel_allocWithZone_1, zone); + return NSXMLElement._(_ret, _lib, retain: false, release: true); + } + + static NSXMLElement alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSXMLElement1, _lib._sel_alloc1); + return NSXMLElement._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSXMLElement1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSXMLElement1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSXMLElement1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSXMLElement1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSXMLElement1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSXMLElement1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSXMLElement1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSXMLElement1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSXMLElement1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSXMLNode extends NSObject { + NSXMLNode._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSXMLNode] that points to the same underlying object as [other]. + static NSXMLNode castFrom(T other) { + return NSXMLNode._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSXMLNode] that wraps the given raw object pointer. + static NSXMLNode castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSXMLNode._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSXMLNode]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLNode1); + } + + @override + NSXMLNode init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + NSXMLNode initWithKind_(int kind) { + final _ret = _lib._objc_msgSend_1089(_id, _lib._sel_initWithKind_1, kind); + return NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + NSXMLNode initWithKind_options_(int kind, int options) { + final _ret = _lib._objc_msgSend_1090( + _id, _lib._sel_initWithKind_options_1, kind, options); + return NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + static NSObject document(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSXMLNode1, _lib._sel_document1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject documentWithRootElement_( + ThermionDartTexture1 _lib, NSXMLElement element) { + final _ret = _lib._objc_msgSend_1091(_lib._class_NSXMLNode1, + _lib._sel_documentWithRootElement_1, element._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSXMLNode1, _lib._sel_elementWithName_1, name._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_URI_( + ThermionDartTexture1 _lib, NSString name, NSString URI) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLNode1, + _lib._sel_elementWithName_URI_1, name._id, URI._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString string) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLNode1, + _lib._sel_elementWithName_stringValue_1, name._id, string._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_children_attributes_( + ThermionDartTexture1 _lib, + NSString name, + NSArray? children, + NSArray? attributes) { + final _ret = _lib._objc_msgSend_1093( + _lib._class_NSXMLNode1, + _lib._sel_elementWithName_children_attributes_1, + name._id, + children?._id ?? ffi.nullptr, + attributes?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject attributeWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLNode1, + _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject attributeWithName_URI_stringValue_(ThermionDartTexture1 _lib, + NSString name, NSString URI, NSString stringValue) { + final _ret = _lib._objc_msgSend_1059( + _lib._class_NSXMLNode1, + _lib._sel_attributeWithName_URI_stringValue_1, + name._id, + URI._id, + stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject namespaceWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLNode1, + _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject processingInstructionWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092( + _lib._class_NSXMLNode1, + _lib._sel_processingInstructionWithName_stringValue_1, + name._id, + stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject commentWithStringValue_( + ThermionDartTexture1 _lib, NSString stringValue) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLNode1, + _lib._sel_commentWithStringValue_1, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject textWithStringValue_( + ThermionDartTexture1 _lib, NSString stringValue) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLNode1, + _lib._sel_textWithStringValue_1, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? DTDNodeWithXMLString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_38( + _lib._class_NSXMLNode1, _lib._sel_DTDNodeWithXMLString_1, string._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + int get kind { + return _lib._objc_msgSend_1094(_id, _lib._sel_kind1); + } + + NSString? get name { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set name(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } + + NSObject? get objectValue { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_objectValue1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set objectValue(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setObjectValue_1, value?._id ?? ffi.nullptr); + } + + NSString? get stringValue { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_stringValue1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set stringValue(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setStringValue_1, value?._id ?? ffi.nullptr); + } + + void setStringValue_resolvingEntities_(NSString string, bool resolve) { + _lib._objc_msgSend_1095( + _id, _lib._sel_setStringValue_resolvingEntities_1, string._id, resolve); + } + + int get index { + return _lib._objc_msgSend_10(_id, _lib._sel_index1); + } + + int get level { + return _lib._objc_msgSend_10(_id, _lib._sel_level1); + } + + NSXMLDocument? get rootDocument { + final _ret = _lib._objc_msgSend_1119(_id, _lib._sel_rootDocument1); + return _ret.address == 0 + ? null + : NSXMLDocument._(_ret, _lib, retain: true, release: true); + } + + NSXMLNode? get parent { + final _ret = _lib._objc_msgSend_1120(_id, _lib._sel_parent1); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + int get childCount { + return _lib._objc_msgSend_10(_id, _lib._sel_childCount1); + } + + NSArray? get children { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_children1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSXMLNode? childAtIndex_(int index) { + final _ret = _lib._objc_msgSend_1121(_id, _lib._sel_childAtIndex_1, index); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + NSXMLNode? get previousSibling { + final _ret = _lib._objc_msgSend_1120(_id, _lib._sel_previousSibling1); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + NSXMLNode? get nextSibling { + final _ret = _lib._objc_msgSend_1120(_id, _lib._sel_nextSibling1); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + NSXMLNode? get previousNode { + final _ret = _lib._objc_msgSend_1120(_id, _lib._sel_previousNode1); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + NSXMLNode? get nextNode { + final _ret = _lib._objc_msgSend_1120(_id, _lib._sel_nextNode1); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + void detach() { + _lib._objc_msgSend_1(_id, _lib._sel_detach1); + } + + NSString? get XPath { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_XPath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get localName { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_localName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get prefix { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_prefix1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get URI { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_URI1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set URI(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setURI_1, value?._id ?? ffi.nullptr); + } + + static NSString localNameForName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_68( + _lib._class_NSXMLNode1, _lib._sel_localNameForName_1, name._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? prefixForName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_185( + _lib._class_NSXMLNode1, _lib._sel_prefixForName_1, name._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSXMLNode? predefinedNamespaceForPrefix_( + ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLNode1, + _lib._sel_predefinedNamespaceForPrefix_1, name._id); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + NSString get description { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString get XMLString { + final _ret = _lib._objc_msgSend_21(_id, _lib._sel_XMLString1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString XMLStringWithOptions_(int options) { + final _ret = + _lib._objc_msgSend_1122(_id, _lib._sel_XMLStringWithOptions_1, options); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString canonicalXMLStringPreservingComments_(bool comments) { + final _ret = _lib._objc_msgSend_1123( + _id, _lib._sel_canonicalXMLStringPreservingComments_1, comments); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray? nodesForXPath_error_( + NSString xpath, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_442( + _id, _lib._sel_nodesForXPath_error_1, xpath._id, error); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray? objectsForXQuery_constants_error_(NSString xquery, + NSDictionary? constants, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_1124( + _id, + _lib._sel_objectsForXQuery_constants_error_1, + xquery._id, + constants?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray? objectsForXQuery_error_( + NSString xquery, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_442( + _id, _lib._sel_objectsForXQuery_error_1, xquery._id, error); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSXMLNode new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLNode1, _lib._sel_new1); + return NSXMLNode._(_ret, _lib, retain: false, release: true); + } + + static NSXMLNode allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSXMLNode1, _lib._sel_allocWithZone_1, zone); + return NSXMLNode._(_ret, _lib, retain: false, release: true); + } + + static NSXMLNode alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLNode1, _lib._sel_alloc1); + return NSXMLNode._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSXMLNode1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSXMLNode1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSXMLNode1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSXMLNode1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSXMLNode1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSXMLNode1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSXMLNode1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSXMLNode1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSXMLNode1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSXMLNodeKind { + static const int NSXMLInvalidKind = 0; + static const int NSXMLDocumentKind = 1; + static const int NSXMLElementKind = 2; + static const int NSXMLAttributeKind = 3; + static const int NSXMLNamespaceKind = 4; + static const int NSXMLProcessingInstructionKind = 5; + static const int NSXMLCommentKind = 6; + static const int NSXMLTextKind = 7; + static const int NSXMLDTDKind = 8; + static const int NSXMLEntityDeclarationKind = 9; + static const int NSXMLAttributeDeclarationKind = 10; + static const int NSXMLElementDeclarationKind = 11; + static const int NSXMLNotationDeclarationKind = 12; +} + +abstract class NSXMLNodeOptions { + static const int NSXMLNodeOptionsNone = 0; + static const int NSXMLNodeIsCDATA = 1; + static const int NSXMLNodeExpandEmptyElement = 2; + static const int NSXMLNodeCompactEmptyElement = 4; + static const int NSXMLNodeUseSingleQuotes = 8; + static const int NSXMLNodeUseDoubleQuotes = 16; + static const int NSXMLNodeNeverEscapeContents = 32; + static const int NSXMLDocumentTidyHTML = 512; + static const int NSXMLDocumentTidyXML = 1024; + static const int NSXMLDocumentValidate = 8192; + static const int NSXMLNodeLoadExternalEntitiesAlways = 16384; + static const int NSXMLNodeLoadExternalEntitiesSameOriginOnly = 32768; + static const int NSXMLNodeLoadExternalEntitiesNever = 524288; + static const int NSXMLDocumentXInclude = 65536; + static const int NSXMLNodePrettyPrint = 131072; + static const int NSXMLDocumentIncludeContentTypeDeclaration = 262144; + static const int NSXMLNodePreserveNamespaceOrder = 1048576; + static const int NSXMLNodePreserveAttributeOrder = 2097152; + static const int NSXMLNodePreserveEntities = 4194304; + static const int NSXMLNodePreservePrefixes = 8388608; + static const int NSXMLNodePreserveCDATA = 16777216; + static const int NSXMLNodePreserveWhitespace = 33554432; + static const int NSXMLNodePreserveDTD = 67108864; + static const int NSXMLNodePreserveCharacterReferences = 134217728; + static const int NSXMLNodePromoteSignificantWhitespace = 268435456; + static const int NSXMLNodePreserveEmptyElements = 6; + static const int NSXMLNodePreserveQuotes = 24; + static const int NSXMLNodePreserveAll = 4293918750; +} + +class NSXMLDocument extends NSXMLNode { + NSXMLDocument._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSXMLDocument] that points to the same underlying object as [other]. + static NSXMLDocument castFrom(T other) { + return NSXMLDocument._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSXMLDocument] that wraps the given raw object pointer. + static NSXMLDocument castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSXMLDocument._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSXMLDocument]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLDocument1); + } + + @override + NSXMLDocument init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSXMLDocument._(_ret, _lib, retain: true, release: true); + } + + NSXMLDocument? initWithXMLString_options_error_( + NSString string, int mask, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_1096(_id, + _lib._sel_initWithXMLString_options_error_1, string._id, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument._(_ret, _lib, retain: true, release: true); + } + + NSXMLDocument? initWithContentsOfURL_options_error_( + NSURL url, int mask, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_1097(_id, + _lib._sel_initWithContentsOfURL_options_error_1, url._id, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument._(_ret, _lib, retain: true, release: true); + } + + NSXMLDocument? initWithData_options_error_( + NSData data, int mask, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_1098( + _id, _lib._sel_initWithData_options_error_1, data._id, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument._(_ret, _lib, retain: true, release: true); + } + + NSXMLDocument initWithRootElement_(NSXMLElement? element) { + final _ret = _lib._objc_msgSend_1099( + _id, _lib._sel_initWithRootElement_1, element?._id ?? ffi.nullptr); + return NSXMLDocument._(_ret, _lib, retain: true, release: true); + } + + static NSObject replacementClassForClass_( + ThermionDartTexture1 _lib, NSObject cls) { + final _ret = _lib._objc_msgSend_123(_lib._class_NSXMLDocument1, + _lib._sel_replacementClassForClass_1, cls._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSString? get characterEncoding { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_characterEncoding1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set characterEncoding(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setCharacterEncoding_1, value?._id ?? ffi.nullptr); + } + + NSString? get version { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_version1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set version(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setVersion_1, value?._id ?? ffi.nullptr); + } + + bool get standalone { + return _lib._objc_msgSend_12(_id, _lib._sel_isStandalone1); + } + + set standalone(bool value) { + return _lib._objc_msgSend_526(_id, _lib._sel_setStandalone_1, value); + } + + int get documentContentKind { + return _lib._objc_msgSend_1100(_id, _lib._sel_documentContentKind1); + } + + set documentContentKind(int value) { + return _lib._objc_msgSend_1101( + _id, _lib._sel_setDocumentContentKind_1, value); + } + + NSString? get MIMEType { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_MIMEType1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set MIMEType(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setMIMEType_1, value?._id ?? ffi.nullptr); + } + + NSXMLDTD? get DTD { + final _ret = _lib._objc_msgSend_1111(_id, _lib._sel_DTD1); + return _ret.address == 0 + ? null + : NSXMLDTD._(_ret, _lib, retain: true, release: true); + } + + set DTD(NSXMLDTD? value) { + return _lib._objc_msgSend_1112( + _id, _lib._sel_setDTD_1, value?._id ?? ffi.nullptr); + } + + void setRootElement_(NSXMLElement root) { + _lib._objc_msgSend_1113(_id, _lib._sel_setRootElement_1, root._id); + } + + NSXMLElement? rootElement() { + final _ret = _lib._objc_msgSend_1114(_id, _lib._sel_rootElement1); + return _ret.address == 0 + ? null + : NSXMLElement._(_ret, _lib, retain: true, release: true); + } + + void insertChild_atIndex_(NSXMLNode child, int index) { + _lib._objc_msgSend_1102( + _id, _lib._sel_insertChild_atIndex_1, child._id, index); + } + + void insertChildren_atIndex_(NSArray children, int index) { + _lib._objc_msgSend_1103( + _id, _lib._sel_insertChildren_atIndex_1, children._id, index); + } + + void removeChildAtIndex_(int index) { + _lib._objc_msgSend_469(_id, _lib._sel_removeChildAtIndex_1, index); + } + + void setChildren_(NSArray? children) { + _lib._objc_msgSend_838( + _id, _lib._sel_setChildren_1, children?._id ?? ffi.nullptr); + } + + void addChild_(NSXMLNode child) { + _lib._objc_msgSend_1104(_id, _lib._sel_addChild_1, child._id); + } + + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _lib._objc_msgSend_1105( + _id, _lib._sel_replaceChildAtIndex_withNode_1, index, node._id); + } + + NSData get XMLData { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_XMLData1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData XMLDataWithOptions_(int options) { + final _ret = + _lib._objc_msgSend_1115(_id, _lib._sel_XMLDataWithOptions_1, options); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSObject? objectByApplyingXSLT_arguments_error_(NSData xslt, + NSDictionary? arguments, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_1116( + _id, + _lib._sel_objectByApplyingXSLT_arguments_error_1, + xslt._id, + arguments?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? objectByApplyingXSLTString_arguments_error_(NSString xslt, + NSDictionary? arguments, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_1117( + _id, + _lib._sel_objectByApplyingXSLTString_arguments_error_1, + xslt._id, + arguments?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? objectByApplyingXSLTAtURL_arguments_error_(NSURL xsltURL, + NSDictionary? argument, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_1118( + _id, + _lib._sel_objectByApplyingXSLTAtURL_arguments_error_1, + xsltURL._id, + argument?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + bool validateAndReturnError_(ffi.Pointer> error) { + return _lib._objc_msgSend_242( + _id, _lib._sel_validateAndReturnError_1, error); + } + + @override + NSXMLDocument initWithKind_(int kind) { + final _ret = _lib._objc_msgSend_1089(_id, _lib._sel_initWithKind_1, kind); + return NSXMLDocument._(_ret, _lib, retain: true, release: true); + } + + @override + NSXMLDocument initWithKind_options_(int kind, int options) { + final _ret = _lib._objc_msgSend_1090( + _id, _lib._sel_initWithKind_options_1, kind, options); + return NSXMLDocument._(_ret, _lib, retain: true, release: true); + } + + static NSObject document(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSXMLDocument1, _lib._sel_document1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject documentWithRootElement_( + ThermionDartTexture1 _lib, NSXMLElement element) { + final _ret = _lib._objc_msgSend_1091(_lib._class_NSXMLDocument1, + _lib._sel_documentWithRootElement_1, element._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSXMLDocument1, _lib._sel_elementWithName_1, name._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_URI_( + ThermionDartTexture1 _lib, NSString name, NSString URI) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLDocument1, + _lib._sel_elementWithName_URI_1, name._id, URI._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString string) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLDocument1, + _lib._sel_elementWithName_stringValue_1, name._id, string._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_children_attributes_( + ThermionDartTexture1 _lib, + NSString name, + NSArray? children, + NSArray? attributes) { + final _ret = _lib._objc_msgSend_1093( + _lib._class_NSXMLDocument1, + _lib._sel_elementWithName_children_attributes_1, + name._id, + children?._id ?? ffi.nullptr, + attributes?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject attributeWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLDocument1, + _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject attributeWithName_URI_stringValue_(ThermionDartTexture1 _lib, + NSString name, NSString URI, NSString stringValue) { + final _ret = _lib._objc_msgSend_1059( + _lib._class_NSXMLDocument1, + _lib._sel_attributeWithName_URI_stringValue_1, + name._id, + URI._id, + stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject namespaceWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLDocument1, + _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject processingInstructionWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092( + _lib._class_NSXMLDocument1, + _lib._sel_processingInstructionWithName_stringValue_1, + name._id, + stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject commentWithStringValue_( + ThermionDartTexture1 _lib, NSString stringValue) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDocument1, + _lib._sel_commentWithStringValue_1, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject textWithStringValue_( + ThermionDartTexture1 _lib, NSString stringValue) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDocument1, + _lib._sel_textWithStringValue_1, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? DTDNodeWithXMLString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSXMLDocument1, + _lib._sel_DTDNodeWithXMLString_1, string._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSString localNameForName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_68( + _lib._class_NSXMLDocument1, _lib._sel_localNameForName_1, name._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? prefixForName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_185( + _lib._class_NSXMLDocument1, _lib._sel_prefixForName_1, name._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSXMLNode? predefinedNamespaceForPrefix_( + ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLDocument1, + _lib._sel_predefinedNamespaceForPrefix_1, name._id); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + static NSXMLDocument new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSXMLDocument1, _lib._sel_new1); + return NSXMLDocument._(_ret, _lib, retain: false, release: true); + } + + static NSXMLDocument allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSXMLDocument1, _lib._sel_allocWithZone_1, zone); + return NSXMLDocument._(_ret, _lib, retain: false, release: true); + } + + static NSXMLDocument alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSXMLDocument1, _lib._sel_alloc1); + return NSXMLDocument._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSXMLDocument1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSXMLDocument1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSXMLDocument1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSXMLDocument1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSXMLDocument1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSXMLDocument1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSXMLDocument1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSXMLDocument1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSXMLDocument1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSXMLDocumentContentKind { + static const int NSXMLDocumentXMLKind = 0; + static const int NSXMLDocumentXHTMLKind = 1; + static const int NSXMLDocumentHTMLKind = 2; + static const int NSXMLDocumentTextKind = 3; +} + +class NSXMLDTD extends NSXMLNode { + NSXMLDTD._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSXMLDTD] that points to the same underlying object as [other]. + static NSXMLDTD castFrom(T other) { + return NSXMLDTD._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSXMLDTD] that wraps the given raw object pointer. + static NSXMLDTD castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSXMLDTD._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSXMLDTD]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLDTD1); + } + + @override + NSXMLDTD init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSXMLDTD._(_ret, _lib, retain: true, release: true); + } + + @override + NSXMLDTD initWithKind_options_(int kind, int options) { + final _ret = _lib._objc_msgSend_1090( + _id, _lib._sel_initWithKind_options_1, kind, options); + return NSXMLDTD._(_ret, _lib, retain: true, release: true); + } + + NSXMLDTD? initWithContentsOfURL_options_error_( + NSURL url, int mask, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_1097(_id, + _lib._sel_initWithContentsOfURL_options_error_1, url._id, mask, error); + return _ret.address == 0 + ? null + : NSXMLDTD._(_ret, _lib, retain: true, release: true); + } + + NSXMLDTD? initWithData_options_error_( + NSData data, int mask, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_1098( + _id, _lib._sel_initWithData_options_error_1, data._id, mask, error); + return _ret.address == 0 + ? null + : NSXMLDTD._(_ret, _lib, retain: true, release: true); + } + + NSString? get publicID { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_publicID1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set publicID(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setPublicID_1, value?._id ?? ffi.nullptr); + } + + NSString? get systemID { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_systemID1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set systemID(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setSystemID_1, value?._id ?? ffi.nullptr); + } + + void insertChild_atIndex_(NSXMLNode child, int index) { + _lib._objc_msgSend_1102( + _id, _lib._sel_insertChild_atIndex_1, child._id, index); + } + + void insertChildren_atIndex_(NSArray children, int index) { + _lib._objc_msgSend_1103( + _id, _lib._sel_insertChildren_atIndex_1, children._id, index); + } + + void removeChildAtIndex_(int index) { + _lib._objc_msgSend_469(_id, _lib._sel_removeChildAtIndex_1, index); + } + + void setChildren_(NSArray? children) { + _lib._objc_msgSend_838( + _id, _lib._sel_setChildren_1, children?._id ?? ffi.nullptr); + } + + void addChild_(NSXMLNode child) { + _lib._objc_msgSend_1104(_id, _lib._sel_addChild_1, child._id); + } + + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _lib._objc_msgSend_1105( + _id, _lib._sel_replaceChildAtIndex_withNode_1, index, node._id); + } + + NSXMLDTDNode? entityDeclarationForName_(NSString name) { + final _ret = _lib._objc_msgSend_1109( + _id, _lib._sel_entityDeclarationForName_1, name._id); + return _ret.address == 0 + ? null + : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + } + + NSXMLDTDNode? notationDeclarationForName_(NSString name) { + final _ret = _lib._objc_msgSend_1109( + _id, _lib._sel_notationDeclarationForName_1, name._id); + return _ret.address == 0 + ? null + : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + } + + NSXMLDTDNode? elementDeclarationForName_(NSString name) { + final _ret = _lib._objc_msgSend_1109( + _id, _lib._sel_elementDeclarationForName_1, name._id); + return _ret.address == 0 + ? null + : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + } + + NSXMLDTDNode? attributeDeclarationForName_elementName_( + NSString name, NSString elementName) { + final _ret = _lib._objc_msgSend_1110( + _id, + _lib._sel_attributeDeclarationForName_elementName_1, + name._id, + elementName._id); + return _ret.address == 0 + ? null + : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + } + + static NSXMLDTDNode? predefinedEntityDeclarationForName_( + ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTD1, + _lib._sel_predefinedEntityDeclarationForName_1, name._id); + return _ret.address == 0 + ? null + : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + } + + @override + NSXMLDTD initWithKind_(int kind) { + final _ret = _lib._objc_msgSend_1089(_id, _lib._sel_initWithKind_1, kind); + return NSXMLDTD._(_ret, _lib, retain: true, release: true); + } + + static NSObject document(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSXMLDTD1, _lib._sel_document1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject documentWithRootElement_( + ThermionDartTexture1 _lib, NSXMLElement element) { + final _ret = _lib._objc_msgSend_1091(_lib._class_NSXMLDTD1, + _lib._sel_documentWithRootElement_1, element._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSXMLDTD1, _lib._sel_elementWithName_1, name._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_URI_( + ThermionDartTexture1 _lib, NSString name, NSString URI) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLDTD1, + _lib._sel_elementWithName_URI_1, name._id, URI._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString string) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLDTD1, + _lib._sel_elementWithName_stringValue_1, name._id, string._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_children_attributes_( + ThermionDartTexture1 _lib, + NSString name, + NSArray? children, + NSArray? attributes) { + final _ret = _lib._objc_msgSend_1093( + _lib._class_NSXMLDTD1, + _lib._sel_elementWithName_children_attributes_1, + name._id, + children?._id ?? ffi.nullptr, + attributes?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject attributeWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLDTD1, + _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject attributeWithName_URI_stringValue_(ThermionDartTexture1 _lib, + NSString name, NSString URI, NSString stringValue) { + final _ret = _lib._objc_msgSend_1059( + _lib._class_NSXMLDTD1, + _lib._sel_attributeWithName_URI_stringValue_1, + name._id, + URI._id, + stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject namespaceWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLDTD1, + _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject processingInstructionWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092( + _lib._class_NSXMLDTD1, + _lib._sel_processingInstructionWithName_stringValue_1, + name._id, + stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject commentWithStringValue_( + ThermionDartTexture1 _lib, NSString stringValue) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDTD1, + _lib._sel_commentWithStringValue_1, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject textWithStringValue_( + ThermionDartTexture1 _lib, NSString stringValue) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDTD1, + _lib._sel_textWithStringValue_1, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? DTDNodeWithXMLString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_38( + _lib._class_NSXMLDTD1, _lib._sel_DTDNodeWithXMLString_1, string._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSString localNameForName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_68( + _lib._class_NSXMLDTD1, _lib._sel_localNameForName_1, name._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? prefixForName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_185( + _lib._class_NSXMLDTD1, _lib._sel_prefixForName_1, name._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSXMLNode? predefinedNamespaceForPrefix_( + ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLDTD1, + _lib._sel_predefinedNamespaceForPrefix_1, name._id); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + static NSXMLDTD new1(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLDTD1, _lib._sel_new1); + return NSXMLDTD._(_ret, _lib, retain: false, release: true); + } + + static NSXMLDTD allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSXMLDTD1, _lib._sel_allocWithZone_1, zone); + return NSXMLDTD._(_ret, _lib, retain: false, release: true); + } + + static NSXMLDTD alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLDTD1, _lib._sel_alloc1); + return NSXMLDTD._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSXMLDTD1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSXMLDTD1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSXMLDTD1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSXMLDTD1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSXMLDTD1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSXMLDTD1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSXMLDTD1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSXMLDTD1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSXMLDTD1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +class NSXMLDTDNode extends NSXMLNode { + NSXMLDTDNode._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSXMLDTDNode] that points to the same underlying object as [other]. + static NSXMLDTDNode castFrom(T other) { + return NSXMLDTDNode._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSXMLDTDNode] that wraps the given raw object pointer. + static NSXMLDTDNode castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSXMLDTDNode._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSXMLDTDNode]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLDTDNode1); + } + + NSXMLDTDNode? initWithXMLString_(NSString string) { + final _ret = + _lib._objc_msgSend_38(_id, _lib._sel_initWithXMLString_1, string._id); + return _ret.address == 0 + ? null + : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + } + + @override + NSXMLDTDNode initWithKind_options_(int kind, int options) { + final _ret = _lib._objc_msgSend_1090( + _id, _lib._sel_initWithKind_options_1, kind, options); + return NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + } + + @override + NSXMLDTDNode init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + } + + int get DTDKind { + return _lib._objc_msgSend_1106(_id, _lib._sel_DTDKind1); + } + + set DTDKind(int value) { + return _lib._objc_msgSend_1107(_id, _lib._sel_setDTDKind_1, value); + } + + bool get external1 { + return _lib._objc_msgSend_12(_id, _lib._sel_isExternal1); + } + + NSString? get publicID { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_publicID1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set publicID(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setPublicID_1, value?._id ?? ffi.nullptr); + } + + NSString? get systemID { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_systemID1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set systemID(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setSystemID_1, value?._id ?? ffi.nullptr); + } + + NSString? get notationName { + final _ret = _lib._objc_msgSend_43(_id, _lib._sel_notationName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set notationName(NSString? value) { + return _lib._objc_msgSend_544( + _id, _lib._sel_setNotationName_1, value?._id ?? ffi.nullptr); + } + + @override + NSXMLDTDNode initWithKind_(int kind) { + final _ret = _lib._objc_msgSend_1089(_id, _lib._sel_initWithKind_1, kind); + return NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + } + + static NSObject document(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSXMLDTDNode1, _lib._sel_document1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject documentWithRootElement_( + ThermionDartTexture1 _lib, NSXMLElement element) { + final _ret = _lib._objc_msgSend_1091(_lib._class_NSXMLDTDNode1, + _lib._sel_documentWithRootElement_1, element._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSXMLDTDNode1, _lib._sel_elementWithName_1, name._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_URI_( + ThermionDartTexture1 _lib, NSString name, NSString URI) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLDTDNode1, + _lib._sel_elementWithName_URI_1, name._id, URI._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString string) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLDTDNode1, + _lib._sel_elementWithName_stringValue_1, name._id, string._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject elementWithName_children_attributes_( + ThermionDartTexture1 _lib, + NSString name, + NSArray? children, + NSArray? attributes) { + final _ret = _lib._objc_msgSend_1093( + _lib._class_NSXMLDTDNode1, + _lib._sel_elementWithName_children_attributes_1, + name._id, + children?._id ?? ffi.nullptr, + attributes?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject attributeWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLDTDNode1, + _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject attributeWithName_URI_stringValue_(ThermionDartTexture1 _lib, + NSString name, NSString URI, NSString stringValue) { + final _ret = _lib._objc_msgSend_1059( + _lib._class_NSXMLDTDNode1, + _lib._sel_attributeWithName_URI_stringValue_1, + name._id, + URI._id, + stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject namespaceWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092(_lib._class_NSXMLDTDNode1, + _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject processingInstructionWithName_stringValue_( + ThermionDartTexture1 _lib, NSString name, NSString stringValue) { + final _ret = _lib._objc_msgSend_1092( + _lib._class_NSXMLDTDNode1, + _lib._sel_processingInstructionWithName_stringValue_1, + name._id, + stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject commentWithStringValue_( + ThermionDartTexture1 _lib, NSString stringValue) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDTDNode1, + _lib._sel_commentWithStringValue_1, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject textWithStringValue_( + ThermionDartTexture1 _lib, NSString stringValue) { + final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDTDNode1, + _lib._sel_textWithStringValue_1, stringValue._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject? DTDNodeWithXMLString_( + ThermionDartTexture1 _lib, NSString string) { + final _ret = _lib._objc_msgSend_38(_lib._class_NSXMLDTDNode1, + _lib._sel_DTDNodeWithXMLString_1, string._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSString localNameForName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_68( + _lib._class_NSXMLDTDNode1, _lib._sel_localNameForName_1, name._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString? prefixForName_(ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_185( + _lib._class_NSXMLDTDNode1, _lib._sel_prefixForName_1, name._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSXMLNode? predefinedNamespaceForPrefix_( + ThermionDartTexture1 _lib, NSString name) { + final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLDTDNode1, + _lib._sel_predefinedNamespaceForPrefix_1, name._id); + return _ret.address == 0 + ? null + : NSXMLNode._(_ret, _lib, retain: true, release: true); + } + + static NSXMLDTDNode new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSXMLDTDNode1, _lib._sel_new1); + return NSXMLDTDNode._(_ret, _lib, retain: false, release: true); + } + + static NSXMLDTDNode allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSXMLDTDNode1, _lib._sel_allocWithZone_1, zone); + return NSXMLDTDNode._(_ret, _lib, retain: false, release: true); + } + + static NSXMLDTDNode alloc(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSXMLDTDNode1, _lib._sel_alloc1); + return NSXMLDTDNode._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_NSXMLDTDNode1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_NSXMLDTDNode1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSXMLDTDNode1, _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSXMLDTDNode1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_NSXMLDTDNode1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_NSXMLDTDNode1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_NSXMLDTDNode1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84( + _lib._class_NSXMLDTDNode1, _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSXMLDTDNode1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} + +abstract class NSXMLDTDNodeKind { + static const int NSXMLEntityGeneralKind = 1; + static const int NSXMLEntityParsedKind = 2; + static const int NSXMLEntityUnparsedKind = 3; + static const int NSXMLEntityParameterKind = 4; + static const int NSXMLEntityPredefined = 5; + static const int NSXMLAttributeCDATAKind = 6; + static const int NSXMLAttributeIDKind = 7; + static const int NSXMLAttributeIDRefKind = 8; + static const int NSXMLAttributeIDRefsKind = 9; + static const int NSXMLAttributeEntityKind = 10; + static const int NSXMLAttributeEntitiesKind = 11; + static const int NSXMLAttributeNMTokenKind = 12; + static const int NSXMLAttributeNMTokensKind = 13; + static const int NSXMLAttributeEnumerationKind = 14; + static const int NSXMLAttributeNotationKind = 15; + static const int NSXMLElementDeclarationUndefinedKind = 16; + static const int NSXMLElementDeclarationEmptyKind = 17; + static const int NSXMLElementDeclarationAnyKind = 18; + static const int NSXMLElementDeclarationMixedKind = 19; + static const int NSXMLElementDeclarationElementKind = 20; +} + +class ThermionDartTexture extends NSObject { + ThermionDartTexture._(ffi.Pointer id, ThermionDartTexture1 lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [ThermionDartTexture] that points to the same underlying object as [other]. + static ThermionDartTexture castFrom(T other) { + return ThermionDartTexture._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [ThermionDartTexture] that wraps the given raw object pointer. + static ThermionDartTexture castFromPointer( + ThermionDartTexture1 lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return ThermionDartTexture._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [ThermionDartTexture]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_ThermionDartTexture1); + } + + int get cvMetalTextureCache { + return _lib._objc_msgSend_236(_id, _lib._sel_cvMetalTextureCache1); + } + + set cvMetalTextureCache(int value) { + return _lib._objc_msgSend_1128( + _id, _lib._sel_setCvMetalTextureCache_1, value); + } + + int get cvMetalTexture { + return _lib._objc_msgSend_236(_id, _lib._sel_cvMetalTexture1); + } + + set cvMetalTexture(int value) { + return _lib._objc_msgSend_1128(_id, _lib._sel_setCvMetalTexture_1, value); + } + + NSObject? get metalTexture { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_metalTexture1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set metalTexture(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setMetalTexture_1, value?._id ?? ffi.nullptr); + } + + NSObject? get metalDevice { + final _ret = _lib._objc_msgSend_17(_id, _lib._sel_metalDevice1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set metalDevice(NSObject? value) { + return _lib._objc_msgSend_415( + _id, _lib._sel_setMetalDevice_1, value?._id ?? ffi.nullptr); + } + + int get metalTextureAddress { + return _lib._objc_msgSend_82(_id, _lib._sel_metalTextureAddress1); + } + + set metalTextureAddress(int value) { + return _lib._objc_msgSend_634( + _id, _lib._sel_setMetalTextureAddress_1, value); + } + + @override + ThermionDartTexture init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return ThermionDartTexture._(_ret, _lib, retain: true, release: true); + } + + ThermionDartTexture initWithWidth_height_(int width, int height) { + final _ret = _lib._objc_msgSend_1129( + _id, _lib._sel_initWithWidth_height_1, width, height); + return ThermionDartTexture._(_ret, _lib, retain: true, release: true); + } + + void destroyTexture() { + _lib._objc_msgSend_1(_id, _lib._sel_destroyTexture1); + } + + static ThermionDartTexture new1(ThermionDartTexture1 _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_ThermionDartTexture1, _lib._sel_new1); + return ThermionDartTexture._(_ret, _lib, retain: false, release: true); + } + + static ThermionDartTexture allocWithZone_( + ThermionDartTexture1 _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_ThermionDartTexture1, _lib._sel_allocWithZone_1, zone); + return ThermionDartTexture._(_ret, _lib, retain: false, release: true); + } + + static ThermionDartTexture alloc(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_ThermionDartTexture1, _lib._sel_alloc1); + return ThermionDartTexture._(_ret, _lib, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + ThermionDartTexture1 _lib, + NSObject aTarget, + ffi.Pointer aSelector, + NSObject? anArgument) { + _lib._objc_msgSend_14( + _lib._class_ThermionDartTexture1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, + aTarget._id, + aSelector, + anArgument?._id ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_( + ThermionDartTexture1 _lib, NSObject aTarget) { + _lib._objc_msgSend_15(_lib._class_ThermionDartTexture1, + _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + } + + static bool getAccessInstanceVariablesDirectly(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12(_lib._class_ThermionDartTexture1, + _lib._sel_accessInstanceVariablesDirectly1); + } + + static bool useStoredAccessor(ThermionDartTexture1 _lib) { + return _lib._objc_msgSend_12( + _lib._class_ThermionDartTexture1, _lib._sel_useStoredAccessor1); + } + + static NSSet keyPathsForValuesAffectingValueForKey_( + ThermionDartTexture1 _lib, NSString key) { + final _ret = _lib._objc_msgSend_62(_lib._class_ThermionDartTexture1, + _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); + return NSSet._(_ret, _lib, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_( + ThermionDartTexture1 _lib, NSString key) { + return _lib._objc_msgSend_63(_lib._class_ThermionDartTexture1, + _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + ThermionDartTexture1 _lib, NSArray keys, NSString dependentKey) { + _lib._objc_msgSend_87( + _lib._class_ThermionDartTexture1, + _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, + keys._id, + dependentKey._id); + } + + static NSArray classFallbacksForKeyedArchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_84(_lib._class_ThermionDartTexture1, + _lib._sel_classFallbacksForKeyedArchiver1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSObject classForKeyedUnarchiver(ThermionDartTexture1 _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_ThermionDartTexture1, _lib._sel_classForKeyedUnarchiver1); + return NSObject._(_ret, _lib, retain: true, release: true); + } +} diff --git a/thermion_dart/lib/thermion_dart/thermion_viewer.dart b/thermion_dart/lib/thermion_dart/thermion_viewer.dart new file mode 100644 index 00000000..93cf4995 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/thermion_viewer.dart @@ -0,0 +1,761 @@ +import 'dart:math'; + +import 'package:vector_math/vector_math_64.dart'; +import 'dart:async'; +import 'package:animation_tools_dart/animation_tools_dart.dart'; + +// a handle that can be safely passed back to the rendering layer to manipulate an Entity +typedef ThermionEntity = int; + +// "picking" means clicking/tapping on the viewport, and unprojecting the X/Y coordinate to determine whether any renderable entities were present at those coordinates. +typedef FilamentPickResult = ({ThermionEntity entity, double x, double y}); + +enum LightType { + SUN, //!< Directional light that also draws a sun's disk in the sky. + DIRECTIONAL, //!< Directional light, emits light in a given direction. + POINT, //!< Point light, emits light from a position, in all directions. + FOCUSED_SPOT, //!< Physically correct spot light. + SPOT, +} + +// copied from filament/backened/DriverEnums.h +enum PrimitiveType { + // don't change the enums values (made to match GL) + POINTS, //!< points + LINES, //!< lines + UNUSED1, + LINE_STRIP, //!< line strip + TRIANGLES, //!< triangles + TRIANGLE_STRIP, //!< triangle strip +} + +enum ToneMapper { ACES, FILMIC, LINEAR } + +// see filament Manipulator.h for more details +enum ManipulatorMode { ORBIT, MAP, FREE_FLIGHT } + +class TextureDetails { + final int textureId; + + // both width and height are in physical, not logical pixels + final int width; + final int height; + + TextureDetails( + {required this.textureId, required this.width, required this.height}); +} + +abstract class ThermionViewer { + + Future get initialized; + + /// + /// The result(s) of calling [pick] (see below). + /// This may be a broadcast stream, so you should ensure you have subscribed to this stream before calling [pick]. + /// If [pick] is called without an active subscription to this stream, the results will be silently discarded. + /// + Stream get pickResult; + + /// + /// Whether the controller is currently rendering at [framerate]. + /// + bool get rendering; + + /// + /// Set to true to continuously render the scene at the framerate specified by [setFrameRate] (60 fps by default). + /// + Future setRendering(bool render); + + /// + /// Render a single frame. + /// + Future render(); + + /// + /// Sets the framerate for continuous rendering when [setRendering] is enabled. + /// + Future setFrameRate(int framerate); + + /// + /// Destroys/disposes the viewer (including the entire scene). You cannot use the viewer after calling this method. + /// + Future dispose(); + + /// + /// Set the background image to [path] (which should have a file extension .png, .jpg, or .ktx). + /// This will be rendered at the maximum depth (i.e. behind all other objects including the skybox). + /// If [fillHeight] is false, the image will be rendered at its original size. Note this may cause issues with pixel density so be sure to specify the correct resolution + /// If [fillHeight] is true, the image will be stretched/compressed to fit the height of the viewport. + /// + Future setBackgroundImage(String path, {bool fillHeight = false}); + + /// + /// Moves the background image to the relative offset from the origin (bottom-left) specified by [x] and [y]. + /// If [clamp] is true, the image cannot be positioned outside the bounds of the viewport. + /// + Future setBackgroundImagePosition(double x, double y, {bool clamp = false}); + + /// + /// Removes the background image. + /// + Future clearBackgroundImage(); + + /// + /// Sets the color for the background plane (positioned at the maximum depth, i.e. behind all other objects including the skybox). + /// + Future setBackgroundColor(double r, double g, double b, double alpha); + + /// + /// Load a skybox from [skyboxPath] (which must be a .ktx file) + /// + Future loadSkybox(String skyboxPath); + + /// + /// Removes the skybox from the scene. + /// + Future removeSkybox(); + + /// + /// Loads an image-based light from the specified path at the given intensity. + /// Only one IBL can be active at any given time; if an IBL has already been loaded, it will be replaced. + /// + Future loadIbl(String lightingPath, {double intensity = 30000}); + + /// + /// Rotates the IBL & skybox. + /// + Future rotateIbl(Matrix3 rotation); + + /// + /// Removes the image-based light from the scene. + /// + Future removeIbl(); + + /// + /// Add a light to the scene. + /// See LightManager.h for details + /// Note that [sunAngularRadius] is in degrees, + /// whereas [spotLightConeInner] and [spotLightConeOuter] are in radians + /// + Future addLight( + LightType type, + double colour, + double intensity, + double posX, + double posY, + double posZ, + double dirX, + double dirY, + double dirZ, + {double falloffRadius = 1.0, + double spotLightConeInner = pi / 8, + double spotLightConeOuter = pi / 4, + double sunAngularRadius = 0.545, + double sunHaloSize = 10.0, + double sunHaloFallof = 80.0, + bool castShadows = true}); + + Future removeLight(ThermionEntity light); + + /// + /// Remove all lights (excluding IBL) from the scene. + /// + Future clearLights(); + + /// + /// Load the .glb asset at the given path and insert into the scene. + /// + Future loadGlb(String path, {int numInstances = 1}); + + /// + /// Create a new instance of [entity]. + /// + Future createInstance(ThermionEntity entity); + + /// + /// Returns the number of instances of the asset associated with [entity]. + /// + Future getInstanceCount(ThermionEntity entity); + + /// + /// Returns all instances of [entity]. + /// + Future> getInstances(ThermionEntity entity); + + /// + /// Load the .gltf asset at the given path and insert into the scene. + /// [relativeResourcePath] is the folder path where the glTF resources are stored; + /// this is usually the parent directory of the .gltf file itself. + /// + Future loadGltf(String path, String relativeResourcePath, + {bool force = false}); + + /// + /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. + /// + Future panStart(double x, double y); + + /// + /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. + /// + Future panUpdate(double x, double y); + + /// + /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. + /// + Future panEnd(); + + /// + /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. + /// + Future rotateStart(double x, double y); + + /// + /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. + /// + Future rotateUpdate(double x, double y); + + /// + /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. + /// + Future rotateEnd(); + + /// + /// Set the weights for all morph targets in [entity] to [weights]. + /// Note that [weights] must contain values for ALL morph targets, but no exception will be thrown if you don't do so (you'll just get incorrect results). + /// If you only want to set one value, set all others to zero (check [getMorphTargetNames] if you need the get a list of all morph targets). + /// IMPORTANT - this accepts the actual ThermionEntity with the relevant morph targets (unlike [getMorphTargetNames], which uses the parent entity and the child mesh name). + /// Use [getChildEntityByName] if you are setting the weights for a child mesh. + /// + Future setMorphTargetWeights(ThermionEntity entity, List weights); + + /// + /// Gets the names of all morph targets for the child renderable [childEntity] under [entity]. + /// + Future> getMorphTargetNames( + ThermionEntity entity, ThermionEntity childEntity); + + /// + /// Gets the names of all bones for the armature at [skinIndex] under the specified [entity]. + /// + Future> getBoneNames(ThermionEntity entity, {int skinIndex = 0}); + + /// + /// Gets the names of all glTF animations embedded in the specified entity. + /// + Future> getAnimationNames(ThermionEntity entity); + + /// + /// Returns the length (in seconds) of the animation at the given index. + /// + Future getAnimationDuration( + ThermionEntity entity, int animationIndex); + + /// + /// Animate the morph targets in [entity]. See [MorphTargetAnimation] for an explanation as to how to construct the animation frame data. + /// This method will check the morph target names specified in [animation] against the morph target names that actually exist exist under [meshName] in [entity], + /// throwing an exception if any cannot be found. + /// It is permissible for [animation] to omit any targets that do exist under [meshName]; these simply won't be animated. + /// + Future setMorphAnimationData( + ThermionEntity entity, MorphAnimationData animation, + {List? targetMeshNames}); + + /// + /// Resets all bones in the given entity to their rest pose. + /// This should be done before every call to addBoneAnimation. + /// + Future resetBones(ThermionEntity entity); + + /// + /// Enqueues and plays the [animation] for the specified bone(s). + /// By default, frame data is interpreted as being in *parent* bone space; + /// a 45 degree around Y means the bone will rotate 45 degrees around the + /// Y axis of the parent bone *in its current orientation*. + /// (i.e NOT the parent bone's rest position!). + /// Currently, only [Space.ParentBone] and [Space.Model] are supported; if you want + /// to transform to another space, you will need to do so manually. + /// + /// [fadeInInSecs]/[fadeOutInSecs]/[maxDelta] are used to cross-fade between + /// the current active glTF animation ("animation1") and the animation you + /// set via this method ("animation2"). The bone orientations will be + /// linearly interpolated between animation1 and animation2; at time 0, + /// the orientation will be 100% animation1, at time [fadeInInSecs], the + /// animation will be ((1 - maxDelta) * animation1) + (maxDelta * animation2). + /// This will be applied in reverse after [fadeOutInSecs]. + /// + /// + Future addBoneAnimation(ThermionEntity entity, BoneAnimationData animation, + {int skinIndex = 0, + double fadeInInSecs = 0.0, + double fadeOutInSecs = 0.0, + double maxDelta = 1.0}); + + /// + /// Gets the entity representing the bone at [boneIndex]/[skinIndex]. + /// The returned entity is only intended for use with [getWorldTransform]. + /// + Future getBone(ThermionEntity parent, int boneIndex, + {int skinIndex = 0}); + + /// + /// Gets the local (relative to parent) transform for [entity]. + /// + Future getLocalTransform(ThermionEntity entity); + + /// + /// Gets the world transform for [entity]. + /// + Future getWorldTransform(ThermionEntity entity); + + /// + /// Gets the inverse bind (pose) matrix for the bone. + /// Note that [parent] must be the ThermionEntity returned by [loadGlb/loadGltf], not any other method ([getChildEntity] etc). + /// This is because all joint information is internally stored with the parent entity. + /// + Future getInverseBindMatrix(ThermionEntity parent, int boneIndex, + {int skinIndex = 0}); + + /// + /// Sets the transform (relative to its parent) for [entity]. + /// + Future setTransform(ThermionEntity entity, Matrix4 transform); + + /// + /// Updates the bone matrices for [entity] (which must be the ThermionEntity + /// returned by [loadGlb/loadGltf]). + /// Under the hood, this just calls [updateBoneMatrices] on the Animator + /// instance of the relevant FilamentInstance (which uses the local + /// bone transform and the inverse bind matrix to set the bone matrix). + /// + Future updateBoneMatrices(ThermionEntity entity); + + /// + /// Directly set the bone matrix for the bone at the given index. + /// Don't call this manually unless you know what you're doing. + /// + Future setBoneTransform( + ThermionEntity entity, int boneIndex, Matrix4 transform, + {int skinIndex = 0}); + + /// + /// Removes/destroys the specified entity from the scene. + /// [entity] will no longer be a valid handle after this method is called; ensure you immediately discard all references once this method is complete. + /// + Future removeEntity(ThermionEntity entity); + + /// + /// Removes/destroys all renderable entities from the scene (including cameras). + /// All [ThermionEntity] handles will no longer be valid after this method is called; ensure you immediately discard all references to all entities once this method is complete. + /// + Future clearEntities(); + + /// + /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. + /// + Future zoomBegin(); + + /// + /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. + /// + Future zoomUpdate(double x, double y, double z); + + /// + /// Called by `FilamentGestureDetector`. You probably don't want to call this yourself. + /// + Future zoomEnd(); + + /// + /// Schedules the glTF animation at [index] in [entity] to start playing on the next frame. + /// + Future playAnimation(ThermionEntity entity, int index, + {bool loop = false, + bool reverse = false, + bool replaceActive = true, + double crossfade = 0.0}); + + /// + /// Schedules the glTF animation at [index] in [entity] to start playing on the next frame. + /// + Future playAnimationByName(ThermionEntity entity, String name, + {bool loop = false, + bool reverse = false, + bool replaceActive = true, + double crossfade = 0.0}); + + Future setAnimationFrame( + ThermionEntity entity, int index, int animationFrame); + + Future stopAnimation(ThermionEntity entity, int animationIndex); + Future stopAnimationByName(ThermionEntity entity, String name); + + /// + /// Sets the current scene camera to the glTF camera under [name] in [entity]. + /// + Future setCamera(ThermionEntity entity, String? name); + + /// + /// Sets the current scene camera to the main camera (which is always available and added to every scene by default). + /// + Future setMainCamera(); + + /// + /// Returns the entity associated with the main camera. + /// + Future getMainCamera(); + + /// + /// Sets the current scene camera to the glTF camera under [name] in [entity]. + /// + Future setCameraFov(double degrees, double width, double height); + + /// + /// Sets the tone mapping (requires postprocessing). + /// + Future setToneMapping(ToneMapper mapper); + + /// + /// Sets the strength of the bloom. + /// + Future setBloom(double bloom); + + /// + /// Sets the focal length of the camera. Default value is 28.0. + /// + Future setCameraFocalLength(double focalLength); + + /// + /// Sets the distance (in world units) to the near/far planes for the active camera. Default values are 0.05/1000.0. See Camera.h for details. + /// + Future setCameraCulling(double near, double far); + + /// + /// Get the distance (in world units) to the near culling plane for the active camera. + /// + Future getCameraCullingNear(); + + /// + /// Get the distance (in world units) to the far culling plane for the active camera. + /// + Future getCameraCullingFar(); + + /// + /// Sets the focus distance for the camera. + /// + Future setCameraFocusDistance(double focusDistance); + + /// + /// Get the camera position in world space. + /// + Future getCameraPosition(); + + /// + /// Get the camera's model matrix. + /// + Future getCameraModelMatrix(); + + /// + /// Get the camera's view matrix. See Camera.h for more details. + /// + Future getCameraViewMatrix(); + + /// + /// Get the camera's projection matrix. See Camera.h for more details. + /// + Future getCameraProjectionMatrix(); + + /// + /// Get the camera's culling projection matrix. See Camera.h for more details. + /// + Future getCameraCullingProjectionMatrix(); + + /// + /// Get the camera's culling frustum in world space. Returns a (vector_math) [Frustum] instance where plane0-plane6 define the left, right, bottom, top, far and near planes respectively. + /// See Camera.h and (filament) Frustum.h for more details. + /// + Future getCameraFrustum(); + + /// + /// Set the camera position in world space. Note this is not persistent - any viewport navigation will reset the camera transform. + /// + Future setCameraPosition(double x, double y, double z); + + /// + /// Get the camera rotation matrix. + /// + Future getCameraRotation(); + + /// + /// Repositions the camera to the last vertex of the bounding box of [entity], looking at the penultimate vertex. + /// + Future moveCameraToAsset(ThermionEntity entity); + + /// + /// Enables/disables frustum culling. Currently we don't expose a method for manipulating the camera projection/culling matrices so this is your only option to deal with unwanted near/far clipping. + /// + Future setViewFrustumCulling(bool enabled); + + /// + /// Sets the camera exposure. + /// + Future setCameraExposure( + double aperture, double shutterSpeed, double sensitivity); + + /// + /// Rotate the camera by [rads] around the given axis. Note this is not persistent - any viewport navigation will reset the camera transform. + /// + Future setCameraRotation(Quaternion quaternion); + + /// + /// Sets the camera model matrix. + /// + Future setCameraModelMatrix(List matrix); + + /// + /// Sets the `baseColorFactor` property for the material at index [materialIndex] in [entity] under node [meshName] to [color]. + /// + Future setMaterialColor(ThermionEntity entity, String meshName, + int materialIndex, double r, double g, double b, double a); + + /// + /// Scale [entity] to fit within the unit cube. + /// + Future transformToUnitCube(ThermionEntity entity); + + /// + /// Directly sets the world space position for [entity] to the given coordinates, skipping all collision detection. + /// + Future setPosition(ThermionEntity entity, double x, double y, double z); + + /// + /// Directly sets the scale for [entity], skipping all collision detection. + /// + Future setScale(ThermionEntity entity, double scale); + + /// + /// Directly sets the rotation for [entity] to [rads] around the axis {x,y,z}, skipping all collision detection. + /// + Future setRotation( + ThermionEntity entity, double rads, double x, double y, double z); + + /// + /// Queues an update to the worldspace position for [entity] to {x,y,z}. + /// The actual update will occur on the next frame, and will be subject to collision detection. + /// + Future queuePositionUpdate( + ThermionEntity entity, double x, double y, double z, + {bool relative = false}); + + /// + /// Queues an update to the worldspace rotation for [entity]. + /// The actual update will occur on the next frame, and will be subject to collision detection. + /// + Future queueRotationUpdate( + ThermionEntity entity, double rads, double x, double y, double z, + {bool relative = false}); + + /// + /// Same as [queueRotationUpdate]. + /// + Future queueRotationUpdateQuat(ThermionEntity entity, Quaternion quat, + {bool relative = false}); + + /// + /// Enable/disable postprocessing. + /// + Future setPostProcessing(bool enabled); + + /// + /// Set antialiasing options. + /// + Future setAntiAliasing(bool msaa, bool fxaa, bool taa); + + /// + /// Sets the rotation for [entity] to the specified quaternion. + /// + Future setRotationQuat(ThermionEntity entity, Quaternion rotation); + + /// + /// Reveal the node [meshName] under [entity]. Only applicable if [hide] had previously been called; this is a no-op otherwise. + /// + Future reveal(ThermionEntity entity, String? meshName); + + /// + /// If [meshName] is provided, hide the node [meshName] under [entity], otherwise hide the root node for [entity]. + /// The entity still exists in memory, but is no longer being rendered into the scene. Call [reveal] to re-commence rendering. + /// + Future hide(ThermionEntity entity, String? meshName); + + /// + /// Used to select the entity in the scene at the given viewport coordinates. + /// Called by `FilamentGestureDetector` on a mouse/finger down event. You probably don't want to call this yourself. + /// This is asynchronous and will require 2-3 frames to complete - subscribe to the [pickResult] stream to receive the results of this method. + /// [x] and [y] must be in local logical coordinates (i.e. where 0,0 is at top-left of the ThermionWidget). + /// + void pick(int x, int y); + + /// + /// Retrieves the name assigned to the given ThermionEntity (usually corresponds to the glTF mesh name). + /// + String? getNameForEntity(ThermionEntity entity); + + /// + /// Sets the options for manipulating the camera via the viewport. + /// ManipulatorMode.FREE_FLIGHT and ManipulatorMode.MAP are currently unsupported and will throw an exception. + /// + Future setCameraManipulatorOptions( + {ManipulatorMode mode = ManipulatorMode.ORBIT, + double orbitSpeedX = 0.01, + double orbitSpeedY = 0.01, + double zoomSpeed = 0.01}); + + /// + /// Returns all child entities under [parent]. + /// + Future> getChildEntities( + ThermionEntity parent, bool renderableOnly); + + /// + /// Finds the child entity named [childName] associated with the given parent. + /// Usually, [parent] will be the return value from [loadGlb]/[loadGltf] and [childName] will be the name of a node/mesh. + /// + Future getChildEntity( + ThermionEntity parent, String childName); + + /// + /// List the name of all child entities under the given entity. + /// + Future> getChildEntityNames(ThermionEntity entity, + {bool renderableOnly = true}); + + /// + /// If [recording] is set to true, each frame the framebuffer/texture will be written to /tmp/output_*.png. + /// This will impact performance; handle with care. + /// + Future setRecording(bool recording); + + /// + /// Sets the output directory where recorded PNGs will be placed. + /// + Future setRecordingOutputDirectory(String outputDirectory); + + /// + /// An [entity] will only be animatable after an animation component is attached. + /// Any calls to [playAnimation]/[setBoneAnimation]/[setMorphAnimation] will have no visual effect until [addAnimationComponent] has been called on the instance. + /// + Future addAnimationComponent(ThermionEntity entity); + + /// + /// Removes an animation component from [entity]. + /// + Future removeAnimationComponent(ThermionEntity entity); + + /// + /// Makes [entity] collidable. + /// This allows you to call [testCollisions] with any other entity ("entity B") to see if [entity] has collided with entity B. The callback will be invoked if so. + /// Alternatively, if [affectsTransform] is true and this entity collides with another entity, any queued position updates to the latter entity will be ignored. + /// + Future addCollisionComponent(ThermionEntity entity, + {void Function(int entityId1, int entityId2)? callback, + bool affectsTransform = false}); + + /// + /// Removes the collision component from [entity], meaning this will no longer be tested when [testCollisions] or [queuePositionUpdate] is called with another entity. + /// + Future removeCollisionComponent(ThermionEntity entity); + + /// + /// Creates a (renderable) entity with the specified geometry and adds to the scene. + /// + Future createGeometry(List vertices, List indices, + {String? materialPath, + PrimitiveType primitiveType = PrimitiveType.TRIANGLES}); + + /// + /// Gets the parent transform of [child]. + /// + Future getParent(ThermionEntity child); + + /// + /// Sets the parent transform of [child] to [parent]. + /// + Future setParent(ThermionEntity child, ThermionEntity parent); + + /// + /// Test all collidable entities against this entity to see if any have collided. + /// This method returns void; the relevant callback passed to [addCollisionComponent] will be fired if a collision is detected. + /// + Future testCollisions(ThermionEntity entity); + + /// + /// Sets the draw priority for the given entity. See RenderableManager.h for more details. + /// + Future setPriority(ThermionEntity entityId, int priority); + + /// + /// The Scene holds all loaded entities/lights. + /// + Scene get scene; + + /// + /// + /// + AbstractGizmo? get gizmo; +} + +/// +/// For now, this class just holds the entities that have been loaded (though not necessarily visible in the Filament Scene). +/// +abstract class Scene { + /// + /// The last entity clicked/tapped in the viewport (internally, the result of calling pick); + ThermionEntity? selected; + + /// + /// A Stream updated whenever an entity is added/removed from the scene. + /// + Stream get onUpdated; + + /// + /// A Stream containing every ThermionEntity added to the scene (i.e. via [loadGlb], [loadGltf] or [addLight]). + /// This is provided for convenience so you can set listeners in front-end widgets that can respond to entity loads without manually passing around the ThermionEntity returned from those methods. + /// + Stream get onLoad; + + /// + /// A Stream containing every ThermionEntity removed from the scene (i.e. via [removeEntity], [clearEntities], [removeLight] or [clearLights]). + + Stream get onUnload; + + /// + /// Lists all light entities currently loaded (not necessarily active in the scene). Does not account for instances. + /// + Iterable listLights(); + + /// + /// Lists all entities currently loaded (not necessarily active in the scene). Does not account for instances. + /// + Iterable listEntities(); + + /// + /// Attach the gizmo to the specified entity. + /// + void select(ThermionEntity entity); + + /// + /// + /// + void registerEntity(ThermionEntity entity); +} + +abstract class AbstractGizmo { + bool get isActive; + + void translate(double transX, double transY); + + void reset(); + + void attach(ThermionEntity entity); + + void detach(); +} diff --git a/thermion_dart/lib/thermion_dart/thermion_viewer_ffi.dart b/thermion_dart/lib/thermion_dart/thermion_viewer_ffi.dart new file mode 100644 index 00000000..ab83957e --- /dev/null +++ b/thermion_dart/lib/thermion_dart/thermion_viewer_ffi.dart @@ -0,0 +1,1677 @@ +import 'dart:async'; +import 'dart:io'; +import 'dart:math'; +import 'package:animation_tools_dart/animation_tools_dart.dart'; +import 'package:thermion_dart/thermion_dart/compatibility/compatibility.dart'; + +import 'package:thermion_dart/thermion_dart/entities/gizmo.dart'; + +import 'package:vector_math/vector_math_64.dart'; +import 'thermion_viewer.dart'; +import 'scene.dart'; +import 'compatibility/compatibility.dart'; + +// ignore: constant_identifier_names +const ThermionEntity _FILAMENT_ASSET_ERROR = 0; + +typedef RenderCallback = Pointer)>>; + +class ThermionViewerFFI extends ThermionViewer { + final _compat = Compatibility(); + + late SceneImpl _scene; + Scene get scene => _scene; + + double _pixelRatio = 1.0; + + late (double, double) viewportDimensions; + + Pointer? _sceneManager; + + Pointer? _viewer; + + final String? uberArchivePath; + + final _initialized = Completer(); + Future get initialized => _initialized.future; + + /// + /// + /// + @override + Stream get pickResult => _pickResultController.stream; + final _pickResultController = + StreamController.broadcast(); + + final Pointer resourceLoader; + + var _driver = nullptr.cast(); + + late final RenderCallback _renderCallback; + var _renderCallbackOwner = nullptr.cast(); + + var _sharedContext = nullptr.cast(); + + /// + /// This controller uses platform channels to bridge Dart with the C/C++ code for the Filament API. + /// Setting up the context/texture (since this is platform-specific) and the render ticker are platform-specific; all other methods are passed through by the platform channel to the methods specified in ThermionFlutterApi.h. + /// + ThermionViewerFFI( + {RenderCallback? renderCallback, + Pointer? renderCallbackOwner, + required this.resourceLoader, + Pointer? driver, + Pointer? sharedContext, + this.uberArchivePath}) { + this._renderCallbackOwner = renderCallbackOwner ?? nullptr; + this._renderCallback = renderCallback ?? nullptr; + this._driver = driver ?? nullptr; + this._sharedContext = sharedContext ?? nullptr; + try { + _onPickResultCallable = + NativeCallable.listener( + _onPickResult); + } catch (err) { + print( + "Failed to set pick result callback. This is expected if running on web/wasm"); + } + _initialize(); + } + + Future createRenderTarget( + double width, double height, int textureHandle) async { + await withVoidCallback((callback) => create_render_target_ffi( + _viewer!, textureHandle, width.toInt(), height.toInt(), callback)); + } + + Future updateViewportAndCameraProjection(double width, double height) async { + await withVoidCallback((callback) { + update_viewport_and_camera_projection_ffi( + _viewer!, width.toInt(), height.toInt(), 1.0, callback); + }); + } + + Future createSwapChain(double width, double height, + {Pointer? surface}) async { + await withVoidCallback((callback) { + create_swap_chain_ffi(_viewer!, surface ?? nullptr, width.toInt(), + height.toInt(), callback); + }); + } + + Future destroySwapChain() async { + await withVoidCallback((callback) { + destroy_swap_chain_ffi(_viewer!, callback); + }); + } + + Gizmo? _gizmo; + Gizmo? get gizmo => _gizmo; + + Future _initialize() async { + final uberarchivePtr = + uberArchivePath?.toNativeUtf8(allocator: allocator).cast() ?? + nullptr; + var viewer = await withVoidPointerCallback( + (Pointer)>> callback) { + create_filament_viewer_ffi(_sharedContext, _driver, uberarchivePtr, + resourceLoader, _renderCallback, _renderCallbackOwner, callback); + }); + _viewer = Pointer.fromAddress(viewer); + allocator.free(uberarchivePtr); + if (_viewer!.address == 0) { + throw Exception("Failed to create viewer. Check logs for details"); + } + + _sceneManager = get_scene_manager(_viewer!); + _scene = SceneImpl(this); + + await setCameraManipulatorOptions(zoomSpeed: 1.0); + + final out = allocator(3); + get_gizmo(_sceneManager!, out); + _gizmo = Gizmo(out[0], out[1], out[2], this); + allocator.free(out); + + this._initialized.complete(true); + } + + bool _rendering = false; + + /// + /// + /// + @override + bool get rendering => _rendering; + + /// + /// + /// + @override + Future setRendering(bool render) async { + _rendering = render; + await withVoidCallback((cb) { + set_rendering_ffi(_viewer!, render, cb); + }); + } + + /// + /// + /// + @override + Future render() async { + render_ffi(_viewer!); + } + + /// + /// + /// + @override + Future setFrameRate(int framerate) async { + final interval = 1000.0 / framerate; + set_frame_interval_ffi(_viewer!, interval); + } + + /// + /// + /// + @override + Future dispose() async { + destroy_filament_viewer_ffi(_viewer!); + _sceneManager = null; + _viewer = null; + } + + /// + /// + /// + @override + Future clearBackgroundImage() async { + clear_background_image_ffi(_viewer!); + } + + /// + /// + /// + @override + Future setBackgroundImage(String path, {bool fillHeight = false}) async { + final pathPtr = path.toNativeUtf8(allocator: allocator).cast(); + await withVoidCallback((cb) { + set_background_image_ffi(_viewer!, pathPtr, fillHeight, cb); + }); + + allocator.free(pathPtr); + } + + /// + /// + /// + @override + Future setBackgroundColor(double r, double g, double b, double a) async { + set_background_color_ffi(_viewer!, r, g, b, a); + } + + /// + /// + /// + @override + Future setBackgroundImagePosition(double x, double y, + {bool clamp = false}) async { + set_background_image_position_ffi(_viewer!, x, y, clamp); + } + + /// + /// + /// + @override + Future loadSkybox(String skyboxPath) async { + final pathPtr = skyboxPath.toNativeUtf8(allocator: allocator).cast(); + + await withVoidCallback((cb) { + load_skybox_ffi(_viewer!, pathPtr, cb); + }); + + allocator.free(pathPtr); + } + + /// + /// + /// + @override + Future loadIbl(String lightingPath, {double intensity = 30000}) async { + final pathPtr = + lightingPath.toNativeUtf8(allocator: allocator).cast(); + load_ibl_ffi(_viewer!, pathPtr, intensity); + } + + /// + /// + /// + @override + Future rotateIbl(Matrix3 rotationMatrix) async { + var floatPtr = allocator(9); + for (int i = 0; i < 9; i++) { + floatPtr[i] = rotationMatrix.storage[i]; + } + rotate_ibl(_viewer!, floatPtr); + allocator.free(floatPtr); + } + + /// + /// + /// + @override + Future removeSkybox() async { + remove_skybox_ffi(_viewer!); + } + + /// + /// + /// + @override + Future removeIbl() async { + remove_ibl_ffi(_viewer!); + } + + /// + /// + /// + @override + Future addLight( + LightType type, + double colour, + double intensity, + double posX, + double posY, + double posZ, + double dirX, + double dirY, + double dirZ, + {double falloffRadius = 1.0, + double spotLightConeInner = pi / 8, + double spotLightConeOuter = pi / 4, + double sunAngularRadius = 0.545, + double sunHaloSize = 10.0, + double sunHaloFallof = 80.0, + bool castShadows = true}) async { + var entity = await withIntCallback((callback) => add_light_ffi( + _viewer!, + type.index, + colour, + intensity, + posX, + posY, + posZ, + dirX, + dirY, + dirZ, + falloffRadius, + spotLightConeInner, + spotLightConeOuter, + sunAngularRadius = 0.545, + sunHaloSize = 10.0, + sunHaloFallof = 80.0, + castShadows, + callback)); + if (entity == _FILAMENT_ASSET_ERROR) { + throw Exception("Failed to add light to scene"); + } + + _scene.registerLight(entity); + return entity; + } + + /// + /// + /// + @override + Future removeLight(ThermionEntity entity) async { + _scene.unregisterLight(entity); + remove_light_ffi(_viewer!, entity); + } + + /// + /// + /// + @override + Future clearLights() async { + clear_lights_ffi(_viewer!); + + _scene.clearLights(); + } + + /// + /// + /// + @override + Future createInstance(ThermionEntity entity) async { + var created = await withIntCallback( + (callback) => create_instance(_sceneManager!, entity)); + if (created == _FILAMENT_ASSET_ERROR) { + throw Exception("Failed to create instance"); + } + return created; + } + + /// + /// + /// + @override + Future getInstanceCount(ThermionEntity entity) async { + return get_instance_count(_sceneManager!, entity); + } + + /// + /// + /// + @override + Future> getInstances(ThermionEntity entity) async { + var count = await getInstanceCount(entity); + var out = allocator(count); + get_instances(_sceneManager!, entity, out); + var instances = []; + for (int i = 0; i < count; i++) { + instances.add(out[i]); + } + allocator.free(out); + return instances; + } + + /// + /// + /// + @override + Future loadGlb(String path, + {bool unlit = false, int numInstances = 1}) async { + if (unlit) { + throw Exception("Not yet implemented"); + } + final pathPtr = path.toNativeUtf8(allocator: allocator).cast(); + var entity = await withIntCallback((callback) => + load_glb_ffi(_sceneManager!, pathPtr, numInstances, callback)); + allocator.free(pathPtr); + if (entity == _FILAMENT_ASSET_ERROR) { + throw Exception("An error occurred loading the asset at $path"); + } + _scene.registerEntity(entity); + + return entity; + } + + /// + /// + /// + @override + Future loadGltf(String path, String relativeResourcePath, + {bool force = false}) async { + // if (Platform.isWindows && !force) { + // throw Exception( + // "loadGltf has a race condition on Windows which is likely to crash your program. If you really want to try, pass force=true to loadGltf"); + // } + + final pathPtr = path.toNativeUtf8(allocator: allocator).cast(); + final relativeResourcePathPtr = + relativeResourcePath.toNativeUtf8(allocator: allocator).cast(); + var entity = await withIntCallback((callback) => load_gltf_ffi( + _sceneManager!, pathPtr, relativeResourcePathPtr, callback)); + allocator.free(pathPtr); + allocator.free(relativeResourcePathPtr); + if (entity == _FILAMENT_ASSET_ERROR) { + throw Exception("An error occurred loading the asset at $path"); + } + _scene.registerEntity(entity); + + return entity; + } + + /// + /// + /// + @override + Future panStart(double x, double y) async { + grab_begin(_viewer!, x * _pixelRatio, y * _pixelRatio, true); + } + + /// + /// + /// + @override + Future panUpdate(double x, double y) async { + grab_update(_viewer!, x * _pixelRatio, y * _pixelRatio); + } + + /// + /// + /// + @override + Future panEnd() async { + grab_end(_viewer!); + } + + /// + /// + /// + @override + Future rotateStart(double x, double y) async { + grab_begin(_viewer!, x * _pixelRatio, y * _pixelRatio, false); + } + + /// + /// + /// + @override + Future rotateUpdate(double x, double y) async { + grab_update(_viewer!, x * _pixelRatio, y * _pixelRatio); + } + + /// + /// + /// + @override + Future rotateEnd() async { + grab_end(_viewer!); + } + + /// + /// + /// + @override + Future setMorphTargetWeights( + ThermionEntity entity, List weights) async { + if (weights.isEmpty) { + throw Exception("Weights must not be empty"); + } + var weightsPtr = allocator(weights.length); + + for (int i = 0; i < weights.length; i++) { + weightsPtr[i] = weights[i]; + } + var success = await withBoolCallback((cb) { + set_morph_target_weights_ffi( + _sceneManager!, entity, weightsPtr, weights.length, cb); + }); + allocator.free(weightsPtr); + + if (!success) { + throw Exception( + "Failed to set morph target weights, check logs for details"); + } + } + + /// + /// + /// + @override + Future> getMorphTargetNames( + ThermionEntity entity, ThermionEntity childEntity) async { + var names = []; + + var count = await withIntCallback((callback) => + get_morph_target_name_count_ffi( + _sceneManager!, entity, childEntity, callback)); + var outPtr = allocator(255); + for (int i = 0; i < count; i++) { + get_morph_target_name(_sceneManager!, entity, childEntity, outPtr, i); + names.add(outPtr.cast().toDartString()); + } + allocator.free(outPtr); + return names.cast(); + } + + Future> getBoneNames(ThermionEntity entity, + {int skinIndex = 0}) async { + var count = get_bone_count(_sceneManager!, entity, skinIndex); + var out = allocator>(count); + for (int i = 0; i < count; i++) { + out[i] = allocator(255); + } + + get_bone_names(_sceneManager!, entity, out, skinIndex); + var names = []; + for (int i = 0; i < count; i++) { + var namePtr = out[i]; + names.add(namePtr.cast().toDartString()); + } + return names; + } + + /// + /// + /// + @override + Future> getAnimationNames(ThermionEntity entity) async { + var animationCount = get_animation_count(_sceneManager!, entity); + var names = []; + var outPtr = allocator(255); + for (int i = 0; i < animationCount; i++) { + get_animation_name(_sceneManager!, entity, outPtr, i); + names.add(outPtr.cast().toDartString()); + } + allocator.free(outPtr); + + return names; + } + + /// + /// + /// + @override + Future getAnimationDuration( + ThermionEntity entity, int animationIndex) async { + var duration = + get_animation_duration(_sceneManager!, entity, animationIndex); + + return duration; + } + + /// + /// + /// + @override + Future getAnimationDurationByName( + ThermionEntity entity, String name) async { + var animations = await getAnimationNames(entity); + var index = animations.indexOf(name); + if (index == -1) { + throw Exception("Failed to find animation $name"); + } + return getAnimationDuration(entity, index); + } + + /// + /// + /// + @override + Future setMorphAnimationData( + ThermionEntity entity, MorphAnimationData animation, + {List? targetMeshNames}) async { + var meshNames = await getChildEntityNames(entity, renderableOnly: true); + if (targetMeshNames != null) { + for (final targetMeshName in targetMeshNames) { + if (!meshNames.contains(targetMeshName)) { + throw Exception( + "Error: mesh ${targetMeshName} does not exist under the specified entity. Available meshes : ${meshNames}"); + } + } + } + + var meshEntities = await getChildEntities(entity, true); + + // Entities are not guaranteed to have the same morph targets (or share the same order), + // either from each other, or from those specified in [animation]. + // We therefore set morph targets separately for each mesh. + // For each mesh, allocate enough memory to hold FxM 32-bit floats + // (where F is the number of Frames, and M is the number of morph targets in the mesh). + // we call [extract] on [animation] to return frame data only for morph targets that present in both the mesh and the animation + for (int i = 0; i < meshNames.length; i++) { + var meshName = meshNames[i]; + var meshEntity = meshEntities[i]; + + if (targetMeshNames?.contains(meshName) == false) { + print("Skipping $meshName, not contained in target"); + continue; + } + + var meshMorphTargets = await getMorphTargetNames(entity, meshEntity); + + print("Got mesh morph targets ${meshMorphTargets}"); + + var intersection = animation.morphTargets + .toSet() + .intersection(meshMorphTargets.toSet()) + .toList(); + + if (intersection.isEmpty) { + throw Exception( + """No morph targets specified in animation are present on mesh $meshName. + If you weren't intending to animate every mesh, specify [targetMeshNames] when invoking this method. + Animation morph targets: ${animation.morphTargets}\n + Mesh morph targets ${meshMorphTargets} + Child meshes: ${meshNames}"""); + } + + var indices = + intersection.map((m) => meshMorphTargets.indexOf(m)).toList(); + + var frameData = animation.extract(morphTargets: intersection); + + assert(frameData.length == animation.numFrames * intersection.length); + + var dataPtr = allocator(frameData.length); + + // not currently working on WASM :( wasted a lot of time figuring that out as no error is thrown + // dataPtr + // .asTypedList(frameData.length) + // .setRange(0, frameData.length, frameData); + for (int i = 0; i < frameData.length; i++) { + dataPtr[i] = frameData[i]; + } + + final idxPtr = allocator(indices.length); + + for (int i = 0; i < indices.length; i++) { + idxPtr[i] = indices[i]; + } + + var result = set_morph_animation( + _sceneManager!, + meshEntity, + dataPtr, + idxPtr, + indices.length, + animation.numFrames, + animation.frameLengthInMs); + allocator.free(dataPtr); + allocator.free(idxPtr); + if (!result) { + throw Exception("Failed to set morph animation data for ${meshName}"); + } + } + } + + /// + /// Currently, scale is not supported. + /// + @override + Future addBoneAnimation(ThermionEntity entity, BoneAnimationData animation, + {int skinIndex = 0, + double fadeOutInSecs = 0.0, + double fadeInInSecs = 0.0, + double maxDelta=1.0}) async { + if (animation.space != Space.Bone && + animation.space != Space.ParentWorldRotation) { + throw UnimplementedError("TODO - support ${animation.space}"); + } + if (skinIndex != 0) { + throw UnimplementedError("TODO - support skinIndex != 0 "); + } + var boneNames = await getBoneNames(entity); + var restLocalTransformsRaw = allocator(boneNames.length * 16); + get_rest_local_transforms(_sceneManager!, entity, skinIndex, + restLocalTransformsRaw, boneNames.length); + var restLocalTransforms = []; + for (int i = 0; i < boneNames.length; i++) { + var values = []; + for (int j = 0; j < 16; j++) { + values.add(restLocalTransformsRaw[(i * 16) + j]); + } + restLocalTransforms.add(Matrix4.fromList(values)); + } + allocator.free(restLocalTransformsRaw); + + var numFrames = animation.frameData.length; + + var data = allocator(numFrames * 16); + + var bones = await Future.wait(List>.generate( + boneNames.length, (i) => getBone(entity, i))); + + for (int i = 0; i < animation.bones.length; i++) { + var boneName = animation.bones[i]; + var entityBoneIndex = boneNames.indexOf(boneName); + if (entityBoneIndex == -1) { + print("Warning : bone $boneName not found, skipping"); + continue; + } + var boneEntity = bones[entityBoneIndex]; + + var baseTransform = restLocalTransforms[entityBoneIndex]; + + var world = Matrix4.identity(); + // this odd use of ! is intentional, without it, the WASM optimizer gets in trouble + var parentBoneEntity = (await getParent(boneEntity))!; + while(true) { + if (!bones.contains(parentBoneEntity!)) { + break; + } + world = restLocalTransforms[bones.indexOf(parentBoneEntity!)] * world; + parentBoneEntity = (await getParent(parentBoneEntity))!; + } + + world = Matrix4.identity()..setRotation(world.getRotation()); + var worldInverse = Matrix4.identity()..copyInverse(world); + + for (int frameNum = 0; frameNum < numFrames; frameNum++) { + var rotation = animation.frameData[frameNum][i].rotation; + var translation = animation.frameData[frameNum][i].translation; + var frameTransform = + Matrix4.compose(translation, rotation, Vector3.all(1.0)); + var newLocalTransform = frameTransform.clone(); + if (animation.space == Space.Bone) { + newLocalTransform = baseTransform * frameTransform; + } else if (animation.space == Space.ParentWorldRotation) { + newLocalTransform = + baseTransform * (worldInverse * frameTransform * world); + } + for (int j = 0; j < 16; j++) { + data.elementAt((frameNum * 16) + j).value = + newLocalTransform.storage[j]; + } + } + + add_bone_animation( + _sceneManager!, + entity, + skinIndex, + entityBoneIndex, + data, + numFrames, + animation.frameLengthInMs, + fadeOutInSecs, + fadeInInSecs, + maxDelta); + } + allocator.free(data); + } + + /// + /// + /// + Future getLocalTransform(ThermionEntity entity) async { + final ptr = allocator(16); + + get_local_transform(_sceneManager!, entity, ptr); + var data = List.filled(16, 0.0); + for (int i = 0; i < 16; i++) { + data[i] = ptr[i]; + } + allocator.free(ptr); + return Matrix4.fromList(data); + } + + /// + /// + /// + Future getWorldTransform(ThermionEntity entity) async { + final ptr = allocator(16); + + get_world_transform(_sceneManager!, entity, ptr); + var data = List.filled(16, 0.0); + for (int i = 0; i < 16; i++) { + data[i] = ptr[i]; + } + allocator.free(ptr); + return Matrix4.fromList(data); + } + + /// + /// + /// + Future setTransform(ThermionEntity entity, Matrix4 transform) async { + final ptr = allocator(16); + for (int i = 0; i < 16; i++) { + ptr[i] = transform[i]; + } + set_transform(_sceneManager!, entity, ptr); + allocator.free(ptr); + } + + /// + /// + /// + Future updateBoneMatrices(ThermionEntity entity) async { + var result = await withBoolCallback((cb) { + update_bone_matrices_ffi(_sceneManager!, entity, cb); + }); + if (!result) { + throw Exception("Failed to update bone matrices"); + } + } + + /// + /// + /// + Future getInverseBindMatrix(ThermionEntity parent, int boneIndex, + {int skinIndex = 0}) async { + final ptr = allocator(16); + + get_inverse_bind_matrix(_sceneManager!, parent, skinIndex, boneIndex, ptr); + var data = List.filled(16, 0.0); + for (int i = 0; i < 16; i++) { + data[i] = ptr[i]; + } + allocator.free(ptr); + return Matrix4.fromList(data); + } + + /// + /// + /// + Future getBone(ThermionEntity parent, int boneIndex, + {int skinIndex = 0}) async { + if (skinIndex != 0) { + throw UnimplementedError("TOOD"); + } + return get_bone(_sceneManager!, parent, skinIndex, boneIndex); + } + + /// + /// + /// + @override + Future setBoneTransform( + ThermionEntity entity, int boneIndex, Matrix4 transform, + {int skinIndex = 0}) async { + if (skinIndex != 0) { + throw UnimplementedError("TOOD"); + } + final ptr = allocator(16); + for (int i = 0; i < 16; i++) { + ptr[i] = transform.storage[i]; + } + var result = await withBoolCallback((cb) { + set_bone_transform_ffi( + _sceneManager!, entity, skinIndex, boneIndex, ptr, cb); + }); + + allocator.free(ptr); + if (!result) { + throw Exception("Failed to set bone transform"); + } + } + + /// + /// + /// + /// + /// + /// + @override + Future resetBones(ThermionEntity entity) async { + if (_viewer == nullptr) { + throw Exception("No viewer available, ignoring"); + } + await withVoidCallback((cb) { + reset_to_rest_pose_ffi(_sceneManager!, entity, cb); + }); + } + + /// + /// + /// + /// + /// + /// + @override + Future removeEntity(ThermionEntity entity) async { + _scene.unregisterEntity(entity); + + await withVoidCallback( + (callback) => remove_entity_ffi(_viewer!, entity, callback)); + } + + /// + /// + /// + /// + /// + /// + @override + Future clearEntities() async { + await withVoidCallback((callback) { + clear_entities_ffi(_viewer!, callback); + }); + _scene.clearEntities(); + } + + /// + /// + /// + /// + /// + /// + @override + Future zoomBegin() async { + scroll_begin(_viewer!); + } + + /// + /// + /// + @override + Future zoomUpdate(double x, double y, double z) async { + scroll_update(_viewer!, x, y, z); + } + + /// + /// + /// + @override + Future zoomEnd() async { + scroll_end(_viewer!); + } + + /// + /// + /// + @override + Future playAnimation(ThermionEntity entity, int index, + {bool loop = false, + bool reverse = false, + bool replaceActive = true, + double crossfade = 0.0}) async { + play_animation( + _sceneManager!, entity, index, loop, reverse, replaceActive, crossfade); + } + + /// + /// + /// + @override + Future stopAnimation(ThermionEntity entity, int animationIndex) async { + stop_animation(_sceneManager!, entity, animationIndex); + } + + /// + /// + /// + @override + Future stopAnimationByName(ThermionEntity entity, String name) async { + var animations = await getAnimationNames(entity); + await stopAnimation(entity, animations.indexOf(name)); + } + + /// + /// + /// + @override + Future playAnimationByName(ThermionEntity entity, String name, + {bool loop = false, + bool reverse = false, + bool replaceActive = true, + double crossfade = 0.0, + bool wait = false}) async { + var animations = await getAnimationNames(entity); + var index = animations.indexOf(name); + var duration = await getAnimationDuration(entity, index); + print("Duration for $name : $duration"); + await playAnimation(entity, index, + loop: loop, + reverse: reverse, + replaceActive: replaceActive, + crossfade: crossfade); + if (wait) { + await Future.delayed(Duration(milliseconds: (duration * 1000).toInt())); + } + } + + /// + /// + /// + @override + Future setAnimationFrame( + ThermionEntity entity, int index, int animationFrame) async { + set_animation_frame(_sceneManager!, entity, index, animationFrame); + } + + /// + /// + /// + @override + Future setMainCamera() async { + set_main_camera(_viewer!); + } + + Future getMainCamera() async { + return get_main_camera(_viewer!); + } + + /// + /// + /// + @override + Future setCamera(ThermionEntity entity, String? name) async { + var cameraNamePtr = + name?.toNativeUtf8(allocator: allocator).cast() ?? nullptr; + var result = set_camera(_viewer!, entity, cameraNamePtr); + allocator.free(cameraNamePtr); + if (!result) { + throw Exception("Failed to set camera"); + } + } + + /// + /// + /// + @override + Future setToneMapping(ToneMapper mapper) async { + set_tone_mapping_ffi(_viewer!, mapper.index); + } + + /// + /// + /// + @override + Future setPostProcessing(bool enabled) async { + set_post_processing_ffi(_viewer!, enabled); + } + + /// + /// + /// + @override + Future setAntiAliasing(bool msaa, bool fxaa, bool taa) async { + set_antialiasing(_viewer!, msaa, fxaa, taa); + } + + /// + /// + /// + @override + Future setBloom(double bloom) async { + set_bloom_ffi(_viewer!, bloom); + } + + /// + /// + /// + @override + Future setCameraFocalLength(double focalLength) async { + set_camera_focal_length(_viewer!, focalLength); + } + + /// + /// + /// + @override + Future setCameraFov(double degrees, double width, double height) async { + set_camera_fov(_viewer!, degrees, width / height); + } + + /// + /// + /// + @override + Future setCameraCulling(double near, double far) async { + set_camera_culling(_viewer!, near, far); + } + + /// + /// + /// + @override + Future getCameraCullingNear() async { + return get_camera_culling_near(_viewer!); + } + + /// + /// + /// + @override + Future getCameraCullingFar() async { + return get_camera_culling_far(_viewer!); + } + + /// + /// + /// + @override + Future setCameraFocusDistance(double focusDistance) async { + set_camera_focus_distance(_viewer!, focusDistance); + } + + /// + /// + /// + @override + Future setCameraPosition(double x, double y, double z) async { + set_camera_position(_viewer!, x, y, z); + } + + /// + /// + /// + @override + Future moveCameraToAsset(ThermionEntity entity) async { + move_camera_to_asset(_viewer!, entity); + } + + /// + /// + /// + @override + Future setViewFrustumCulling(bool enabled) async { + set_view_frustum_culling(_viewer!, enabled); + } + + /// + /// + /// + @override + Future setCameraExposure( + double aperture, double shutterSpeed, double sensitivity) async { + set_camera_exposure(_viewer!, aperture, shutterSpeed, sensitivity); + } + + /// + /// + /// + @override + Future setCameraRotation(Quaternion quaternion) async { + set_camera_rotation( + _viewer!, quaternion.w, quaternion.x, quaternion.y, quaternion.z); + } + + /// + /// + /// + @override + Future setCameraModelMatrix(List matrix) async { + assert(matrix.length == 16); + var ptr = allocator(16); + for (int i = 0; i < 16; i++) { + ptr.elementAt(i).value = matrix[i]; + } + set_camera_model_matrix(_viewer!, ptr); + allocator.free(ptr); + } + + /// + /// + /// + @override + Future setMaterialColor(ThermionEntity entity, String meshName, + int materialIndex, double r, double g, double b, double a) async { + var meshNamePtr = meshName.toNativeUtf8(allocator: allocator).cast(); + var result = set_material_color( + _sceneManager!, entity, meshNamePtr, materialIndex, r, g, b, a); + allocator.free(meshNamePtr); + if (!result) { + throw Exception("Failed to set material color"); + } + } + + /// + /// + /// + @override + Future transformToUnitCube(ThermionEntity entity) async { + transform_to_unit_cube(_sceneManager!, entity); + } + + /// + /// + /// + @override + Future setPosition( + ThermionEntity entity, double x, double y, double z) async { + set_position(_sceneManager!, entity, x, y, z); + } + + /// + /// + /// + @override + Future setRotationQuat(ThermionEntity entity, Quaternion rotation, + {bool relative = false}) async { + set_rotation(_sceneManager!, entity, rotation.radians, rotation.x, + rotation.y, rotation.z, rotation.w); + } + + /// + /// + /// + @override + Future setRotation( + ThermionEntity entity, double rads, double x, double y, double z) async { + var quat = Quaternion.axisAngle(Vector3(x, y, z), rads); + await setRotationQuat(entity, quat); + } + + /// + /// + /// + @override + Future setScale(ThermionEntity entity, double scale) async { + set_scale(_sceneManager!, entity, scale); + } + + Future queueRotationUpdateQuat(ThermionEntity entity, Quaternion rotation, + {bool relative = false}) async { + queue_rotation_update(_sceneManager!, entity, rotation.radians, rotation.x, + rotation.y, rotation.z, rotation.w, relative); + } + + /// + /// + /// + @override + Future queueRotationUpdate( + ThermionEntity entity, double rads, double x, double y, double z, + {bool relative = false}) async { + var quat = Quaternion.axisAngle(Vector3(x, y, z), rads); + await queueRotationUpdateQuat(entity, quat, relative: relative); + } + + /// + /// + /// + @override + Future queuePositionUpdate( + ThermionEntity entity, double x, double y, double z, + {bool relative = false}) async { + queue_position_update(_sceneManager!, entity, x, y, z, relative); + } + + /// + /// + /// + @override + Future hide(ThermionEntity entity, String? meshName) async { + final meshNamePtr = + meshName?.toNativeUtf8(allocator: allocator).cast() ?? nullptr; + if (hide_mesh(_sceneManager!, entity, meshNamePtr) != 1) {} + allocator.free(meshNamePtr); + } + + /// + /// + /// + @override + Future reveal(ThermionEntity entity, String? meshName) async { + final meshNamePtr = + meshName?.toNativeUtf8(allocator: allocator).cast() ?? nullptr; + final result = reveal_mesh(_sceneManager!, entity, meshNamePtr) == 1; + allocator.free(meshNamePtr); + if (!result) { + throw Exception("Failed to reveal mesh $meshName"); + } + } + + /// + /// + /// + @override + String? getNameForEntity(ThermionEntity entity) { + final result = get_name_for_entity(_sceneManager!, entity); + if (result == nullptr) { + return null; + } + return result.cast().toDartString(); + } + + void _onPickResult(ThermionEntity entityId, int x, int y) { + _pickResultController.add(( + entity: entityId, + x: (x / _pixelRatio).toDouble(), + y: (viewportDimensions.$2 - y) / _pixelRatio + )); + _scene.registerSelected(entityId); + } + + late NativeCallable + _onPickResultCallable; + + /// + /// + /// + @override + void pick(int x, int y) async { + _scene.unregisterSelected(); + + filament_pick( + _viewer!, + (x * _pixelRatio).toInt(), + (viewportDimensions.$2 - (y * _pixelRatio)).toInt(), + _onPickResultCallable.nativeFunction); + } + + /// + /// + /// + @override + Future getCameraViewMatrix() async { + if (_viewer == null) { + throw Exception("No viewer available"); + } + var arrayPtr = get_camera_view_matrix(_viewer!); + var viewMatrix = Matrix4.fromList(arrayPtr.asTypedList(16)); + allocator.free(arrayPtr); + return viewMatrix; + } + + /// + /// + /// + @override + Future getCameraModelMatrix() async { + if (_viewer == null) { + throw Exception("No viewer available"); + } + var arrayPtr = get_camera_model_matrix(_viewer!); + var modelMatrix = Matrix4.fromList(arrayPtr.asTypedList(16)); + allocator.free(arrayPtr); + return modelMatrix; + } + + /// + /// + /// + @override + Future getCameraPosition() async { + if (_viewer == null) { + throw Exception("No viewer available"); + } + var arrayPtr = get_camera_model_matrix(_viewer!); + var doubleList = arrayPtr.asTypedList(16); + var modelMatrix = Matrix4.fromFloat64List(doubleList); + + var position = modelMatrix.getColumn(3).xyz; + + thermion_flutter_free(arrayPtr.cast()); + return position; + } + + /// + /// + /// + @override + Future getCameraRotation() async { + if (_viewer == null) { + throw Exception("No viewer available"); + } + var arrayPtr = get_camera_model_matrix(_viewer!); + var doubleList = arrayPtr.asTypedList(16); + var modelMatrix = Matrix4.fromFloat64List(doubleList); + var rotationMatrix = Matrix3.identity(); + modelMatrix.copyRotation(rotationMatrix); + thermion_flutter_free(arrayPtr.cast()); + return rotationMatrix; + } + + ManipulatorMode _cameraMode = ManipulatorMode.ORBIT; + + /// + /// + /// + @override + Future setCameraManipulatorOptions( + {ManipulatorMode? mode, + double orbitSpeedX = 0.01, + double orbitSpeedY = 0.01, + double zoomSpeed = 0.01}) async { + if (mode != null) { + _cameraMode = mode; + } + if (_cameraMode != ManipulatorMode.ORBIT) { + throw Exception("Manipulator mode $mode not yet implemented"); + } + set_camera_manipulator_options( + _viewer!, _cameraMode.index, orbitSpeedX, orbitSpeedX, zoomSpeed); + } + + /// + /// I don't think these two methods are accurate - don't rely on them, use the Frustum values instead. + /// I think because we use [setLensProjection] and [setScaling] together, this projection matrix doesn't accurately reflect the field of view (because it's using an additional scaling matrix). + /// Also, the near/far planes never seem to get updated (which is what I would expect to see when calling [getCameraCullingProjectionMatrix]) + /// + /// + /// + /// + @override + Future getCameraProjectionMatrix() async { + if (_viewer == null) { + throw Exception("No viewer available"); + } + + print( + "WARNING: getCameraProjectionMatrix and getCameraCullingProjectionMatrix are not reliable. Consider these broken"); + + var arrayPtr = get_camera_projection_matrix(_viewer!); + var doubleList = arrayPtr.asTypedList(16); + var projectionMatrix = Matrix4.fromList(doubleList); + thermion_flutter_free(arrayPtr.cast()); + return projectionMatrix; + } + + /// + /// + /// + @override + Future getCameraCullingProjectionMatrix() async { + if (_viewer == null) { + throw Exception("No viewer available"); + } + print( + "WARNING: getCameraProjectionMatrix and getCameraCullingProjectionMatrix are not reliable. Consider these broken"); + var arrayPtr = get_camera_culling_projection_matrix(_viewer!); + var doubleList = arrayPtr.asTypedList(16); + var projectionMatrix = Matrix4.fromList(doubleList); + thermion_flutter_free(arrayPtr.cast()); + return projectionMatrix; + } + + /// + /// + /// + @override + Future getCameraFrustum() async { + if (_viewer == null) { + throw Exception("No viewer available"); + } + var arrayPtr = get_camera_frustum(_viewer!); + var doubleList = arrayPtr.asTypedList(24); + print(doubleList); + + var frustum = Frustum(); + frustum.plane0.setFromComponents( + doubleList[0], doubleList[1], doubleList[2], doubleList[3]); + frustum.plane1.setFromComponents( + doubleList[4], doubleList[5], doubleList[6], doubleList[7]); + frustum.plane2.setFromComponents( + doubleList[8], doubleList[9], doubleList[10], doubleList[11]); + frustum.plane3.setFromComponents( + doubleList[12], doubleList[13], doubleList[14], doubleList[15]); + frustum.plane4.setFromComponents( + doubleList[16], doubleList[17], doubleList[18], doubleList[19]); + frustum.plane5.setFromComponents( + doubleList[20], doubleList[21], doubleList[22], doubleList[23]); + thermion_flutter_free(arrayPtr.cast()); + return frustum; + } + + /// + /// + /// + @override + Future getChildEntity( + ThermionEntity parent, String childName) async { + var childNamePtr = + childName.toNativeUtf8(allocator: allocator).cast(); + + var childEntity = + find_child_entity_by_name(_sceneManager!, parent, childNamePtr); + allocator.free(childNamePtr); + if (childEntity == _FILAMENT_ASSET_ERROR) { + throw Exception( + "Could not find child ${childName} under the specified entity"); + } + return childEntity; + } + + Future> getChildEntities( + ThermionEntity parent, bool renderableOnly) async { + var count = get_entity_count(_sceneManager!, parent, renderableOnly); + var out = allocator(count); + get_entities(_sceneManager!, parent, renderableOnly, out); + var outList = + List.generate(count, (index) => out[index]).cast(); + allocator.free(out); + return outList; + } + + /// + /// + /// + @override + Future> getChildEntityNames(ThermionEntity entity, + {bool renderableOnly = false}) async { + var count = get_entity_count(_sceneManager!, entity, renderableOnly); + var names = []; + for (int i = 0; i < count; i++) { + var name = get_entity_name_at(_sceneManager!, entity, i, renderableOnly); + if (name == nullptr) { + throw Exception("Failed to find mesh at index $i"); + } + names.add(name.cast().toDartString()); + } + return names; + } + + /// + /// + /// + @override + Future setRecording(bool recording) async { + set_recording(_viewer!, recording); + } + + /// + /// + /// + @override + Future setRecordingOutputDirectory(String outputDir) async { + var pathPtr = outputDir.toNativeUtf8(allocator: allocator); + set_recording_output_directory(_viewer!, pathPtr.cast()); + allocator.free(pathPtr); + } + + final _collisions = {}; + + /// + /// + /// + @override + Future addCollisionComponent(ThermionEntity entity, + {void Function(int entityId1, int entityId2)? callback, + bool affectsTransform = false}) async { + if (_sceneManager == null) { + throw Exception("SceneManager must be non-null"); + } + // ignore: sdk_version_since + + if (callback != null) { + var ptr = NativeCallable< + Void Function(Int32 entityId1, Int32 entityId2)>.listener(callback); + add_collision_component( + _sceneManager!, entity, ptr.nativeFunction, affectsTransform); + _collisions[entity] = ptr; + } else { + add_collision_component( + _sceneManager!, entity, nullptr, affectsTransform); + } + } + + /// + /// + /// + @override + Future removeCollisionComponent(ThermionEntity entity) async { + remove_collision_component(_sceneManager!, entity); + } + + /// + /// + /// + @override + Future addAnimationComponent(ThermionEntity entity) async { + if (!add_animation_component(_sceneManager!, entity)) { + throw Exception("Failed to add animation component"); + } + } + + /// + /// + /// + Future removeAnimationComponent(ThermionEntity entity) async { + remove_animation_component(_sceneManager!, entity); + } + + /// + /// + /// + @override + Future createGeometry( + List vertices, List indices, + {String? materialPath, + PrimitiveType primitiveType = PrimitiveType.TRIANGLES}) async { + if (_viewer == null) { + throw Exception("Viewer must not be null"); + } + + final materialPathPtr = + materialPath?.toNativeUtf8(allocator: allocator) ?? nullptr; + final vertexPtr = allocator(vertices.length); + final indicesPtr = allocator(indices.length); + for (int i = 0; i < vertices.length; i++) { + vertexPtr.elementAt(i).value = vertices[i]; + } + + for (int i = 0; i < indices.length; i++) { + (indicesPtr + i).value = indices[i]; + } + + var entity = await withIntCallback((callback) => create_geometry_ffi( + _viewer!, + vertexPtr, + vertices.length, + indicesPtr, + indices.length, + primitiveType.index, + materialPathPtr.cast(), + callback)); + if (entity == _FILAMENT_ASSET_ERROR) { + throw Exception("Failed to create geometry"); + } + + _scene.registerEntity(entity); + + allocator.free(materialPathPtr); + allocator.free(vertexPtr); + allocator.free(indicesPtr); + + return entity; + } + + /// + /// + /// + @override + Future setParent(ThermionEntity child, ThermionEntity parent) async { + if (_sceneManager == null) { + throw Exception("Asset manager must be non-null"); + } + set_parent(_sceneManager!, child, parent); + } + + /// + /// + /// + @override + Future getParent(ThermionEntity child) async { + if (_sceneManager == null) { + throw Exception("Asset manager must be non-null"); + } + var parent = get_parent(_sceneManager!, child); + if (parent == _FILAMENT_ASSET_ERROR) { + return null; + } + return parent; + } + + /// + /// + /// + @override + Future testCollisions(ThermionEntity entity) async { + test_collisions(_sceneManager!, entity); + } + + /// + /// + /// + @override + Future setPriority(ThermionEntity entityId, int priority) async { + set_priority(_sceneManager!, entityId, priority); + } +} diff --git a/thermion_dart/lib/thermion_dart/utils/camera_orientation.dart b/thermion_dart/lib/thermion_dart/utils/camera_orientation.dart new file mode 100644 index 00000000..3e800836 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/utils/camera_orientation.dart @@ -0,0 +1,15 @@ +import 'package:vector_math/vector_math_64.dart' as v; + +class CameraOrientation { + v.Vector3 position = v.Vector3(0, 0, 0); + + var rotationX = 0.0; + var rotationY = 0.0; + var rotationZ = 0.0; + + v.Quaternion compose() { + return v.Quaternion.axisAngle(v.Vector3(0, 0, 1), rotationZ) * + v.Quaternion.axisAngle(v.Vector3(0, 1, 0), rotationY) * + v.Quaternion.axisAngle(v.Vector3(1, 0, 0), rotationX); + } +} diff --git a/thermion_dart/lib/thermion_dart/utils/dart_resources.dart b/thermion_dart/lib/thermion_dart/utils/dart_resources.dart new file mode 100644 index 00000000..e9b0f71d --- /dev/null +++ b/thermion_dart/lib/thermion_dart/utils/dart_resources.dart @@ -0,0 +1,27 @@ +import 'dart:ffi'; +import 'dart:io'; +import '../compatibility/compatibility.dart'; + +class DartResourceLoader { + static final _assets = {}; + static void loadResource(Pointer uri, Pointer out) { + try { + var data = File(uri.cast().toDartString().replaceAll("file://", "")) + .readAsBytesSync(); + var ptr = calloc(data.lengthInBytes); + ptr.asTypedList(data.lengthInBytes).setRange(0, data.lengthInBytes, data); + + out.ref.data = ptr.cast(); + out.ref.size = data.lengthInBytes; + out.ref.id = _assets.length; + _assets[out.ref.id] = ptr; + } catch (err) { + print(err); + out.ref.size = -1; + } + } + + static void freeResource(ResourceBuffer rb) { + calloc.free(_assets[rb.id]!); + } +} diff --git a/thermion_dart/lib/thermion_dart/utils/light_options.dart b/thermion_dart/lib/thermion_dart/utils/light_options.dart new file mode 100644 index 00000000..76f7b187 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/utils/light_options.dart @@ -0,0 +1,29 @@ +import 'package:vector_math/vector_math_64.dart' as v; + +class LightOptions { + String? iblPath; + double iblIntensity; + int directionalType; + double directionalColor; + double directionalIntensity; + bool directionalCastShadows; + late v.Vector3 directionalPosition; + late v.Vector3 directionalDirection; + + LightOptions( + {required this.iblPath, + required this.iblIntensity, + required this.directionalType, + required this.directionalColor, + required this.directionalIntensity, + required this.directionalCastShadows, + v.Vector3? directionalDirection, + v.Vector3? directionalPosition}) { + this.directionalDirection = directionalDirection == null + ? v.Vector3(0, -1, 0) + : directionalDirection; + this.directionalPosition = directionalPosition == null + ? v.Vector3(0, 100, 0) + : directionalPosition; + } +} diff --git a/thermion_dart/lib/thermion_dart/utils/using_pointer.dart b/thermion_dart/lib/thermion_dart/utils/using_pointer.dart new file mode 100644 index 00000000..d192ec03 --- /dev/null +++ b/thermion_dart/lib/thermion_dart/utils/using_pointer.dart @@ -0,0 +1,10 @@ +import 'dart:ffi'; + +import 'package:ffi/ffi.dart'; + +final allocator = calloc; + +void using(Pointer ptr, Future Function(Pointer ptr) function) async { + await function.call(ptr); + allocator.free(ptr); +} diff --git a/ios/Assets/.gitkeep b/thermion_dart/native/.gitattributes similarity index 100% rename from ios/Assets/.gitkeep rename to thermion_dart/native/.gitattributes diff --git a/ios/include/FilamentViewer.hpp b/thermion_dart/native/include/FilamentViewer.hpp similarity index 60% rename from ios/include/FilamentViewer.hpp rename to thermion_dart/native/include/FilamentViewer.hpp index c1881389..52cc7ff6 100644 --- a/ios/include/FilamentViewer.hpp +++ b/thermion_dart/native/include/FilamentViewer.hpp @@ -32,19 +32,21 @@ #include #include -#include "AssetManager.hpp" +#include "ResourceBuffer.hpp" +#include "SceneManager.hpp" +#include "ThreadPool.hpp" -using namespace std; -using namespace filament; -using namespace filament::math; -using namespace gltfio; -using namespace camutils; - -typedef int32_t EntityId; - -namespace polyvox +namespace thermion_filament { + typedef std::chrono::time_point time_point_t; + + using namespace std::chrono; + using namespace filament; + using namespace filament::math; + using namespace gltfio; + using namespace camutils; + enum ToneMapping { ACES, @@ -54,8 +56,11 @@ namespace polyvox class FilamentViewer { + + typedef int32_t EntityId; + public: - FilamentViewer(const void *context, const ResourceLoaderWrapper *const resourceLoaderWrapper, void *const platform = nullptr, const char *uberArchivePath = nullptr); + FilamentViewer(const void *context, const ResourceLoaderWrapperImpl *const resourceLoaderWrapper, void *const platform = nullptr, const char *uberArchivePath = nullptr); ~FilamentViewer(); void setToneMapping(ToneMapping toneMapping); @@ -65,9 +70,10 @@ namespace polyvox void loadIbl(const char *const iblUri, float intensity); void removeIbl(); + void rotateIbl(const math::mat3f &matrix); - void removeAsset(EntityId asset); - void clearAssets(); + void removeEntity(EntityId asset); + void clearEntities(); void updateViewportAndCameraProjection(int height, int width, float scaleFactor); void render( @@ -78,6 +84,9 @@ namespace polyvox void setFrameInterval(float interval); bool setCamera(EntityId asset, const char *nodeName); + void setMainCamera(); + EntityId getMainCamera(); + void setCameraFov(double fovDegrees, double aspect); void createSwapChain(const void *surface, uint32_t width, uint32_t height); void destroySwapChain(); @@ -90,14 +99,13 @@ namespace polyvox void setBackgroundImage(const char *resourcePath, bool fillHeight); void clearBackgroundImage(); void setBackgroundImagePosition(float x, float y, bool clamp); - // Camera methods void moveCameraToAsset(EntityId entityId); void setViewFrustumCulling(bool enabled); void setCameraExposure(float aperture, float shutterSpeed, float sensitivity); void setCameraPosition(float x, float y, float z); - void setCameraRotation(float rads, float x, float y, float z); + void setCameraRotation(float w, float x, float y, float z); const math::mat4 getCameraModelMatrix(); const math::mat4 getCameraViewMatrix(); const math::mat4 getCameraProjectionMatrix(); @@ -107,6 +115,8 @@ namespace polyvox void setCameraProjectionMatrix(const double *const matrix, double near, double far); void setCameraFocalLength(float focalLength); void setCameraCulling(double near, double far); + double getCameraCullingNear(); + double getCameraCullingFar(); void setCameraFocusDistance(float focusDistance); void setCameraManipulatorOptions(filament::camutils::Mode mode, double orbitSpeedX, double orbitSpeedY, double zoomSpeed); void grabBegin(float x, float y, bool pan); @@ -115,26 +125,49 @@ namespace polyvox void scrollBegin(); void scrollUpdate(float x, float y, float delta); void scrollEnd(); - void pick(uint32_t x, uint32_t y, EntityId *entityId); - - EntityId addLight(LightManager::Type t, float colour, float intensity, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, bool shadows); + void pick(uint32_t x, uint32_t y, void (*callback)(EntityId entityId, int x, int y)); + + EntityId addLight( + LightManager::Type t, + float colour, + float intensity, + float posX, + float posY, + float posZ, + float dirX, + float dirY, + float dirZ, + float falloffRadius, + float spotLightConeInner, + float spotLightConeOuter, + float sunAngularRadius, + float sunHaloSize, + float sunHaloFallof, + bool shadows); void removeLight(EntityId entityId); void clearLights(); void setPostProcessing(bool enabled); + void setRecording(bool recording); + void setRecordingOutputDirectory(const char *path); - AssetManager *const getAssetManager() + void setAntiAliasing(bool msaaEnabled, bool fxaaEnabled, bool taaEnabled); + void setDepthOfField(); + + EntityId createGeometry(float *vertices, uint32_t numVertices, uint16_t *indices, uint32_t numIndices, filament::RenderableManager::PrimitiveType primitiveType = RenderableManager::PrimitiveType::TRIANGLES, const char *materialPath = nullptr); + + SceneManager *const getSceneManager() { - return (AssetManager *const)_assetManager; + return (SceneManager *const)_sceneManager; } private: - const ResourceLoaderWrapper *const _resourceLoaderWrapper; - + const ResourceLoaderWrapperImpl *const _resourceLoaderWrapper; + void* _context = nullptr; Scene *_scene = nullptr; View *_view = nullptr; Engine *_engine = nullptr; - + thermion_filament::ThreadPool *_tp = nullptr; Renderer *_renderer = nullptr; RenderTarget *_rt = nullptr; Texture *_rtColor = nullptr; @@ -142,24 +175,22 @@ namespace polyvox SwapChain *_swapChain = nullptr; - AssetManager *_assetManager = nullptr; - - NameComponentManager *_ncm = nullptr; + SceneManager *_sceneManager = nullptr; std::mutex mtx; // mutex to ensure thread safety when removing assets - vector _lights; + std::vector _lights; Texture *_skyboxTexture = nullptr; Skybox *_skybox = nullptr; Texture *_iblTexture = nullptr; IndirectLight *_indirectLight = nullptr; - bool _recomputeAabb = false; - bool _actualSize = false; + float _frameInterval = 1000.0 / 60.0; + // Camera properties - Camera *_mainCamera = nullptr; // the default camera added to every scene. If you want the *active* camera, access via View. + Camera *_mainCamera = nullptr; // the default camera added to every scene. If you want the *active* camera, access via View. float _cameraFocalLength = 28.0f; float _cameraFocusDistance = 0.0f; Manipulator *_manipulator = nullptr; @@ -170,8 +201,8 @@ namespace polyvox math::mat4f _cameraPosition; math::mat4f _cameraRotation; void _createManipulator(); - double _near = 0.05; - double _far = 1000.0; + double _near = 0.05; + double _far = 1000.0; ColorGrading *colorGrading = nullptr; @@ -180,18 +211,32 @@ namespace polyvox uint32_t _imageWidth = 0; mat4f _imageScale; Texture *_imageTexture = nullptr; - utils::Entity *_imageEntity = nullptr; + utils::Entity _imageEntity; VertexBuffer *_imageVb = nullptr; IndexBuffer *_imageIb = nullptr; Material *_imageMaterial = nullptr; TextureSampler _imageSampler; - void loadKtx2Texture(string path, ResourceBuffer data); - void loadKtxTexture(string path, ResourceBuffer data); - void loadPngTexture(string path, ResourceBuffer data); - void loadTextureFromPath(string path); - + void loadKtx2Texture(std::string path, ResourceBuffer data); + void loadKtxTexture(std::string path, ResourceBuffer data); + void loadPngTexture(std::string path, ResourceBuffer data); + void loadTextureFromPath(std::string path); + void savePng(void *data, size_t size, int frameNumber); - uint32_t _lastFrameTimeInNanos; + time_point_t _recordingStartTime = std::chrono::high_resolution_clock::now(); + time_point_t _fpsCounterStartTime = std::chrono::high_resolution_clock::now(); + + bool _recording = false; + std::string _recordingOutputDirectory = std::string("/tmp"); + std::mutex _recordingMutex; + double _cumulativeAnimationUpdateTime = 0; + int _frameCount = 0; + int _skippedFrames = 0; + }; + + struct FrameCallbackData + { + FilamentViewer *viewer; + uint32_t frameNumber; }; } diff --git a/ios/include/Log.hpp b/thermion_dart/native/include/Log.hpp similarity index 95% rename from ios/include/Log.hpp rename to thermion_dart/native/include/Log.hpp index 7db45b76..2da5dd22 100644 --- a/ios/include/Log.hpp +++ b/thermion_dart/native/include/Log.hpp @@ -7,7 +7,7 @@ #import #elif defined __ANDROID__ #include -#define LOGTAG "FlutterFilament" +#define LOGTAG "ThermionFlutter" #else #include #include diff --git a/thermion_dart/native/include/ResourceBuffer.h b/thermion_dart/native/include/ResourceBuffer.h new file mode 100644 index 00000000..eab0ee0d --- /dev/null +++ b/thermion_dart/native/include/ResourceBuffer.h @@ -0,0 +1,44 @@ +#ifndef RESOURCE_BUFFER_H +#define RESOURCE_BUFFER_H + +#include +#include + +// +// A ResourceBuffer is a unified interface for working with +// binary assets across various platforms. +// This is simply: +// 1) a pointer to some data +// 2) the length of the data +// 3) an ID that can be passed back to the native platform to release the underlying asset when needed. +// +typedef struct ResourceBuffer +{ + const void *const data; + const int32_t size; + const int32_t id; + +#if defined(__cplusplus) + ResourceBuffer(void *const data, int32_t size, int32_t id) : data(data), size(size), id(id) {} +#endif +} ResourceBuffer; + +typedef void (*LoadFilamentResourceIntoOutPointer)(const char *uri, ResourceBuffer *out); +typedef ResourceBuffer (*LoadFilamentResource)(const char *uri); +typedef ResourceBuffer (*LoadFilamentResourceFromOwner)(const char *const, void *const owner); +typedef void (*FreeFilamentResource)(ResourceBuffer); +typedef void (*FreeFilamentResourceFromOwner)(ResourceBuffer, void *const owner); + +typedef struct ResourceLoaderWrapper +{ + LoadFilamentResource loadResource; + FreeFilamentResource freeResource; + LoadFilamentResourceFromOwner loadFromOwner; + FreeFilamentResourceFromOwner freeFromOwner; + void *owner; + LoadFilamentResourceIntoOutPointer loadToOut; +} ResourceLoaderWrapper; + +void *make_resource_loader(LoadFilamentResourceFromOwner loadFn, FreeFilamentResourceFromOwner freeFn, void *const owner); + +#endif diff --git a/thermion_dart/native/include/ResourceBuffer.hpp b/thermion_dart/native/include/ResourceBuffer.hpp new file mode 100644 index 00000000..57c68bda --- /dev/null +++ b/thermion_dart/native/include/ResourceBuffer.hpp @@ -0,0 +1,76 @@ +#ifndef RESOURCE_BUFFER_HPP +#define RESOURCE_BUFFER_HPP + +#include "ResourceBuffer.h" + +#if defined(__cplusplus) +#ifndef __EMSCRIPTEN__ +#include +using namespace std::chrono_literals; +#endif + +namespace thermion_filament +{ + + struct ResourceLoaderWrapperImpl : public ResourceLoaderWrapper + { + + ResourceLoaderWrapperImpl(LoadFilamentResource loader, FreeFilamentResource freeResource) + { + loadFromOwner = nullptr; + freeFromOwner = nullptr; + loadResource = loader; + freeResource = freeResource; + owner = nullptr; + } + + ResourceLoaderWrapperImpl(LoadFilamentResourceFromOwner loader, FreeFilamentResourceFromOwner freeResource, void *owner) + { + loadResource = nullptr; + freeResource = nullptr; + loadFromOwner = loader; + freeFromOwner = freeResource; + owner = owner; + } + + ResourceBuffer load(const char *uri) const + { + if (loadToOut) + { + ResourceBuffer rb(nullptr, 0, -1); + loadToOut(uri, &rb); + while (rb.size == 0) + { + #if! __EMSCRIPTEN__ + std::this_thread::sleep_for(100ms); + #endif + } + + return rb; + } + else if (loadFromOwner) + { + auto rb = loadFromOwner(uri, owner); + return rb; + } + auto rb = loadResource(uri); + return rb; + } + + void free(ResourceBuffer rb) const + { + if (freeFromOwner) + { + freeFromOwner(rb, owner); + } + else + { + freeResource(rb); + } + } + }; + +} +#endif + +#endif diff --git a/thermion_dart/native/include/SceneManager.hpp b/thermion_dart/native/include/SceneManager.hpp new file mode 100644 index 00000000..f9f6efaa --- /dev/null +++ b/thermion_dart/native/include/SceneManager.hpp @@ -0,0 +1,208 @@ +#pragma once + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include + +#include "material/gizmo.h" +#include "utils/NameComponentManager.h" +#include "ResourceBuffer.hpp" +#include "components/CollisionComponentManager.hpp" +#include "components/AnimationComponentManager.hpp" + +#include "tsl/robin_map.h" + +namespace thermion_filament +{ + typedef int32_t EntityId; + + using namespace filament; + using namespace filament::gltfio; + using namespace utils; + using std::string; + using std::unique_ptr; + using std::vector; + + class SceneManager + { + public: + SceneManager(const ResourceLoaderWrapperImpl *const loader, + Engine *engine, + Scene *scene, + const char *uberArchivePath); + ~SceneManager(); + + EntityId loadGltf(const char *uri, const char *relativeResourcePath); + + //// + /// @brief Load the GLB from the specified path, optionally creating multiple instances. + /// @param uri the path to the asset. Should be either asset:// (representing a Flutter asset), or file:// (representing a filesystem file). + /// @param numInstances the number of instances to create. + /// @return an Entity representing the FilamentAsset associated with the loaded FilamentAsset. + /// + EntityId loadGlb(const char *uri, int numInstances); + EntityId loadGlbFromBuffer(const uint8_t *data, size_t length, int numInstances = 1); + EntityId createInstance(EntityId entityId); + + void remove(EntityId entity); + void destroyAll(); + unique_ptr> getAnimationNames(EntityId entity); + float getAnimationDuration(EntityId entity, int animationIndex); + + unique_ptr> getMorphTargetNames(EntityId assetEntityId, EntityId childEntity); + unique_ptr> getBoneNames(EntityId assetEntityId, EntityId childEntity); + void transformToUnitCube(EntityId e); + inline void updateTransform(EntityId e); + void setScale(EntityId e, float scale); + void setPosition(EntityId e, float x, float y, float z); + void setRotation(EntityId e, float rads, float x, float y, float z, float w); + void queuePositionUpdate(EntityId e, float x, float y, float z, bool relative); + void queueRotationUpdate(EntityId e, float rads, float x, float y, float z, float w, bool relative); + const utils::Entity *getCameraEntities(EntityId e); + size_t getCameraEntityCount(EntityId e); + const utils::Entity *getLightEntities(EntityId e) noexcept; + size_t getLightEntityCount(EntityId e) noexcept; + + void updateAnimations(); + void updateTransforms(); + void testCollisions(EntityId entity); + bool setMaterialColor(EntityId e, const char *meshName, int materialInstance, const float r, const float g, const float b, const float a); + + bool setMorphAnimationBuffer( + EntityId entityId, + const float *const morphData, + const int *const morphIndices, + int numMorphTargets, + int numFrames, + float frameLengthInMs); + + bool setMorphTargetWeights(EntityId entityId, const float *const weights, int count); + + math::mat4f getLocalTransform(EntityId entityId); + math::mat4f getWorldTransform(EntityId entityId); + EntityId getBone(EntityId entityId, int skinIndex, int boneIndex); + math::mat4f getInverseBindMatrix(EntityId entityId, int skinIndex, int boneIndex); + + /// @brief Set the local transform for the bone at boneIndex/skinIndex in the given entity. + /// @param entityId the parent entity + /// @param entityName the name of the mesh under entityId for which the bone will be set. + /// @param skinIndex the index of the joint skin. Currently only 0 is supported. + /// @param boneName the name of the bone + /// @param transform the 4x4 matrix representing the local transform for the bone + /// @return true if the transform was successfully set, false otherwise + bool setBoneTransform(EntityId entityId, int skinIndex, int boneIndex, math::mat4f transform); + + /// @brief Immediately start animating the bone at [boneIndex] under the parent instance [entity] at skin [skinIndex]. + /// @param entity the mesh entity to animate + /// @param frameData frame data as quaternions + /// @param numFrames the number of frames + /// @param boneName the name of the bone to animate + /// @param frameLengthInMs the length of each frame in ms + /// @return true if the bone animation was successfully enqueued + bool addBoneAnimation( + EntityId parent, + int skinIndex, + int boneIndex, + const float *const frameData, + int numFrames, + float frameLengthInMs, + float fadeOutInSecs, + float fadeInInSecs, + float maxDelta + ); + + std::unique_ptr> getBoneRestTranforms(EntityId entityId, int skinIndex); + void resetBones(EntityId entityId); + bool setTransform(EntityId entityId, math::mat4f transform); + bool updateBoneMatrices(EntityId entityId); + void playAnimation(EntityId e, int index, bool loop, bool reverse, bool replaceActive, float crossfade = 0.3f); + void stopAnimation(EntityId e, int index); + void setMorphTargetWeights(const char *const entityName, float *weights, int count); + void loadTexture(EntityId entity, const char *resourcePath, int renderableIndex); + void setAnimationFrame(EntityId entity, int animationIndex, int animationFrame); + bool hide(EntityId entity, const char *meshName); + bool reveal(EntityId entity, const char *meshName); + const char *getNameForEntity(EntityId entityId); + utils::Entity findChildEntityByName( + EntityId entityId, + const char *entityName); + int getEntityCount(EntityId entity, bool renderableOnly); + void getEntities(EntityId entity, bool renderableOnly, EntityId *out); + const char *getEntityNameAt(EntityId entity, int index, bool renderableOnly); + void addCollisionComponent(EntityId entity, void (*onCollisionCallback)(const EntityId entityId1, const EntityId entityId2), bool affectsCollidingTransform); + void removeCollisionComponent(EntityId entityId); + EntityId getParent(EntityId child); + void setParent(EntityId child, EntityId parent); + bool addAnimationComponent(EntityId entity); + void removeAnimationComponent(EntityId entity); + + /// @brief returns the number of instances of the FilamentAsset represented by the given entity. + /// @param entityId + /// @return the number of instances + int getInstanceCount(EntityId entityId); + + /// @brief returns an array containing all instances of the FilamentAsset represented by the given entity. + /// @param entityId + void getInstances(EntityId entityId, EntityId *out); + + /// + /// Sets the draw priority for the given entity. See RenderableManager.h for more details. + /// + void setPriority(EntityId entity, int priority); + + /// @brief returns the gizmo entity, used to manipulate the global transform for entities + /// @param out a pointer to an array of three EntityId {x, y, z} + /// @return + /// + void getGizmo(EntityId *out); + + friend class FilamentViewer; + + private: + gltfio::AssetLoader *_assetLoader = nullptr; + const ResourceLoaderWrapperImpl *const _resourceLoaderWrapper; + Engine *_engine; + Scene *_scene; + gltfio::MaterialProvider *_ubershaderProvider = nullptr; + gltfio::ResourceLoader *_gltfResourceLoader = nullptr; + gltfio::TextureProvider *_stbDecoder = nullptr; + gltfio::TextureProvider *_ktxDecoder = nullptr; + std::mutex _mutex; + Material *_gizmoMaterial; + + utils::NameComponentManager *_ncm; + + tsl::robin_map< + EntityId, + gltfio::FilamentInstance *> + _instances; + tsl::robin_map _assets; + tsl::robin_map> _transformUpdates; + + AnimationComponentManager *_animationComponentManager = nullptr; + CollisionComponentManager *_collisionComponentManager = nullptr; + + gltfio::FilamentInstance *getInstanceByEntityId(EntityId entityId); + gltfio::FilamentAsset *getAssetByEntityId(EntityId entityId); + + utils::Entity findEntityByName( + const gltfio::FilamentInstance *instance, + const char *entityName); + + EntityId addGizmo(); + utils::Entity _gizmoX; + utils::Entity _gizmoY; + utils::Entity _gizmoZ; + }; +} diff --git a/ios/include/StreamBufferAdapter.hpp b/thermion_dart/native/include/StreamBufferAdapter.hpp similarity index 66% rename from ios/include/StreamBufferAdapter.hpp rename to thermion_dart/native/include/StreamBufferAdapter.hpp index f1931bc8..e76a9fda 100644 --- a/ios/include/StreamBufferAdapter.hpp +++ b/thermion_dart/native/include/StreamBufferAdapter.hpp @@ -5,9 +5,8 @@ #include #include -namespace polyvox { +namespace thermion_filament { - using namespace std; // // A generic adapter to expose any contiguous section of memory as a std::streambuf. @@ -20,15 +19,15 @@ namespace polyvox { ~StreamBufferAdapter() { } - streamsize size(); + std::streamsize size(); private: int_type uflow() override; int_type underflow() override; int_type pbackfail(int_type ch) override; - streampos seekoff(streamoff off, ios_base::seekdir way, ios_base::openmode which) override; - streampos seekpos(streampos sp, ios_base::openmode which) override; - streamsize showmanyc() override; + std::streampos seekoff(std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which) override; + std::streampos seekpos(std::streampos sp, std::ios_base::openmode which) override; + std::streamsize showmanyc() override; }; diff --git a/thermion_dart/native/include/ThermionDartApi.h b/thermion_dart/native/include/ThermionDartApi.h new file mode 100644 index 00000000..28af7795 --- /dev/null +++ b/thermion_dart/native/include/ThermionDartApi.h @@ -0,0 +1,245 @@ +#ifndef _FLUTTER_FILAMENT_API_H +#define _FLUTTER_FILAMENT_API_H + +#ifdef _WIN32 +#ifdef IS_DLL +#define EMSCRIPTEN_KEEPALIVE __declspec(dllimport) +#else +#define EMSCRIPTEN_KEEPALIVE __declspec(dllexport) +#endif +#else +#ifndef EMSCRIPTEN_KEEPALIVE +#define EMSCRIPTEN_KEEPALIVE __attribute__((visibility("default"))) +#endif +#endif + +// we copy the LLVM here rather than including, +// because on Windows it's difficult to pin the exact location which confuses dart ffigen + +#ifndef __STDBOOL_H +#define __STDBOOL_H + +#define __bool_true_false_are_defined 1 + +#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L +/* FIXME: We should be issuing a deprecation warning here, but cannot yet due + * to system headers which include this header file unconditionally. + */ +#elif !defined(__cplusplus) +#define bool _Bool +#define true 1 +#define false 0 +#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) +/* Define _Bool as a GNU extension. */ +#define _Bool bool +#if defined(__cplusplus) && __cplusplus < 201103L +/* For C++98, define bool, false, true as a GNU extension. */ +#define bool bool +#define false false +#define true true +#endif +#endif + +#endif /* __STDBOOL_H */ + +#if defined(__APPLE__) || defined(__EMSCRIPTEN__) +#include +#endif + +#include "ResourceBuffer.hpp" + +typedef int32_t EntityId; +typedef int32_t _ManipulatorMode; + +#ifdef __cplusplus +extern "C" +{ +#endif + + EMSCRIPTEN_KEEPALIVE const void *create_filament_viewer(const void *const context, const void *const loader, void *const platform, const char *uberArchivePath); + EMSCRIPTEN_KEEPALIVE void destroy_filament_viewer(const void *const viewer); + EMSCRIPTEN_KEEPALIVE void *get_scene_manager(const void *const viewer); + EMSCRIPTEN_KEEPALIVE void create_render_target(const void *const viewer, intptr_t texture, uint32_t width, uint32_t height); + EMSCRIPTEN_KEEPALIVE void clear_background_image(const void *const viewer); + EMSCRIPTEN_KEEPALIVE void set_background_image(const void *const viewer, const char *path, bool fillHeight); + EMSCRIPTEN_KEEPALIVE void set_background_image_position(const void *const viewer, float x, float y, bool clamp); + EMSCRIPTEN_KEEPALIVE void set_background_color(const void *const viewer, const float r, const float g, const float b, const float a); + EMSCRIPTEN_KEEPALIVE void set_tone_mapping(const void *const viewer, int toneMapping); + EMSCRIPTEN_KEEPALIVE void set_bloom(const void *const viewer, float strength); + EMSCRIPTEN_KEEPALIVE void load_skybox(const void *const viewer, const char *skyboxPath); + EMSCRIPTEN_KEEPALIVE void load_ibl(const void *const viewer, const char *iblPath, float intensity); + EMSCRIPTEN_KEEPALIVE void rotate_ibl(const void *const viewer, float *rotationMatrix); + EMSCRIPTEN_KEEPALIVE void remove_skybox(const void *const viewer); + EMSCRIPTEN_KEEPALIVE void remove_ibl(const void *const viewer); + EMSCRIPTEN_KEEPALIVE EntityId add_light( + const void *const viewer, + uint8_t type, + float colour, + float intensity, + float posX, + float posY, + float posZ, + float dirX, + float dirY, + float dirZ, + float falloffRadius, + float spotLightConeInner, + float spotLightConeOuter, + float sunAngularRadius, + float sunHaloSize, + float sunHaloFallof, + bool shadows); + EMSCRIPTEN_KEEPALIVE void remove_light(const void *const viewer, EntityId entityId); + EMSCRIPTEN_KEEPALIVE void clear_lights(const void *const viewer); + EMSCRIPTEN_KEEPALIVE EntityId load_glb(void *sceneManager, const char *assetPath, int numInstances); + EMSCRIPTEN_KEEPALIVE EntityId load_glb_from_buffer(void *sceneManager, const void *const data, size_t length); + EMSCRIPTEN_KEEPALIVE EntityId load_gltf(void *sceneManager, const char *assetPath, const char *relativePath); + EMSCRIPTEN_KEEPALIVE EntityId create_instance(void *sceneManager, EntityId id); + EMSCRIPTEN_KEEPALIVE int get_instance_count(void *sceneManager, EntityId entityId); + EMSCRIPTEN_KEEPALIVE void get_instances(void *sceneManager, EntityId entityId, EntityId *out); + EMSCRIPTEN_KEEPALIVE void set_main_camera(const void *const viewer); + EMSCRIPTEN_KEEPALIVE EntityId get_main_camera(const void *const viewer); + EMSCRIPTEN_KEEPALIVE bool set_camera(const void *const viewer, EntityId entity, const char *nodeName); + EMSCRIPTEN_KEEPALIVE void set_view_frustum_culling(const void *const viewer, bool enabled); + EMSCRIPTEN_KEEPALIVE void render( + const void *const viewer, + uint64_t frameTimeInNanos, + void *pixelBuffer, + void (*callback)(void *buf, size_t size, void *data), + void *data); + EMSCRIPTEN_KEEPALIVE void create_swap_chain(const void *const viewer, const void *const window, uint32_t width, uint32_t height); + EMSCRIPTEN_KEEPALIVE void destroy_swap_chain(const void *const viewer); + EMSCRIPTEN_KEEPALIVE void set_frame_interval(const void *const viewer, float interval); + EMSCRIPTEN_KEEPALIVE void update_viewport_and_camera_projection(const void *const viewer, uint32_t width, uint32_t height, float scaleFactor); + EMSCRIPTEN_KEEPALIVE void scroll_begin(const void *const viewer); + EMSCRIPTEN_KEEPALIVE void scroll_update(const void *const viewer, float x, float y, float z); + EMSCRIPTEN_KEEPALIVE void scroll_end(const void *const viewer); + EMSCRIPTEN_KEEPALIVE void grab_begin(const void *const viewer, float x, float y, bool pan); + EMSCRIPTEN_KEEPALIVE void grab_update(const void *const viewer, float x, float y); + EMSCRIPTEN_KEEPALIVE void grab_end(const void *const viewer); + EMSCRIPTEN_KEEPALIVE void apply_weights( + void *sceneManager, + EntityId entity, + const char *const entityName, + float *const weights, + int count); + EMSCRIPTEN_KEEPALIVE bool set_morph_target_weights( + void *sceneManager, + EntityId entity, + const float *const morphData, + int numWeights); + EMSCRIPTEN_KEEPALIVE bool set_morph_animation( + void *sceneManager, + EntityId entity, + const float *const morphData, + const int *const morphIndices, + int numMorphTargets, + int numFrames, + float frameLengthInMs); + + EMSCRIPTEN_KEEPALIVE void reset_to_rest_pose( + void *sceneManager, + EntityId asset); + EMSCRIPTEN_KEEPALIVE void add_bone_animation( + void *sceneManager, + EntityId entity, + int skinIndex, + int boneIndex, + const float *const frameData, + int numFrames, + float frameLengthInMs, + float fadeOutInSecs, + float fadeInInSecs, + float maxDelta); + EMSCRIPTEN_KEEPALIVE void get_local_transform(void *sceneManager, + EntityId entityId, float* const); + EMSCRIPTEN_KEEPALIVE void get_rest_local_transforms(void *sceneManager, + EntityId entityId, int skinIndex, float* const out, int numBones); + EMSCRIPTEN_KEEPALIVE void get_world_transform(void *sceneManager, + EntityId entityId, float* const); + EMSCRIPTEN_KEEPALIVE void get_inverse_bind_matrix(void *sceneManager, + EntityId entityId, int skinIndex, int boneIndex, float* const); + EMSCRIPTEN_KEEPALIVE bool set_bone_transform( + void *sceneManager, + EntityId entity, + int skinIndex, + int boneIndex, + const float *const transform); + EMSCRIPTEN_KEEPALIVE void play_animation(void *sceneManager, EntityId entity, int index, bool loop, bool reverse, bool replaceActive, float crossfade); + EMSCRIPTEN_KEEPALIVE void set_animation_frame(void *sceneManager, EntityId entity, int animationIndex, int animationFrame); + EMSCRIPTEN_KEEPALIVE void stop_animation(void *sceneManager, EntityId entity, int index); + EMSCRIPTEN_KEEPALIVE int get_animation_count(void *sceneManager, EntityId asset); + EMSCRIPTEN_KEEPALIVE void get_animation_name(void *sceneManager, EntityId entity, char *const outPtr, int index); + EMSCRIPTEN_KEEPALIVE float get_animation_duration(void *sceneManager, EntityId entity, int index); + EMSCRIPTEN_KEEPALIVE int get_bone_count(void *sceneManager, EntityId assetEntity, int skinIndex); + EMSCRIPTEN_KEEPALIVE void get_bone_names(void *sceneManager, EntityId assetEntity, const char** outPtr, int skinIndex); + EMSCRIPTEN_KEEPALIVE EntityId get_bone(void *sceneManager, + EntityId entityId, + int skinIndex, + int boneIndex); + EMSCRIPTEN_KEEPALIVE bool set_transform(void* sceneManager, EntityId entityId, const float* const transform); + EMSCRIPTEN_KEEPALIVE bool update_bone_matrices(void* sceneManager, EntityId entityId); + EMSCRIPTEN_KEEPALIVE void get_morph_target_name(void *sceneManager, EntityId assetEntity, EntityId childEntity, char *const outPtr, int index); + EMSCRIPTEN_KEEPALIVE int get_morph_target_name_count(void *sceneManager, EntityId assetEntity, EntityId childEntity); + EMSCRIPTEN_KEEPALIVE void remove_entity(const void *const viewer, EntityId asset); + EMSCRIPTEN_KEEPALIVE void clear_entities(const void *const viewer); + EMSCRIPTEN_KEEPALIVE bool set_material_color(void *sceneManager, EntityId entity, const char *meshName, int materialIndex, const float r, const float g, const float b, const float a); + EMSCRIPTEN_KEEPALIVE void transform_to_unit_cube(void *sceneManager, EntityId asset); + EMSCRIPTEN_KEEPALIVE void queue_position_update(void *sceneManager, EntityId entity, float x, float y, float z, bool relative); + EMSCRIPTEN_KEEPALIVE void queue_rotation_update(void *sceneManager, EntityId entity, float rads, float x, float y, float z, float w, bool relative); + EMSCRIPTEN_KEEPALIVE void set_position(void *sceneManager, EntityId entity, float x, float y, float z); + EMSCRIPTEN_KEEPALIVE void set_rotation(void *sceneManager, EntityId entity, float rads, float x, float y, float z, float w); + EMSCRIPTEN_KEEPALIVE void set_scale(void *sceneManager, EntityId entity, float scale); + + // Camera methods + EMSCRIPTEN_KEEPALIVE void move_camera_to_asset(const void *const viewer, EntityId asset); + EMSCRIPTEN_KEEPALIVE void set_view_frustum_culling(const void *const viewer, bool enabled); + EMSCRIPTEN_KEEPALIVE void set_camera_exposure(const void *const viewer, float aperture, float shutterSpeed, float sensitivity); + EMSCRIPTEN_KEEPALIVE void set_camera_position(const void *const viewer, float x, float y, float z); + EMSCRIPTEN_KEEPALIVE void get_camera_position(const void *const viewer); + EMSCRIPTEN_KEEPALIVE void set_camera_rotation(const void *const viewer, float w, float x, float y, float z); + EMSCRIPTEN_KEEPALIVE void set_camera_model_matrix(const void *const viewer, const float *const matrix); + EMSCRIPTEN_KEEPALIVE const double *const get_camera_model_matrix(const void *const viewer); + EMSCRIPTEN_KEEPALIVE const double *const get_camera_view_matrix(const void *const viewer); + EMSCRIPTEN_KEEPALIVE const double *const get_camera_projection_matrix(const void *const viewer); + EMSCRIPTEN_KEEPALIVE void set_camera_projection_matrix(const void *const viewer, const double *const matrix, double near, double far); + EMSCRIPTEN_KEEPALIVE void set_camera_culling(const void *const viewer, double near, double far); + EMSCRIPTEN_KEEPALIVE double get_camera_culling_near(const void *const viewer); + EMSCRIPTEN_KEEPALIVE double get_camera_culling_far(const void *const viewer); + EMSCRIPTEN_KEEPALIVE const double *const get_camera_culling_projection_matrix(const void *const viewer); + EMSCRIPTEN_KEEPALIVE const double *const get_camera_frustum(const void *const viewer); + EMSCRIPTEN_KEEPALIVE void set_camera_fov(const void *const viewer, float fovInDegrees, float aspect); + EMSCRIPTEN_KEEPALIVE void set_camera_focal_length(const void *const viewer, float focalLength); + EMSCRIPTEN_KEEPALIVE void set_camera_focus_distance(const void *const viewer, float focusDistance); + EMSCRIPTEN_KEEPALIVE void set_camera_manipulator_options(const void *const viewer, _ManipulatorMode mode, double orbitSpeedX, double orbitSpeedY, double zoomSpeed); + + EMSCRIPTEN_KEEPALIVE int hide_mesh(void *sceneManager, EntityId entity, const char *meshName); + EMSCRIPTEN_KEEPALIVE int reveal_mesh(void *sceneManager, EntityId entity, const char *meshName); + EMSCRIPTEN_KEEPALIVE void set_post_processing(void *const viewer, bool enabled); + EMSCRIPTEN_KEEPALIVE void set_antialiasing(void *const viewer, bool msaa, bool fxaa, bool taa); + EMSCRIPTEN_KEEPALIVE void filament_pick(void *const viewer, int x, int y, void (*callback)(EntityId entityId, int x, int y)); + EMSCRIPTEN_KEEPALIVE const char *get_name_for_entity(void *const sceneManager, const EntityId entityId); + EMSCRIPTEN_KEEPALIVE EntityId find_child_entity_by_name(void *const sceneManager, const EntityId parent, const char *name); + EMSCRIPTEN_KEEPALIVE int get_entity_count(void *const sceneManager, const EntityId target, bool renderableOnly); + EMSCRIPTEN_KEEPALIVE void get_entities(void *const sceneManager, const EntityId target, bool renderableOnly, EntityId *out); + EMSCRIPTEN_KEEPALIVE const char *get_entity_name_at(void *const sceneManager, const EntityId target, int index, bool renderableOnly); + EMSCRIPTEN_KEEPALIVE void set_recording(void *const viewer, bool recording); + EMSCRIPTEN_KEEPALIVE void set_recording_output_directory(void *const viewer, const char *outputDirectory); + EMSCRIPTEN_KEEPALIVE void ios_dummy(); + EMSCRIPTEN_KEEPALIVE void thermion_flutter_free(void *ptr); + EMSCRIPTEN_KEEPALIVE void add_collision_component(void *const sceneManager, EntityId entityId, void (*callback)(const EntityId entityId1, const EntityId entityId2), bool affectsCollidingTransform); + EMSCRIPTEN_KEEPALIVE void remove_collision_component(void *const sceneManager, EntityId entityId); + EMSCRIPTEN_KEEPALIVE bool add_animation_component(void *const sceneManager, EntityId entityId); + EMSCRIPTEN_KEEPALIVE void remove_animation_component(void *const sceneManager, EntityId entityId); + + EMSCRIPTEN_KEEPALIVE EntityId create_geometry(void *const viewer, float *vertices, int numVertices, uint16_t *indices, int numIndices, int primitiveType, const char *materialPath); + EMSCRIPTEN_KEEPALIVE EntityId get_parent(void *const sceneManager, EntityId child); + EMSCRIPTEN_KEEPALIVE void set_parent(void *const sceneManager, EntityId child, EntityId parent); + EMSCRIPTEN_KEEPALIVE void test_collisions(void *const sceneManager, EntityId entity); + EMSCRIPTEN_KEEPALIVE void set_priority(void *const sceneManager, EntityId entityId, int priority); + EMSCRIPTEN_KEEPALIVE void get_gizmo(void *const sceneManager, EntityId *out); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/thermion_dart/native/include/ThermionDartFFIApi.h b/thermion_dart/native/include/ThermionDartFFIApi.h new file mode 100644 index 00000000..fa99f621 --- /dev/null +++ b/thermion_dart/native/include/ThermionDartFFIApi.h @@ -0,0 +1,112 @@ +#ifndef _DART_FILAMENT_FFI_API_H +#define _DART_FILAMENT_FFI_API_H + +#include "ThermionDartApi.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + + /// + /// This header replicates most of the methods in ThermionDartApi.h. + /// It represents the interface for: + /// - invoking those methods that must be called on the main Filament engine thread + /// - setting up a render loop + /// + typedef int32_t EntityId; + typedef void (*FilamentRenderCallback)(void *const owner); + + EMSCRIPTEN_KEEPALIVE void create_filament_viewer_ffi( + void *const context, + void *const platform, + const char *uberArchivePath, + const void *const loader, + void (*renderCallback)(void *const renderCallbackOwner), + void *const renderCallbackOwner, + void (*callback)(void *const viewer)); + EMSCRIPTEN_KEEPALIVE void create_swap_chain_ffi(void *const viewer, void *const surface, uint32_t width, uint32_t height, void (*onComplete)()); + EMSCRIPTEN_KEEPALIVE void destroy_swap_chain_ffi(void *const viewer, void (*onComplete)()); + EMSCRIPTEN_KEEPALIVE void create_render_target_ffi(void *const viewer, intptr_t nativeTextureId, uint32_t width, uint32_t height, void (*onComplete)()); + EMSCRIPTEN_KEEPALIVE void destroy_filament_viewer_ffi(void *const viewer); + EMSCRIPTEN_KEEPALIVE void render_ffi(void *const viewer); + EMSCRIPTEN_KEEPALIVE FilamentRenderCallback make_render_callback_fn_pointer(FilamentRenderCallback); + EMSCRIPTEN_KEEPALIVE void set_rendering_ffi(void *const viewer, bool rendering, void(*onComplete)()); + EMSCRIPTEN_KEEPALIVE void set_frame_interval_ffi(void *const viewer, float frameInterval); + EMSCRIPTEN_KEEPALIVE void update_viewport_and_camera_projection_ffi(void *const viewer, const uint32_t width, const uint32_t height, const float scaleFactor, void (*onComplete)()); + EMSCRIPTEN_KEEPALIVE void set_background_color_ffi(void *const viewer, const float r, const float g, const float b, const float a); + EMSCRIPTEN_KEEPALIVE void clear_background_image_ffi(void *const viewer); + EMSCRIPTEN_KEEPALIVE void set_background_image_ffi(void *const viewer, const char *path, bool fillHeight, void (*onComplete)()); + EMSCRIPTEN_KEEPALIVE void set_background_image_position_ffi(void *const viewer, float x, float y, bool clamp); + EMSCRIPTEN_KEEPALIVE void set_tone_mapping_ffi(void *const viewer, int toneMapping); + EMSCRIPTEN_KEEPALIVE void set_bloom_ffi(void *const viewer, float strength); + EMSCRIPTEN_KEEPALIVE void load_skybox_ffi(void *const viewer, const char *skyboxPath, void (*onComplete)()); + EMSCRIPTEN_KEEPALIVE void load_ibl_ffi(void *const viewer, const char *iblPath, float intensity); + EMSCRIPTEN_KEEPALIVE void remove_skybox_ffi(void *const viewer); + EMSCRIPTEN_KEEPALIVE void remove_ibl_ffi(void *const viewer); + EMSCRIPTEN_KEEPALIVE void add_light_ffi( + void *const viewer, + uint8_t type, + float colour, + float intensity, + float posX, + float posY, + float posZ, + float dirX, + float dirY, + float dirZ, + float falloffRadius, + float spotLightConeInner, + float spotLightConeOuter, + float sunAngularRadius, + float sunHaloSize, + float sunHaloFallof, + bool shadows, + void (*callback)(EntityId)); + EMSCRIPTEN_KEEPALIVE void remove_light_ffi(void *const viewer, EntityId entityId); + EMSCRIPTEN_KEEPALIVE void clear_lights_ffi(void *const viewer); + EMSCRIPTEN_KEEPALIVE void load_glb_ffi(void *const sceneManager, const char *assetPath, int numInstances, void (*callback)(EntityId)); + EMSCRIPTEN_KEEPALIVE void load_glb_from_buffer_ffi(void *const sceneManager, const void *const data, size_t length, int numInstances, void (*callback)(EntityId)); + EMSCRIPTEN_KEEPALIVE void load_gltf_ffi(void *const sceneManager, const char *assetPath, const char *relativePath, void (*callback)(EntityId)); + EMSCRIPTEN_KEEPALIVE void create_instance_ffi(void *const sceneManager, EntityId entityId, void (*callback)(EntityId)); + EMSCRIPTEN_KEEPALIVE void remove_entity_ffi(void *const viewer, EntityId asset, void (*callback)()); + EMSCRIPTEN_KEEPALIVE void clear_entities_ffi(void *const viewer, void (*callback)()); + EMSCRIPTEN_KEEPALIVE void set_camera_ffi(void *const viewer, EntityId asset, const char *nodeName, void (*callback)(bool)); + EMSCRIPTEN_KEEPALIVE void apply_weights_ffi( + void *const sceneManager, + EntityId asset, + const char *const entityName, + float *const weights, + int count); + + EMSCRIPTEN_KEEPALIVE void play_animation_ffi(void *const sceneManager, EntityId asset, int index, bool loop, bool reverse, bool replaceActive, float crossfade); + EMSCRIPTEN_KEEPALIVE void set_animation_frame_ffi(void *const sceneManager, EntityId asset, int animationIndex, int animationFrame); + EMSCRIPTEN_KEEPALIVE void stop_animation_ffi(void *const sceneManager, EntityId asset, int index); + EMSCRIPTEN_KEEPALIVE void get_animation_count_ffi(void *const sceneManager, EntityId asset, void (*callback)(int)); + EMSCRIPTEN_KEEPALIVE void get_animation_name_ffi(void *const sceneManager, EntityId asset, char *const outPtr, int index, void (*callback)()); + EMSCRIPTEN_KEEPALIVE void get_morph_target_name_ffi(void *const sceneManager, EntityId assetEntity, EntityId childEntity, char *const outPtr, int index, void (*callback)()); + EMSCRIPTEN_KEEPALIVE void get_morph_target_name_count_ffi(void *const sceneManager, EntityId asset, EntityId childEntity, void (*callback)(int32_t)); + EMSCRIPTEN_KEEPALIVE void set_morph_target_weights_ffi(void *const sceneManager, + EntityId asset, + const float *const morphData, + int numWeights, + void (*callback)(bool)); + + EMSCRIPTEN_KEEPALIVE void update_bone_matrices_ffi(void *sceneManager, + EntityId asset, void(*callback)(bool)); + EMSCRIPTEN_KEEPALIVE void set_bone_transform_ffi( + void *sceneManager, + EntityId asset, + int skinIndex, + int boneIndex, + const float *const transform, + void (*callback)(bool)); + EMSCRIPTEN_KEEPALIVE void set_post_processing_ffi(void *const viewer, bool enabled); + EMSCRIPTEN_KEEPALIVE void reset_to_rest_pose_ffi(void *const sceneManager, EntityId entityId, void(*callback)()); + EMSCRIPTEN_KEEPALIVE void create_geometry_ffi(void *const viewer, float *vertices, int numVertices, uint16_t *indices, int numIndices, int primitiveType, const char *materialPath, void (*callback)(EntityId)); + +#ifdef __cplusplus +} +#endif + +#endif // _DART_FILAMENT_FFI_API_H diff --git a/ios/include/ThreadPool.hpp b/thermion_dart/native/include/ThreadPool.hpp similarity index 95% rename from ios/include/ThreadPool.hpp rename to thermion_dart/native/include/ThreadPool.hpp index ea743910..1f1e27fb 100644 --- a/ios/include/ThreadPool.hpp +++ b/thermion_dart/native/include/ThreadPool.hpp @@ -15,7 +15,7 @@ #ifndef _THREADPOOL_HPP #define _THREADPOOL_HPP -namespace flutter_filament { +namespace thermion_filament { class ThreadPool { std::vector pool; @@ -54,7 +54,7 @@ public: private: void add_worker() { std::thread t([this]() { - while(!stop) { + while(!stop || tasks.size() > 0) { std::function task; { std::unique_lock lock(access); diff --git a/ios/include/TimeIt.hpp b/thermion_dart/native/include/TimeIt.hpp similarity index 100% rename from ios/include/TimeIt.hpp rename to thermion_dart/native/include/TimeIt.hpp diff --git a/ios/include/cgltf.h b/thermion_dart/native/include/cgltf.h similarity index 100% rename from ios/include/cgltf.h rename to thermion_dart/native/include/cgltf.h diff --git a/thermion_dart/native/include/components/AnimationComponentManager.hpp b/thermion_dart/native/include/components/AnimationComponentManager.hpp new file mode 100644 index 00000000..c182ef85 --- /dev/null +++ b/thermion_dart/native/include/components/AnimationComponentManager.hpp @@ -0,0 +1,362 @@ +#pragma once + +#include "Log.hpp" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +template class std::vector; +namespace thermion_filament +{ + using namespace filament; + using namespace filament::gltfio; + using namespace utils; + using namespace std::chrono; + + typedef std::chrono::time_point time_point_t; + + enum AnimationType + { + MORPH, + BONE, + GLTF + }; + + struct AnimationStatus + { + time_point_t start = time_point_t::max(); + bool loop = false; + bool reverse = false; + float durationInSecs = 0; + }; + + /// @brief + /// The status of an animation embedded in a glTF object. + /// @param index refers to the index of the animation in the animations property of the underlying object. + /// + struct GltfAnimation : AnimationStatus + { + int index = -1; + }; + + // + // The status of a morph target animation created dynamically at runtime (not glTF embedded). + // + struct MorphAnimation : AnimationStatus + { + utils::Entity meshTarget; + int numFrames = -1; + float frameLengthInMs = 0; + std::vector frameData; + std::vector morphIndices; + int lengthInFrames; + }; + + // + // The status of a skeletal animation created dynamically at runtime (not glTF embedded). + // + struct BoneAnimation : AnimationStatus + { + size_t boneIndex; + size_t skinIndex = 0; + int lengthInFrames; + float frameLengthInMs = 0; + std::vector frameData; + float fadeOutInSecs = 0; + float fadeInInSecs = 0; + float maxDelta = 1.0f; + }; + + struct AnimationComponent + { + std::variant target; + std::vector gltfAnimations; + std::vector morphAnimations; + std::vector boneAnimations; + + // the index of the last active glTF animation, + // used to cross-fade + int fadeGltfAnimationIndex = -1; + float fadeDuration = 0.0f; + float fadeOutAnimationStart = 0.0f; + }; + + class AnimationComponentManager : public utils::SingleInstanceComponentManager + { + + filament::TransformManager &_transformManager; + filament::RenderableManager &_renderableManager; + + public: + AnimationComponentManager( + filament::TransformManager &transformManager, + filament::RenderableManager &renderableManager) : _transformManager(transformManager), + _renderableManager(renderableManager){}; + + void addAnimationComponent(std::variant target) + { + + AnimationComponent animationComponent; + animationComponent.target = target; + EntityInstanceBase::Type componentInstance; + if (std::holds_alternative(target)) + { + auto instance = std::get(target); + if(!hasComponent(instance->getRoot())) { + componentInstance = addComponent(instance->getRoot()); + this->elementAt<0>(componentInstance) = animationComponent; + } + } + else + { + auto entity = std::get(target); + if(!hasComponent(entity)) { + componentInstance = addComponent(entity); + this->elementAt<0>(componentInstance) = animationComponent; + } + } + } + + + void removeAnimationComponent(std::variant target) + { + AnimationComponent animationComponent; + animationComponent.target = target; + EntityInstanceBase::Type componentInstance; + if (std::holds_alternative(target)) + { + auto instance = std::get(target); + if(hasComponent(instance->getRoot())) { + removeComponent(instance->getRoot()); + } + } else { + auto entity = std::get(target); + if(hasComponent(entity)) { + removeComponent(entity); + } + } + } + + void update() + { + + for (auto it = begin(); it < end(); it++) + { + const auto &entity = getEntity(it); + + auto componentInstance = getInstance(entity); + auto &animationComponent = elementAt<0>(componentInstance); + + auto &morphAnimations = animationComponent.morphAnimations; + + if (std::holds_alternative(animationComponent.target)) + { + + auto target = std::get(animationComponent.target); + auto animator = target->getAnimator(); + auto &gltfAnimations = animationComponent.gltfAnimations; + auto &boneAnimations = animationComponent.boneAnimations; + + if(gltfAnimations.size() > 0) { + for (int i = ((int)gltfAnimations.size()) - 1; i >= 0; i--) + { + auto now = high_resolution_clock::now(); + + auto animationStatus = animationComponent.gltfAnimations[i]; + + auto elapsedInSecs = float(std::chrono::duration_cast(now - animationStatus.start).count()) / 1000.0f; + + if (!animationStatus.loop && elapsedInSecs >= animationStatus.durationInSecs) + { + animator->applyAnimation(animationStatus.index, animationStatus.durationInSecs - 0.001); + animator->updateBoneMatrices(); + gltfAnimations.erase(gltfAnimations.begin() + i); + animationComponent.fadeGltfAnimationIndex = -1; + continue; + } + animator->applyAnimation(animationStatus.index, elapsedInSecs); + + if (animationComponent.fadeGltfAnimationIndex != -1 && elapsedInSecs < animationComponent.fadeDuration) + { + // cross-fade + auto fadeFromTime = animationComponent.fadeOutAnimationStart + elapsedInSecs; + auto alpha = elapsedInSecs / animationComponent.fadeDuration; + animator->applyCrossFade(animationComponent.fadeGltfAnimationIndex, fadeFromTime, alpha); + } + } + + animator->updateBoneMatrices(); + } + + /// + /// When fading in/out, interpolate between the "current" transform (which has possibly been set by the glTF animation loop above) + /// and the first (for fading in) or last (for fading out) frame. + /// + for (int i = (int)boneAnimations.size() - 1; i >= 0; i--) + { + auto animationStatus = boneAnimations[i]; + + auto now = high_resolution_clock::now(); + + auto elapsedInMillis = float(std::chrono::duration_cast(now - animationStatus.start).count()); + auto elapsedInSecs = elapsedInMillis / 1000.0f; + + // if we're not looping and the amount of time elapsed is greater than the animation duration plus the fade-in/out buffer, + // then the animation is completed and we can delete it + if (elapsedInSecs >= (animationStatus.durationInSecs + animationStatus.fadeInInSecs + animationStatus.fadeOutInSecs)) + { + if(!animationStatus.loop) { + Log("Bone animation %d finished", i); + boneAnimations.erase(boneAnimations.begin() + i); + continue; + } + } + + // if we're fading in, treat elapsedFrames is zero (and fading out, treat elapsedFrames as lengthInFrames) + float elapsedInFrames = (elapsedInMillis - (1000 * animationStatus.fadeInInSecs)) / animationStatus.frameLengthInMs; + int currFrame = std::floor(elapsedInFrames); + int nextFrame = currFrame; + + // offset from the end if reverse + if (animationStatus.reverse) + { + currFrame = animationStatus.lengthInFrames - currFrame; + if (currFrame > 0) + { + nextFrame = currFrame - 1; + } + else + { + nextFrame = 0; + } + } + else + { + if (currFrame < animationStatus.lengthInFrames - 1) + { + nextFrame = currFrame + 1; + } + else + { + nextFrame = currFrame; + } + } + currFrame = std::clamp(currFrame, 0, animationStatus.lengthInFrames - 1); + nextFrame = std::clamp(nextFrame, 0, animationStatus.lengthInFrames - 1); + + float frameDelta = elapsedInFrames - currFrame; + + // linearly interpolate this animation between its last/current frames + // this is to avoid jerky animations when the animation framerate is slower than our tick rate + + math::float3 currScale, newScale; + math::quatf currRotation, newRotation; + math::float3 currTranslation, newTranslation; + math::mat4f curr = animationStatus.frameData[currFrame]; + decomposeMatrix(curr, &currTranslation, &currRotation, &currScale); + + if(frameDelta > 0) { + math::mat4f next = animationStatus.frameData[nextFrame]; + decomposeMatrix(next, &newTranslation, &newRotation, &newScale); + newScale = mix(currScale, newScale, frameDelta); + newRotation = slerp(currRotation, newRotation, frameDelta); + newTranslation = mix(currTranslation, newTranslation, frameDelta); + } else { + newScale = currScale; + newRotation = currRotation; + newTranslation = currTranslation; + } + + const Entity joint = target->getJointsAt(animationStatus.skinIndex)[animationStatus.boneIndex]; + + // now calculate the fade out/in delta + // if we're fading in, this will be 0.0 at the start of the fade and 1.0 at the end + auto fadeDelta = elapsedInSecs / animationStatus.fadeInInSecs; + + // // if we're fading out, this will be 1.0 at the start of the fade and 0.0 at the end + if(fadeDelta > 1.0f) { + fadeDelta = 1 - ((elapsedInSecs - animationStatus.durationInSecs - animationStatus.fadeInInSecs) / animationStatus.fadeOutInSecs); + } + + fadeDelta = std::clamp(fadeDelta, 0.0f, animationStatus.maxDelta); + + auto jointTransform = _transformManager.getInstance(joint); + + // linearly interpolate this animation between its current (interpolated) frame and the current transform (i.e. as set by the gltf frame) + // // if we are fading in or out, apply a delta + if (fadeDelta >= 0.0f && fadeDelta <= 1.0f) { + math::float3 fadeScale; + math::quatf fadeRotation; + math::float3 fadeTranslation; + auto currentTransform = _transformManager.getTransform(jointTransform); + decomposeMatrix(currentTransform, &fadeTranslation, &fadeRotation, &fadeScale); + newScale = mix(fadeScale, newScale, fadeDelta); + newRotation = slerp(fadeRotation, newRotation, fadeDelta); + newTranslation = mix(fadeTranslation, newTranslation, fadeDelta); + } + + _transformManager.setTransform(jointTransform, composeMatrix(newTranslation, newRotation, newScale)); + + animator->updateBoneMatrices(); + + if (animationStatus.loop && elapsedInSecs >= (animationStatus.durationInSecs + animationStatus.fadeInInSecs + animationStatus.fadeOutInSecs)) + { + animationStatus.start = now; + } + } + } + for (int i = (int)morphAnimations.size() - 1; i >= 0; i--) + { + + auto now = high_resolution_clock::now(); + + auto animationStatus = morphAnimations[i]; + + auto elapsedInSecs = float(std::chrono::duration_cast(now - animationStatus.start).count()) / 1000.0f; + + if (!animationStatus.loop && elapsedInSecs >= animationStatus.durationInSecs) + { + morphAnimations.erase(morphAnimations.begin() + i); + continue; + } + + int frameNumber = static_cast(elapsedInSecs * 1000.0f / animationStatus.frameLengthInMs) % animationStatus.lengthInFrames; + // offset from the end if reverse + if (animationStatus.reverse) + { + frameNumber = animationStatus.lengthInFrames - frameNumber; + } + auto baseOffset = frameNumber * animationStatus.morphIndices.size(); + for (int i = 0; i < animationStatus.morphIndices.size(); i++) + { + auto morphIndex = animationStatus.morphIndices[i]; + // set the weights appropriately + _renderableManager.setMorphWeights( + _renderableManager.getInstance(animationStatus.meshTarget), + animationStatus.frameData.data() + baseOffset + i, + 1, + morphIndex); + } + } + } + } + }; +} diff --git a/thermion_dart/native/include/components/CollisionComponentManager.hpp b/thermion_dart/native/include/components/CollisionComponentManager.hpp new file mode 100644 index 00000000..b7e62ab1 --- /dev/null +++ b/thermion_dart/native/include/components/CollisionComponentManager.hpp @@ -0,0 +1,100 @@ +#pragma once + +#include "utils/Entity.h" +#include "utils/EntityInstance.h" +#include "utils/SingleInstanceComponentManager.h" +#include "filament/TransformManager.h" +#include "gltfio/FilamentAsset.h" +#include "gltfio/FilamentInstance.h" +#include "Log.hpp" + +namespace thermion_filament +{ + +typedef void(*CollisionCallback)(int32_t entityId1, int32_t entityId2) ; +class CollisionComponentManager : public utils::SingleInstanceComponentManager { + + const filament::TransformManager& _transformManager; + public: + CollisionComponentManager(const filament::TransformManager& transformManager) : _transformManager(transformManager) {} + + std::vector collides(utils::Entity transformingEntity, filament::Aabb sourceBox) { + auto sourceCorners = sourceBox.getCorners(); + std::vector collisionAxes; + for(auto it = begin(); it < end(); it++) { + auto entity = getEntity(it); + + if(entity == transformingEntity) { + continue; + } + auto targetXformInstance = _transformManager.getInstance(entity); + auto targetXform = _transformManager.getWorldTransform(targetXformInstance); + auto targetBox = elementAt<0>(it).transform(targetXform); + auto targetCorners = targetBox.getCorners(); + + // Log("Checking collision for entity %d with aabb extent %f %f %f against source entity %d with aabb extent %f %f %f", entity, targetBox.extent().x, targetBox.extent().y, targetBox.extent().z, transformingEntityId, sourceBox.extent().x, sourceBox.extent().y, sourceBox.extent().z); + + bool collided = false; + + // iterate over every vertex in the source/target AABB + for(int i = 0; i < 8; i++) { + auto intersecting = sourceCorners.vertices[i]; + auto min = targetBox.min; + auto max = targetBox.max; + + // if the vertex has insersected with the target/source AABB + if(targetBox.contains(sourceCorners.vertices[i]) <= 0) { + collided = true; + // Log("targetBox %f %f %f contains source vertex %f %f %f", targetBox.extent().x, targetBox.extent().y, targetBox.extent().z, sourceCorners.vertices[i].x, sourceCorners.vertices[i].y, sourceCorners.vertices[i].z); + } else if(sourceBox.contains(targetCorners.vertices[i]) <= 0) { + // Log("sourceBox %f %f %f contains target vertex %f %f %f", sourceBox.extent().x, sourceBox.extent().y, sourceBox.extent().z, targetCorners.vertices[i].x, targetCorners.vertices[i].y, targetCorners.vertices[i].z); + collided = true; + intersecting = targetCorners.vertices[i]; + min = sourceBox.min; + max = sourceBox.max; + } else { + continue; + } + auto affectsTransform = elementAt<2>(it); + if(affectsTransform) { + float xmin = min.x - intersecting.x; + float ymin = min.y - intersecting.y; + float zmin = min.z - intersecting.z; + float xmax = intersecting.x - max.x; + float ymax = intersecting.y - max.y; + float zmax = intersecting.z - max.z; + + auto maxD = std::max(xmin,std::max(ymin,std::max(zmin,std::max(xmax,std::max(ymax,zmax))))); + filament::math::float3 axis; + if(maxD == xmin) { + axis = {-1.0f,0.0f, 0.0f}; + } else if(maxD == ymin) { + axis = {0.0f,-1.0f, 0.0f}; + } else if(maxD == zmin) { + axis = {0.0f,0.0f, -1.0f}; + } else if(maxD == xmax) { + axis = {1.0f,0.0f, 0.0f}; + } else if(maxD == ymax) { + axis = {0.0f,1.0f, 0.0f}; + } else { + axis = { 0.0f, 0.0f, 1.0f}; + } + collisionAxes.push_back(axis); + } + break; + } + if(collided) { + auto callback = elementAt<1>(it); + if(callback) { + callback(utils::Entity::smuggle(entity), utils::Entity::smuggle(transformingEntity)); + } + } + } + + return collisionAxes; + } +}; + +} + + diff --git a/ios/include/filament/GL/glcorearb.h b/thermion_dart/native/include/filament/GL/glcorearb.h similarity index 100% rename from ios/include/filament/GL/glcorearb.h rename to thermion_dart/native/include/filament/GL/glcorearb.h diff --git a/ios/include/filament/GL/glext.h b/thermion_dart/native/include/filament/GL/glext.h similarity index 100% rename from ios/include/filament/GL/glext.h rename to thermion_dart/native/include/filament/GL/glext.h diff --git a/ios/include/filament/GL/wglext.h b/thermion_dart/native/include/filament/GL/wglext.h similarity index 100% rename from ios/include/filament/GL/wglext.h rename to thermion_dart/native/include/filament/GL/wglext.h diff --git a/ios/include/filament/KHR/.clang-format b/thermion_dart/native/include/filament/KHR/.clang-format similarity index 100% rename from ios/include/filament/KHR/.clang-format rename to thermion_dart/native/include/filament/KHR/.clang-format diff --git a/ios/include/filament/KHR/khrplatform.h b/thermion_dart/native/include/filament/KHR/khrplatform.h similarity index 100% rename from ios/include/filament/KHR/khrplatform.h rename to thermion_dart/native/include/filament/KHR/khrplatform.h diff --git a/ios/include/filament/backend/AcquiredImage.h b/thermion_dart/native/include/filament/backend/AcquiredImage.h similarity index 100% rename from ios/include/filament/backend/AcquiredImage.h rename to thermion_dart/native/include/filament/backend/AcquiredImage.h diff --git a/windows/include/filament/backend/BufferDescriptor.h b/thermion_dart/native/include/filament/backend/BufferDescriptor.h similarity index 92% rename from windows/include/filament/backend/BufferDescriptor.h rename to thermion_dart/native/include/filament/backend/BufferDescriptor.h index 80fe182a..ebb57537 100644 --- a/windows/include/filament/backend/BufferDescriptor.h +++ b/thermion_dart/native/include/filament/backend/BufferDescriptor.h @@ -23,7 +23,6 @@ #include #include -#include namespace filament::backend { @@ -113,7 +112,7 @@ public: /** * Helper to create a BufferDescriptor that uses a KNOWN method pointer w/ object passed * by pointer as the callback. e.g.: - * auto bd = BufferDescriptor::make(buffer, size, &Foo::method, foo); + * auto bd = BufferDescriptor::make(buffer, size, foo); * * @param buffer Memory address of the CPU buffer to reference * @param size Size of the CPU buffer in bytes @@ -121,12 +120,12 @@ public: * @return a new BufferDescriptor */ template - static BufferDescriptor make( - void const* buffer, size_t size, T* data, CallbackHandler* handler = nullptr) noexcept { + static BufferDescriptor make(void const* buffer, size_t size, T* data, + CallbackHandler* handler = nullptr) noexcept { return { buffer, size, handler, [](void* b, size_t s, void* u) { - (*static_cast(u)->*method)(b, s); + (static_cast(u)->*method)(b, s); }, data }; } @@ -145,14 +144,14 @@ public: * @return a new BufferDescriptor */ template - static BufferDescriptor make( - void const* buffer, size_t size, T&& functor, CallbackHandler* handler = nullptr) noexcept { + static BufferDescriptor make(void const* buffer, size_t size, T&& functor, + CallbackHandler* handler = nullptr) noexcept { return { buffer, size, handler, [](void* b, size_t s, void* u) { - T& that = *static_cast(u); - that(b, s); - delete &that; + T* const that = static_cast(u); + that->operator()(b, s); + delete that; }, new T(std::forward(functor)) }; @@ -201,7 +200,7 @@ public: return mUser; } - //! CPU mempry-buffer virtual address + //! CPU memory-buffer virtual address void* buffer = nullptr; //! CPU memory-buffer size in bytes diff --git a/ios/include/filament/backend/CallbackHandler.h b/thermion_dart/native/include/filament/backend/CallbackHandler.h similarity index 98% rename from ios/include/filament/backend/CallbackHandler.h rename to thermion_dart/native/include/filament/backend/CallbackHandler.h index 3ffc707c..036031a9 100644 --- a/ios/include/filament/backend/CallbackHandler.h +++ b/thermion_dart/native/include/filament/backend/CallbackHandler.h @@ -17,8 +17,6 @@ #ifndef TNT_FILAMENT_BACKEND_CALLBACKHANDLER_H #define TNT_FILAMENT_BACKEND_CALLBACKHANDLER_H -#include - namespace filament::backend { /** diff --git a/ios/include/filament/backend/DriverApiForward.h b/thermion_dart/native/include/filament/backend/DriverApiForward.h similarity index 100% rename from ios/include/filament/backend/DriverApiForward.h rename to thermion_dart/native/include/filament/backend/DriverApiForward.h diff --git a/ios/include/filament/backend/DriverEnums.h b/thermion_dart/native/include/filament/backend/DriverEnums.h similarity index 92% rename from ios/include/filament/backend/DriverEnums.h rename to thermion_dart/native/include/filament/backend/DriverEnums.h index 8598114a..6b0424ca 100644 --- a/ios/include/filament/backend/DriverEnums.h +++ b/thermion_dart/native/include/filament/backend/DriverEnums.h @@ -28,7 +28,8 @@ #include -#include // FIXME: STL headers are not allowed in public headers +#include // FIXME: STL headers are not allowed in public headers +#include // FIXME: STL headers are not allowed in public headers #include #include @@ -77,6 +78,18 @@ static constexpr uint64_t SWAP_CHAIN_CONFIG_APPLE_CVPIXELBUFFER = 0x8; */ static constexpr uint64_t SWAP_CHAIN_CONFIG_SRGB_COLORSPACE = 0x10; +/** + * Indicates that the SwapChain should also contain a stencil component. + */ +static constexpr uint64_t SWAP_CHAIN_CONFIG_HAS_STENCIL_BUFFER = 0x20; +static constexpr uint64_t SWAP_CHAIN_HAS_STENCIL_BUFFER = SWAP_CHAIN_CONFIG_HAS_STENCIL_BUFFER; + +/** + * The SwapChain contains protected content. Currently only supported by OpenGLPlatform and + * only when OpenGLPlatform::isProtectedContextSupported() is true. + */ +static constexpr uint64_t SWAP_CHAIN_CONFIG_PROTECTED_CONTENT = 0x40; + static constexpr size_t MAX_VERTEX_ATTRIBUTE_COUNT = 16; // This is guaranteed by OpenGL ES. static constexpr size_t MAX_SAMPLER_COUNT = 62; // Maximum needed at feature level 3. @@ -123,6 +136,12 @@ enum class Backend : uint8_t { NOOP = 4, //!< Selects the no-op driver for testing purposes. }; +enum class TimerQueryResult : int8_t { + ERROR = -1, // an error occurred, result won't be available + NOT_READY = 0, // result to ready yet + AVAILABLE = 1, // result is available +}; + static constexpr const char* backendToString(Backend backend) { switch (backend) { case Backend::NOOP: @@ -138,6 +157,30 @@ static constexpr const char* backendToString(Backend backend) { } } +/** + * Defines the shader language. Similar to the above backend enum, but the OpenGL backend can select + * between two shader languages: ESSL 1.0 and ESSL 3.0. + */ +enum class ShaderLanguage { + ESSL1 = 0, + ESSL3 = 1, + SPIRV = 2, + MSL = 3, +}; + +static constexpr const char* shaderLanguageToString(ShaderLanguage shaderLanguage) { + switch (shaderLanguage) { + case ShaderLanguage::ESSL1: + return "ESSL 1.0"; + case ShaderLanguage::ESSL3: + return "ESSL 3.0"; + case ShaderLanguage::SPIRV: + return "SPIR-V"; + case ShaderLanguage::MSL: + return "MSL"; + } +} + /** * Bitmask for selecting render buffers */ @@ -198,6 +241,7 @@ struct Viewport { int32_t top() const noexcept { return bottom + int32_t(height); } }; + /** * Specifies the mapping of the near and far clipping plane to window coordinates. */ @@ -628,14 +672,17 @@ enum class TextureFormat : uint16_t { }; //! Bitmask describing the intended Texture Usage -enum class TextureUsage : uint8_t { - NONE = 0x0, - COLOR_ATTACHMENT = 0x1, //!< Texture can be used as a color attachment - DEPTH_ATTACHMENT = 0x2, //!< Texture can be used as a depth attachment - STENCIL_ATTACHMENT = 0x4, //!< Texture can be used as a stencil attachment - UPLOADABLE = 0x8, //!< Data can be uploaded into this texture (default) - SAMPLEABLE = 0x10, //!< Texture can be sampled (default) - SUBPASS_INPUT = 0x20, //!< Texture can be used as a subpass input +enum class TextureUsage : uint16_t { + NONE = 0x0000, + COLOR_ATTACHMENT = 0x0001, //!< Texture can be used as a color attachment + DEPTH_ATTACHMENT = 0x0002, //!< Texture can be used as a depth attachment + STENCIL_ATTACHMENT = 0x0004, //!< Texture can be used as a stencil attachment + UPLOADABLE = 0x0008, //!< Data can be uploaded into this texture (default) + SAMPLEABLE = 0x0010, //!< Texture can be sampled (default) + SUBPASS_INPUT = 0x0020, //!< Texture can be used as a subpass input + BLIT_SRC = 0x0040, //!< Texture can be used the source of a blit() + BLIT_DST = 0x0080, //!< Texture can be used the destination of a blit() + PROTECTED = 0x0100, //!< Texture can be used the destination of a blit() DEFAULT = UPLOADABLE | SAMPLEABLE //!< Default texture usage }; @@ -663,6 +710,17 @@ static constexpr bool isDepthFormat(TextureFormat format) noexcept { } } +static constexpr bool isStencilFormat(TextureFormat format) noexcept { + switch (format) { + case TextureFormat::STENCIL8: + case TextureFormat::DEPTH24_STENCIL8: + case TextureFormat::DEPTH32F_STENCIL8: + return true; + default: + return false; + } +} + static constexpr bool isUnsignedIntFormat(TextureFormat format) { switch (format) { case TextureFormat::R8UI: @@ -1128,11 +1186,27 @@ struct StencilState { //! Stencil operations for front-facing polygons StencilOperations front = { - .stencilFunc = StencilFunction::A, .ref = 0, .readMask = 0xff, .writeMask = 0xff }; + .stencilFunc = StencilFunction::A, + .stencilOpStencilFail = StencilOperation::KEEP, + .padding0 = 0, + .stencilOpDepthFail = StencilOperation::KEEP, + .stencilOpDepthStencilPass = StencilOperation::KEEP, + .padding1 = 0, + .ref = 0, + .readMask = 0xff, + .writeMask = 0xff }; //! Stencil operations for back-facing polygons StencilOperations back = { - .stencilFunc = StencilFunction::A, .ref = 0, .readMask = 0xff, .writeMask = 0xff }; + .stencilFunc = StencilFunction::A, + .stencilOpStencilFail = StencilOperation::KEEP, + .padding0 = 0, + .stencilOpDepthFail = StencilOperation::KEEP, + .stencilOpDepthStencilPass = StencilOperation::KEEP, + .padding1 = 0, + .ref = 0, + .readMask = 0xff, + .writeMask = 0xff }; //! Whether stencil-buffer writes are enabled bool stencilWrite = false; @@ -1151,8 +1225,8 @@ using FrameScheduledCallback = void(*)(PresentCallable callable, void* user); enum class Workaround : uint16_t { // The EASU pass must split because shader compiler flattens early-exit branch SPLIT_EASU, - // Backend allows feedback loop with ancillary buffers (depth/stencil) as long as they're read-only for - // the whole render pass. + // Backend allows feedback loop with ancillary buffers (depth/stencil) as long as they're + // read-only for the whole render pass. ALLOW_READ_ONLY_ANCILLARY_FEEDBACK_LOOP, // for some uniform arrays, it's needed to do an initialization to avoid crash on adreno gpu ADRENO_UNIFORM_ARRAY_CRASH, @@ -1168,6 +1242,14 @@ enum class Workaround : uint16_t { DISABLE_THREAD_AFFINITY }; +//! The type of technique for stereoscopic rendering +enum class StereoscopicType : uint8_t { + // Stereoscopic rendering is performed using instanced rendering technique. + INSTANCED, + // Stereoscopic rendering is performed using the multiview feature from the graphics backend. + MULTIVIEW, +}; + } // namespace filament::backend template<> struct utils::EnableBitMaskOperators diff --git a/ios/include/filament/backend/Handle.h b/thermion_dart/native/include/filament/backend/Handle.h similarity index 67% rename from ios/include/filament/backend/Handle.h rename to thermion_dart/native/include/filament/backend/Handle.h index 04e83809..4b63607a 100644 --- a/ios/include/filament/backend/Handle.h +++ b/thermion_dart/native/include/filament/backend/Handle.h @@ -17,16 +17,14 @@ #ifndef TNT_FILAMENT_BACKEND_HANDLE_H #define TNT_FILAMENT_BACKEND_HANDLE_H -#include #if !defined(NDEBUG) -#include +#include #endif #include -#include +#include // FIXME: STL headers are not allowed in public headers -#include -#include +#include namespace filament::backend { @@ -41,6 +39,7 @@ struct HwStream; struct HwSwapChain; struct HwTexture; struct HwTimerQuery; +struct HwVertexBufferInfo; struct HwVertexBuffer; /* @@ -54,7 +53,7 @@ struct HwVertexBuffer; class HandleBase { public: using HandleId = uint32_t; - static constexpr const HandleId nullid = HandleId{ std::numeric_limits::max() }; + static constexpr const HandleId nullid = HandleId{ UINT32_MAX }; constexpr HandleBase() noexcept: object(nullid) {} @@ -64,14 +63,6 @@ public: // clear the handle, this doesn't free associated resources void clear() noexcept { object = nullid; } - // compare handles - bool operator==(const HandleBase& rhs) const noexcept { return object == rhs.object; } - bool operator!=(const HandleBase& rhs) const noexcept { return object != rhs.object; } - bool operator<(const HandleBase& rhs) const noexcept { return object < rhs.object; } - bool operator<=(const HandleBase& rhs) const noexcept { return object <= rhs.object; } - bool operator>(const HandleBase& rhs) const noexcept { return object > rhs.object; } - bool operator>=(const HandleBase& rhs) const noexcept { return object >= rhs.object; } - // get this handle's handleId HandleId getId() const noexcept { return object; } @@ -103,6 +94,14 @@ struct Handle : public HandleBase { explicit Handle(HandleId id) noexcept : HandleBase(id) { } + // compare handles of the same type + bool operator==(const Handle& rhs) const noexcept { return getId() == rhs.getId(); } + bool operator!=(const Handle& rhs) const noexcept { return getId() != rhs.getId(); } + bool operator<(const Handle& rhs) const noexcept { return getId() < rhs.getId(); } + bool operator<=(const Handle& rhs) const noexcept { return getId() <= rhs.getId(); } + bool operator>(const Handle& rhs) const noexcept { return getId() > rhs.getId(); } + bool operator>=(const Handle& rhs) const noexcept { return getId() >= rhs.getId(); } + // type-safe Handle cast template::value> > Handle(Handle const& base) noexcept : HandleBase(base) { } // NOLINT(hicpp-explicit-conversions,google-explicit-constructor) @@ -116,18 +115,19 @@ private: // Types used by the command stream // (we use this renaming because the macro-system doesn't deal well with "<" and ">") -using BufferObjectHandle = Handle; -using FenceHandle = Handle; -using IndexBufferHandle = Handle; -using ProgramHandle = Handle; -using RenderPrimitiveHandle = Handle; -using RenderTargetHandle = Handle; -using SamplerGroupHandle = Handle; -using StreamHandle = Handle; -using SwapChainHandle = Handle; -using TextureHandle = Handle; -using TimerQueryHandle = Handle; -using VertexBufferHandle = Handle; +using BufferObjectHandle = Handle; +using FenceHandle = Handle; +using IndexBufferHandle = Handle; +using ProgramHandle = Handle; +using RenderPrimitiveHandle = Handle; +using RenderTargetHandle = Handle; +using SamplerGroupHandle = Handle; +using StreamHandle = Handle; +using SwapChainHandle = Handle; +using TextureHandle = Handle; +using TimerQueryHandle = Handle; +using VertexBufferHandle = Handle; +using VertexBufferInfoHandle = Handle; } // namespace filament::backend diff --git a/windows/include/filament/backend/PipelineState.h b/thermion_dart/native/include/filament/backend/PipelineState.h similarity index 64% rename from windows/include/filament/backend/PipelineState.h rename to thermion_dart/native/include/filament/backend/PipelineState.h index 8b31c5f3..220d04bb 100644 --- a/windows/include/filament/backend/PipelineState.h +++ b/thermion_dart/native/include/filament/backend/PipelineState.h @@ -20,7 +20,7 @@ #include #include -#include +#include #include @@ -29,14 +29,13 @@ namespace filament::backend { //! \privatesection struct PipelineState { - Handle program; - RasterState rasterState; - StencilState stencilState; - PolygonOffset polygonOffset; - Viewport scissor{ 0, 0, - (uint32_t)std::numeric_limits::max(), - (uint32_t)std::numeric_limits::max() - }; + Handle program; // 4 + Handle vertexBufferInfo; // 4 + RasterState rasterState; // 4 + StencilState stencilState; // 12 + PolygonOffset polygonOffset; // 8 + PrimitiveType primitiveType = PrimitiveType::TRIANGLES; // 1 + uint8_t padding[3] = {}; // 3 }; } // namespace filament::backend diff --git a/ios/include/filament/backend/PixelBufferDescriptor.h b/thermion_dart/native/include/filament/backend/PixelBufferDescriptor.h similarity index 95% rename from ios/include/filament/backend/PixelBufferDescriptor.h rename to thermion_dart/native/include/filament/backend/PixelBufferDescriptor.h index 1b498032..c45f344d 100644 --- a/ios/include/filament/backend/PixelBufferDescriptor.h +++ b/thermion_dart/native/include/filament/backend/PixelBufferDescriptor.h @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -141,7 +142,7 @@ public: CallbackHandler* handler = nullptr) noexcept { return { buffer, size, format, type, alignment, left, top, stride, handler, [](void* b, size_t s, void* u) { - (*static_cast(u)->*method)(b, s); }, data }; + (static_cast(u)->*method)(b, s); }, data }; } template @@ -149,7 +150,7 @@ public: PixelDataFormat format, PixelDataType type, T* data, CallbackHandler* handler = nullptr) noexcept { return { buffer, size, format, type, handler, [](void* b, size_t s, void* u) { - (*static_cast(u)->*method)(b, s); }, data }; + (static_cast(u)->*method)(b, s); }, data }; } template @@ -157,7 +158,7 @@ public: backend::CompressedPixelDataType format, uint32_t imageSize, T* data, CallbackHandler* handler = nullptr) noexcept { return { buffer, size, format, imageSize, handler, [](void* b, size_t s, void* u) { - (*static_cast(u)->*method)(b, s); }, data + (static_cast(u)->*method)(b, s); }, data }; } @@ -168,9 +169,9 @@ public: CallbackHandler* handler = nullptr) noexcept { return { buffer, size, format, type, alignment, left, top, stride, handler, [](void* b, size_t s, void* u) { - T& that = *static_cast(u); - that(b, s); - delete &that; + T* const that = static_cast(u); + that->operator()(b, s); + delete that; }, new T(std::forward(functor)) }; } @@ -181,9 +182,9 @@ public: CallbackHandler* handler = nullptr) noexcept { return { buffer, size, format, type, handler, [](void* b, size_t s, void* u) { - T& that = *static_cast(u); - that(b, s); - delete &that; + T* const that = static_cast(u); + that->operator()(b, s); + delete that; }, new T(std::forward(functor)) }; } @@ -194,9 +195,9 @@ public: CallbackHandler* handler = nullptr) noexcept { return { buffer, size, format, imageSize, handler, [](void* b, size_t s, void* u) { - T& that = *static_cast(u); - that(b, s); - delete &that; + T* const that = static_cast(u); + that->operator()(b, s); + delete that; }, new T(std::forward(functor)) }; } diff --git a/ios/include/filament/backend/Platform.h b/thermion_dart/native/include/filament/backend/Platform.h similarity index 65% rename from ios/include/filament/backend/Platform.h rename to thermion_dart/native/include/filament/backend/Platform.h index 1777860f..03026dff 100644 --- a/ios/include/filament/backend/Platform.h +++ b/thermion_dart/native/include/filament/backend/Platform.h @@ -19,11 +19,12 @@ #ifndef TNT_FILAMENT_BACKEND_PLATFORM_H #define TNT_FILAMENT_BACKEND_PLATFORM_H -#include - #include #include +#include +#include + namespace filament::backend { class Driver; @@ -41,11 +42,29 @@ public: struct Stream {}; struct DriverConfig { - /* - * size of handle arena in bytes. Setting to 0 indicates default value is to be used. + /** + * Size of handle arena in bytes. Setting to 0 indicates default value is to be used. * Driver clamps to valid values. */ size_t handleArenaSize = 0; + + /** + * This number of most-recently destroyed textures will be tracked for use-after-free. + * Throws an exception when a texture is freed but still bound to a SamplerGroup and used in + * a draw call. 0 disables completely. Currently only respected by the Metal backend. + */ + size_t textureUseAfterFreePoolSize = 0; + + /** + * Set to `true` to forcibly disable parallel shader compilation in the backend. + * Currently only honored by the GL and Metal backends. + */ + bool disableParallelShaderCompile = false; + + /** + * Disable backend handles use-after-free checks. + */ + bool disableHandleUseAfterFreeCheck = false; }; Platform() noexcept; @@ -71,7 +90,7 @@ public: * * @return nullptr on failure, or a pointer to the newly created driver. */ - virtual backend::Driver* createDriver(void* sharedContext, + virtual backend::Driver* UTILS_NULLABLE createDriver(void* UTILS_NULLABLE sharedContext, const DriverConfig& driverConfig) noexcept = 0; /** @@ -89,7 +108,8 @@ public: * cache. */ using InsertBlobFunc = utils::Invocable< - void(const void* key, size_t keySize, const void* value, size_t valueSize)>; + void(const void* UTILS_NONNULL key, size_t keySize, + const void* UTILS_NONNULL value, size_t valueSize)>; /* * RetrieveBlobFunc is an Invocable to an application-provided function that a @@ -97,7 +117,8 @@ public: * cache. */ using RetrieveBlobFunc = utils::Invocable< - size_t(const void* key, size_t keySize, void* value, size_t valueSize)>; + size_t(const void* UTILS_NONNULL key, size_t keySize, + void* UTILS_NONNULL value, size_t valueSize)>; /** * Sets the callback functions that the backend can use to interact with caching functionality @@ -107,6 +128,7 @@ public: * Platform. The and Invocables may be called at any time and * from any thread from the time at which setBlobFunc is called until the time that Platform * is destroyed. Concurrent calls to these functions from different threads is also allowed. + * Either function can be null. * * @param insertBlob an Invocable that inserts a new value into the cache and associates * it with the given key @@ -116,9 +138,21 @@ public: void setBlobFunc(InsertBlobFunc&& insertBlob, RetrieveBlobFunc&& retrieveBlob) noexcept; /** - * @return true if setBlobFunc was called. + * @return true if insertBlob is valid. */ - bool hasBlobFunc() const noexcept; + bool hasInsertBlobFunc() const noexcept; + + /** + * @return true if retrieveBlob is valid. + */ + bool hasRetrieveBlobFunc() const noexcept; + + /** + * @return true if either of insertBlob or retrieveBlob are valid. + */ + bool hasBlobFunc() const noexcept { + return hasInsertBlobFunc() || hasRetrieveBlobFunc(); + } /** * To insert a new binary value into the cache and associate it with a given @@ -137,7 +171,8 @@ public: * @param value pointer to the beginning of the value data that is to be inserted * @param valueSize specifies the size in byte of the data pointed to by */ - void insertBlob(const void* key, size_t keySize, const void* value, size_t valueSize); + void insertBlob(const void* UTILS_NONNULL key, size_t keySize, + const void* UTILS_NONNULL value, size_t valueSize); /** * To retrieve the binary value associated with a given key from the cache, a @@ -156,11 +191,43 @@ public: * @return If the cache contains a value associated with the given key then the * size of that binary value in bytes is returned. Otherwise 0 is returned. */ - size_t retrieveBlob(const void* key, size_t keySize, void* value, size_t valueSize); + size_t retrieveBlob(const void* UTILS_NONNULL key, size_t keySize, + void* UTILS_NONNULL value, size_t valueSize); + + using DebugUpdateStatFunc = utils::Invocable; + + /** + * Sets the callback function that the backend can use to update backend-specific statistics + * to aid with debugging. This callback is guaranteed to be called on the Filament driver + * thread. + * + * @param debugUpdateStat an Invocable that updates debug statistics + */ + void setDebugUpdateStatFunc(DebugUpdateStatFunc&& debugUpdateStat) noexcept; + + /** + * @return true if debugUpdateStat is valid. + */ + bool hasDebugUpdateStatFunc() const noexcept; + + /** + * To track backend-specific statistics, the backend implementation can call the + * application-provided callback function debugUpdateStatFunc to associate or update a value + * with a given key. It is possible for this function to be called multiple times with the + * same key, in which case newer values should overwrite older values. + * + * This function is guaranteed to be called only on a single thread, the Filament driver + * thread. + * + * @param key a null-terminated C-string with the key of the debug statistic + * @param value the updated value of key + */ + void debugUpdateStat(const char* UTILS_NONNULL key, uint64_t value); private: InsertBlobFunc mInsertBlob; RetrieveBlobFunc mRetrieveBlob; + DebugUpdateStatFunc mDebugUpdateStat; }; } // namespace filament diff --git a/ios/include/filament/backend/PresentCallable.h b/thermion_dart/native/include/filament/backend/PresentCallable.h similarity index 97% rename from ios/include/filament/backend/PresentCallable.h rename to thermion_dart/native/include/filament/backend/PresentCallable.h index 26579420..4402f222 100644 --- a/ios/include/filament/backend/PresentCallable.h +++ b/thermion_dart/native/include/filament/backend/PresentCallable.h @@ -21,8 +21,7 @@ #include -namespace filament { -namespace backend { +namespace filament::backend { /** * A PresentCallable is a callable object that, when called, schedules a frame for presentation on @@ -98,7 +97,6 @@ private: */ using FrameFinishedCallback UTILS_DEPRECATED = void(*)(PresentCallable callable, void* user); -} // namespace backend -} // namespace filament +} // namespace filament::backend #endif // TNT_FILAMENT_BACKEND_PRESENTCALLABLE diff --git a/ios/include/filament/backend/Program.h b/thermion_dart/native/include/filament/backend/Program.h similarity index 89% rename from ios/include/filament/backend/Program.h rename to thermion_dart/native/include/filament/backend/Program.h index a27790c2..fe1c4a9b 100644 --- a/ios/include/filament/backend/Program.h +++ b/thermion_dart/native/include/filament/backend/Program.h @@ -17,17 +17,19 @@ #ifndef TNT_FILAMENT_BACKEND_PRIVATE_PROGRAM_H #define TNT_FILAMENT_BACKEND_PRIVATE_PROGRAM_H -#include #include #include #include -#include #include #include -#include -#include +#include // FIXME: STL headers are not allowed in public headers +#include // FIXME: STL headers are not allowed in public headers +#include // FIXME: STL headers are not allowed in public headers + +#include +#include namespace filament::backend { @@ -114,6 +116,8 @@ public: Program& cacheId(uint64_t cacheId) noexcept; + Program& multiview(bool multiview) noexcept; + ShaderSource const& getShadersSource() const noexcept { return mShadersSource; } ShaderSource& getShadersSource() noexcept { return mShadersSource; } @@ -141,6 +145,8 @@ public: uint64_t getCacheId() const noexcept { return mCacheId; } + bool isMultiview() const noexcept { return mMultiview; } + CompilerPriorityQueue getPriorityQueue() const noexcept { return mPriorityQueue; } private: @@ -156,6 +162,11 @@ private: utils::FixedCapacityVector> mAttributes; std::array mBindingUniformInfo; CompilerPriorityQueue mPriorityQueue = CompilerPriorityQueue::HIGH; + // Indicates the current engine was initialized with multiview stereo, and the variant for this + // program contains STE flag. This will be referred later for the OpenGL shader compiler to + // determine whether shader code replacement for the num_views should be performed. + // This variable could be promoted as a more generic variable later if other similar needs occur. + bool mMultiview = false; }; } // namespace filament::backend diff --git a/ios/include/filament/backend/README.md b/thermion_dart/native/include/filament/backend/README.md similarity index 100% rename from ios/include/filament/backend/README.md rename to thermion_dart/native/include/filament/backend/README.md diff --git a/ios/include/filament/backend/SamplerDescriptor.h b/thermion_dart/native/include/filament/backend/SamplerDescriptor.h similarity index 96% rename from ios/include/filament/backend/SamplerDescriptor.h rename to thermion_dart/native/include/filament/backend/SamplerDescriptor.h index fe78d610..f99472da 100644 --- a/ios/include/filament/backend/SamplerDescriptor.h +++ b/thermion_dart/native/include/filament/backend/SamplerDescriptor.h @@ -24,9 +24,6 @@ #include -#include -#include - namespace filament::backend { struct UTILS_PUBLIC SamplerDescriptor { diff --git a/ios/include/filament/backend/TargetBufferInfo.h b/thermion_dart/native/include/filament/backend/TargetBufferInfo.h similarity index 90% rename from ios/include/filament/backend/TargetBufferInfo.h rename to thermion_dart/native/include/filament/backend/TargetBufferInfo.h index a2f30d45..ce23fc5f 100644 --- a/ios/include/filament/backend/TargetBufferInfo.h +++ b/thermion_dart/native/include/filament/backend/TargetBufferInfo.h @@ -17,9 +17,11 @@ #ifndef TNT_FILAMENT_BACKEND_TARGETBUFFERINFO_H #define TNT_FILAMENT_BACKEND_TARGETBUFFERINFO_H -#include #include +#include + +#include #include namespace filament::backend { @@ -30,6 +32,10 @@ struct TargetBufferInfo { // texture to be used as render target Handle handle; + // starting layer index for multiview. This value is only used when the `layerCount` for the + // render target is greater than 1. + uint8_t baseViewIndex = 0; + // level to be used uint8_t level = 0; @@ -78,7 +84,7 @@ public: // this is here for backward compatibility MRT(Handle handle, uint8_t level, uint16_t layer) noexcept - : mInfos{{ handle, level, layer }} { + : mInfos{{ handle, 0, level, layer }} { } }; diff --git a/ios/include/filament/backend/platforms/OpenGLPlatform.h b/thermion_dart/native/include/filament/backend/platforms/OpenGLPlatform.h similarity index 67% rename from ios/include/filament/backend/platforms/OpenGLPlatform.h rename to thermion_dart/native/include/filament/backend/platforms/OpenGLPlatform.h index 3f4488c5..dec6f47b 100644 --- a/ios/include/filament/backend/platforms/OpenGLPlatform.h +++ b/thermion_dart/native/include/filament/backend/platforms/OpenGLPlatform.h @@ -18,8 +18,15 @@ #define TNT_FILAMENT_BACKEND_PRIVATE_OPENGLPLATFORM_H #include +#include #include +#include +#include + +#include +#include + namespace filament::backend { class Driver; @@ -38,8 +45,8 @@ protected: * Derived classes can use this to instantiate the default OpenGLDriver backend. * This is typically called from your implementation of createDriver() */ - static Driver* createDefaultDriver(OpenGLPlatform* platform, - void* sharedContext, const DriverConfig& driverConfig); + static Driver* UTILS_NULLABLE createDefaultDriver(OpenGLPlatform* UTILS_NONNULL platform, + void* UTILS_NULLABLE sharedContext, const DriverConfig& driverConfig); ~OpenGLPlatform() noexcept override; @@ -57,6 +64,22 @@ public: */ virtual void terminate() noexcept = 0; + /** + * Return whether createSwapChain supports the SWAP_CHAIN_CONFIG_SRGB_COLORSPACE flag. + * The default implementation returns false. + * + * @return true if SWAP_CHAIN_CONFIG_SRGB_COLORSPACE is supported, false otherwise. + */ + virtual bool isSRGBSwapChainSupported() const noexcept; + + /** + * Return whether protected contexts are supported by this backend. + * If protected context are supported, the SWAP_CHAIN_CONFIG_PROTECTED_CONTENT flag can be + * used when creating a SwapChain. + * The default implementation returns false. + */ + virtual bool isProtectedContextSupported() const noexcept; + /** * Called by the driver to create a SwapChain for this driver. * @@ -66,15 +89,8 @@ public: * @return The driver's SwapChain object. * */ - virtual SwapChain* createSwapChain(void* nativeWindow, uint64_t flags) noexcept = 0; - - /** - * Return whether createSwapChain supports the SWAP_CHAIN_CONFIG_SRGB_COLORSPACE flag. - * The default implementation returns false. - * - * @return true if SWAP_CHAIN_CONFIG_SRGB_COLORSPACE is supported, false otherwise. - */ - virtual bool isSRGBSwapChainSupported() const noexcept; + virtual SwapChain* UTILS_NULLABLE createSwapChain( + void* UTILS_NULLABLE nativeWindow, uint64_t flags) noexcept = 0; /** * Called by the driver create a headless SwapChain. @@ -87,13 +103,14 @@ public: * TODO: we need a more generic way of passing construction parameters * A void* might be enough. */ - virtual SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept = 0; + virtual SwapChain* UTILS_NULLABLE createSwapChain( + uint32_t width, uint32_t height, uint64_t flags) noexcept = 0; /** * Called by the driver to destroys the SwapChain * @param swapChain SwapChain to be destroyed. */ - virtual void destroySwapChain(SwapChain* swapChain) noexcept = 0; + virtual void destroySwapChain(SwapChain* UTILS_NONNULL swapChain) noexcept = 0; /** * Returns the set of buffers that must be preserved up to the call to commit(). @@ -106,28 +123,80 @@ public: * @return buffer that must be preserved * @see commit() */ - virtual TargetBufferFlags getPreservedFlags(SwapChain* swapChain) noexcept; + virtual TargetBufferFlags getPreservedFlags(SwapChain* UTILS_NONNULL swapChain) noexcept; + + /** + * Returns true if the swapchain is protected + */ + virtual bool isSwapChainProtected(Platform::SwapChain* UTILS_NONNULL swapChain) noexcept; /** * Called by the driver to establish the default FBO. The default implementation returns 0. - * @return a GLuint casted to a uint32_t that is an OpenGL framebuffer object. + * + * This method can be called either on the regular or protected OpenGL contexts and can return + * a different or identical name, since these names exist in different namespaces. + * + * @return a GLuint casted to a uint32_t that is an OpenGL framebuffer object. */ - virtual uint32_t createDefaultRenderTarget() noexcept; + virtual uint32_t getDefaultFramebufferObject() noexcept; + + + /** + * Type of contexts available + */ + enum class ContextType { + NONE, //!< No current context + UNPROTECTED, //!< current context is unprotected + PROTECTED //!< current context supports protected content + }; + + /** + * Returns the type of the context currently in use. This value is updated by makeCurrent() + * and therefore can be cached between calls. ContextType::PROTECTED can only be returned + * if isProtectedContextSupported() is true. + * @return ContextType + */ + virtual ContextType getCurrentContextType() const noexcept; + + /** + * Binds the requested context to the current thread and drawSwapChain to the default FBO + * returned by getDefaultFramebufferObject(). + * + * @param type type of context to bind to the current thread. + * @param drawSwapChain SwapChain to draw to. It must be bound to the default FBO. + * @param readSwapChain SwapChain to read from (for operation like `glBlitFramebuffer`) + * @return true on success, false on error. + */ + virtual bool makeCurrent(ContextType type, + SwapChain* UTILS_NONNULL drawSwapChain, + SwapChain* UTILS_NONNULL readSwapChain) noexcept = 0; /** * Called by the driver to make the OpenGL context active on the calling thread and bind - * the drawSwapChain to the default render target (FBO) created with createDefaultRenderTarget. + * the drawSwapChain to the default FBO returned by getDefaultFramebufferObject(). + * The context used is either the default context or the protected context. When a context + * change is necessary, the preContextChange and postContextChange callbacks are called, + * before and after the context change respectively. postContextChange is given the index + * of the new context (0 for default and 1 for protected). + * The default implementation just calls makeCurrent(getCurrentContextType(), SwapChain*, SwapChain*). + * * @param drawSwapChain SwapChain to draw to. It must be bound to the default FBO. * @param readSwapChain SwapChain to read from (for operation like `glBlitFramebuffer`) + * @param preContextChange called before the context changes + * @param postContextChange called after the context changes */ - virtual void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept = 0; + virtual void makeCurrent( + SwapChain* UTILS_NONNULL drawSwapChain, + SwapChain* UTILS_NONNULL readSwapChain, + utils::Invocable preContextChange, + utils::Invocable postContextChange) noexcept; /** * Called by the driver once the current frame finishes drawing. Typically, this should present * the drawSwapChain. This is for example where `eglMakeCurrent()` would be called. * @param swapChain the SwapChain to present. */ - virtual void commit(SwapChain* swapChain) noexcept = 0; + virtual void commit(SwapChain* UTILS_NONNULL swapChain) noexcept = 0; /** * Set the time the next committed buffer should be presented to the user at. @@ -152,14 +221,14 @@ public: * * @return A Fence object. The default implementation returns nullptr. */ - virtual Fence* createFence() noexcept; + virtual Fence* UTILS_NULLABLE createFence() noexcept; /** * Destroys a Fence object. The default implementation does nothing. * * @param fence Fence to destroy. */ - virtual void destroyFence(Fence* fence) noexcept; + virtual void destroyFence(Fence* UTILS_NONNULL fence) noexcept; /** * Waits on a Fence. @@ -169,7 +238,7 @@ public: * @return Whether the fence signaled or timed out. See backend::FenceStatus. * The default implementation always return backend::FenceStatus::ERROR. */ - virtual backend::FenceStatus waitFence(Fence* fence, uint64_t timeout) noexcept; + virtual backend::FenceStatus waitFence(Fence* UTILS_NONNULL fence, uint64_t timeout) noexcept; // -------------------------------------------------------------------------------------------- @@ -183,13 +252,13 @@ public: * @param nativeStream The native stream, this parameter depends on the concrete implementation. * @return A new Stream object. */ - virtual Stream* createStream(void* nativeStream) noexcept; + virtual Stream* UTILS_NULLABLE createStream(void* UTILS_NULLABLE nativeStream) noexcept; /** * Destroys a Stream. * @param stream Stream to destroy. */ - virtual void destroyStream(Stream* stream) noexcept; + virtual void destroyStream(Stream* UTILS_NONNULL stream) noexcept; /** * The specified stream takes ownership of the texture (tname) object @@ -199,20 +268,21 @@ public: * @param stream Stream to take ownership of the texture * @param tname GL texture id to "bind" to the Stream. */ - virtual void attach(Stream* stream, intptr_t tname) noexcept; + virtual void attach(Stream* UTILS_NONNULL stream, intptr_t tname) noexcept; /** * Destroys the texture associated to the stream * @param stream Stream to detach from its texture */ - virtual void detach(Stream* stream) noexcept; + virtual void detach(Stream* UTILS_NONNULL stream) noexcept; /** * Updates the content of the texture attached to the stream. * @param stream Stream to update * @param timestamp Output parameter: Timestamp of the image bound to the texture. */ - virtual void updateTexImage(Stream* stream, int64_t* timestamp) noexcept; + virtual void updateTexImage(Stream* UTILS_NONNULL stream, + int64_t* UTILS_NONNULL timestamp) noexcept; // -------------------------------------------------------------------------------------------- @@ -225,13 +295,13 @@ public: * implementation could just return { 0, GL_TEXTURE_2D } at this point. The actual * values can be delayed until setExternalImage. */ - virtual ExternalTexture *createExternalImageTexture() noexcept; + virtual ExternalTexture* UTILS_NULLABLE createExternalImageTexture() noexcept; /** * Destroys an external texture handle and associated data. * @param texture a pointer to the handle to destroy. */ - virtual void destroyExternalImage(ExternalTexture* texture) noexcept; + virtual void destroyExternalImage(ExternalTexture* UTILS_NONNULL texture) noexcept; // called on the application thread to allow Filament to take ownership of the image @@ -244,7 +314,7 @@ public: * @param externalImage A token representing the platform's external image. * @see destroyExternalImage */ - virtual void retainExternalImage(void* externalImage) noexcept; + virtual void retainExternalImage(void* UTILS_NONNULL externalImage) noexcept; /** * Called to bind the platform-specific externalImage to an ExternalTexture. @@ -258,7 +328,8 @@ public: * @param texture an in/out pointer to ExternalTexture, id and target can be updated if necessary. * @return true on success, false on error. */ - virtual bool setExternalImage(void* externalImage, ExternalTexture* texture) noexcept; + virtual bool setExternalImage(void* UTILS_NONNULL externalImage, + ExternalTexture* UTILS_NONNULL texture) noexcept; /** * The method allows platforms to convert a user-supplied external image object into a new type diff --git a/ios/include/filament/backend/platforms/PlatformCocoaGL.h b/thermion_dart/native/include/filament/backend/platforms/PlatformCocoaGL.h similarity index 95% rename from ios/include/filament/backend/platforms/PlatformCocoaGL.h rename to thermion_dart/native/include/filament/backend/platforms/PlatformCocoaGL.h index df03bcbf..97c9c3ce 100644 --- a/ios/include/filament/backend/platforms/PlatformCocoaGL.h +++ b/thermion_dart/native/include/filament/backend/platforms/PlatformCocoaGL.h @@ -17,11 +17,10 @@ #ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_GL_H #define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_GL_H -#include - +#include #include -#include +#include namespace filament::backend { @@ -58,7 +57,7 @@ protected: SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override; SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override; void destroySwapChain(SwapChain* swapChain) noexcept override; - void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; + bool makeCurrent(ContextType type, SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; void commit(SwapChain* swapChain) noexcept override; OpenGLPlatform::ExternalTexture* createExternalImageTexture() noexcept override; void destroyExternalImage(ExternalTexture* texture) noexcept override; diff --git a/ios/include/filament/backend/platforms/PlatformCocoaTouchGL.h b/thermion_dart/native/include/filament/backend/platforms/PlatformCocoaTouchGL.h similarity index 91% rename from ios/include/filament/backend/platforms/PlatformCocoaTouchGL.h rename to thermion_dart/native/include/filament/backend/platforms/PlatformCocoaTouchGL.h index cbdd6a06..e7f1d1ff 100644 --- a/ios/include/filament/backend/platforms/PlatformCocoaTouchGL.h +++ b/thermion_dart/native/include/filament/backend/platforms/PlatformCocoaTouchGL.h @@ -30,7 +30,7 @@ struct PlatformCocoaTouchGLImpl; class PlatformCocoaTouchGL : public OpenGLPlatform { public: PlatformCocoaTouchGL(); - ~PlatformCocoaTouchGL() noexcept; + ~PlatformCocoaTouchGL() noexcept override; // -------------------------------------------------------------------------------------------- // Platform Interface @@ -45,7 +45,7 @@ public: void terminate() noexcept override; - uint32_t createDefaultRenderTarget() noexcept override; + uint32_t getDefaultFramebufferObject() noexcept override; bool isExtraContextSupported() const noexcept override; void createContext(bool shared) override; @@ -53,7 +53,7 @@ public: SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override; SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override; void destroySwapChain(SwapChain* swapChain) noexcept override; - void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; + bool makeCurrent(ContextType type, SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; void commit(SwapChain* swapChain) noexcept override; OpenGLPlatform::ExternalTexture* createExternalImageTexture() noexcept override; diff --git a/ios/include/filament/backend/platforms/PlatformEGL.h b/thermion_dart/native/include/filament/backend/platforms/PlatformEGL.h similarity index 67% rename from ios/include/filament/backend/platforms/PlatformEGL.h rename to thermion_dart/native/include/filament/backend/platforms/PlatformEGL.h index 79400540..ef687653 100644 --- a/ios/include/filament/backend/platforms/PlatformEGL.h +++ b/thermion_dart/native/include/filament/backend/platforms/PlatformEGL.h @@ -17,18 +17,23 @@ #ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_H #define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_H -#include +#include +#include +#include #include #include +#include -#include - -#include +#include +#include #include #include +#include +#include + namespace filament::backend { /** @@ -38,12 +43,11 @@ class PlatformEGL : public OpenGLPlatform { public: PlatformEGL() noexcept; - bool isExtraContextSupported() const noexcept override; - void createContext(bool shared) override; - void releaseContext() noexcept override; + + // Return true if we're on an OpenGL platform (as opposed to OpenGL ES). false by default. + virtual bool isOpenGL() const noexcept; protected: - // -------------------------------------------------------------------------------------------- // Helper for EGL configs and attributes parameters @@ -83,13 +87,30 @@ protected: // -------------------------------------------------------------------------------------------- // OpenGLPlatform Interface + bool isExtraContextSupported() const noexcept override; + void createContext(bool shared) override; + void releaseContext() noexcept override; + void terminate() noexcept override; + bool isProtectedContextSupported() const noexcept override; + bool isSRGBSwapChainSupported() const noexcept override; SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override; SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override; void destroySwapChain(SwapChain* swapChain) noexcept override; - void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; + bool isSwapChainProtected(SwapChain* swapChain) noexcept override; + + ContextType getCurrentContextType() const noexcept override; + + bool makeCurrent(ContextType type, + SwapChain* drawSwapChain, + SwapChain* readSwapChain) noexcept override; + + void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain, + utils::Invocable preContextChange, + utils::Invocable postContextChange) noexcept override; + void commit(SwapChain* swapChain) noexcept override; bool canCreateFence() noexcept override; @@ -116,16 +137,28 @@ protected: static void clearGlError() noexcept; /** - * Always use this instead of eglMakeCurrent(). + * Always use this instead of eglMakeCurrent(), as it tracks some state. */ - EGLBoolean makeCurrent(EGLSurface drawSurface, EGLSurface readSurface) noexcept; + + EGLContext getContextForType(ContextType type) const noexcept; + + // makes the draw and read surface current without changing the current context + EGLBoolean makeCurrent(EGLSurface drawSurface, EGLSurface readSurface) noexcept { + return egl.makeCurrent(drawSurface, readSurface); + } + + // makes context current and set draw and read surfaces to EGL_NO_SURFACE + EGLBoolean makeCurrent(EGLContext context) noexcept { + return egl.makeCurrent(context, mEGLDummySurface, mEGLDummySurface); + } // TODO: this should probably use getters instead. EGLDisplay mEGLDisplay = EGL_NO_DISPLAY; EGLContext mEGLContext = EGL_NO_CONTEXT; - EGLSurface mCurrentDrawSurface = EGL_NO_SURFACE; - EGLSurface mCurrentReadSurface = EGL_NO_SURFACE; + EGLContext mEGLContextProtected = EGL_NO_CONTEXT; EGLSurface mEGLDummySurface = EGL_NO_SURFACE; + ContextType mCurrentContextType = ContextType::NONE; + // mEGLConfig is valid only if ext.egl.KHR_no_config_context is false EGLConfig mEGLConfig = EGL_NO_CONFIG_KHR; Config mContextAttribs; std::vector mAdditionalContexts; @@ -141,13 +174,38 @@ protected: bool KHR_gl_colorspace = false; bool KHR_no_config_context = false; bool KHR_surfaceless_context = false; + bool EXT_protected_content = false; } egl; } ext; + struct SwapChainEGL : public Platform::SwapChain { + EGLSurface sur = EGL_NO_SURFACE; + Config attribs{}; + EGLNativeWindowType nativeWindow{}; + EGLConfig config{}; + uint64_t flags{}; + }; + void initializeGlExtensions() noexcept; +protected: + EGLConfig findSwapChainConfig(uint64_t flags, bool window, bool pbuffer) const; + private: - EGLConfig findSwapChainConfig(uint64_t flags) const; + class EGL { + EGLDisplay& mEGLDisplay; + EGLSurface mCurrentDrawSurface = EGL_NO_SURFACE; + EGLSurface mCurrentReadSurface = EGL_NO_SURFACE; + EGLContext mCurrentContext = EGL_NO_CONTEXT; + public: + explicit EGL(EGLDisplay& dpy) : mEGLDisplay(dpy) {} + EGLBoolean makeCurrent(EGLContext context, + EGLSurface drawSurface, EGLSurface readSurface) noexcept; + + EGLBoolean makeCurrent(EGLSurface drawSurface, EGLSurface readSurface) noexcept { + return makeCurrent(mCurrentContext, drawSurface, readSurface); + } + } egl{ mEGLDisplay }; }; } // namespace filament::backend diff --git a/ios/include/filament/backend/platforms/PlatformEGLAndroid.h b/thermion_dart/native/include/filament/backend/platforms/PlatformEGLAndroid.h similarity index 94% rename from ios/include/filament/backend/platforms/PlatformEGLAndroid.h rename to thermion_dart/native/include/filament/backend/platforms/PlatformEGLAndroid.h index 1c7a4cd7..32f83038 100644 --- a/ios/include/filament/backend/platforms/PlatformEGLAndroid.h +++ b/thermion_dart/native/include/filament/backend/platforms/PlatformEGLAndroid.h @@ -17,8 +17,14 @@ #ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_ANDROID_H #define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_ANDROID_H +#include +#include +#include #include +#include +#include + namespace filament::backend { class ExternalStreamManagerAndroid; diff --git a/ios/include/filament/backend/platforms/PlatformEGLHeadless.h b/thermion_dart/native/include/filament/backend/platforms/PlatformEGLHeadless.h similarity index 95% rename from ios/include/filament/backend/platforms/PlatformEGLHeadless.h rename to thermion_dart/native/include/filament/backend/platforms/PlatformEGLHeadless.h index 13d5fa05..40d285b9 100644 --- a/ios/include/filament/backend/platforms/PlatformEGLHeadless.h +++ b/thermion_dart/native/include/filament/backend/platforms/PlatformEGLHeadless.h @@ -30,6 +30,9 @@ public: Driver* createDriver(void* sharedContext, const Platform::DriverConfig& driverConfig) noexcept override; + +protected: + bool isOpenGL() const noexcept override; }; } // namespace filament diff --git a/ios/include/filament/backend/platforms/PlatformGLX.h b/thermion_dart/native/include/filament/backend/platforms/PlatformGLX.h similarity index 95% rename from ios/include/filament/backend/platforms/PlatformGLX.h rename to thermion_dart/native/include/filament/backend/platforms/PlatformGLX.h index b2be5e40..796e27a1 100644 --- a/ios/include/filament/backend/platforms/PlatformGLX.h +++ b/thermion_dart/native/include/filament/backend/platforms/PlatformGLX.h @@ -51,7 +51,7 @@ protected: SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override; SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override; void destroySwapChain(SwapChain* swapChain) noexcept override; - void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; + bool makeCurrent(ContextType type, SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; void commit(SwapChain* swapChain) noexcept override; private: diff --git a/ios/include/filament/backend/platforms/PlatformWGL.h b/thermion_dart/native/include/filament/backend/platforms/PlatformWGL.h similarity index 95% rename from ios/include/filament/backend/platforms/PlatformWGL.h rename to thermion_dart/native/include/filament/backend/platforms/PlatformWGL.h index 6c16c305..e0003156 100644 --- a/ios/include/filament/backend/platforms/PlatformWGL.h +++ b/thermion_dart/native/include/filament/backend/platforms/PlatformWGL.h @@ -53,7 +53,7 @@ protected: SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override; SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override; void destroySwapChain(SwapChain* swapChain) noexcept override; - void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; + bool makeCurrent(ContextType type, SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; void commit(SwapChain* swapChain) noexcept override; protected: diff --git a/ios/include/filament/backend/platforms/PlatformWebGL.h b/thermion_dart/native/include/filament/backend/platforms/PlatformWebGL.h similarity index 94% rename from ios/include/filament/backend/platforms/PlatformWebGL.h rename to thermion_dart/native/include/filament/backend/platforms/PlatformWebGL.h index 92bff0c4..0d83fbb9 100644 --- a/ios/include/filament/backend/platforms/PlatformWebGL.h +++ b/thermion_dart/native/include/filament/backend/platforms/PlatformWebGL.h @@ -46,7 +46,7 @@ protected: SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override; SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override; void destroySwapChain(SwapChain* swapChain) noexcept override; - void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; + bool makeCurrent(ContextType type, SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; void commit(SwapChain* swapChain) noexcept override; }; diff --git a/ios/include/filament/backend/platforms/VulkanPlatform.h b/thermion_dart/native/include/filament/backend/platforms/VulkanPlatform.h similarity index 86% rename from ios/include/filament/backend/platforms/VulkanPlatform.h rename to thermion_dart/native/include/filament/backend/platforms/VulkanPlatform.h index 87ffc44c..6201d644 100644 --- a/ios/include/filament/backend/platforms/VulkanPlatform.h +++ b/thermion_dart/native/include/filament/backend/platforms/VulkanPlatform.h @@ -20,12 +20,18 @@ #include #include + +#include #include #include +#include #include #include +#include +#include + namespace filament::backend { using SwapChain = Platform::SwapChain; @@ -89,36 +95,44 @@ public: // ---------------------------------------------------- // ---------- Platform Customization options ---------- - /** - * The client preference can be stored within the struct. We allow for two specification of - * preference: - * 1) A substring to match against `VkPhysicalDeviceProperties.deviceName`. - * 2) Index of the device in the list as returned by vkEnumeratePhysicalDevices. - */ - struct GPUPreference { - std::string deviceName; - int8_t index = -1; + struct Customization { + /** + * The client can specify the GPU (i.e. VkDevice) for the platform. We allow the + * following preferences: + * 1) A substring to match against `VkPhysicalDeviceProperties.deviceName`. Empty string + * by default. + * 2) Index of the device in the list as returned by + * `vkEnumeratePhysicalDevices`. -1 by default to indicate no preference. + */ + struct GPUPreference { + utils::CString deviceName; + int8_t index = -1; + } gpu; + + /** + * Whether the platform supports sRGB swapchain. Default is true. + */ + bool isSRGBSwapChainSupported = true; + + /** + * When the platform window is resized, we will flush and wait on the command queues + * before recreating the swapchain. Default is true. + */ + bool flushAndWaitOnWindowResize = true; }; /** - * Client can provide a preference over the GPU to use in the vulkan instance - * @return `GPUPreference` struct that indicates the client's preference + * Client can override to indicate customized behavior or parameter for their platform. + * @return `Customization` struct that indicates the client's platform + * customizations. */ - virtual GPUPreference getPreferredGPU() noexcept { + virtual Customization getCustomization() const noexcept { return {}; } + // -------- End platform customization options -------- // ---------------------------------------------------- - /** - * Returns whether the platform supports sRGB swapchain. This is true by default, and the client - * needs to override this method to specify otherwise. - * @return Whether the platform supports sRGB swapchain. - */ - virtual bool isSRGBSwapChainSupported() const { - return true; - } - /** * Get the images handles and format of the memory backing the swapchain. This should be called * after createSwapChain() or after recreateIfResized(). diff --git a/ios/include/filament/bluegl/BlueGL.h b/thermion_dart/native/include/filament/bluegl/BlueGL.h similarity index 100% rename from ios/include/filament/bluegl/BlueGL.h rename to thermion_dart/native/include/filament/bluegl/BlueGL.h diff --git a/ios/include/filament/bluegl/BlueGLDefines.h b/thermion_dart/native/include/filament/bluegl/BlueGLDefines.h similarity index 100% rename from ios/include/filament/bluegl/BlueGLDefines.h rename to thermion_dart/native/include/filament/bluegl/BlueGLDefines.h diff --git a/ios/include/filament/camutils/Bookmark.h b/thermion_dart/native/include/filament/camutils/Bookmark.h similarity index 100% rename from ios/include/filament/camutils/Bookmark.h rename to thermion_dart/native/include/filament/camutils/Bookmark.h diff --git a/ios/include/filament/camutils/Manipulator.h b/thermion_dart/native/include/filament/camutils/Manipulator.h similarity index 100% rename from ios/include/filament/camutils/Manipulator.h rename to thermion_dart/native/include/filament/camutils/Manipulator.h diff --git a/ios/include/filament/camutils/compiler.h b/thermion_dart/native/include/filament/camutils/compiler.h similarity index 100% rename from ios/include/filament/camutils/compiler.h rename to thermion_dart/native/include/filament/camutils/compiler.h diff --git a/ios/include/filament/filamat/Enums.h b/thermion_dart/native/include/filament/filamat/Enums.h similarity index 100% rename from ios/include/filament/filamat/Enums.h rename to thermion_dart/native/include/filament/filamat/Enums.h diff --git a/ios/include/filament/filamat/IncludeCallback.h b/thermion_dart/native/include/filament/filamat/IncludeCallback.h similarity index 100% rename from ios/include/filament/filamat/IncludeCallback.h rename to thermion_dart/native/include/filament/filamat/IncludeCallback.h diff --git a/ios/include/filament/filamat/MaterialBuilder.h b/thermion_dart/native/include/filament/filamat/MaterialBuilder.h similarity index 96% rename from ios/include/filament/filamat/MaterialBuilder.h rename to thermion_dart/native/include/filament/filamat/MaterialBuilder.h index c48adb79..2e2d0963 100644 --- a/ios/include/filament/filamat/MaterialBuilder.h +++ b/thermion_dart/native/include/filament/filamat/MaterialBuilder.h @@ -127,7 +127,7 @@ public: protected: // Looks at platform and target API, then decides on shader models and output formats. - void prepare(bool vulkanSemantics); + void prepare(bool vulkanSemantics, filament::backend::FeatureLevel featureLevel); using ShaderModel = filament::backend::ShaderModel; Platform mPlatform = Platform::DESKTOP; @@ -135,11 +135,13 @@ protected: Optimization mOptimization = Optimization::PERFORMANCE; bool mPrintShaders = false; bool mGenerateDebugInfo = false; + bool mIncludeEssl1 = true; utils::bitset32 mShaderModels; struct CodeGenParams { ShaderModel shaderModel; TargetApi targetApi; TargetLanguage targetLanguage; + filament::backend::FeatureLevel featureLevel; }; std::vector mCodeGenPermutations; @@ -241,6 +243,7 @@ public: using Precision = filament::backend::Precision; using CullingMode = filament::backend::CullingMode; using FeatureLevel = filament::backend::FeatureLevel; + using StereoscopicType = filament::backend::StereoscopicType; enum class VariableQualifier : uint8_t { OUT @@ -270,6 +273,9 @@ public: MaterialBuilder& noSamplerValidation(bool enabled) noexcept; + //! Enable generation of ESSL 1.0 code in FL0 materials. + MaterialBuilder& includeEssl1(bool enabled) noexcept; + //! Set the name of this material. MaterialBuilder& name(const char* name) noexcept; @@ -306,12 +312,8 @@ public: */ MaterialBuilder& parameter(const char* name, SamplerType samplerType, SamplerFormat format = SamplerFormat::FLOAT, - ParameterPrecision precision = ParameterPrecision::DEFAULT) noexcept; - - /// @copydoc parameter(SamplerType, SamplerFormat, ParameterPrecision, const char*) - MaterialBuilder& parameter(const char* name, SamplerType samplerType, - ParameterPrecision precision) noexcept; - + ParameterPrecision precision = ParameterPrecision::DEFAULT, + bool multisample = false) noexcept; MaterialBuilder& buffer(filament::BufferInterfaceBlock bib) noexcept; @@ -408,7 +410,8 @@ public: /** * Set the blending mode of the post-lighting color for this material. * Only OPAQUE, TRANSPARENT and ADD are supported, the default is TRANSPARENT. - * This setting requires the material property "postLightingColor" to be set. + * This setting requires the material properties "postLightingColor" and + * "postLightingMixFactor" to be set. */ MaterialBuilder& postLightingBlending(BlendingMode blending) noexcept; @@ -520,6 +523,12 @@ public: //! Specifies how transparent objects should be rendered (default is DEFAULT). MaterialBuilder& transparencyMode(TransparencyMode mode) noexcept; + //! Specify the stereoscopic type (default is INSTANCED) + MaterialBuilder& stereoscopicType(StereoscopicType stereoscopicType) noexcept; + + //! Specify the number of eyes for stereoscopic rendering + MaterialBuilder& stereoscopicEyeCount(uint8_t eyeCount) noexcept; + /** * Enable / disable custom surface shading. Custom surface shading requires the LIT * shading model. In addition, the following function must be defined in the fragment @@ -617,8 +626,8 @@ public: Parameter() noexcept: parameterType(INVALID) {} // Sampler - Parameter(const char* paramName, SamplerType t, SamplerFormat f, ParameterPrecision p) - : name(paramName), size(1), precision(p), samplerType(t), format(f), parameterType(SAMPLER) { } + Parameter(const char* paramName, SamplerType t, SamplerFormat f, ParameterPrecision p, bool ms) + : name(paramName), size(1), precision(p), samplerType(t), format(f), parameterType(SAMPLER), multisample(ms) { } // Uniform Parameter(const char* paramName, UniformType t, size_t typeSize, ParameterPrecision p) @@ -635,6 +644,7 @@ public: SamplerType samplerType; SubpassType subpassType; SamplerFormat format; + bool multisample; enum { INVALID, UNIFORM, @@ -690,8 +700,8 @@ public: std::string peek(filament::backend::ShaderStage type, const CodeGenParams& params, const PropertyList& properties) noexcept; - // Returns true if any of the parameter samplers is of type samplerExternal - bool hasExternalSampler() const noexcept; + // Returns true if any of the parameter samplers matches the specified type. + bool hasSamplerType(SamplerType samplerType) const noexcept; static constexpr size_t MAX_PARAMETERS_COUNT = 48; static constexpr size_t MAX_SUBPASS_COUNT = 1; @@ -754,7 +764,7 @@ private: MaterialBuilder::PropertyList& allProperties, CodeGenParams const& semanticCodeGenParams) noexcept; - bool runSemanticAnalysis(MaterialInfo const& info, + bool runSemanticAnalysis(MaterialInfo* inOutInfo, CodeGenParams const& semanticCodeGenParams) noexcept; bool checkLiteRequirements() noexcept; @@ -827,6 +837,8 @@ private: Interpolation mInterpolation = Interpolation::SMOOTH; VertexDomain mVertexDomain = VertexDomain::OBJECT; TransparencyMode mTransparencyMode = TransparencyMode::DEFAULT; + StereoscopicType mStereoscopicType = StereoscopicType::INSTANCED; + uint8_t mStereoscopicEyeCount = 2; filament::AttributeBitset mRequiredAttributes; diff --git a/ios/include/filament/filamat/Package.h b/thermion_dart/native/include/filament/filamat/Package.h similarity index 100% rename from ios/include/filament/filamat/Package.h rename to thermion_dart/native/include/filament/filamat/Package.h diff --git a/ios/include/filament/filament-iblprefilter/IBLPrefilterContext.h b/thermion_dart/native/include/filament/filament-iblprefilter/IBLPrefilterContext.h similarity index 96% rename from ios/include/filament/filament-iblprefilter/IBLPrefilterContext.h rename to thermion_dart/native/include/filament/filament-iblprefilter/IBLPrefilterContext.h index 815ff613..903c4258 100644 --- a/ios/include/filament/filament-iblprefilter/IBLPrefilterContext.h +++ b/thermion_dart/native/include/filament/filament-iblprefilter/IBLPrefilterContext.h @@ -88,12 +88,23 @@ public: */ class EquirectangularToCubemap { public: + + struct Config { + bool mirror = true; //!< mirror the source horizontally + }; + /** - * Creates a EquirectangularToCubemap processor. + * Creates a EquirectangularToCubemap processor using the default Config * @param context IBLPrefilterContext to use */ explicit EquirectangularToCubemap(IBLPrefilterContext& context); + /** + * Creates a EquirectangularToCubemap processor using the provided Config + * @param context IBLPrefilterContext to use + */ + EquirectangularToCubemap(IBLPrefilterContext& context, Config const& config); + /** * Destroys all GPU resources created during initialization. */ @@ -125,6 +136,7 @@ public: private: IBLPrefilterContext& mContext; filament::Material* mEquirectMaterial = nullptr; + Config mConfig{}; }; /** diff --git a/ios/include/filament/filament/Box.h b/thermion_dart/native/include/filament/filament/Box.h similarity index 89% rename from ios/include/filament/filament/Box.h rename to thermion_dart/native/include/filament/filament/Box.h index 36f19924..da6638da 100644 --- a/ios/include/filament/filament/Box.h +++ b/thermion_dart/native/include/filament/filament/Box.h @@ -21,10 +21,14 @@ #include -#include - +#include #include #include +#include + +#include + +#include namespace filament { @@ -70,7 +74,7 @@ public: * @return This bounding box */ Box& set(const math::float3& min, const math::float3& max) noexcept { - // float3 ctor needed for visual studio + // float3 ctor needed for Visual Studio center = (max + min) * math::float3(0.5f); halfExtent = (max - min) * math::float3(0.5f); return *this; @@ -130,17 +134,17 @@ public: struct UTILS_PUBLIC Aabb { /** min coordinates */ - math::float3 min = std::numeric_limits::max(); + math::float3 min = FLT_MAX; /** max coordinates */ - math::float3 max = std::numeric_limits::lowest(); + math::float3 max = -FLT_MAX; /** * Computes the center of the box. * @return (max + min)/2 */ math::float3 center() const noexcept { - // float3 ctor needed for visual studio + // float3 ctor needed for Visual Studio return (max + min) * math::float3(0.5f); } @@ -149,7 +153,7 @@ struct UTILS_PUBLIC Aabb { * @return (max - min)/2 */ math::float3 extent() const noexcept { - // float3 ctor needed for visual studio + // float3 ctor needed for Visual Studio return (max - min) * math::float3(0.5f); } @@ -170,6 +174,8 @@ struct UTILS_PUBLIC Aabb { value_type const* data() const { return vertices; } value_type * data() { return vertices; } size_t size() const { return 8; } + value_type const& operator[](size_t i) const noexcept { return vertices[i]; } + value_type& operator[](size_t i) noexcept { return vertices[i]; } value_type vertices[8]; }; @@ -196,12 +202,14 @@ struct UTILS_PUBLIC Aabb { * @return the maximum signed distance to the box. Negative if p is in the box */ float contains(math::float3 p) const noexcept { + // we don't use std::max to avoid a dependency on + auto const maximum = [](auto a, auto b) { return a > b ? a : b; }; float d = min.x - p.x; - d = std::max(d, min.y - p.y); - d = std::max(d, min.z - p.z); - d = std::max(d, p.x - max.x); - d = std::max(d, p.y - max.y); - d = std::max(d, p.z - max.z); + d = maximum(d, min.y - p.y); + d = maximum(d, min.z - p.z); + d = maximum(d, p.x - max.x); + d = maximum(d, p.y - max.y); + d = maximum(d, p.z - max.z); return d; } diff --git a/ios/include/filament/filament/BufferObject.h b/thermion_dart/native/include/filament/filament/BufferObject.h similarity index 94% rename from ios/include/filament/filament/BufferObject.h rename to thermion_dart/native/include/filament/filament/BufferObject.h index 1ede31b8..74a4b1ff 100644 --- a/ios/include/filament/filament/BufferObject.h +++ b/thermion_dart/native/include/filament/filament/BufferObject.h @@ -22,11 +22,13 @@ #include #include - #include #include +#include +#include + namespace filament { class FBufferObject; @@ -82,8 +84,7 @@ public: * * @param engine Reference to the filament::Engine to associate this BufferObject with. * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. + * @return pointer to the newly created object * * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of * memory or other resources. @@ -91,7 +92,7 @@ public: * * @see IndexBuffer::setBuffer */ - BufferObject* build(Engine& engine); + BufferObject* UTILS_NONNULL build(Engine& engine); private: friend class FBufferObject; }; @@ -110,6 +111,10 @@ public: * @return The maximum capacity of the BufferObject. */ size_t getByteCount() const noexcept; + +protected: + // prevent heap allocation + ~BufferObject() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/Camera.h b/thermion_dart/native/include/filament/filament/Camera.h similarity index 91% rename from ios/include/filament/filament/Camera.h rename to thermion_dart/native/include/filament/filament/Camera.h index ea263438..74f34af0 100644 --- a/ios/include/filament/filament/Camera.h +++ b/thermion_dart/native/include/filament/filament/Camera.h @@ -26,6 +26,12 @@ #include #include #include +#include + +#include + +#include +#include namespace utils { class Entity; @@ -172,6 +178,30 @@ public: HORIZONTAL //!< the field-of-view angle is defined on the horizontal axis }; + /** Returns the projection matrix from the field-of-view. + * + * @param fovInDegrees full field-of-view in degrees. 0 < \p fov < 180. + * @param aspect aspect ratio \f$ \frac{width}{height} \f$. \p aspect > 0. + * @param near distance in world units from the camera to the near plane. \p near > 0. + * @param far distance in world units from the camera to the far plane. \p far > \p near. + * @param direction direction of the \p fovInDegrees parameter. + * + * @see Fov. + */ + static math::mat4 projection(Fov direction, double fovInDegrees, + double aspect, double near, double far = INFINITY); + + /** Returns the projection matrix from the focal length. + * + * @param focalLengthInMillimeters lens's focal length in millimeters. \p focalLength > 0. + * @param aspect aspect ratio \f$ \frac{width}{height} \f$. \p aspect > 0. + * @param near distance in world units from the camera to the near plane. \p near > 0. + * @param far distance in world units from the camera to the far plane. \p far > \p near. + */ + static math::mat4 projection(double focalLengthInMillimeters, + double aspect, double near, double far = INFINITY); + + /** Sets the projection matrix from a frustum defined by six planes. * * @param projection type of #Projection to use. @@ -209,7 +239,8 @@ public: double bottom, double top, double near, double far); - /** Sets the projection matrix from the field-of-view. + + /** Utility to set the projection matrix from the field-of-view. * * @param fovInDegrees full field-of-view in degrees. 0 < \p fov < 180. * @param aspect aspect ratio \f$ \frac{width}{height} \f$. \p aspect > 0. @@ -222,7 +253,7 @@ public: void setProjection(double fovInDegrees, double aspect, double near, double far, Fov direction = Fov::VERTICAL); - /** Sets the projection matrix from the focal length. + /** Utility to set the projection matrix from the focal length. * * @param focalLengthInMillimeters lens's focal length in millimeters. \p focalLength > 0. * @param aspect aspect ratio \f$ \frac{width}{height} \f$. \p aspect > 0. @@ -232,13 +263,8 @@ public: void setLensProjection(double focalLengthInMillimeters, double aspect, double near, double far); + /** Sets a custom projection matrix. - * - * The projection matrix must be of one of the following form: - * a 0 tx 0 a 0 0 tx - * 0 b ty 0 0 b 0 ty - * 0 0 tz c 0 0 c tz - * 0 0 -1 0 0 0 0 1 * * The projection matrix must define an NDC system that must match the OpenGL convention, * that is all 3 axis are mapped to [-1, 1]. @@ -249,31 +275,7 @@ public: */ void setCustomProjection(math::mat4 const& projection, double near, double far) noexcept; - /** Sets a custom projection matrix for each eye. - * - * The projectionForCulling, near, and far parameters establish a "culling frustum" which must - * encompass anything either eye can see. - * - * @param projection an array of projection matrices, only the first - * CONFIG_STEREOSCOPIC_EYES (2) are read - * @param count size of the projection matrix array to set, must be - * >= CONFIG_STEREOSCOPIC_EYES (2) - * @param projectionForCulling custom projection matrix for culling, must encompass both eyes - * @param near distance in world units from the camera to the culling near plane. \p near > 0. - * @param far distance in world units from the camera to the culling far plane. \p far > \p - * near. - * @see setCustomProjection - */ - void setCustomEyeProjection(math::mat4 const* projection, size_t count, - math::mat4 const& projectionForCulling, double near, double far); - /** Sets the projection matrix. - * - * The projection matrices must be of one of the following form: - * a 0 tx 0 a 0 0 tx - * 0 b ty 0 0 b 0 ty - * 0 0 tz c 0 0 c tz - * 0 0 -1 0 0 0 0 1 * * The projection matrices must define an NDC system that must match the OpenGL convention, * that is all 3 axis are mapped to [-1, 1]. @@ -286,6 +288,27 @@ public: void setCustomProjection(math::mat4 const& projection, math::mat4 const& projectionForCulling, double near, double far) noexcept; + /** Sets a custom projection matrix for each eye. + * + * The projectionForCulling, near, and far parameters establish a "culling frustum" which must + * encompass anything any eye can see. All projection matrices must be set simultaneously. The + * number of stereoscopic eyes is controlled by the stereoscopicEyeCount setting inside of + * Engine::Config. + * + * @param projection an array of projection matrices, only the first config.stereoscopicEyeCount + * are read + * @param count size of the projection matrix array to set, must be + * >= config.stereoscopicEyeCount + * @param projectionForCulling custom projection matrix for culling, must encompass both eyes + * @param near distance in world units from the camera to the culling near plane. \p near > 0. + * @param far distance in world units from the camera to the culling far plane. \p far > \p + * near. + * @see setCustomProjection + * @see Engine::Config::stereoscopicEyeCount + */ + void setCustomEyeProjection(math::mat4 const* UTILS_NONNULL projection, size_t count, + math::mat4 const& projectionForCulling, double near, double far); + /** Sets an additional matrix that scales the projection matrix. * * This is useful to adjust the aspect ratio of the camera independent from its projection. @@ -342,8 +365,8 @@ public: * The projection matrix used for rendering always has its far plane set to infinity. This * is why it may differ from the matrix set through setProjection() or setLensProjection(). * - * @param eyeId the index of the eye to return the projection matrix for, must be < - * CONFIG_STEREOSCOPIC_EYES (2) + * @param eyeId the index of the eye to return the projection matrix for, must be + * < config.stereoscopicEyeCount * @return The projection matrix used for rendering * * @see setProjection, setLensProjection, setCustomProjection, getCullingProjectionMatrix, @@ -401,7 +424,7 @@ public: * This method is not intended to be called every frame. Instead, to update the position of the * head, use Camera::setModelMatrix. * - * @param eyeId the index of the eye to set, must be < CONFIG_STEREOSCOPIC_EYES (2) + * @param eyeId the index of the eye to set, must be < config.stereoscopicEyeCount * @param model the model matrix for an individual eye */ void setEyeModelMatrix(uint8_t eyeId, math::mat4 const& model); @@ -524,33 +547,6 @@ public: * * \param p the projection matrix to inverse * \returns the inverse of the projection matrix \p p - * - * \warning the projection matrix to invert must have one of the form below: - * - perspective projection - * - * \f$ - * \left( - * \begin{array}{cccc} - * a & 0 & tx & 0 \\ - * 0 & b & ty & 0 \\ - * 0 & 0 & tz & c \\ - * 0 & 0 & -1 & 0 \\ - * \end{array} - * \right) - * \f$ - * - * - orthographic projection - * - * \f$ - * \left( - * \begin{array}{cccc} - * a & 0 & 0 & tx \\ - * 0 & b & 0 & ty \\ - * 0 & 0 & c & tz \\ - * 0 & 0 & 0 & 1 \\ - * \end{array} - * \right) - * \f$ */ static math::mat4 inverseProjection(const math::mat4& p) noexcept; @@ -577,6 +573,10 @@ public: * @return effective full field of view in degrees */ static double computeEffectiveFov(double fovInDegrees, double focusDistance) noexcept; + +protected: + // prevent heap allocation + ~Camera() = default; }; } // namespace filament diff --git a/windows/include/filament/filament/Color.h b/thermion_dart/native/include/filament/filament/Color.h similarity index 99% rename from windows/include/filament/filament/Color.h rename to thermion_dart/native/include/filament/filament/Color.h index fa03b1e2..30b77856 100644 --- a/windows/include/filament/filament/Color.h +++ b/thermion_dart/native/include/filament/filament/Color.h @@ -24,6 +24,9 @@ #include #include +#include +#include + namespace filament { //! RGB color in linear space diff --git a/ios/include/filament/filament/ColorGrading.h b/thermion_dart/native/include/filament/filament/ColorGrading.h similarity index 98% rename from ios/include/filament/filament/ColorGrading.h rename to thermion_dart/native/include/filament/filament/ColorGrading.h index db709600..e5c8f3ca 100644 --- a/ios/include/filament/filament/ColorGrading.h +++ b/thermion_dart/native/include/filament/filament/ColorGrading.h @@ -26,6 +26,9 @@ #include +#include +#include + namespace filament { class Engine; @@ -200,7 +203,7 @@ public: * * @return This Builder, for chaining calls */ - Builder& toneMapper(const ToneMapper* toneMapper) noexcept; + Builder& toneMapper(ToneMapper const* UTILS_NULLABLE toneMapper) noexcept; /** * Selects the tone mapping operator to apply to the HDR color buffer as the last @@ -470,14 +473,17 @@ public: * * @param engine Reference to the filament::Engine to associate this ColorGrading with. * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. + * @return pointer to the newly created object. */ - ColorGrading* build(Engine& engine); + ColorGrading* UTILS_NONNULL build(Engine& engine); private: friend class FColorGrading; }; + +protected: + // prevent heap allocation + ~ColorGrading() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/ColorSpace.h b/thermion_dart/native/include/filament/filament/ColorSpace.h similarity index 99% rename from ios/include/filament/filament/ColorSpace.h rename to thermion_dart/native/include/filament/filament/ColorSpace.h index 502ac8db..d8890955 100644 --- a/ios/include/filament/filament/ColorSpace.h +++ b/thermion_dart/native/include/filament/filament/ColorSpace.h @@ -18,7 +18,6 @@ #define TNT_FILAMENT_COLOR_SPACE_H #include -#include namespace filament::color { diff --git a/windows/include/filament/filament/DebugRegistry.h b/thermion_dart/native/include/filament/filament/DebugRegistry.h similarity index 56% rename from windows/include/filament/filament/DebugRegistry.h rename to thermion_dart/native/include/filament/filament/DebugRegistry.h index b5fb8f21..d5e1d8e9 100644 --- a/windows/include/filament/filament/DebugRegistry.h +++ b/thermion_dart/native/include/filament/filament/DebugRegistry.h @@ -25,7 +25,7 @@ #include -#include +#include namespace filament { @@ -39,27 +39,12 @@ namespace filament { class UTILS_PUBLIC DebugRegistry : public FilamentAPI { public: - /** - * Type of a property - */ - enum Type { - BOOL, INT, FLOAT, FLOAT2, FLOAT3, FLOAT4 - }; - - /** - * Information about a property - */ - struct Property { - const char* name; //!< property name - Type type; //!< property type - }; - /** * Queries whether a property exists * @param name The name of the property to query * @return true if the property exists, false otherwise */ - bool hasProperty(const char* name) const noexcept; + bool hasProperty(const char* UTILS_NONNULL name) const noexcept; /** * Queries the address of a property's data from its name @@ -67,15 +52,30 @@ public: * @return Address of the data of the \p name property * @{ */ - void* getPropertyAddress(const char* name) noexcept; + void* UTILS_NULLABLE getPropertyAddress(const char* UTILS_NONNULL name); + + void const* UTILS_NULLABLE getPropertyAddress(const char* UTILS_NONNULL name) const noexcept; template - inline T* getPropertyAddress(const char* name) noexcept { + inline T* UTILS_NULLABLE getPropertyAddress(const char* UTILS_NONNULL name) { return static_cast(getPropertyAddress(name)); } template - inline bool getPropertyAddress(const char* name, T** p) noexcept { + inline T const* UTILS_NULLABLE getPropertyAddress(const char* UTILS_NONNULL name) const noexcept { + return static_cast(getPropertyAddress(name)); + } + + template + inline bool getPropertyAddress(const char* UTILS_NONNULL name, + T* UTILS_NULLABLE* UTILS_NONNULL p) { + *p = getPropertyAddress(name); + return *p != nullptr; + } + + template + inline bool getPropertyAddress(const char* UTILS_NONNULL name, + T* const UTILS_NULLABLE* UTILS_NONNULL p) const noexcept { *p = getPropertyAddress(name); return *p != nullptr; } @@ -88,12 +88,12 @@ public: * @return true if the operation was successful, false otherwise. * @{ */ - bool setProperty(const char* name, bool v) noexcept; - bool setProperty(const char* name, int v) noexcept; - bool setProperty(const char* name, float v) noexcept; - bool setProperty(const char* name, math::float2 v) noexcept; - bool setProperty(const char* name, math::float3 v) noexcept; - bool setProperty(const char* name, math::float4 v) noexcept; + bool setProperty(const char* UTILS_NONNULL name, bool v) noexcept; + bool setProperty(const char* UTILS_NONNULL name, int v) noexcept; + bool setProperty(const char* UTILS_NONNULL name, float v) noexcept; + bool setProperty(const char* UTILS_NONNULL name, math::float2 v) noexcept; + bool setProperty(const char* UTILS_NONNULL name, math::float3 v) noexcept; + bool setProperty(const char* UTILS_NONNULL name, math::float4 v) noexcept; /** @}*/ /** @@ -103,20 +103,20 @@ public: * @return true if the call was successful and \p v was updated * @{ */ - bool getProperty(const char* name, bool* v) const noexcept; - bool getProperty(const char* name, int* v) const noexcept; - bool getProperty(const char* name, float* v) const noexcept; - bool getProperty(const char* name, math::float2* v) const noexcept; - bool getProperty(const char* name, math::float3* v) const noexcept; - bool getProperty(const char* name, math::float4* v) const noexcept; + bool getProperty(const char* UTILS_NONNULL name, bool* UTILS_NONNULL v) const noexcept; + bool getProperty(const char* UTILS_NONNULL name, int* UTILS_NONNULL v) const noexcept; + bool getProperty(const char* UTILS_NONNULL name, float* UTILS_NONNULL v) const noexcept; + bool getProperty(const char* UTILS_NONNULL name, math::float2* UTILS_NONNULL v) const noexcept; + bool getProperty(const char* UTILS_NONNULL name, math::float3* UTILS_NONNULL v) const noexcept; + bool getProperty(const char* UTILS_NONNULL name, math::float4* UTILS_NONNULL v) const noexcept; /** @}*/ struct DataSource { - void const* data; + void const* UTILS_NULLABLE data; size_t count; }; - DataSource getDataSource(const char* name) const noexcept; + DataSource getDataSource(const char* UTILS_NONNULL name) const noexcept; struct FrameHistory { using duration_ms = float; @@ -129,6 +129,10 @@ public: float pid_i = 0.0f; float pid_d = 0.0f; }; + +protected: + // prevent heap allocation + ~DebugRegistry() = default; }; diff --git a/ios/include/filament/filament/Engine.h b/thermion_dart/native/include/filament/filament/Engine.h similarity index 67% rename from ios/include/filament/filament/Engine.h rename to thermion_dart/native/include/filament/filament/Engine.h index f4173f26..b741d3ab 100644 --- a/ios/include/filament/filament/Engine.h +++ b/thermion_dart/native/include/filament/filament/Engine.h @@ -19,9 +19,14 @@ #include +#include #include #include +#include + +#include +#include namespace utils { class Entity; @@ -172,10 +177,12 @@ public: using Platform = backend::Platform; using Backend = backend::Backend; using DriverConfig = backend::Platform::DriverConfig; + using FeatureLevel = backend::FeatureLevel; + using StereoscopicType = backend::StereoscopicType; /** * Config is used to define the memory footprint used by the engine, such as the - * command buffer size. Config can be used to customize engine requirements based + * command buffer size. Config can be used to customize engine requirements based * on the applications needs. * * .perRenderPassArenaSizeMB (default: 3 MiB) @@ -267,11 +274,77 @@ public: * This value does not affect the application's memory usage. */ uint32_t perFrameCommandsSizeMB = FILAMENT_PER_FRAME_COMMANDS_SIZE_IN_MB; + + /** + * Number of threads to use in Engine's JobSystem. + * + * Engine uses a utils::JobSystem to carry out paralleization of Engine workloads. This + * value sets the number of threads allocated for JobSystem. Configuring this value can be + * helpful in CPU-constrained environments where too many threads can cause contention of + * CPU and reduce performance. + * + * The default value is 0, which implies that the Engine will use a heuristic to determine + * the number of threads to use. + */ + uint32_t jobSystemThreadCount = 0; + + /* + * Number of most-recently destroyed textures to track for use-after-free. + * + * This will cause the backend to throw an exception when a texture is freed but still bound + * to a SamplerGroup and used in a draw call. 0 disables completely. + * + * Currently only respected by the Metal backend. + */ + size_t textureUseAfterFreePoolSize = 0; + + /** + * Set to `true` to forcibly disable parallel shader compilation in the backend. + * Currently only honored by the GL and Metal backends. + */ + bool disableParallelShaderCompile = false; + + /* + * The type of technique for stereoscopic rendering. + * + * This setting determines the algorithm used when stereoscopic rendering is enabled. This + * decision applies to the entire Engine for the lifetime of the Engine. E.g., multiple + * Views created from the Engine must use the same stereoscopic type. + * + * Each view can enable stereoscopic rendering via the StereoscopicOptions::enable flag. + * + * @see View::setStereoscopicOptions + */ + StereoscopicType stereoscopicType = StereoscopicType::INSTANCED; + + /* + * The number of eyes to render when stereoscopic rendering is enabled. Supported values are + * between 1 and Engine::getMaxStereoscopicEyes() (inclusive). + * + * @see View::setStereoscopicOptions + * @see Engine::getMaxStereoscopicEyes + */ + uint8_t stereoscopicEyeCount = 2; + + /* + * @deprecated This value is no longer used. + */ + uint32_t resourceAllocatorCacheSizeMB = 64; + + /* + * This value determines for how many frames are texture entries kept in the cache. + */ + uint32_t resourceAllocatorCacheMaxAge = 2; + + /* + * Disable backend handles use-after-free checks. + */ + bool disableHandleUseAfterFreeCheck = false; }; #if UTILS_HAS_THREADING - using CreateCallback = void(void* user, void* token); + using CreateCallback = void(void* UTILS_NULLABLE user, void* UTILS_NONNULL token); #endif /** @@ -310,7 +383,7 @@ public: * * @return A reference to this Builder for chaining calls. */ - Builder& platform(Platform* platform) noexcept; + Builder& platform(Platform* UTILS_NULLABLE platform) noexcept; /** * @param config A pointer to optional parameters to specify memory size @@ -318,7 +391,7 @@ public: * * @return A reference to this Builder for chaining calls. */ - Builder& config(const Config* config) noexcept; + Builder& config(const Config* UTILS_NULLABLE config) noexcept; /** * @param sharedContext A platform-dependant context used as a shared context @@ -326,7 +399,21 @@ public: * * @return A reference to this Builder for chaining calls. */ - Builder& sharedContext(void* sharedContext) noexcept; + Builder& sharedContext(void* UTILS_NULLABLE sharedContext) noexcept; + + /** + * @param featureLevel The feature level at which initialize Filament. + * @return A reference to this Builder for chaining calls. + */ + Builder& featureLevel(FeatureLevel featureLevel) noexcept; + + /** + * Warning: This is an experimental API. See Engine::setPaused(bool) for caveats. + * + * @param paused Whether to start the rendering thread paused. + * @return A reference to this Builder for chaining calls. + */ + Builder& paused(bool paused) noexcept; #if UTILS_HAS_THREADING /** @@ -335,7 +422,7 @@ public: * @param callback Callback called once the engine is initialized and it is safe to * call Engine::getEngine(). */ - void build(utils::Invocable&& callback) const; + void build(utils::Invocable&& callback) const; #endif /** @@ -350,16 +437,17 @@ public: * allocate the command buffer. If exceptions are disabled, this condition if * fatal and this function will abort. */ - Engine* build() const; + Engine* UTILS_NULLABLE build() const; }; /** * Backward compatibility helper to create an Engine. * @see Builder */ - static inline Engine* create(Backend backend = Backend::DEFAULT, - Platform* platform = nullptr, void* sharedContext = nullptr, - const Config* config = nullptr) { + static inline Engine* UTILS_NULLABLE create(Backend backend = Backend::DEFAULT, + Platform* UTILS_NULLABLE platform = nullptr, + void* UTILS_NULLABLE sharedContext = nullptr, + const Config* UTILS_NULLABLE config = nullptr) { return Engine::Builder() .backend(backend) .platform(platform) @@ -374,16 +462,18 @@ public: * Backward compatibility helper to create an Engine asynchronously. * @see Builder */ - static inline void createAsync(CreateCallback callback, void* user, + static inline void createAsync(CreateCallback callback, + void* UTILS_NULLABLE user, Backend backend = Backend::DEFAULT, - Platform* platform = nullptr, void* sharedContext = nullptr, - const Config* config = nullptr) { + Platform* UTILS_NULLABLE platform = nullptr, + void* UTILS_NULLABLE sharedContext = nullptr, + const Config* UTILS_NULLABLE config = nullptr) { Engine::Builder() .backend(backend) .platform(platform) .sharedContext(sharedContext) .config(config) - .build([callback, user](void* token) { + .build([callback, user](void* UTILS_NONNULL token) { callback(user, token); }); } @@ -400,7 +490,7 @@ public: * allocate the command buffer. If exceptions are disabled, this condition if fatal and * this function will abort. */ - static Engine* getEngine(void* token); + static Engine* UTILS_NULLABLE getEngine(void* UTILS_NONNULL token); #endif @@ -430,7 +520,7 @@ public: * \remark * This method is thread-safe. */ - static void destroy(Engine** engine); + static void destroy(Engine* UTILS_NULLABLE* UTILS_NULLABLE engine); /** * Destroy the Engine instance and all associated resources. @@ -457,10 +547,7 @@ public: * \remark * This method is thread-safe. */ - static void destroy(Engine* engine); - - using FeatureLevel = backend::FeatureLevel; - + static void destroy(Engine* UTILS_NULLABLE engine); /** * Query the feature level supported by the selected backend. @@ -473,17 +560,23 @@ public: FeatureLevel getSupportedFeatureLevel() const noexcept; /** - * Activate all features of a given feature level. By default FeatureLevel::FEATURE_LEVEL_1 is - * active. The selected feature level must not be higher than the value returned by - * getActiveFeatureLevel() and it's not possible lower the active feature level. + * Activate all features of a given feature level. If an explicit feature level is not specified + * at Engine initialization time via Builder::featureLevel, the default feature level is + * FeatureLevel::FEATURE_LEVEL_0 on devices not compatible with GLES 3.0; otherwise, the default + * is FeatureLevel::FEATURE_LEVEL_1. The selected feature level must not be higher than the + * value returned by getActiveFeatureLevel() and it's not possible lower the active feature + * level. Additionally, it is not possible to modify the feature level at all if the Engine was + * initialized at FeatureLevel::FEATURE_LEVEL_0. * * @param featureLevel the feature level to activate. If featureLevel is lower than - * getActiveFeatureLevel(), the current (higher) feature level is kept. - * If featureLevel is higher than getSupportedFeatureLevel(), an exception - * is thrown, or the program is terminated if exceptions are disabled. + * getActiveFeatureLevel(), the current (higher) feature level is kept. If + * featureLevel is higher than getSupportedFeatureLevel(), or if the engine + * was initialized at feature level 0, an exception is thrown, or the + * program is terminated if exceptions are disabled. * * @return the active feature level. * + * @see Builder::featureLevel * @see getSupportedFeatureLevel * @see getActiveFeatureLevel */ @@ -514,12 +607,35 @@ public: size_t getMaxAutomaticInstances() const noexcept; /** - * Queries the device and platform for instanced stereo rendering support. + * Queries the device and platform for support of the given stereoscopic type. * - * @return true if stereo rendering is supported, false otherwise + * @return true if the given stereo rendering is supported, false otherwise * @see View::setStereoscopicOptions */ - bool isStereoSupported() const noexcept; + bool isStereoSupported(StereoscopicType stereoscopicType) const noexcept; + + /** + * Retrieves the configuration settings of this Engine. + * + * This method returns the configuration object that was supplied to the Engine's + * Builder::config method during the creation of this Engine. If the Builder::config method was + * not explicitly called (or called with nullptr), this method returns the default configuration + * settings. + * + * @return a Config object with this Engine's configuration + * @see Builder::config + */ + const Config& getConfig() const noexcept; + + /** + * Returns the maximum number of stereoscopic eyes supported by Filament. The actual number of + * eyes rendered is set at Engine creation time with the Engine::Config::stereoscopicEyeCount + * setting. + * + * @return the max number of stereoscopic eyes supported + * @see Engine::Config::stereoscopicEyeCount + */ + static size_t getMaxStereoscopicEyes() noexcept; /** * @return EntityManager used by filament @@ -579,11 +695,11 @@ public: * `ANativeWindow*`. * @param flags One or more configuration flags as defined in `SwapChain`. * - * @return A pointer to the newly created SwapChain or nullptr if it couldn't be created. + * @return A pointer to the newly created SwapChain. * * @see Renderer.beginFrame() */ - SwapChain* createSwapChain(void* nativeWindow, uint64_t flags = 0) noexcept; + SwapChain* UTILS_NONNULL createSwapChain(void* UTILS_NULLABLE nativeWindow, uint64_t flags = 0) noexcept; /** @@ -593,42 +709,42 @@ public: * @param height Height of the drawing buffer in pixels. * @param flags One or more configuration flags as defined in `SwapChain`. * - * @return A pointer to the newly created SwapChain or nullptr if it couldn't be created. + * @return A pointer to the newly created SwapChain. * * @see Renderer.beginFrame() */ - SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags = 0) noexcept; + SwapChain* UTILS_NONNULL createSwapChain(uint32_t width, uint32_t height, uint64_t flags = 0) noexcept; /** * Creates a renderer associated to this engine. * * A Renderer is intended to map to a *window* on screen. * - * @return A pointer to the newly created Renderer or nullptr if it couldn't be created. + * @return A pointer to the newly created Renderer. */ - Renderer* createRenderer() noexcept; + Renderer* UTILS_NONNULL createRenderer() noexcept; /** * Creates a View. * - * @return A pointer to the newly created View or nullptr if it couldn't be created. + * @return A pointer to the newly created View. */ - View* createView() noexcept; + View* UTILS_NONNULL createView() noexcept; /** * Creates a Scene. * - * @return A pointer to the newly created Scene or nullptr if it couldn't be created. + * @return A pointer to the newly created Scene. */ - Scene* createScene() noexcept; + Scene* UTILS_NONNULL createScene() noexcept; /** * Creates a Camera component. * * @param entity Entity to add the camera component to. - * @return A pointer to the newly created Camera or nullptr if it couldn't be created. + * @return A pointer to the newly created Camera. */ - Camera* createCamera(utils::Entity entity) noexcept; + Camera* UTILS_NONNULL createCamera(utils::Entity entity) noexcept; /** * Returns the Camera component of the given entity. @@ -638,7 +754,7 @@ public: * have a Camera component. The pointer is valid until destroyCameraComponent() * is called or the entity itself is destroyed. */ - Camera* getCameraComponent(utils::Entity entity) noexcept; + Camera* UTILS_NULLABLE getCameraComponent(utils::Entity entity) noexcept; /** * Destroys the Camera component associated with the given entity. @@ -650,17 +766,17 @@ public: /** * Creates a Fence. * - * @return A pointer to the newly created Fence or nullptr if it couldn't be created. + * @return A pointer to the newly created Fence. */ - Fence* createFence() noexcept; + Fence* UTILS_NONNULL createFence() noexcept; - bool destroy(const BufferObject* p); //!< Destroys a BufferObject object. - bool destroy(const VertexBuffer* p); //!< Destroys an VertexBuffer object. - bool destroy(const Fence* p); //!< Destroys a Fence object. - bool destroy(const IndexBuffer* p); //!< Destroys an IndexBuffer object. - bool destroy(const SkinningBuffer* p); //!< Destroys a SkinningBuffer object. - bool destroy(const MorphTargetBuffer* p); //!< Destroys a MorphTargetBuffer object. - bool destroy(const IndirectLight* p); //!< Destroys an IndirectLight object. + bool destroy(const BufferObject* UTILS_NULLABLE p); //!< Destroys a BufferObject object. + bool destroy(const VertexBuffer* UTILS_NULLABLE p); //!< Destroys an VertexBuffer object. + bool destroy(const Fence* UTILS_NULLABLE p); //!< Destroys a Fence object. + bool destroy(const IndexBuffer* UTILS_NULLABLE p); //!< Destroys an IndexBuffer object. + bool destroy(const SkinningBuffer* UTILS_NULLABLE p); //!< Destroys a SkinningBuffer object. + bool destroy(const MorphTargetBuffer* UTILS_NULLABLE p); //!< Destroys a MorphTargetBuffer object. + bool destroy(const IndirectLight* UTILS_NULLABLE p); //!< Destroys an IndirectLight object. /** * Destroys a Material object @@ -670,38 +786,38 @@ public: * @exception utils::PreConditionPanic is thrown if some MaterialInstances remain. * no-op if exceptions are disabled and some MaterialInstances remain. */ - bool destroy(const Material* p); - bool destroy(const MaterialInstance* p); //!< Destroys a MaterialInstance object. - bool destroy(const Renderer* p); //!< Destroys a Renderer object. - bool destroy(const Scene* p); //!< Destroys a Scene object. - bool destroy(const Skybox* p); //!< Destroys a SkyBox object. - bool destroy(const ColorGrading* p); //!< Destroys a ColorGrading object. - bool destroy(const SwapChain* p); //!< Destroys a SwapChain object. - bool destroy(const Stream* p); //!< Destroys a Stream object. - bool destroy(const Texture* p); //!< Destroys a Texture object. - bool destroy(const RenderTarget* p); //!< Destroys a RenderTarget object. - bool destroy(const View* p); //!< Destroys a View object. - bool destroy(const InstanceBuffer* p); //!< Destroys an InstanceBuffer object. - void destroy(utils::Entity e); //!< Destroys all filament-known components from this entity + bool destroy(const Material* UTILS_NULLABLE p); + bool destroy(const MaterialInstance* UTILS_NULLABLE p); //!< Destroys a MaterialInstance object. + bool destroy(const Renderer* UTILS_NULLABLE p); //!< Destroys a Renderer object. + bool destroy(const Scene* UTILS_NULLABLE p); //!< Destroys a Scene object. + bool destroy(const Skybox* UTILS_NULLABLE p); //!< Destroys a SkyBox object. + bool destroy(const ColorGrading* UTILS_NULLABLE p); //!< Destroys a ColorGrading object. + bool destroy(const SwapChain* UTILS_NULLABLE p); //!< Destroys a SwapChain object. + bool destroy(const Stream* UTILS_NULLABLE p); //!< Destroys a Stream object. + bool destroy(const Texture* UTILS_NULLABLE p); //!< Destroys a Texture object. + bool destroy(const RenderTarget* UTILS_NULLABLE p); //!< Destroys a RenderTarget object. + bool destroy(const View* UTILS_NULLABLE p); //!< Destroys a View object. + bool destroy(const InstanceBuffer* UTILS_NULLABLE p); //!< Destroys an InstanceBuffer object. + void destroy(utils::Entity e); //!< Destroys all filament-known components from this entity - bool isValid(const BufferObject* p); //!< Tells whether a BufferObject object is valid - bool isValid(const VertexBuffer* p); //!< Tells whether an VertexBuffer object is valid - bool isValid(const Fence* p); //!< Tells whether a Fence object is valid - bool isValid(const IndexBuffer* p); //!< Tells whether an IndexBuffer object is valid - bool isValid(const SkinningBuffer* p); //!< Tells whether a SkinningBuffer object is valid - bool isValid(const MorphTargetBuffer* p); //!< Tells whether a MorphTargetBuffer object is valid - bool isValid(const IndirectLight* p); //!< Tells whether an IndirectLight object is valid - bool isValid(const Material* p); //!< Tells whether an IndirectLight object is valid - bool isValid(const Renderer* p); //!< Tells whether a Renderer object is valid - bool isValid(const Scene* p); //!< Tells whether a Scene object is valid - bool isValid(const Skybox* p); //!< Tells whether a SkyBox object is valid - bool isValid(const ColorGrading* p); //!< Tells whether a ColorGrading object is valid - bool isValid(const SwapChain* p); //!< Tells whether a SwapChain object is valid - bool isValid(const Stream* p); //!< Tells whether a Stream object is valid - bool isValid(const Texture* p); //!< Tells whether a Texture object is valid - bool isValid(const RenderTarget* p); //!< Tells whether a RenderTarget object is valid - bool isValid(const View* p); //!< Tells whether a View object is valid - bool isValid(const InstanceBuffer* p); //!< Tells whether an InstanceBuffer object is valid + bool isValid(const BufferObject* UTILS_NULLABLE p); //!< Tells whether a BufferObject object is valid + bool isValid(const VertexBuffer* UTILS_NULLABLE p); //!< Tells whether an VertexBuffer object is valid + bool isValid(const Fence* UTILS_NULLABLE p); //!< Tells whether a Fence object is valid + bool isValid(const IndexBuffer* UTILS_NULLABLE p); //!< Tells whether an IndexBuffer object is valid + bool isValid(const SkinningBuffer* UTILS_NULLABLE p); //!< Tells whether a SkinningBuffer object is valid + bool isValid(const MorphTargetBuffer* UTILS_NULLABLE p); //!< Tells whether a MorphTargetBuffer object is valid + bool isValid(const IndirectLight* UTILS_NULLABLE p); //!< Tells whether an IndirectLight object is valid + bool isValid(const Material* UTILS_NULLABLE p); //!< Tells whether an IndirectLight object is valid + bool isValid(const Renderer* UTILS_NULLABLE p); //!< Tells whether a Renderer object is valid + bool isValid(const Scene* UTILS_NULLABLE p); //!< Tells whether a Scene object is valid + bool isValid(const Skybox* UTILS_NULLABLE p); //!< Tells whether a SkyBox object is valid + bool isValid(const ColorGrading* UTILS_NULLABLE p); //!< Tells whether a ColorGrading object is valid + bool isValid(const SwapChain* UTILS_NULLABLE p); //!< Tells whether a SwapChain object is valid + bool isValid(const Stream* UTILS_NULLABLE p); //!< Tells whether a Stream object is valid + bool isValid(const Texture* UTILS_NULLABLE p); //!< Tells whether a Texture object is valid + bool isValid(const RenderTarget* UTILS_NULLABLE p); //!< Tells whether a RenderTarget object is valid + bool isValid(const View* UTILS_NULLABLE p); //!< Tells whether a View object is valid + bool isValid(const InstanceBuffer* UTILS_NULLABLE p); //!< Tells whether an InstanceBuffer object is valid /** * Kicks the hardware thread (e.g. the OpenGL, Vulkan or Metal thread) and blocks until @@ -724,6 +840,21 @@ public: */ void flush(); + /** + * Pause or resume rendering thread. + * + *

Warning: This is an experimental API. In particular, note the following caveats. + * + *

  • + * Buffer callbacks will never be called as long as the rendering thread is paused. + * Do not rely on a buffer callback to unpause the thread. + *
  • + * While the rendering thread is paused, rendering commands will continue to be queued until the + * buffer limit is reached. When the limit is reached, the program will abort. + *
+ */ + void setPaused(bool paused); + /** * Drains the user callback message queue and immediately execute all pending callbacks. * @@ -741,7 +872,7 @@ public: * * @return A pointer to the default Material instance (a singleton). */ - const Material* getDefaultMaterial() const noexcept; + Material const* UTILS_NONNULL getDefaultMaterial() const noexcept; /** * Returns the resolved backend. @@ -772,7 +903,7 @@ public: * @return A pointer to the Platform object that was provided to Engine::create, or the * Filament-created one. */ - Platform* getPlatform() const noexcept; + Platform* UTILS_NULLABLE getPlatform() const noexcept; /** * Allocate a small amount of memory directly in the command stream. The allocated memory is @@ -785,7 +916,7 @@ public: * @note there is no need to destroy this buffer, it will be freed automatically when * the current command buffer is executed. */ - void* streamAlloc(size_t size, size_t alignment = alignof(double)) noexcept; + void* UTILS_NULLABLE streamAlloc(size_t size, size_t alignment = alignof(double)) noexcept; /** * Invokes one iteration of the render loop, used only on single-threaded platforms. @@ -804,14 +935,14 @@ public: #if defined(__EMSCRIPTEN__) /** * WebGL only: Tells the driver to reset any internal state tracking if necessary. - * - * This is only useful when integrating an external renderer into Filament on platforms + * + * This is only useful when integrating an external renderer into Filament on platforms * like WebGL, where share contexts do not exist. Filament keeps track of the GL * state it has set (like which texture is bound), and does not re-set that state if * it does not think it needs to. However, if an external renderer has set different * state in the mean time, Filament will use that new state unknowingly. - * - * If you are in this situation, call this function - ideally only once per frame, + * + * If you are in this situation, call this function - ideally only once per frame, * immediately after calling Engine::execute(). */ void resetBackendState() noexcept; diff --git a/ios/include/filament/filament/Exposure.h b/thermion_dart/native/include/filament/filament/Exposure.h similarity index 100% rename from ios/include/filament/filament/Exposure.h rename to thermion_dart/native/include/filament/filament/Exposure.h diff --git a/ios/include/filament/filament/Fence.h b/thermion_dart/native/include/filament/filament/Fence.h similarity index 93% rename from ios/include/filament/filament/Fence.h rename to thermion_dart/native/include/filament/filament/Fence.h index bcfd2871..673d12cd 100644 --- a/ios/include/filament/filament/Fence.h +++ b/thermion_dart/native/include/filament/filament/Fence.h @@ -25,6 +25,8 @@ #include +#include + namespace filament { /** @@ -74,7 +76,11 @@ public: * @return FenceStatus::CONDITION_SATISFIED on success, * FenceStatus::ERROR otherwise. */ - static FenceStatus waitAndDestroy(Fence* fence, Mode mode = Mode::FLUSH); + static FenceStatus waitAndDestroy(Fence* UTILS_NONNULL fence, Mode mode = Mode::FLUSH); + +protected: + // prevent heap allocation + ~Fence() = default; }; } // namespace filament diff --git a/windows/include/filament/filament/FilamentAPI.h b/thermion_dart/native/include/filament/filament/FilamentAPI.h similarity index 94% rename from windows/include/filament/filament/FilamentAPI.h rename to thermion_dart/native/include/filament/filament/FilamentAPI.h index 2925aca4..19d6ba24 100644 --- a/windows/include/filament/filament/FilamentAPI.h +++ b/thermion_dart/native/include/filament/filament/FilamentAPI.h @@ -49,8 +49,6 @@ public: // prevent heap allocation static void *operator new (size_t) = delete; static void *operator new[] (size_t) = delete; - static void operator delete (void*) = delete; - static void operator delete[](void*) = delete; }; template diff --git a/windows/include/filament/filament/Frustum.h b/thermion_dart/native/include/filament/filament/Frustum.h similarity index 94% rename from windows/include/filament/filament/Frustum.h rename to thermion_dart/native/include/filament/filament/Frustum.h index bfd01b04..ceec55eb 100644 --- a/windows/include/filament/filament/Frustum.h +++ b/thermion_dart/native/include/filament/filament/Frustum.h @@ -23,9 +23,12 @@ #include #include +#include #include // Because we define NEAR and FAR in the Plane enum. +#include + namespace filament { class Box; @@ -76,14 +79,14 @@ public: * @param planes six plane equations encoded as in getNormalizedPlane() in * left, right, bottom, top, far, near order */ - void getNormalizedPlanes(math::float4 planes[6]) const noexcept; + void getNormalizedPlanes(math::float4 planes[UTILS_NONNULL 6]) const noexcept; /** * Returns all six frustum planes in left, right, bottom, top, far, near order * @return six plane equations encoded as in getNormalizedPlane() in * left, right, bottom, top, far, near order */ - math::float4 const* getNormalizedPlanes() const noexcept { return mPlanes; } + math::float4 const* UTILS_NONNULL getNormalizedPlanes() const noexcept { return mPlanes; } /** * Returns whether a box intersects the frustum (i.e. is visible) diff --git a/ios/include/filament/filament/IndexBuffer.h b/thermion_dart/native/include/filament/filament/IndexBuffer.h similarity index 95% rename from ios/include/filament/filament/IndexBuffer.h rename to thermion_dart/native/include/filament/filament/IndexBuffer.h index 09b47929..35b8a10e 100644 --- a/ios/include/filament/filament/IndexBuffer.h +++ b/thermion_dart/native/include/filament/filament/IndexBuffer.h @@ -27,6 +27,7 @@ #include +#include #include namespace filament { @@ -88,8 +89,7 @@ public: * * @param engine Reference to the filament::Engine to associate this IndexBuffer with. * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. + * @return pointer to the newly created object. * * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of * memory or other resources. @@ -97,7 +97,7 @@ public: * * @see IndexBuffer::setBuffer */ - IndexBuffer* build(Engine& engine); + IndexBuffer* UTILS_NONNULL build(Engine& engine); private: friend class FIndexBuffer; }; @@ -118,6 +118,10 @@ public: * @return The number of indices the IndexBuffer holds. */ size_t getIndexCount() const noexcept; + +protected: + // prevent heap allocation + ~IndexBuffer() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/IndirectLight.h b/thermion_dart/native/include/filament/filament/IndirectLight.h similarity index 94% rename from ios/include/filament/filament/IndirectLight.h rename to thermion_dart/native/include/filament/filament/IndirectLight.h index 70448523..c230dac8 100644 --- a/ios/include/filament/filament/IndirectLight.h +++ b/thermion_dart/native/include/filament/filament/IndirectLight.h @@ -25,6 +25,8 @@ #include +#include + namespace filament { class Engine; @@ -114,7 +116,7 @@ public: * @return This Builder, for chaining calls. * */ - Builder& reflections(Texture const* cubemap) noexcept; + Builder& reflections(Texture const* UTILS_NULLABLE cubemap) noexcept; /** * Sets the irradiance as Spherical Harmonics. @@ -160,7 +162,7 @@ public: * Because the coefficients are pre-scaled, `sh[0]` is the environment's * average irradiance. */ - Builder& irradiance(uint8_t bands, math::float3 const* sh) noexcept; + Builder& irradiance(uint8_t bands, math::float3 const* UTILS_NONNULL sh) noexcept; /** * Sets the irradiance from the radiance expressed as Spherical Harmonics. @@ -192,7 +194,7 @@ public: * * @return This Builder, for chaining calls. */ - Builder& radiance(uint8_t bands, math::float3 const* sh) noexcept; + Builder& radiance(uint8_t bands, math::float3 const* UTILS_NONNULL sh) noexcept; /** * Sets the irradiance as a cubemap. @@ -211,7 +213,7 @@ public: * * @see irradiance(uint8_t bands, math::float3 const* sh) */ - Builder& irradiance(Texture const* cubemap) noexcept; + Builder& irradiance(Texture const* UTILS_NULLABLE cubemap) noexcept; /** * (optional) Environment intensity. @@ -247,7 +249,7 @@ public: * memory or other resources. * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. */ - IndirectLight* build(Engine& engine); + IndirectLight* UTILS_NONNULL build(Engine& engine); private: friend class FIndirectLight; @@ -284,12 +286,12 @@ public: /** * Returns the associated reflection map, or null if it does not exist. */ - Texture const* getReflectionsTexture() const noexcept; + Texture const* UTILS_NULLABLE getReflectionsTexture() const noexcept; /** * Returns the associated irradiance map, or null if it does not exist. */ - Texture const* getIrradianceTexture() const noexcept; + Texture const* UTILS_NULLABLE getIrradianceTexture() const noexcept; /** * Helper to estimate the direction of the dominant light in the environment represented by @@ -312,7 +314,7 @@ public: * @see LightManager::Builder::direction() * @see getColorEstimate() */ - static math::float3 getDirectionEstimate(const math::float3 sh[9]) noexcept; + static math::float3 getDirectionEstimate(const math::float3 sh[UTILS_NONNULL 9]) noexcept; /** * Helper to estimate the color and relative intensity of the environment represented by @@ -332,7 +334,8 @@ public: * @see LightManager::Builder::intensity() * @see getDirectionEstimate, getIntensity, setIntensity */ - static math::float4 getColorEstimate(const math::float3 sh[9], math::float3 direction) noexcept; + static math::float4 getColorEstimate(const math::float3 sh[UTILS_NONNULL 9], + math::float3 direction) noexcept; /** @deprecated use static versions instead */ @@ -342,6 +345,10 @@ public: /** @deprecated use static versions instead */ UTILS_DEPRECATED math::float4 getColorEstimate(math::float3 direction) const noexcept; + +protected: + // prevent heap allocation + ~IndirectLight() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/InstanceBuffer.h b/thermion_dart/native/include/filament/filament/InstanceBuffer.h similarity index 87% rename from ios/include/filament/filament/InstanceBuffer.h rename to thermion_dart/native/include/filament/filament/InstanceBuffer.h index d1ad29a9..2135152d 100644 --- a/ios/include/filament/filament/InstanceBuffer.h +++ b/thermion_dart/native/include/filament/filament/InstanceBuffer.h @@ -18,11 +18,14 @@ #define TNT_FILAMENT_INSTANCEBUFFER_H #include - #include +#include + #include +#include + namespace filament { /** @@ -45,7 +48,7 @@ public: * >= 1 and <= \c Engine::getMaxAutomaticInstances() * @see Engine::getMaxAutomaticInstances */ - Builder(size_t instanceCount) noexcept; + explicit Builder(size_t instanceCount) noexcept; Builder(Builder const& rhs) noexcept; Builder(Builder&& rhs) noexcept; @@ -65,12 +68,12 @@ public: * @param localTransforms an array of math::mat4f with length instanceCount, must remain * valid until after build() is called */ - Builder& localTransforms(math::mat4f const* localTransforms) noexcept; + Builder& localTransforms(math::mat4f const* UTILS_NULLABLE localTransforms) noexcept; /** * Creates the InstanceBuffer object and returns a pointer to it. */ - InstanceBuffer* build(Engine& engine); + InstanceBuffer* UTILS_NONNULL build(Engine& engine); private: friend class FInstanceBuffer; @@ -90,7 +93,12 @@ public: * @param count the number of local transforms * @param offset index of the first instance to set local transforms */ - void setLocalTransforms(math::mat4f const* localTransforms, size_t count, size_t offset = 0); + void setLocalTransforms(math::mat4f const* UTILS_NONNULL localTransforms, + size_t count, size_t offset = 0); + +protected: + // prevent heap allocation + ~InstanceBuffer() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/LightManager.h b/thermion_dart/native/include/filament/filament/LightManager.h similarity index 97% rename from ios/include/filament/filament/LightManager.h rename to thermion_dart/native/include/filament/filament/LightManager.h index b7cb62e1..22d663f2 100644 --- a/ios/include/filament/filament/LightManager.h +++ b/thermion_dart/native/include/filament/filament/LightManager.h @@ -27,6 +27,9 @@ #include #include +#include +#include + namespace utils { class Entity; } // namespace utils @@ -143,20 +146,13 @@ public: using Instance = utils::EntityInstance; /** - * Returns the number of component in the LightManager, not that component are not + * Returns the number of component in the LightManager, note that component are not * guaranteed to be active. Use the EntityManager::isAlive() before use if needed. * * @return number of component in the LightManager */ size_t getComponentCount() const noexcept; - /** - * Returns the list of Entity for all components. Use getComponentCount() to know the size - * of the list. - * @return a pointer to Entity - */ - utils::Entity const* getEntities() const noexcept; - /** * Returns whether a particular Entity is associated with a component of this LightManager * @param e An Entity. @@ -164,6 +160,24 @@ public: */ bool hasComponent(utils::Entity e) const noexcept; + /** + * @return true if the this manager has no components + */ + bool empty() const noexcept; + + /** + * Retrieve the `Entity` of the component from its `Instance`. + * @param i Instance of the component obtained from getInstance() + * @return + */ + utils::Entity getEntity(Instance i) const noexcept; + + /** + * Retrieve the Entities of all the components of this manager. + * @return A list, in no particular order, of all the entities managed by this manager. + */ + utils::Entity const* UTILS_NONNULL getEntities() const noexcept; + /** * Gets an Instance representing the Light component associated with the given Entity. * @param e An Entity. @@ -380,7 +394,7 @@ public: * positions into * @param cascades the number of shadow cascades, at most 4 */ - static void computeUniformSplits(float* splitPositions, uint8_t cascades); + static void computeUniformSplits(float* UTILS_NONNULL splitPositions, uint8_t cascades); /** * Utility method to compute ShadowOptions::cascadeSplitPositions according to a logarithmic @@ -392,7 +406,7 @@ public: * @param near the camera near plane * @param far the camera far plane */ - static void computeLogSplits(float* splitPositions, uint8_t cascades, + static void computeLogSplits(float* UTILS_NONNULL splitPositions, uint8_t cascades, float near, float far); /** @@ -412,7 +426,7 @@ public: * @param lambda a float in the range [0, 1] that interpolates between log and * uniform split schemes */ - static void computePracticalSplits(float* splitPositions, uint8_t cascades, + static void computePracticalSplits(float* UTILS_NONNULL splitPositions, uint8_t cascades, float near, float far, float lambda); }; @@ -953,19 +967,9 @@ public: */ bool isShadowCaster(Instance i) const noexcept; - /** - * Helper to process all components with a given function - * @tparam F a void(Entity entity, Instance instance) - * @param func a function of type F - */ - template - void forEachComponent(F func) noexcept { - utils::Entity const* const pEntity = getEntities(); - for (size_t i = 0, c = getComponentCount(); i < c; i++) { - // Instance 0 is the invalid instance - func(pEntity[i], Instance(i + 1)); - } - } +protected: + // prevent heap allocation + ~LightManager() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/Material.h b/thermion_dart/native/include/filament/filament/Material.h similarity index 83% rename from ios/include/filament/filament/Material.h rename to thermion_dart/native/include/filament/filament/Material.h index 35faaf50..b4b9bbed 100644 --- a/ios/include/filament/filament/Material.h +++ b/thermion_dart/native/include/filament/filament/Material.h @@ -30,7 +30,12 @@ #include +#include +#include + +#include #include +#include namespace utils { class CString; @@ -50,11 +55,11 @@ class UTILS_PUBLIC Material : public FilamentAPI { struct BuilderDetails; public: - using BlendingMode = BlendingMode; - using Shading = Shading; - using Interpolation = Interpolation; - using VertexDomain = VertexDomain; - using TransparencyMode = TransparencyMode; + using BlendingMode = filament::BlendingMode; + using Shading = filament::Shading; + using Interpolation = filament::Interpolation; + using VertexDomain = filament::VertexDomain; + using TransparencyMode = filament::TransparencyMode; using ParameterType = backend::UniformType; using Precision = backend::Precision; @@ -69,7 +74,7 @@ public: */ struct ParameterInfo { //! Name of the parameter. - const char* name; + const char* UTILS_NONNULL name; //! Whether the parameter is a sampler (texture). bool isSampler; //! Whether the parameter is a subpass type. @@ -105,7 +110,7 @@ public: * @param payload Pointer to the material data, must stay valid until build() is called. * @param size Size of the material data pointed to by "payload" in bytes. */ - Builder& package(const void* payload, size_t size); + Builder& package(const void* UTILS_NONNULL payload, size_t size); template using is_supported_constant_parameter_t = typename std::enable_if< @@ -127,11 +132,11 @@ public: * in the material definition. */ template> - Builder& constant(const char* name, size_t nameLength, T value); + Builder& constant(const char* UTILS_NONNULL name, size_t nameLength, T value); /** inline helper to provide the constant name as a null-terminated C string */ template> - inline Builder& constant(const char* name, T value) { + inline Builder& constant(const char* UTILS_NONNULL name, T value) { return constant(name, strlen(name), value); } @@ -147,7 +152,7 @@ public: * memory or other resources. * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. */ - Material* build(Engine& engine); + Material* UTILS_NULLABLE build(Engine& engine); private: friend class FMaterial; }; @@ -193,22 +198,22 @@ public: */ void compile(CompilerPriorityQueue priority, UserVariantFilterMask variants, - backend::CallbackHandler* handler = nullptr, - utils::Invocable&& callback = {}) noexcept; + backend::CallbackHandler* UTILS_NULLABLE handler = nullptr, + utils::Invocable&& callback = {}) noexcept; inline void compile(CompilerPriorityQueue priority, UserVariantFilterBit variants, - backend::CallbackHandler* handler = nullptr, - utils::Invocable&& callback = {}) noexcept { + backend::CallbackHandler* UTILS_NULLABLE handler = nullptr, + utils::Invocable&& callback = {}) noexcept { compile(priority, UserVariantFilterMask(variants), handler, - std::forward>(callback)); + std::forward>(callback)); } inline void compile(CompilerPriorityQueue priority, - backend::CallbackHandler* handler = nullptr, - utils::Invocable&& callback = {}) noexcept { + backend::CallbackHandler* UTILS_NULLABLE handler = nullptr, + utils::Invocable&& callback = {}) noexcept { compile(priority, UserVariantFilterBit::ALL, handler, - std::forward>(callback)); + std::forward>(callback)); } /** @@ -220,13 +225,13 @@ public: * * @return A pointer to the new instance. */ - MaterialInstance* createInstance(const char* name = nullptr) const noexcept; + MaterialInstance* UTILS_NONNULL createInstance(const char* UTILS_NULLABLE name = nullptr) const noexcept; //! Returns the name of this material as a null-terminated string. - const char* getName() const noexcept; + const char* UTILS_NONNULL getName() const noexcept; //! Returns the shading model of this material. - Shading getShading() const noexcept; + Shading getShading() const noexcept; //! Returns the interpolation mode of this material. This affects how variables are interpolated. Interpolation getInterpolation() const noexcept; @@ -237,6 +242,9 @@ public: //! Returns the vertex domain of this material. VertexDomain getVertexDomain() const noexcept; + //! Returns the material's supported variants + UserVariantFilterMask getSupportedVariants() const noexcept; + //! Returns the material domain of this material. //! The material domain determines how the material is used. MaterialDomain getMaterialDomain() const noexcept; @@ -291,6 +299,9 @@ public: //! Returns the reflection mode used by this material. ReflectionMode getReflectionMode() const noexcept; + //! Returns the minimum required feature level for this material. + backend::FeatureLevel getFeatureLevel() const noexcept; + /** * Returns the number of parameters declared by this material. * The returned value can be 0. @@ -306,13 +317,13 @@ public: * * @return The number of parameters written to the parameters pointer. */ - size_t getParameters(ParameterInfo* parameters, size_t count) const noexcept; + size_t getParameters(ParameterInfo* UTILS_NONNULL parameters, size_t count) const noexcept; //! Indicates whether a parameter of the given name exists on this material. - bool hasParameter(const char* name) const noexcept; + bool hasParameter(const char* UTILS_NONNULL name) const noexcept; //! Indicates whether an existing parameter is a sampler or not. - bool isSampler(const char* name) const noexcept; + bool isSampler(const char* UTILS_NONNULL name) const noexcept; /** * Sets the value of the given parameter on this material's default instance. @@ -323,7 +334,7 @@ public: * @see getDefaultInstance() */ template - void setDefaultParameter(const char* name, T value) noexcept { + void setDefaultParameter(const char* UTILS_NONNULL name, T value) noexcept { getDefaultInstance()->setParameter(name, value); } @@ -336,8 +347,8 @@ public: * * @see getDefaultInstance() */ - void setDefaultParameter(const char* name, Texture const* texture, - TextureSampler const& sampler) noexcept { + void setDefaultParameter(const char* UTILS_NONNULL name, + Texture const* UTILS_NULLABLE texture, TextureSampler const& sampler) noexcept { getDefaultInstance()->setParameter(name, texture, sampler); } @@ -350,7 +361,7 @@ public: * * @see getDefaultInstance() */ - void setDefaultParameter(const char* name, RgbType type, math::float3 color) noexcept { + void setDefaultParameter(const char* UTILS_NONNULL name, RgbType type, math::float3 color) noexcept { getDefaultInstance()->setParameter(name, type, color); } @@ -363,15 +374,19 @@ public: * * @see getDefaultInstance() */ - void setDefaultParameter(const char* name, RgbaType type, math::float4 color) noexcept { + void setDefaultParameter(const char* UTILS_NONNULL name, RgbaType type, math::float4 color) noexcept { getDefaultInstance()->setParameter(name, type, color); } //! Returns this material's default instance. - MaterialInstance* getDefaultInstance() noexcept; + MaterialInstance* UTILS_NONNULL getDefaultInstance() noexcept; //! Returns this material's default instance. - MaterialInstance const* getDefaultInstance() const noexcept; + MaterialInstance const* UTILS_NONNULL getDefaultInstance() const noexcept; + +protected: + // prevent heap allocation + ~Material() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/MaterialChunkType.h b/thermion_dart/native/include/filament/filament/MaterialChunkType.h similarity index 97% rename from ios/include/filament/filament/MaterialChunkType.h rename to thermion_dart/native/include/filament/filament/MaterialChunkType.h index 9e115645..6cff2003 100644 --- a/ios/include/filament/filament/MaterialChunkType.h +++ b/thermion_dart/native/include/filament/filament/MaterialChunkType.h @@ -42,6 +42,7 @@ enum UTILS_PUBLIC ChunkType : uint64_t { MaterialSib = charTo64bitNum("MAT_SIB "), MaterialSubpass = charTo64bitNum("MAT_SUB "), MaterialGlsl = charTo64bitNum("MAT_GLSL"), + MaterialEssl1 = charTo64bitNum("MAT_ESS1"), MaterialSpirv = charTo64bitNum("MAT_SPIR"), MaterialMetal = charTo64bitNum("MAT_METL"), MaterialShaderModels = charTo64bitNum("MAT_SMDL"), @@ -66,6 +67,7 @@ enum UTILS_PUBLIC ChunkType : uint64_t { MaterialSpecularAntiAliasingThreshold = charTo64bitNum("MAT_STHR"), MaterialClearCoatIorChange = charTo64bitNum("MAT_CIOR"), MaterialDomain = charTo64bitNum("MAT_DOMN"), + MaterialVariantFilterMask = charTo64bitNum("MAT_VFLT"), MaterialRefraction = charTo64bitNum("MAT_REFM"), MaterialRefractionType = charTo64bitNum("MAT_REFT"), MaterialReflectionMode = charTo64bitNum("MAT_REFL"), diff --git a/ios/include/filament/filament/MaterialEnums.h b/thermion_dart/native/include/filament/filament/MaterialEnums.h similarity index 98% rename from ios/include/filament/filament/MaterialEnums.h rename to thermion_dart/native/include/filament/filament/MaterialEnums.h index c511c293..ebe2ccce 100644 --- a/ios/include/filament/filament/MaterialEnums.h +++ b/thermion_dart/native/include/filament/filament/MaterialEnums.h @@ -28,7 +28,7 @@ namespace filament { // update this when a new version of filament wouldn't work with older materials -static constexpr size_t MATERIAL_VERSION = 43; +static constexpr size_t MATERIAL_VERSION = 51; /** * Supported shading models @@ -201,7 +201,7 @@ enum class ReflectionMode : uint8_t { // can't really use std::underlying_type::type because the driver takes a uint32_t using AttributeBitset = utils::bitset32; -static constexpr size_t MATERIAL_PROPERTIES_COUNT = 26; +static constexpr size_t MATERIAL_PROPERTIES_COUNT = 27; enum class Property : uint8_t { BASE_COLOR, //!< float4, all shading models ROUGHNESS, //!< float, lit shading models only @@ -223,6 +223,7 @@ enum class Property : uint8_t { EMISSIVE, //!< float4, all shading models NORMAL, //!< float3, all shading models only, except unlit POST_LIGHTING_COLOR, //!< float4, all shading models + POST_LIGHTING_MIX_FACTOR,//!< float, all shading models CLIP_SPACE_TRANSFORM, //!< mat4, vertex shader only ABSORPTION, //!< float3, how much light is absorbed by the material TRANSMISSION, //!< float, how much light is refracted through the material diff --git a/ios/include/filament/filament/MaterialInstance.h b/thermion_dart/native/include/filament/filament/MaterialInstance.h similarity index 90% rename from ios/include/filament/filament/MaterialInstance.h rename to thermion_dart/native/include/filament/filament/MaterialInstance.h index ee7a8e25..a0edd135 100644 --- a/ios/include/filament/filament/MaterialInstance.h +++ b/thermion_dart/native/include/filament/filament/MaterialInstance.h @@ -28,6 +28,12 @@ #include +#include + +#include +#include +#include + namespace filament { class Material; @@ -41,7 +47,7 @@ class UTILS_PUBLIC MaterialInstance : public FilamentAPI { using StringLiteralHelper = const char[N]; struct StringLiteral { - const char* data; + const char* UTILS_NONNULL data; size_t size; template StringLiteral(StringLiteralHelper const& s) noexcept // NOLINT(google-explicit-constructor) @@ -89,17 +95,18 @@ public: * @param name A name for the new MaterialInstance or nullptr to use the template's name * @return A new MaterialInstance */ - static MaterialInstance* duplicate(MaterialInstance const* other, const char* name = nullptr) noexcept; + static MaterialInstance* UTILS_NONNULL duplicate(MaterialInstance const* UTILS_NONNULL other, + const char* UTILS_NULLABLE name = nullptr) noexcept; /** * @return the Material associated with this instance */ - Material const* getMaterial() const noexcept; + Material const* UTILS_NONNULL getMaterial() const noexcept; /** * @return the name associated with this instance */ - const char* getName() const noexcept; + const char* UTILS_NONNULL getName() const noexcept; /** * Set a uniform by name @@ -110,7 +117,7 @@ public: * @throws utils::PreConditionPanic if name doesn't exist or no-op if exceptions are disabled. */ template> - void setParameter(const char* name, size_t nameLength, T const& value); + void setParameter(const char* UTILS_NONNULL name, size_t nameLength, T const& value); /** inline helper to provide the name as a null-terminated string literal */ template> @@ -120,7 +127,7 @@ public: /** inline helper to provide the name as a null-terminated C string */ template> - inline void setParameter(const char* name, T const& value) { + inline void setParameter(const char* UTILS_NONNULL name, T const& value) { setParameter(name, strlen(name), value); } @@ -135,17 +142,19 @@ public: * @throws utils::PreConditionPanic if name doesn't exist or no-op if exceptions are disabled. */ template> - void setParameter(const char* name, size_t nameLength, const T* values, size_t count); + void setParameter(const char* UTILS_NONNULL name, size_t nameLength, + const T* UTILS_NONNULL values, size_t count); /** inline helper to provide the name as a null-terminated string literal */ template> - inline void setParameter(StringLiteral name, const T* values, size_t count) { + inline void setParameter(StringLiteral name, const T* UTILS_NONNULL values, size_t count) { setParameter(name.data, name.size, values, count); } /** inline helper to provide the name as a null-terminated C string */ template> - inline void setParameter(const char* name, const T* values, size_t count) { + inline void setParameter(const char* UTILS_NONNULL name, + const T* UTILS_NONNULL values, size_t count) { setParameter(name, strlen(name), values, count); } @@ -162,18 +171,18 @@ public: * @param sampler Sampler parameters. * @throws utils::PreConditionPanic if name doesn't exist or no-op if exceptions are disabled. */ - void setParameter(const char* name, size_t nameLength, - Texture const* texture, TextureSampler const& sampler); + void setParameter(const char* UTILS_NONNULL name, size_t nameLength, + Texture const* UTILS_NULLABLE texture, TextureSampler const& sampler); /** inline helper to provide the name as a null-terminated string literal */ inline void setParameter(StringLiteral name, - Texture const* texture, TextureSampler const& sampler) { + Texture const* UTILS_NULLABLE texture, TextureSampler const& sampler) { setParameter(name.data, name.size, texture, sampler); } /** inline helper to provide the name as a null-terminated C string */ - inline void setParameter(const char* name, - Texture const* texture, TextureSampler const& sampler) { + inline void setParameter(const char* UTILS_NONNULL name, + Texture const* UTILS_NULLABLE texture, TextureSampler const& sampler) { setParameter(name, strlen(name), texture, sampler); } @@ -188,7 +197,8 @@ public: * @param color Array of read, green, blue channels values. * @throws utils::PreConditionPanic if name doesn't exist or no-op if exceptions are disabled. */ - void setParameter(const char* name, size_t nameLength, RgbType type, math::float3 color); + void setParameter(const char* UTILS_NONNULL name, size_t nameLength, + RgbType type, math::float3 color); /** inline helper to provide the name as a null-terminated string literal */ inline void setParameter(StringLiteral name, RgbType type, math::float3 color) { @@ -196,7 +206,7 @@ public: } /** inline helper to provide the name as a null-terminated C string */ - inline void setParameter(const char* name, RgbType type, math::float3 color) { + inline void setParameter(const char* UTILS_NONNULL name, RgbType type, math::float3 color) { setParameter(name, strlen(name), type, color); } @@ -211,7 +221,8 @@ public: * @param color Array of read, green, blue and alpha channels values. * @throws utils::PreConditionPanic if name doesn't exist or no-op if exceptions are disabled. */ - void setParameter(const char* name, size_t nameLength, RgbaType type, math::float4 color); + void setParameter(const char* UTILS_NONNULL name, size_t nameLength, + RgbaType type, math::float4 color); /** inline helper to provide the name as a null-terminated string literal */ inline void setParameter(StringLiteral name, RgbaType type, math::float4 color) { @@ -219,7 +230,7 @@ public: } /** inline helper to provide the name as a null-terminated C string */ - inline void setParameter(const char* name, RgbaType type, math::float4 color) { + inline void setParameter(const char* UTILS_NONNULL name, RgbaType type, math::float4 color) { setParameter(name, strlen(name), type, color); } @@ -479,6 +490,10 @@ public: */ void setStencilWriteMask(uint8_t writeMask, StencilFace face = StencilFace::FRONT_AND_BACK) noexcept; + +protected: + // prevent heap allocation + ~MaterialInstance() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/MorphTargetBuffer.h b/thermion_dart/native/include/filament/filament/MorphTargetBuffer.h similarity index 90% rename from ios/include/filament/filament/MorphTargetBuffer.h rename to thermion_dart/native/include/filament/filament/MorphTargetBuffer.h index d080d0da..655bb8d8 100644 --- a/ios/include/filament/filament/MorphTargetBuffer.h +++ b/thermion_dart/native/include/filament/filament/MorphTargetBuffer.h @@ -21,8 +21,11 @@ #include +#include + #include +#include namespace filament { @@ -65,14 +68,13 @@ public: * * @param engine Reference to the filament::Engine to associate this MorphTargetBuffer with. * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. + * @return pointer to the newly created object. * * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of * memory or other resources. * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. */ - MorphTargetBuffer* build(Engine& engine); + MorphTargetBuffer* UTILS_NONNULL build(Engine& engine); private: friend class FMorphTargetBuffer; }; @@ -92,7 +94,7 @@ public: * @see setTangentsAt */ void setPositionsAt(Engine& engine, size_t targetIndex, - math::float3 const* positions, size_t count, size_t offset = 0); + math::float3 const* UTILS_NONNULL positions, size_t count, size_t offset = 0); /** * Updates positions for the given morph target. @@ -107,7 +109,7 @@ public: * @see setTangentsAt */ void setPositionsAt(Engine& engine, size_t targetIndex, - math::float4 const* positions, size_t count, size_t offset = 0); + math::float4 const* UTILS_NONNULL positions, size_t count, size_t offset = 0); /** * Updates tangents for the given morph target. @@ -123,7 +125,7 @@ public: * @see setPositionsAt */ void setTangentsAt(Engine& engine, size_t targetIndex, - math::short4 const* tangents, size_t count, size_t offset = 0); + math::short4 const* UTILS_NONNULL tangents, size_t count, size_t offset = 0); /** * Returns the vertex count of this MorphTargetBuffer. @@ -136,6 +138,10 @@ public: * @return The number of targets the MorphTargetBuffer holds. */ size_t getCount() const noexcept; + +protected: + // prevent heap allocation + ~MorphTargetBuffer() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/Options.h b/thermion_dart/native/include/filament/filament/Options.h similarity index 89% rename from ios/include/filament/filament/Options.h rename to thermion_dart/native/include/filament/filament/Options.h index d5fac6b3..3966053e 100644 --- a/ios/include/filament/filament/Options.h +++ b/thermion_dart/native/include/filament/filament/Options.h @@ -19,10 +19,13 @@ #include -#include +#include +#include #include +#include + namespace filament { class Texture; @@ -114,8 +117,6 @@ struct DynamicResolutionOptions { * blendMode: Whether the bloom effect is purely additive (false) or mixed with the original * image (true). * - * anamorphism: Bloom's aspect ratio (x/y), for artistic purposes. - * * threshold: When enabled, a threshold at 1.0 is applied on the source image, this is * useful for artistic reasons and is usually needed when a dirt texture is used. * @@ -134,7 +135,6 @@ struct BloomOptions { float dirtStrength = 0.2f; //!< strength of the dirt texture %codegen_skip_json% %codegen_skip_javascript% float strength = 0.10f; //!< bloom's strength between 0.0 and 1.0 uint32_t resolution = 384; //!< resolution of vertical axis (2^levels to 2048) - float anamorphism = 1.0f; //!< bloom x/y aspect-ratio (1/32 to 32) uint8_t levels = 6; //!< number of blur levels (1 to 11) BlendMode blendMode = BlendMode::ADD; //!< how the bloom effect is applied bool threshold = true; //!< whether to threshold the source @@ -296,6 +296,7 @@ struct DepthOfFieldOptions { MEDIAN }; float cocScale = 1.0f; //!< circle of confusion scale factor (amount of blur) + float cocAspectRatio = 1.0f; //!< width/height aspect ratio of the circle of confusion (simulate anamorphic lenses) float maxApertureDiameter = 0.01f; //!< maximum aperture diameter in meters (zero to disable rotation) bool enabled = false; //!< enable or disable depth of field effect Filter filter = Filter::MEDIAN; //!< filter to use for filling gaps in the kernel @@ -404,7 +405,7 @@ struct AmbientOcclusionOptions { }; /** - * Options for Temporal Multi-Sample Anti-aliasing (MSAA) + * Options for Multi-Sample Anti-aliasing (MSAA) * @see setMultiSampleAntiAliasingOptions() */ struct MultiSampleAntiAliasingOptions { @@ -427,12 +428,53 @@ struct MultiSampleAntiAliasingOptions { /** * Options for Temporal Anti-aliasing (TAA) + * Most TAA parameters are extremely costly to change, as they will trigger the TAA post-process + * shaders to be recompiled. These options should be changed or set during initialization. + * `filterWidth`, `feedback` and `jitterPattern`, however, can be changed at any time. + * + * `feedback` of 0.1 effectively accumulates a maximum of 19 samples in steady state. + * see "A Survey of Temporal Antialiasing Techniques" by Lei Yang and all for more information. + * * @see setTemporalAntiAliasingOptions() */ struct TemporalAntiAliasingOptions { - float filterWidth = 1.0f; //!< reconstruction filter width typically between 0 (sharper, aliased) and 1 (smoother) - float feedback = 0.04f; //!< history feedback, between 0 (maximum temporal AA) and 1 (no temporal AA). + float filterWidth = 1.0f; //!< reconstruction filter width typically between 0.2 (sharper, aliased) and 1.5 (smoother) + float feedback = 0.12f; //!< history feedback, between 0 (maximum temporal AA) and 1 (no temporal AA). + float lodBias = -1.0f; //!< texturing lod bias (typically -1 or -2) + float sharpness = 0.0f; //!< post-TAA sharpen, especially useful when upscaling is true. bool enabled = false; //!< enables or disables temporal anti-aliasing + bool upscaling = false; //!< 4x TAA upscaling. Disables Dynamic Resolution. [BETA] + + enum class BoxType : uint8_t { + AABB, //!< use an AABB neighborhood + VARIANCE, //!< use the variance of the neighborhood (not recommended) + AABB_VARIANCE //!< use both AABB and variance + }; + + enum class BoxClipping : uint8_t { + ACCURATE, //!< Accurate box clipping + CLAMP, //!< clamping + NONE //!< no rejections (use for debugging) + }; + + enum class JitterPattern : uint8_t { + RGSS_X4, //! 4-samples, rotated grid sampling + UNIFORM_HELIX_X4, //! 4-samples, uniform grid in helix sequence + HALTON_23_X8, //! 8-samples of halton 2,3 + HALTON_23_X16, //! 16-samples of halton 2,3 + HALTON_23_X32 //! 32-samples of halton 2,3 + }; + + bool filterHistory = true; //!< whether to filter the history buffer + bool filterInput = true; //!< whether to apply the reconstruction filter to the input + bool useYCoCg = false; //!< whether to use the YcoCg color-space for history rejection + BoxType boxType = BoxType::AABB; //!< type of color gamut box + BoxClipping boxClipping = BoxClipping::ACCURATE; //!< clipping algorithm + JitterPattern jitterPattern = JitterPattern::HALTON_23_X16; //! Jitter Pattern + float varianceGamma = 1.0f; //! High values increases ghosting artefact, lower values increases jittering, range [0.75, 1.25] + + bool preventFlickering = false; //!< adjust the feedback dynamically to reduce flickering + bool historyReprojection = true; //!< whether to apply history reprojection (debug option) }; /** @@ -482,7 +524,8 @@ enum class ShadowType : uint8_t { PCF, //!< percentage-closer filtered shadows (default) VSM, //!< variance shadows DPCF, //!< PCF with contact hardening simulation - PCSS //!< PCF with soft shadows and contact hardening + PCSS, //!< PCF with soft shadows and contact hardening + PCFd, // for debugging only, don't use. }; /** diff --git a/ios/include/filament/filament/RenderTarget.h b/thermion_dart/native/include/filament/filament/RenderTarget.h similarity index 94% rename from ios/include/filament/filament/RenderTarget.h rename to thermion_dart/native/include/filament/filament/RenderTarget.h index 508e1c24..fc76111d 100644 --- a/ios/include/filament/filament/RenderTarget.h +++ b/thermion_dart/native/include/filament/filament/RenderTarget.h @@ -24,7 +24,10 @@ #include #include +#include + #include +#include namespace filament { @@ -103,7 +106,7 @@ public: * @param texture The associated texture object. * @return A reference to this Builder for chaining calls. */ - Builder& texture(AttachmentPoint attachment, Texture* texture) noexcept; + Builder& texture(AttachmentPoint attachment, Texture* UTILS_NULLABLE texture) noexcept; /** * Sets the mipmap level for a given attachment point. @@ -135,10 +138,9 @@ public: /** * Creates the RenderTarget object and returns a pointer to it. * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. + * @return pointer to the newly created object. */ - RenderTarget* build(Engine& engine); + RenderTarget* UTILS_NONNULL build(Engine& engine); private: friend class FRenderTarget; @@ -149,7 +151,7 @@ public: * @param attachment Attachment point * @return A Texture object or nullptr if no texture is set for this attachment point */ - Texture* getTexture(AttachmentPoint attachment) const noexcept; + Texture* UTILS_NULLABLE getTexture(AttachmentPoint attachment) const noexcept; /** * Returns the mipmap level set on the given attachment point @@ -180,6 +182,10 @@ public: * @return Number of color attachments usable in a render target. */ uint8_t getSupportedColorAttachmentsCount() const noexcept; + +protected: + // prevent heap allocation + ~RenderTarget() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/RenderableManager.h b/thermion_dart/native/include/filament/filament/RenderableManager.h similarity index 77% rename from ios/include/filament/filament/RenderableManager.h rename to thermion_dart/native/include/filament/filament/RenderableManager.h index 868375ba..bb50b7d1 100644 --- a/ios/include/filament/filament/RenderableManager.h +++ b/thermion_dart/native/include/filament/filament/RenderableManager.h @@ -26,11 +26,18 @@ #include #include +#include #include +#include +#include #include +#include +#include +#include + namespace utils { class Entity; } // namespace utils @@ -101,6 +108,29 @@ public: */ Instance getInstance(utils::Entity e) const noexcept; + /** + * @return the number of Components + */ + size_t getComponentCount() const noexcept; + + /** + * @return true if the this manager has no components + */ + bool empty() const noexcept; + + /** + * Retrieve the `Entity` of the component from its `Instance`. + * @param i Instance of the component obtained from getInstance() + * @return + */ + utils::Entity getEntity(Instance i) const noexcept; + + /** + * Retrieve the Entities of all the components of this manager. + * @return A list, in no particular order, of all the entities managed by this manager. + */ + utils::Entity const* UTILS_NONNULL getEntities() const noexcept; + /** * The transformation associated with a skinning joint. * @@ -126,6 +156,15 @@ public: */ static constexpr uint8_t DEFAULT_CHANNEL = 2u; + /** + * Type of geometry for a Renderable + */ + enum class GeometryType : uint8_t { + DYNAMIC, //!< dynamic gemoetry has no restriction + STATIC_BOUNDS, //!< bounds and world space transform are immutable + STATIC //!< skinning/morphing not allowed and Vertex/IndexBuffer immutables + }; + /** * Creates a builder for renderable components. * @@ -160,9 +199,30 @@ public: * @param maxIndex specifies the maximum index contained in the index buffer * @param count number of indices to read (for triangles, this should be a multiple of 3) */ - Builder& geometry(size_t index, PrimitiveType type, VertexBuffer* vertices, IndexBuffer* indices, size_t offset, size_t minIndex, size_t maxIndex, size_t count) noexcept; - Builder& geometry(size_t index, PrimitiveType type, VertexBuffer* vertices, IndexBuffer* indices, size_t offset, size_t count) noexcept; //!< \overload - Builder& geometry(size_t index, PrimitiveType type, VertexBuffer* vertices, IndexBuffer* indices) noexcept; //!< \overload + Builder& geometry(size_t index, PrimitiveType type, + VertexBuffer* UTILS_NONNULL vertices, + IndexBuffer* UTILS_NONNULL indices, + size_t offset, size_t minIndex, size_t maxIndex, size_t count) noexcept; + + Builder& geometry(size_t index, PrimitiveType type, + VertexBuffer* UTILS_NONNULL vertices, + IndexBuffer* UTILS_NONNULL indices, + size_t offset, size_t count) noexcept; //!< \overload + + Builder& geometry(size_t index, PrimitiveType type, + VertexBuffer* UTILS_NONNULL vertices, + IndexBuffer* UTILS_NONNULL indices) noexcept; //!< \overload + + + /** + * Specify the type of geometry for this renderable. DYNAMIC geometry has no restriction, + * STATIC_BOUNDS geometry means that both the bounds and the world-space transform of the + * the renderable are immutable. + * STATIC geometry has the same restrictions as STATIC_BOUNDS, but in addition disallows + * skinning, morphing and changing the VertexBuffer or IndexBuffer in any way. + * @param enable whether this renderable has static bounds. false by default. + */ + Builder& geometryType(GeometryType type) noexcept; /** * Binds a material instance to the specified primitive. @@ -179,7 +239,8 @@ public: * * @see Engine::setActiveFeatureLevel */ - Builder& material(size_t index, MaterialInstance const* materialInstance) noexcept; + Builder& material(size_t index, + MaterialInstance const* UTILS_NONNULL materialInstance) noexcept; /** * The axis-aligned bounding box of the renderable. @@ -327,7 +388,8 @@ public: * @param count 0 to disable, otherwise the number of bone transforms (up to 255) * @param offset offset in the SkinningBuffer */ - Builder& skinning(SkinningBuffer* skinningBuffer, size_t count, size_t offset) noexcept; + Builder& skinning(SkinningBuffer* UTILS_NONNULL skinningBuffer, + size_t count, size_t offset) noexcept; /** @@ -345,10 +407,63 @@ public: * @param boneCount 0 to disable, otherwise the number of bone transforms (up to 255) * @param transforms the initial set of transforms (one for each bone) */ - Builder& skinning(size_t boneCount, math::mat4f const* transforms) noexcept; - Builder& skinning(size_t boneCount, Bone const* bones) noexcept; //!< \overload + Builder& skinning(size_t boneCount, math::mat4f const* UTILS_NONNULL transforms) noexcept; + Builder& skinning(size_t boneCount, Bone const* UTILS_NONNULL bones) noexcept; //!< \overload Builder& skinning(size_t boneCount) noexcept; //!< \overload + /** + * Define bone indices and weights "pairs" for vertex skinning as a float2. + * The unsigned int(pair.x) defines index of the bone and pair.y is the bone weight. + * The pairs substitute \c BONE_INDICES and the \c BONE_WEIGHTS defined in the VertexBuffer. + * Both ways of indices and weights definition must not be combined in one primitive. + * Number of pairs per vertex bonesPerVertex is not limited to 4 bones. + * Vertex buffer used for \c primitiveIndex must be set for advance skinning. + * All bone weights of one vertex should sum to one. Otherwise they will be normalized. + * Data must be rectangular and number of bone pairs must be same for all vertices of this + * primitive. + * The data is arranged sequentially, all bone pairs for the first vertex, then for the + * second vertex, and so on. + * + * @param primitiveIndex zero-based index of the primitive, must be less than the primitive + * count passed to Builder constructor + * @param indicesAndWeights pairs of bone index and bone weight for all vertices + * sequentially + * @param count number of all pairs, must be a multiple of vertexCount of the primitive + * count = vertexCount * bonesPerVertex + * @param bonesPerVertex number of bone pairs, same for all vertices of the primitive + * + * @return Builder reference for chaining calls. + * + * @see VertexBuffer:Builder:advancedSkinning + */ + Builder& boneIndicesAndWeights(size_t primitiveIndex, + math::float2 const* UTILS_NONNULL indicesAndWeights, + size_t count, size_t bonesPerVertex) noexcept; + + /** + * Define bone indices and weights "pairs" for vertex skinning as a float2. + * The unsigned int(pair.x) defines index of the bone and pair.y is the bone weight. + * The pairs substitute \c BONE_INDICES and the \c BONE_WEIGHTS defined in the VertexBuffer. + * Both ways of indices and weights definition must not be combined in one primitive. + * Number of pairs is not limited to 4 bones per vertex. + * Vertex buffer used for \c primitiveIndex must be set for advance skinning. + * All bone weights of one vertex should sum to one. Otherwise they will be normalized. + * Data doesn't have to be rectangular and number of pairs per vertices of primitive can be + * variable. + * The vector of the vertices contains the vectors of the pairs + * + * @param primitiveIndex zero-based index of the primitive, must be less than the primitive + * count passed to Builder constructor + * @param indicesAndWeightsVectors pairs of bone index and bone weight for all vertices of + * the primitive sequentially + * + * @return Builder reference for chaining calls. + * + * @see VertexBuffer:Builder:advancedSkinning + */ + Builder& boneIndicesAndWeights(size_t primitiveIndex, + utils::FixedCapacityVector< + utils::FixedCapacityVector> indicesAndWeightsVector) noexcept; /** * Controls if the renderable has vertex morphing targets, zero by default. This is * required to enable GPU morphing. @@ -386,10 +501,11 @@ public: * @param count number of vertices in the morph target buffer to read, must equal the geometry's count (for triangles, this should be a multiple of 3) */ Builder& morphing(uint8_t level, size_t primitiveIndex, - MorphTargetBuffer* morphTargetBuffer, size_t offset, size_t count) noexcept; + MorphTargetBuffer* UTILS_NONNULL morphTargetBuffer, + size_t offset, size_t count) noexcept; inline Builder& morphing(uint8_t level, size_t primitiveIndex, - MorphTargetBuffer* morphTargetBuffer) noexcept; + MorphTargetBuffer* UTILS_NONNULL morphTargetBuffer) noexcept; /** * Sets the drawing order for blended primitives. The drawing order is either global or @@ -456,7 +572,8 @@ public: * the result of Engine::getMaxAutomaticInstances(). * @param instanceBuffer an InstanceBuffer containing at least instanceCount transforms */ - Builder& instances(size_t instanceCount, InstanceBuffer* instanceBuffer) noexcept; + Builder& instances(size_t instanceCount, + InstanceBuffer* UTILS_NONNULL instanceBuffer) noexcept; /** * Adds the Renderable component to an entity. @@ -483,18 +600,16 @@ public: friend class FRenderPrimitive; friend class FRenderableManager; struct Entry { - VertexBuffer* vertices = nullptr; - IndexBuffer* indices = nullptr; + VertexBuffer* UTILS_NULLABLE vertices = nullptr; + IndexBuffer* UTILS_NULLABLE indices = nullptr; size_t offset = 0; - size_t minIndex = 0; - size_t maxIndex = 0; size_t count = 0; - MaterialInstance const* materialInstance = nullptr; + MaterialInstance const* UTILS_NULLABLE materialInstance = nullptr; PrimitiveType type = PrimitiveType::TRIANGLES; uint16_t blendOrder = 0; bool globalBlendOrderEnabled = false; struct { - MorphTargetBuffer* buffer = nullptr; + MorphTargetBuffer* UTILS_NULLABLE buffer = nullptr; size_t offset = 0; size_t count = 0; } morphing; @@ -508,11 +623,12 @@ public: /** * Changes the bounding box used for frustum culling. + * The renderable must not have staticGeometry enabled. * * \see Builder::boundingBox() * \see RenderableManager::getAxisAlignedBoundingBox() */ - void setAxisAlignedBoundingBox(Instance instance, const Box& aabb) noexcept; + void setAxisAlignedBoundingBox(Instance instance, const Box& aabb); /** * Changes the visibility bits. @@ -612,8 +728,11 @@ public: * Updates the bone transforms in the range [offset, offset + boneCount). * The bones must be pre-allocated using Builder::skinning(). */ - void setBones(Instance instance, Bone const* transforms, size_t boneCount = 1, size_t offset = 0); - void setBones(Instance instance, math::mat4f const* transforms, size_t boneCount = 1, size_t offset = 0); //!< \overload + void setBones(Instance instance, Bone const* UTILS_NONNULL transforms, + size_t boneCount = 1, size_t offset = 0); + + void setBones(Instance instance, math::mat4f const* UTILS_NONNULL transforms, + size_t boneCount = 1, size_t offset = 0); //!< \overload /** * Associates a region of a SkinningBuffer to a renderable instance @@ -626,7 +745,7 @@ public: * @param count Size of the region in bones, must be smaller or equal to 256. * @param offset Start offset of the region in bones */ - void setSkinningBuffer(Instance instance, SkinningBuffer* skinningBuffer, + void setSkinningBuffer(Instance instance, SkinningBuffer* UTILS_NONNULL skinningBuffer, size_t count, size_t offset); /** @@ -641,24 +760,25 @@ public: * @param offset Index of the first morph target weight to set at instance. */ void setMorphWeights(Instance instance, - float const* weights, size_t count, size_t offset = 0); + float const* UTILS_NONNULL weights, size_t count, size_t offset = 0); /** * Associates a MorphTargetBuffer to the given primitive. */ void setMorphTargetBufferAt(Instance instance, uint8_t level, size_t primitiveIndex, - MorphTargetBuffer* morphTargetBuffer, size_t offset, size_t count); + MorphTargetBuffer* UTILS_NONNULL morphTargetBuffer, size_t offset, size_t count); /** * Utility method to change a MorphTargetBuffer to the given primitive */ inline void setMorphTargetBufferAt(Instance instance, uint8_t level, size_t primitiveIndex, - MorphTargetBuffer* morphTargetBuffer); + MorphTargetBuffer* UTILS_NONNULL morphTargetBuffer); /** * Get a MorphTargetBuffer to the given primitive or null if it doesn't exist. */ - MorphTargetBuffer* getMorphTargetBufferAt(Instance instance, uint8_t level, size_t primitiveIndex) const noexcept; + MorphTargetBuffer* UTILS_NULLABLE getMorphTargetBufferAt(Instance instance, + uint8_t level, size_t primitiveIndex) const noexcept; /** * Gets the number of morphing in the given entity. @@ -700,20 +820,22 @@ public: * @see Engine::setActiveFeatureLevel */ void setMaterialInstanceAt(Instance instance, - size_t primitiveIndex, MaterialInstance const* materialInstance); + size_t primitiveIndex, MaterialInstance const* UTILS_NONNULL materialInstance); /** * Retrieves the material instance that is bound to the given primitive. */ - MaterialInstance* getMaterialInstanceAt(Instance instance, size_t primitiveIndex) const noexcept; + MaterialInstance* UTILS_NULLABLE getMaterialInstanceAt( + Instance instance, size_t primitiveIndex) const noexcept; /** * Changes the geometry for the given primitive. * * \see Builder::geometry() */ - void setGeometryAt(Instance instance, size_t primitiveIndex, - PrimitiveType type, VertexBuffer* vertices, IndexBuffer* indices, + void setGeometryAt(Instance instance, size_t primitiveIndex, PrimitiveType type, + VertexBuffer* UTILS_NONNULL vertices, + IndexBuffer* UTILS_NONNULL indices, size_t offset, size_t count) noexcept; /** @@ -774,27 +896,37 @@ public: template::type, typename = typename is_supported_index_type::type> - static Box computeAABB(VECTOR const* vertices, INDEX const* indices, size_t count, + static Box computeAABB( + VECTOR const* UTILS_NONNULL vertices, + INDEX const* UTILS_NONNULL indices, size_t count, size_t stride = sizeof(VECTOR)) noexcept; + +protected: + // prevent heap allocation + ~RenderableManager() = default; }; -RenderableManager::Builder& RenderableManager::Builder::morphing(uint8_t level, size_t primitiveIndex, - MorphTargetBuffer* morphTargetBuffer) noexcept { +RenderableManager::Builder& RenderableManager::Builder::morphing( + uint8_t level, size_t primitiveIndex, + MorphTargetBuffer* UTILS_NONNULL morphTargetBuffer) noexcept { return morphing(level, primitiveIndex, morphTargetBuffer, 0, morphTargetBuffer->getVertexCount()); } -void RenderableManager::setMorphTargetBufferAt(Instance instance, uint8_t level, size_t primitiveIndex, - MorphTargetBuffer* morphTargetBuffer) { +void RenderableManager::setMorphTargetBufferAt( + Instance instance, uint8_t level, size_t primitiveIndex, + MorphTargetBuffer* UTILS_NONNULL morphTargetBuffer) { setMorphTargetBufferAt(instance, level, primitiveIndex, morphTargetBuffer, 0, morphTargetBuffer->getVertexCount()); } template -Box RenderableManager::computeAABB(VECTOR const* vertices, INDEX const* indices, size_t count, - size_t stride) noexcept { - math::float3 bmin(std::numeric_limits::max()); - math::float3 bmax(std::numeric_limits::lowest()); +Box RenderableManager::computeAABB( + VECTOR const* UTILS_NONNULL vertices, + INDEX const* UTILS_NONNULL indices, + size_t count, size_t stride) noexcept { + math::float3 bmin(FLT_MAX); + math::float3 bmax(-FLT_MAX); for (size_t i = 0; i < count; ++i) { VECTOR const* p = reinterpret_cast( (char const*)vertices + indices[i] * stride); diff --git a/ios/include/filament/filament/Renderer.h b/thermion_dart/native/include/filament/filament/Renderer.h similarity index 97% rename from ios/include/filament/filament/Renderer.h rename to thermion_dart/native/include/filament/filament/Renderer.h index 111026bb..fdc291b1 100644 --- a/ios/include/filament/filament/Renderer.h +++ b/thermion_dart/native/include/filament/filament/Renderer.h @@ -23,9 +23,6 @@ #include -#include -#include - #include #include @@ -173,19 +170,25 @@ public: */ void setClearOptions(const ClearOptions& options); + /** + * Returns the ClearOptions currently set. + * @return A reference to a ClearOptions structure. + */ + ClearOptions const& getClearOptions() const noexcept; + /** * Get the Engine that created this Renderer. * * @return A pointer to the Engine instance this Renderer is associated to. */ - Engine* getEngine() noexcept; + Engine* UTILS_NONNULL getEngine() noexcept; /** * Get the Engine that created this Renderer. * * @return A constant pointer to the Engine instance this Renderer is associated to. */ - inline Engine const* getEngine() const noexcept { + inline Engine const* UTILS_NONNULL getEngine() const noexcept { return const_cast(this)->getEngine(); } @@ -261,7 +264,7 @@ public: * @see * endFrame() */ - bool beginFrame(SwapChain* swapChain, + bool beginFrame(SwapChain* UTILS_NONNULL swapChain, uint64_t vsyncSteadyClockTimeNano = 0u); /** @@ -332,7 +335,7 @@ public: * beginFrame(), endFrame(), View * */ - void render(View const* view); + void render(View const* UTILS_NONNULL view); /** * Copy the currently rendered view to the indicated swap chain, using the @@ -347,7 +350,7 @@ public: * copyFrame() should be called after a frame is rendered using render() * but before endFrame() is called. */ - void copyFrame(SwapChain* dstSwapChain, Viewport const& dstViewport, + void copyFrame(SwapChain* UTILS_NONNULL dstSwapChain, Viewport const& dstViewport, Viewport const& srcViewport, uint32_t flags = 0); /** @@ -487,7 +490,7 @@ public: * readPixels() is intended for debugging and testing. It will impact performance significantly. * */ - void readPixels(RenderTarget* renderTarget, + void readPixels(RenderTarget* UTILS_NONNULL renderTarget, uint32_t xoffset, uint32_t yoffset, uint32_t width, uint32_t height, backend::PixelBufferDescriptor&& buffer); @@ -514,7 +517,7 @@ public: * However, internally, renderStandaloneView() is highly multi-threaded to both improve * performance in mitigate the call's latency. */ - void renderStandaloneView(View const* view); + void renderStandaloneView(View const* UTILS_NONNULL view); /** @@ -573,6 +576,10 @@ public: * getUserTime() */ void resetUserTime(); + +protected: + // prevent heap allocation + ~Renderer() = default; }; } // namespace filament diff --git a/windows/include/filament/filament/Scene.h b/thermion_dart/native/include/filament/filament/Scene.h similarity index 82% rename from windows/include/filament/filament/Scene.h rename to thermion_dart/native/include/filament/filament/Scene.h index 3e6a63c4..9df6285c 100644 --- a/windows/include/filament/filament/Scene.h +++ b/thermion_dart/native/include/filament/filament/Scene.h @@ -24,6 +24,8 @@ #include #include +#include + namespace utils { class Entity; } // namespace utils @@ -73,14 +75,14 @@ public: * * @param skybox The Skybox to use to fill untouched pixels, or nullptr to unset the Skybox. */ - void setSkybox(Skybox* skybox) noexcept; + void setSkybox(Skybox* UTILS_NULLABLE skybox) noexcept; /** * Returns the Skybox associated with the Scene. * * @return The associated Skybox, or nullptr if there is none. */ - Skybox* getSkybox() const noexcept; + Skybox* UTILS_NULLABLE getSkybox() const noexcept; /** * Set the IndirectLight to use when rendering the Scene. @@ -91,7 +93,7 @@ public: * @param ibl The IndirectLight to use when rendering the Scene or nullptr to unset. * @see getIndirectLight */ - void setIndirectLight(IndirectLight* ibl) noexcept; + void setIndirectLight(IndirectLight* UTILS_NULLABLE ibl) noexcept; /** * Get the IndirectLight or nullptr if none is set. @@ -99,7 +101,7 @@ public: * @return the the IndirectLight or nullptr if none is set * @see setIndirectLight */ - IndirectLight* getIndirectLight() const noexcept; + IndirectLight* UTILS_NULLABLE getIndirectLight() const noexcept; /** * Adds an Entity to the Scene. @@ -118,7 +120,7 @@ public: * @param entities Array containing entities to add to the scene. * @param count Size of the entity array. */ - void addEntities(const utils::Entity* entities, size_t count); + void addEntities(const utils::Entity* UTILS_NONNULL entities, size_t count); /** * Removes the Renderable from the Scene. @@ -137,19 +139,25 @@ public: * @param entities Array containing entities to remove from the scene. * @param count Size of the entity array. */ - void removeEntities(const utils::Entity* entities, size_t count); + void removeEntities(const utils::Entity* UTILS_NONNULL entities, size_t count); /** - * Returns the number of Renderable objects in the Scene. + * Returns the total number of Entities in the Scene, whether alive or not. + * @return Total number of Entities in the Scene. + */ + size_t getEntityCount() const noexcept; + + /** + * Returns the number of active (alive) Renderable objects in the Scene. * - * @return number of Renderable objects in the Scene. + * @return The number of active (alive) Renderable objects in the Scene. */ size_t getRenderableCount() const noexcept; /** - * Returns the total number of Light objects in the Scene. + * Returns the number of active (alive) Light objects in the Scene. * - * @return The total number of Light objects in the Scene. + * @return The number of active (alive) Light objects in the Scene. */ size_t getLightCount() const noexcept; @@ -168,6 +176,10 @@ public: * @param functor User provided functor called for each entity in the scene */ void forEach(utils::Invocable&& functor) const noexcept; + +protected: + // prevent heap allocation + ~Scene() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/SkinningBuffer.h b/thermion_dart/native/include/filament/filament/SkinningBuffer.h similarity index 93% rename from ios/include/filament/filament/SkinningBuffer.h rename to thermion_dart/native/include/filament/filament/SkinningBuffer.h index 007feb85..36ae30ed 100644 --- a/ios/include/filament/filament/SkinningBuffer.h +++ b/thermion_dart/native/include/filament/filament/SkinningBuffer.h @@ -26,7 +26,7 @@ #include #include - +#include namespace filament { @@ -74,8 +74,7 @@ public: * * @param engine Reference to the filament::Engine to associate this SkinningBuffer with. * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. + * @return pointer to the newly created object. * * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of * memory or other resources. @@ -83,7 +82,7 @@ public: * * @see SkinningBuffer::setBones */ - SkinningBuffer* build(Engine& engine); + SkinningBuffer* UTILS_NONNULL build(Engine& engine); private: friend class FSkinningBuffer; }; @@ -96,7 +95,7 @@ public: * @param offset offset in elements (not bytes) in the SkinningBuffer (not in transforms) * @see RenderableManager::setSkinningBuffer */ - void setBones(Engine& engine, RenderableManager::Bone const* transforms, + void setBones(Engine& engine, RenderableManager::Bone const* UTILS_NONNULL transforms, size_t count, size_t offset = 0); /** @@ -107,7 +106,7 @@ public: * @param offset offset in elements (not bytes) in the SkinningBuffer (not in transforms) * @see RenderableManager::setSkinningBuffer */ - void setBones(Engine& engine, math::mat4f const* transforms, + void setBones(Engine& engine, math::mat4f const* UTILS_NONNULL transforms, size_t count, size_t offset = 0); /** @@ -115,6 +114,10 @@ public: * @return The number of bones the SkinningBuffer holds. */ size_t getBoneCount() const noexcept; + +protected: + // prevent heap allocation + ~SkinningBuffer() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/Skybox.h b/thermion_dart/native/include/filament/filament/Skybox.h similarity index 93% rename from ios/include/filament/filament/Skybox.h rename to thermion_dart/native/include/filament/filament/Skybox.h index 5e9f2c60..ce203aae 100644 --- a/ios/include/filament/filament/Skybox.h +++ b/thermion_dart/native/include/filament/filament/Skybox.h @@ -23,9 +23,10 @@ #include -#include #include +#include + namespace filament { class FSkybox; @@ -91,7 +92,7 @@ public: * * @see Texture */ - Builder& environment(Texture* cubemap) noexcept; + Builder& environment(Texture* UTILS_NONNULL cubemap) noexcept; /** * Indicates whether the sun should be rendered. The sun can only be @@ -135,9 +136,9 @@ public: * * @param engine Reference to the filament::Engine to associate this Skybox with. * - * @return pointer to the newly created object, or nullptr if the light couldn't be created. + * @return pointer to the newly created object. */ - Skybox* build(Engine& engine); + Skybox* UTILS_NONNULL build(Engine& engine); private: friend class FSkybox; @@ -171,9 +172,13 @@ public: float getIntensity() const noexcept; /** - * @return the associated texture, or null if it does not exist + * @return the associated texture */ - Texture const* getTexture() const noexcept; + Texture const* UTILS_NONNULL getTexture() const noexcept; + +protected: + // prevent heap allocation + ~Skybox() = default; }; } // namespace filament diff --git a/windows/include/filament/filament/Stream.h b/thermion_dart/native/include/filament/filament/Stream.h similarity index 91% rename from windows/include/filament/filament/Stream.h rename to thermion_dart/native/include/filament/filament/Stream.h index 7fccecfe..6cafbacc 100644 --- a/windows/include/filament/filament/Stream.h +++ b/thermion_dart/native/include/filament/filament/Stream.h @@ -20,12 +20,12 @@ #include #include - -#include #include #include +#include + namespace filament { class FStream; @@ -114,7 +114,7 @@ public: * * @return This Builder, for chaining calls. */ - Builder& stream(void* stream) noexcept; + Builder& stream(void* UTILS_NULLABLE stream) noexcept; /** * @@ -141,9 +141,9 @@ public: * * @param engine Reference to the filament::Engine to associate this Stream with. * - * @return pointer to the newly created object, or nullptr if the stream couldn't be created. + * @return pointer to the newly created object. */ - Stream* build(Engine& engine); + Stream* UTILS_NONNULL build(Engine& engine); private: friend class FStream; @@ -171,11 +171,12 @@ public: * * @param image Pointer to AHardwareBuffer, casted to void* since this is a public header. * @param callback This is triggered by Filament when it wishes to release the image. - * It callback tales two arguments: the AHardwareBuffer and the userdata. + * The callback tales two arguments: the AHardwareBuffer and the userdata. * @param userdata Optional closure data. Filament will pass this into the callback when it * releases the image. */ - void setAcquiredImage(void* image, Callback callback, void* userdata) noexcept; + void setAcquiredImage(void* UTILS_NONNULL image, + Callback UTILS_NONNULL callback, void* UTILS_NULLABLE userdata) noexcept; /** * @see setAcquiredImage(void*, Callback, void*) @@ -187,7 +188,9 @@ public: * @param userdata Optional closure data. Filament will pass this into the callback when it * releases the image. */ - void setAcquiredImage(void* image, backend::CallbackHandler* handler, Callback callback, void* userdata) noexcept; + void setAcquiredImage(void* UTILS_NONNULL image, + backend::CallbackHandler* UTILS_NULLABLE handler, + Callback UTILS_NONNULL callback, void* UTILS_NULLABLE userdata) noexcept; /** * Updates the size of the incoming stream. Whether this value is used is @@ -207,6 +210,10 @@ public: * @return timestamp in nanosecond. */ int64_t getTimestamp() const noexcept; + +protected: + // prevent heap allocation + ~Stream() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/SwapChain.h b/thermion_dart/native/include/filament/filament/SwapChain.h similarity index 75% rename from ios/include/filament/filament/SwapChain.h rename to thermion_dart/native/include/filament/filament/SwapChain.h index 29413275..0af01afc 100644 --- a/ios/include/filament/filament/SwapChain.h +++ b/thermion_dart/native/include/filament/filament/SwapChain.h @@ -21,11 +21,12 @@ #include #include -#include #include #include +#include + namespace filament { class Engine; @@ -151,7 +152,7 @@ class Engine; class UTILS_PUBLIC SwapChain : public FilamentAPI { public: using FrameScheduledCallback = backend::FrameScheduledCallback; - using FrameCompletedCallback = utils::Invocable; + using FrameCompletedCallback = utils::Invocable; /** * Requests a SwapChain with an alpha channel. @@ -202,15 +203,55 @@ public: static constexpr uint64_t CONFIG_SRGB_COLORSPACE = backend::SWAP_CHAIN_CONFIG_SRGB_COLORSPACE; /** - * Return whether createSwapChain supports the SWAP_CHAIN_CONFIG_SRGB_COLORSPACE flag. + * Indicates that this SwapChain should allocate a stencil buffer in addition to a depth buffer. + * + * This flag is necessary when using View::setStencilBufferEnabled and rendering directly into + * the SwapChain (when post-processing is disabled). + * + * The specific format of the stencil buffer depends on platform support. The following pixel + * formats are tried, in order of preference: + * + * Depth only (without CONFIG_HAS_STENCIL_BUFFER): + * - DEPTH32F + * - DEPTH24 + * + * Depth + stencil (with CONFIG_HAS_STENCIL_BUFFER): + * - DEPTH32F_STENCIL8 + * - DEPTH24F_STENCIL8 + * + * Note that enabling the stencil buffer may hinder depth precision and should only be used if + * necessary. + * + * @see View.setStencilBufferEnabled + * @see View.setPostProcessingEnabled + */ + static constexpr uint64_t CONFIG_HAS_STENCIL_BUFFER = backend::SWAP_CHAIN_CONFIG_HAS_STENCIL_BUFFER; + + /** + * The SwapChain contains protected content. Only supported when isProtectedContentSupported() + * is true. + */ + static constexpr uint64_t CONFIG_PROTECTED_CONTENT = backend::SWAP_CHAIN_CONFIG_PROTECTED_CONTENT; + + /** + * Return whether createSwapChain supports the CONFIG_PROTECTED_CONTENT flag. * The default implementation returns false. * * @param engine A pointer to the filament Engine - * @return true if SWAP_CHAIN_CONFIG_SRGB_COLORSPACE is supported, false otherwise. + * @return true if CONFIG_PROTECTED_CONTENT is supported, false otherwise. + */ + static bool isProtectedContentSupported(Engine& engine) noexcept; + + /** + * Return whether createSwapChain supports the CONFIG_SRGB_COLORSPACE flag. + * The default implementation returns false. + * + * @param engine A pointer to the filament Engine + * @return true if CONFIG_SRGB_COLORSPACE is supported, false otherwise. */ static bool isSRGBSwapChainSupported(Engine& engine) noexcept; - void* getNativeWindow() const noexcept; + void* UTILS_NULLABLE getNativeWindow() const noexcept; /** * FrameScheduledCallback is a callback function that notifies an application when Filament has @@ -227,6 +268,16 @@ public: * automatically schedule itself for presentation. Instead, the application must call the * PresentCallable passed to the FrameScheduledCallback. * + * There may be only one FrameScheduledCallback set per SwapChain. A call to + * SwapChain::setFrameScheduledCallback will overwrite any previous FrameScheduledCallbacks set + * on the same SwapChain. + * + * If your application delays the call to the PresentCallable by, for example, calling it on a + * separate thread, you must ensure all PresentCallables have been called before shutting down + * the Filament Engine. You can do this by issuing an Engine::flushAndWait before calling + * Engine::shutdown. This is necessary to ensure the Filament Engine has had a chance to clean + * up all memory related to frame presentation. + * * @param callback A callback, or nullptr to unset. * @param user An optional pointer to user data passed to the callback function. * @@ -237,7 +288,18 @@ public: * * @see PresentCallable */ - void setFrameScheduledCallback(FrameScheduledCallback callback, void* user = nullptr); + void setFrameScheduledCallback(FrameScheduledCallback UTILS_NULLABLE callback, + void* UTILS_NULLABLE user = nullptr); + + /** + * Returns the SwapChain::FrameScheduledCallback that was previously set with + * SwapChain::setFrameScheduledCallback, or nullptr if one is not set. + * + * @return the previously-set FrameScheduledCallback, or nullptr + * + * @see SwapChain::setFrameCompletedCallback + */ + UTILS_NULLABLE FrameScheduledCallback getFrameScheduledCallback() const noexcept; /** * FrameCompletedCallback is a callback function that notifies an application when a frame's @@ -258,9 +320,13 @@ public: * * @see CallbackHandler */ - void setFrameCompletedCallback(backend::CallbackHandler* handler = nullptr, + void setFrameCompletedCallback(backend::CallbackHandler* UTILS_NULLABLE handler = nullptr, FrameCompletedCallback&& callback = {}) noexcept; + +protected: + // prevent heap allocation + ~SwapChain() = default; }; } // namespace filament diff --git a/windows/include/filament/filament/Texture.h b/thermion_dart/native/include/filament/filament/Texture.h similarity index 96% rename from windows/include/filament/filament/Texture.h rename to thermion_dart/native/include/filament/filament/Texture.h index c005c2b1..8a27f831 100644 --- a/windows/include/filament/filament/Texture.h +++ b/thermion_dart/native/include/filament/filament/Texture.h @@ -20,12 +20,16 @@ #define TNT_FILAMENT_TEXTURE_H #include + #include #include #include +#include + #include +#include namespace filament { @@ -84,6 +88,9 @@ public: /** @return whether a backend supports a particular format. */ static bool isTextureFormatSupported(Engine& engine, InternalFormat format) noexcept; + /** @return whether this backend supports protected textures. */ + static bool isProtectedTexturesSupported(Engine& engine) noexcept; + /** @return whether a backend supports texture swizzling. */ static bool isTextureSwizzleSupported(Engine& engine) noexcept; @@ -200,14 +207,13 @@ public: * * @param engine Reference to the filament::Engine to associate this Texture with. * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. + * @return pointer to the newly created object. * * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of * memory or other resources. * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. */ - Texture* build(Engine& engine); + Texture* UTILS_NONNULL build(Engine& engine); /* no user serviceable parts below */ @@ -396,7 +402,7 @@ public: * @see Builder::sampler() * */ - void setExternalImage(Engine& engine, void* image) noexcept; + void setExternalImage(Engine& engine, void* UTILS_NONNULL image) noexcept; /** * Specify the external image and plane to associate with this Texture. Typically the external @@ -427,7 +433,7 @@ public: * kCVPixelFormatType_420YpCbCr8BiPlanarFullRange images. On platforms * other than iOS, this method is a no-op. */ - void setExternalImage(Engine& engine, void* image, size_t plane) noexcept; + void setExternalImage(Engine& engine, void* UTILS_NONNULL image, size_t plane) noexcept; /** * Specify the external stream to associate with this Texture. Typically the external @@ -446,16 +452,17 @@ public: * @see Builder::sampler(), Stream * */ - void setExternalStream(Engine& engine, Stream* stream) noexcept; + void setExternalStream(Engine& engine, Stream* UTILS_NULLABLE stream) noexcept; /** * Generates all the mipmap levels automatically. This requires the texture to have a - * color-renderable format. + * color-renderable format and usage set to BLIT_SRC | BLIT_DST. If unspecified, + * usage bits are set automatically. * * @param engine Engine this texture is associated to. * * @attention \p engine must be the instance passed to Builder::build() - * @attention This Texture instance must NOT use Sampler::SAMPLER_CUBEMAP or it has no effect + * @attention This Texture instance must NOT use SamplerType::SAMPLER_3D or it has no effect */ void generateMipmaps(Engine& engine) const noexcept; @@ -495,7 +502,7 @@ public: */ void generatePrefilterMipmap(Engine& engine, PixelBufferDescriptor&& buffer, const FaceOffsets& faceOffsets, - PrefilterOptions const* options = nullptr); + PrefilterOptions const* UTILS_NULLABLE options = nullptr); /** @deprecated */ @@ -541,6 +548,10 @@ public: return *this; } }; + +protected: + // prevent heap allocation + ~Texture() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/TextureSampler.h b/thermion_dart/native/include/filament/filament/TextureSampler.h similarity index 99% rename from ios/include/filament/filament/TextureSampler.h rename to thermion_dart/native/include/filament/filament/TextureSampler.h index 77ee4fab..ba5e5534 100644 --- a/ios/include/filament/filament/TextureSampler.h +++ b/thermion_dart/native/include/filament/filament/TextureSampler.h @@ -25,6 +25,8 @@ #include +#include + namespace filament { /** diff --git a/windows/include/filament/filament/ToneMapper.h b/thermion_dart/native/include/filament/filament/ToneMapper.h similarity index 86% rename from windows/include/filament/filament/ToneMapper.h rename to thermion_dart/native/include/filament/filament/ToneMapper.h index 8d19c597..e89e702c 100644 --- a/windows/include/filament/filament/ToneMapper.h +++ b/thermion_dart/native/include/filament/filament/ToneMapper.h @@ -21,6 +21,8 @@ #include +#include + namespace filament { /** @@ -37,10 +39,12 @@ namespace filament { * * - Configurable tone mapping operators * - GenericToneMapper + * - AgXToneMapper * - Fixed-aesthetic tone mapping operators * - ACESToneMapper * - ACESLegacyToneMapper * - FilmicToneMapper + * - PBRNeutralToneMapper * - Debug/validation tone mapping operators * - LinearToneMapper * - DisplayRangeToneMapper @@ -115,6 +119,41 @@ struct UTILS_PUBLIC FilmicToneMapper final : public ToneMapper { math::float3 operator()(math::float3 x) const noexcept override; }; +/** + * Khronos PBR Neutral tone mapping operator. This tone mapper was designed + * to preserve the appearance of materials across lighting conditions while + * avoiding artifacts in the highlights in high dynamic range conditions. + */ +struct UTILS_PUBLIC PBRNeutralToneMapper final : public ToneMapper { + PBRNeutralToneMapper() noexcept; + ~PBRNeutralToneMapper() noexcept final; + + math::float3 operator()(math::float3 x) const noexcept override; +}; + +/** + * AgX tone mapping operator. + */ +struct UTILS_PUBLIC AgxToneMapper final : public ToneMapper { + enum class AgxLook : uint8_t { + NONE = 0, //!< Base contrast with no look applied + PUNCHY, //!< A punchy and more chroma laden look for sRGB displays + GOLDEN //!< A golden tinted, slightly washed look for BT.1886 displays + }; + + /** + * Builds a new AgX tone mapper. + * + * @param look an optional creative adjustment to contrast and saturation + */ + explicit AgxToneMapper(AgxLook look = AgxLook::NONE) noexcept; + ~AgxToneMapper() noexcept final; + + math::float3 operator()(math::float3 x) const noexcept override; + + AgxLook look; +}; + /** * Generic tone mapping operator that gives control over the tone mapping * curve. This operator can be used to control the aesthetics of the final @@ -159,9 +198,6 @@ struct UTILS_PUBLIC GenericToneMapper final : public ToneMapper { /** Returns the contrast of the curve as a strictly positive value. */ float getContrast() const noexcept; - /** Returns how fast scene referred values map to output white as a value between 0.0 and 1.0. */ - float getShoulder() const noexcept; - /** Returns the middle gray point for input values as a value between 0.0 and 1.0. */ float getMidGrayIn() const noexcept; diff --git a/ios/include/filament/filament/TransformManager.h b/thermion_dart/native/include/filament/filament/TransformManager.h similarity index 92% rename from ios/include/filament/filament/TransformManager.h rename to thermion_dart/native/include/filament/filament/TransformManager.h index 9afa6897..5d612a16 100644 --- a/ios/include/filament/filament/TransformManager.h +++ b/thermion_dart/native/include/filament/filament/TransformManager.h @@ -26,6 +26,7 @@ #include +#include namespace utils { class Entity; @@ -118,6 +119,29 @@ public: */ Instance getInstance(utils::Entity e) const noexcept; + /** + * @return the number of Components + */ + size_t getComponentCount() const noexcept; + + /** + * @return true if the this manager has no components + */ + bool empty() const noexcept; + + /** + * Retrieve the `Entity` of the component from its `Instance`. + * @param i Instance of the component obtained from getInstance() + * @return + */ + utils::Entity getEntity(Instance i) const noexcept; + + /** + * Retrieve the Entities of all the components of this manager. + * @return A list, in no particular order, of all the entities managed by this manager. + */ + utils::Entity const* UTILS_NONNULL getEntities() const noexcept; + /** * Enables or disable the accurate translation mode. Disabled by default. * @@ -200,7 +224,7 @@ public: * @param count The maximum number of children to retrieve. * @return The number of children written to the pointer. */ - size_t getChildren(Instance i, utils::Entity* children, size_t count) const noexcept; + size_t getChildren(Instance i, utils::Entity* UTILS_NONNULL children, size_t count) const noexcept; /** * Returns an iterator to the Instance of the first child of the given parent. @@ -261,7 +285,7 @@ public: * returns the value set by setTransform(). * @see setTransform() */ - const math::mat4 getTransformAccurate(Instance ci) const noexcept; + math::mat4 getTransformAccurate(Instance ci) const noexcept; /** * Return the world transform of a transform component. @@ -279,7 +303,7 @@ public: * composition of this component's local transform with its parent's world transform. * @see setTransform() */ - const math::mat4 getWorldTransformAccurate(Instance ci) const noexcept; + math::mat4 getWorldTransformAccurate(Instance ci) const noexcept; /** * Opens a local transform transaction. During a transaction, getWorldTransform() can @@ -308,6 +332,10 @@ public: * @see openLocalTransformTransaction(), setTransform() */ void commitLocalTransformTransaction() noexcept; + +protected: + // prevent heap allocation + ~TransformManager() = default; }; } // namespace filament diff --git a/windows/include/filament/filament/VertexBuffer.h b/thermion_dart/native/include/filament/filament/VertexBuffer.h similarity index 89% rename from windows/include/filament/filament/VertexBuffer.h rename to thermion_dart/native/include/filament/filament/VertexBuffer.h index 9557a541..fccbd004 100644 --- a/windows/include/filament/filament/VertexBuffer.h +++ b/thermion_dart/native/include/filament/filament/VertexBuffer.h @@ -27,6 +27,9 @@ #include +#include +#include + namespace filament { class FVertexBuffer; @@ -142,19 +145,31 @@ public: */ Builder& normalized(VertexAttribute attribute, bool normalize = true) noexcept; + /** + * Sets advanced skinning mode. Bone data, indices and weights will be + * set in RenderableManager:Builder:boneIndicesAndWeights methods. + * Works with or without buffer objects. + * + * @param enabled If true, enables advanced skinning mode. False by default. + * + * @return A reference to this Builder for chaining calls. + * + * @see RenderableManager:Builder:boneIndicesAndWeights + */ + Builder& advancedSkinning(bool enabled) noexcept; + /** * Creates the VertexBuffer object and returns a pointer to it. * * @param engine Reference to the filament::Engine to associate this VertexBuffer with. * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. + * @return pointer to the newly created object. * * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of * memory or other resources. * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. */ - VertexBuffer* build(Engine& engine); + VertexBuffer* UTILS_NONNULL build(Engine& engine); private: friend class FVertexBuffer; @@ -193,7 +208,12 @@ public: * and Builder::bufferCount() - 1. * @param bufferObject The handle to the GPU data that will be used in this buffer slot. */ - void setBufferObjectAt(Engine& engine, uint8_t bufferIndex, BufferObject const* bufferObject); + void setBufferObjectAt(Engine& engine, uint8_t bufferIndex, + BufferObject const* UTILS_NONNULL bufferObject); + +protected: + // prevent heap allocation + ~VertexBuffer() = default; }; } // namespace filament diff --git a/ios/include/filament/filament/View.h b/thermion_dart/native/include/filament/filament/View.h similarity index 90% rename from ios/include/filament/filament/View.h rename to thermion_dart/native/include/filament/filament/View.h index 7c0f1683..3cdd527f 100644 --- a/ios/include/filament/filament/View.h +++ b/thermion_dart/native/include/filament/filament/View.h @@ -19,17 +19,19 @@ #ifndef TNT_FILAMENT_VIEW_H #define TNT_FILAMENT_VIEW_H -#include #include #include -#include - #include #include #include +#include + +#include +#include + namespace filament { namespace backend { @@ -66,32 +68,32 @@ class Viewport; */ class UTILS_PUBLIC View : public FilamentAPI { public: - using QualityLevel = QualityLevel; - using BlendMode = BlendMode; - using AntiAliasing = AntiAliasing; - using Dithering = Dithering; - using ShadowType = ShadowType; + using QualityLevel = filament::QualityLevel; + using BlendMode = filament::BlendMode; + using AntiAliasing = filament::AntiAliasing; + using Dithering = filament::Dithering; + using ShadowType = filament::ShadowType; - using DynamicResolutionOptions = DynamicResolutionOptions; - using BloomOptions = BloomOptions; - using FogOptions = FogOptions; - using DepthOfFieldOptions = DepthOfFieldOptions; - using VignetteOptions = VignetteOptions; - using RenderQuality = RenderQuality; - using AmbientOcclusionOptions = AmbientOcclusionOptions; - using TemporalAntiAliasingOptions = TemporalAntiAliasingOptions; - using MultiSampleAntiAliasingOptions = MultiSampleAntiAliasingOptions; - using VsmShadowOptions = VsmShadowOptions; - using SoftShadowOptions = SoftShadowOptions; - using ScreenSpaceReflectionsOptions = ScreenSpaceReflectionsOptions; - using GuardBandOptions = GuardBandOptions; - using StereoscopicOptions = StereoscopicOptions; + using DynamicResolutionOptions = filament::DynamicResolutionOptions; + using BloomOptions = filament::BloomOptions; + using FogOptions = filament::FogOptions; + using DepthOfFieldOptions = filament::DepthOfFieldOptions; + using VignetteOptions = filament::VignetteOptions; + using RenderQuality = filament::RenderQuality; + using AmbientOcclusionOptions = filament::AmbientOcclusionOptions; + using TemporalAntiAliasingOptions = filament::TemporalAntiAliasingOptions; + using MultiSampleAntiAliasingOptions = filament::MultiSampleAntiAliasingOptions; + using VsmShadowOptions = filament::VsmShadowOptions; + using SoftShadowOptions = filament::SoftShadowOptions; + using ScreenSpaceReflectionsOptions = filament::ScreenSpaceReflectionsOptions; + using GuardBandOptions = filament::GuardBandOptions; + using StereoscopicOptions = filament::StereoscopicOptions; /** * Sets the View's name. Only useful for debugging. * @param name Pointer to the View's name. The string is copied. */ - void setName(const char* name) noexcept; + void setName(const char* UTILS_NONNULL name) noexcept; /** * Returns the View's name @@ -100,7 +102,7 @@ public: * * @attention Do *not* free the pointer or modify its content. */ - const char* getName() const noexcept; + const char* UTILS_NULLABLE getName() const noexcept; /** * Set this View instance's Scene. @@ -116,19 +118,19 @@ public: * There is no reference-counting. * Make sure to dissociate a Scene from all Views before destroying it. */ - void setScene(Scene* scene); + void setScene(Scene* UTILS_NULLABLE scene); /** * Returns the Scene currently associated with this View. * @return A pointer to the Scene associated to this View. nullptr if no Scene is set. */ - Scene* getScene() noexcept; + Scene* UTILS_NULLABLE getScene() noexcept; /** * Returns the Scene currently associated with this View. * @return A pointer to the Scene associated to this View. nullptr if no Scene is set. */ - Scene const* getScene() const noexcept { + Scene const* UTILS_NULLABLE getScene() const noexcept { return const_cast(this)->getScene(); } @@ -143,7 +145,7 @@ public: * * @param renderTarget Render target associated with view, or nullptr for the swap chain. */ - void setRenderTarget(RenderTarget* renderTarget) noexcept; + void setRenderTarget(RenderTarget* UTILS_NULLABLE renderTarget) noexcept; /** * Gets the offscreen render target associated with this view. @@ -152,7 +154,7 @@ public: * * @see setRenderTarget */ - RenderTarget* getRenderTarget() const noexcept; + RenderTarget* UTILS_NULLABLE getRenderTarget() const noexcept; /** * Sets the rectangular region to render to. @@ -185,7 +187,7 @@ public: * There is no reference-counting. * Make sure to dissociate a Camera from all Views before destroying it. */ - void setCamera(Camera* camera) noexcept; + void setCamera(Camera* UTILS_NONNULL camera) noexcept; /** * Returns the Camera currently associated with this View. @@ -402,13 +404,13 @@ public: * There is no reference-counting. * Make sure to dissociate a ColorGrading from all Views before destroying it. */ - void setColorGrading(ColorGrading* colorGrading) noexcept; + void setColorGrading(ColorGrading* UTILS_NULLABLE colorGrading) noexcept; /** * Returns the color grading transforms currently associated to this view. * @return A pointer to the ColorGrading associated to this View. */ - const ColorGrading* getColorGrading() const noexcept; + const ColorGrading* UTILS_NULLABLE getColorGrading() const noexcept; /** * Sets ambient occlusion options. @@ -662,7 +664,8 @@ public: * Material's stencil comparison function and reference value. Fragments that don't pass the * stencil test are then discarded. * - * Post-processing must be enabled in order to use the stencil buffer. + * If post-processing is disabled, then the SwapChain must have the CONFIG_HAS_STENCIL_BUFFER + * flag set in order to use the stencil buffer. * * A renderable's priority (see RenderableManager::setPriority) is useful to control the order * in which primitives are drawn. @@ -690,11 +693,12 @@ public: * - punctual lights * * Stereo rendering depends on device and platform support. To check if stereo rendering is - * supported, use Engine::isStereoSupported(). + * supported, use Engine::isStereoSupported(). If stereo rendering is not supported, then the + * stereoscopic options have no effect. * * @param options The stereoscopic options to use on this view */ - void setStereoscopicOptions(StereoscopicOptions const& options); + void setStereoscopicOptions(StereoscopicOptions const& options) noexcept; /** * Returns the stereoscopic options associated with this View. @@ -712,10 +716,10 @@ public: bool isFrustumCullingEnabled() const noexcept; //! debugging: sets the Camera used for rendering. It may be different from the culling camera. - void setDebugCamera(Camera* camera) noexcept; + void setDebugCamera(Camera* UTILS_NULLABLE camera) noexcept; //! debugging: returns a Camera from the point of view of *the* dominant directional light used for shadowing. - Camera const* getDirectionalLightCamera() const noexcept; + Camera const* UTILS_NULLABLE getDirectionalShadowCamera() const noexcept; /** Result of a picking query */ @@ -744,11 +748,12 @@ public: /** User data for PickingQueryResultCallback */ struct PickingQuery { // note: this is enough to store a std::function<> -- just saying... - void* storage[4]; + void* UTILS_NULLABLE storage[4]; }; /** callback type used for picking queries. */ - using PickingQueryResultCallback = void(*)(PickingQueryResult const& result, PickingQuery* pq); + using PickingQueryResultCallback = + void(*)(PickingQueryResult const& result, PickingQuery* UTILS_NONNULL pq); /** * Helper for creating a picking query from Foo::method, by pointer. @@ -762,10 +767,10 @@ public: * @param handler Handler to dispatch the callback or nullptr for the default handler. */ template - void pick(uint32_t x, uint32_t y, T* instance, backend::CallbackHandler* handler = nullptr) noexcept { + void pick(uint32_t x, uint32_t y, T* UTILS_NONNULL instance, + backend::CallbackHandler* UTILS_NULLABLE handler = nullptr) noexcept { PickingQuery& query = pick(x, y, [](PickingQueryResult const& result, PickingQuery* pq) { - void* user = pq->storage; - (*static_cast(user)->*method)(result); + (static_cast(pq->storage[0])->*method)(result); }, handler); query.storage[0] = instance; } @@ -782,11 +787,11 @@ public: * @param handler Handler to dispatch the callback or nullptr for the default handler. */ template - void pick(uint32_t x, uint32_t y, T instance, backend::CallbackHandler* handler = nullptr) noexcept { + void pick(uint32_t x, uint32_t y, T instance, + backend::CallbackHandler* UTILS_NULLABLE handler = nullptr) noexcept { static_assert(sizeof(instance) <= sizeof(PickingQuery::storage), "user data too large"); PickingQuery& query = pick(x, y, [](PickingQueryResult const& result, PickingQuery* pq) { - void* user = pq->storage; - T* that = static_cast(user); + T* const that = static_cast(reinterpret_cast(pq->storage)); (that->*method)(result); that->~T(); }, handler); @@ -803,15 +808,15 @@ public: * @param handler Handler to dispatch the callback or nullptr for the default handler. */ template - void pick(uint32_t x, uint32_t y, T functor, backend::CallbackHandler* handler = nullptr) noexcept { + void pick(uint32_t x, uint32_t y, T functor, + backend::CallbackHandler* UTILS_NULLABLE handler = nullptr) noexcept { static_assert(sizeof(functor) <= sizeof(PickingQuery::storage), "functor too large"); PickingQuery& query = pick(x, y, handler, (PickingQueryResultCallback)[](PickingQueryResult const& result, PickingQuery* pq) { - void* user = pq->storage; - T& that = *static_cast(user); - that(result); - that.~T(); - }); + T* const that = static_cast(reinterpret_cast(pq->storage)); + that->operator()(result); + that->~T(); + }); new(query.storage) T(std::move(functor)); } @@ -830,8 +835,9 @@ public: * 8*sizeof(void*) bytes of user data. This user data is later accessible * in the PickingQueryResultCallback callback 3rd parameter. */ - PickingQuery& pick(uint32_t x, uint32_t y, backend::CallbackHandler* handler, - PickingQueryResultCallback callback) noexcept; + PickingQuery& pick(uint32_t x, uint32_t y, + backend::CallbackHandler* UTILS_NULLABLE handler, + PickingQueryResultCallback UTILS_NONNULL callback) noexcept; /** * Set the value of material global variables. There are up-to four such variable each of @@ -893,6 +899,10 @@ public: */ UTILS_DEPRECATED AmbientOcclusion getAmbientOcclusion() const noexcept; + +protected: + // prevent heap allocation + ~View() = default; }; } // namespace filament diff --git a/windows/include/filament/filament/Viewport.h b/thermion_dart/native/include/filament/filament/Viewport.h similarity index 98% rename from windows/include/filament/filament/Viewport.h rename to thermion_dart/native/include/filament/filament/Viewport.h index a641e7ab..29916f70 100644 --- a/windows/include/filament/filament/Viewport.h +++ b/thermion_dart/native/include/filament/filament/Viewport.h @@ -23,9 +23,6 @@ #include -#include -#include - #include #include diff --git a/ios/include/filament/filameshio/MeshReader.h b/thermion_dart/native/include/filament/filameshio/MeshReader.h similarity index 100% rename from ios/include/filament/filameshio/MeshReader.h rename to thermion_dart/native/include/filament/filameshio/MeshReader.h diff --git a/ios/include/filament/geometry/SurfaceOrientation.h b/thermion_dart/native/include/filament/geometry/SurfaceOrientation.h similarity index 100% rename from ios/include/filament/geometry/SurfaceOrientation.h rename to thermion_dart/native/include/filament/geometry/SurfaceOrientation.h diff --git a/windows/include/filament/geometry/TangentSpaceMesh.h b/thermion_dart/native/include/filament/geometry/TangentSpaceMesh.h similarity index 82% rename from windows/include/filament/geometry/TangentSpaceMesh.h rename to thermion_dart/native/include/filament/geometry/TangentSpaceMesh.h index 616245a5..980e81ac 100644 --- a/windows/include/filament/geometry/TangentSpaceMesh.h +++ b/thermion_dart/native/include/filament/geometry/TangentSpaceMesh.h @@ -21,6 +21,8 @@ #include #include +#include + namespace filament { namespace geometry { @@ -106,16 +108,24 @@ public: * - http://people.compute.dtu.dk/jerf/code/hairy/ */ FRISVAD = 4, - - /** - * Flat Shading - * - * **Requires**: `positions + indices`
- * **Note**: Will remesh - */ - FLAT_SHADING = 5 }; + /** + * This enum specifies the auxiliary attributes of each vertex that can be provided as input. + * These attributes do not affect the computation of the tangent space, but they will be + * properly mapped when a remeshing is carried out. + */ + enum class AuxAttribute : uint8_t { + UV1 = 0x0, + COLORS = 0x1, + JOINTS = 0x2, + WEIGHTS = 0x3, + }; + + using InData = std::variant; + /** * Use this class to provide input to the TangentSpaceMesh computation. **Important**: * Computation of the tangent space is intended to be synchronous (working on the same thread). @@ -170,6 +180,16 @@ public: */ Builder& uvs(filament::math::float2 const* uvs, size_t stride = 0) noexcept; + /** + * Sets "auxiliary" attributes that will be properly mapped when remeshed. + * + * @param attribute The attribute of the data to be stored + * @param data The data to be store + * @param stride The stride for iterating through `attribute` + * @return Builder + */ + Builder& aux(AuxAttribute attribute, InData data, size_t stride = 0) noexcept; + /** * @param positions The input positions * @param stride The stride for iterating through `positions` @@ -177,10 +197,30 @@ public: */ Builder& positions(filament::math::float3 const* positions, size_t stride = 0) noexcept; + /** + * @param triangleCount The input number of triangles + * @return Builder + */ Builder& triangleCount(size_t triangleCount) noexcept; + + /** + * @param triangles The triangles in 32-bit indices + * @return Builder + */ Builder& triangles(filament::math::uint3 const* triangles) noexcept; + + /** + * @param triangles The triangles in 16-bit indices + * @return Builder + */ Builder& triangles(filament::math::ushort3 const* triangles) noexcept; + /** + * The Client can provide an algorithm hint to produce the tangents. + * + * @param algorithm The algorithm hint. + * @return Builder + */ Builder& algorithm(Algorithm algorithm) noexcept; /** @@ -199,7 +239,7 @@ public: }; /** - * Destory the mesh object + * Destroy the mesh object * @param mesh A pointer to a TangentSpaceMesh ready to be destroyed */ static void destroy(TangentSpaceMesh* mesh) noexcept; @@ -284,6 +324,24 @@ public: */ void getQuats(filament::math::quath* out, size_t stride = 0) const noexcept; + /** + * Get output auxiliary attributes. + * Assumes the `out` param is at least of getVertexCount() length (while accounting for + * `stride`). + * + * @param out Client-allocated array that will be used for copying out attribute as T + * @param stride Stride for iterating through `out` + */ + template + using is_supported_aux_t = + typename std::enable_if::value || + std::is_same::value || + std::is_same::value || + std::is_same::value || + std::is_same::value>::type; + template> + void getAux(AuxAttribute attribute, T* out, size_t stride = 0) const noexcept; + /** * Get number of output triangles. * The number of output triangles is the same as the number of input triangles. However, when a @@ -315,9 +373,9 @@ public: void getTriangles(filament::math::ushort3* out) const; /** - * @return The algorithm used to compute the output mesh. + * @return Whether the TBN algorithm remeshed the input. */ - Algorithm getAlgorithm() const noexcept; + bool remeshed() const noexcept; private: ~TangentSpaceMesh() noexcept; diff --git a/ios/include/filament/geometry/Transcoder.h b/thermion_dart/native/include/filament/geometry/Transcoder.h similarity index 100% rename from ios/include/filament/geometry/Transcoder.h rename to thermion_dart/native/include/filament/geometry/Transcoder.h diff --git a/ios/include/filament/gltfio/Animator.h b/thermion_dart/native/include/filament/gltfio/Animator.h similarity index 100% rename from ios/include/filament/gltfio/Animator.h rename to thermion_dart/native/include/filament/gltfio/Animator.h diff --git a/windows/include/filament/gltfio/AssetLoader.h b/thermion_dart/native/include/filament/gltfio/AssetLoader.h similarity index 98% rename from windows/include/filament/gltfio/AssetLoader.h rename to thermion_dart/native/include/filament/gltfio/AssetLoader.h index c031850f..f516166a 100644 --- a/windows/include/filament/gltfio/AssetLoader.h +++ b/thermion_dart/native/include/filament/gltfio/AssetLoader.h @@ -97,8 +97,8 @@ struct AssetConfiguration { * * // Load buffers and textures from disk. * ResourceLoader resourceLoader({engine, ".", true}); - * resourceLoader.addTextureProvider("image/png", decoder) - * resourceLoader.addTextureProvider("image/jpeg", decoder) + * resourceLoader.addTextureProvider("image/png", decoder); + * resourceLoader.addTextureProvider("image/jpeg", decoder); * resourceLoader.loadResources(asset); * * // Free the glTF hierarchy as it is no longer needed. @@ -197,7 +197,7 @@ public: * This cannot be called after FilamentAsset::releaseSourceData(). * See also AssetLoader::createInstancedAsset(). */ - FilamentInstance* createInstance(FilamentAsset* primary); + FilamentInstance* createInstance(FilamentAsset* asset); /** * Allows clients to enable diagnostic shading on newly-loaded assets. diff --git a/ios/include/filament/gltfio/FilamentAsset.h b/thermion_dart/native/include/filament/gltfio/FilamentAsset.h similarity index 100% rename from ios/include/filament/gltfio/FilamentAsset.h rename to thermion_dart/native/include/filament/gltfio/FilamentAsset.h diff --git a/ios/include/filament/gltfio/FilamentInstance.h b/thermion_dart/native/include/filament/gltfio/FilamentInstance.h similarity index 100% rename from ios/include/filament/gltfio/FilamentInstance.h rename to thermion_dart/native/include/filament/gltfio/FilamentInstance.h diff --git a/ios/include/filament/gltfio/MaterialProvider.h b/thermion_dart/native/include/filament/gltfio/MaterialProvider.h similarity index 100% rename from ios/include/filament/gltfio/MaterialProvider.h rename to thermion_dart/native/include/filament/gltfio/MaterialProvider.h diff --git a/ios/include/filament/gltfio/NodeManager.h b/thermion_dart/native/include/filament/gltfio/NodeManager.h similarity index 100% rename from ios/include/filament/gltfio/NodeManager.h rename to thermion_dart/native/include/filament/gltfio/NodeManager.h diff --git a/ios/include/filament/gltfio/ResourceLoader.h b/thermion_dart/native/include/filament/gltfio/ResourceLoader.h similarity index 96% rename from ios/include/filament/gltfio/ResourceLoader.h rename to thermion_dart/native/include/filament/gltfio/ResourceLoader.h index ab0a6f10..d222871b 100644 --- a/ios/include/filament/gltfio/ResourceLoader.h +++ b/thermion_dart/native/include/filament/gltfio/ResourceLoader.h @@ -69,9 +69,12 @@ class UTILS_PUBLIC ResourceLoader { public: using BufferDescriptor = filament::backend::BufferDescriptor; - ResourceLoader(const ResourceConfiguration& config); + explicit ResourceLoader(const ResourceConfiguration& config); ~ResourceLoader(); + + void setConfiguration(const ResourceConfiguration& config); + /** * Feeds the binary content of an external resource into the loader's URI cache. * @@ -90,7 +93,8 @@ public: /** * Register a plugin that can consume PNG / JPEG content and produce filament::Texture objects. * - * Destruction of the given provider is the client's responsibility. + * Destruction of the given provider is the client's responsibility and must be done after the + * destruction of this ResourceLoader. */ void addTextureProvider(const char* mimeType, TextureProvider* provider); @@ -153,8 +157,6 @@ public: private: bool loadResources(FFilamentAsset* asset, bool async); - void normalizeSkinningWeights(FFilamentAsset* asset) const; - AssetPool* mPool; struct Impl; Impl* pImpl; }; diff --git a/ios/include/filament/gltfio/TextureProvider.h b/thermion_dart/native/include/filament/gltfio/TextureProvider.h similarity index 100% rename from ios/include/filament/gltfio/TextureProvider.h rename to thermion_dart/native/include/filament/gltfio/TextureProvider.h diff --git a/ios/include/filament/gltfio/TrsTransformManager.h b/thermion_dart/native/include/filament/gltfio/TrsTransformManager.h similarity index 100% rename from ios/include/filament/gltfio/TrsTransformManager.h rename to thermion_dart/native/include/filament/gltfio/TrsTransformManager.h diff --git a/ios/include/filament/gltfio/materials/uberarchive.h b/thermion_dart/native/include/filament/gltfio/materials/uberarchive.h similarity index 100% rename from ios/include/filament/gltfio/materials/uberarchive.h rename to thermion_dart/native/include/filament/gltfio/materials/uberarchive.h diff --git a/ios/include/filament/gltfio/math.h b/thermion_dart/native/include/filament/gltfio/math.h similarity index 100% rename from ios/include/filament/gltfio/math.h rename to thermion_dart/native/include/filament/gltfio/math.h diff --git a/ios/include/filament/ibl/Cubemap.h b/thermion_dart/native/include/filament/ibl/Cubemap.h similarity index 100% rename from ios/include/filament/ibl/Cubemap.h rename to thermion_dart/native/include/filament/ibl/Cubemap.h diff --git a/ios/include/filament/ibl/CubemapIBL.h b/thermion_dart/native/include/filament/ibl/CubemapIBL.h similarity index 100% rename from ios/include/filament/ibl/CubemapIBL.h rename to thermion_dart/native/include/filament/ibl/CubemapIBL.h diff --git a/ios/include/filament/ibl/CubemapSH.h b/thermion_dart/native/include/filament/ibl/CubemapSH.h similarity index 100% rename from ios/include/filament/ibl/CubemapSH.h rename to thermion_dart/native/include/filament/ibl/CubemapSH.h diff --git a/ios/include/filament/ibl/CubemapUtils.h b/thermion_dart/native/include/filament/ibl/CubemapUtils.h similarity index 100% rename from ios/include/filament/ibl/CubemapUtils.h rename to thermion_dart/native/include/filament/ibl/CubemapUtils.h diff --git a/ios/include/filament/ibl/Image.h b/thermion_dart/native/include/filament/ibl/Image.h similarity index 100% rename from ios/include/filament/ibl/Image.h rename to thermion_dart/native/include/filament/ibl/Image.h diff --git a/ios/include/filament/ibl/utilities.h b/thermion_dart/native/include/filament/ibl/utilities.h similarity index 100% rename from ios/include/filament/ibl/utilities.h rename to thermion_dart/native/include/filament/ibl/utilities.h diff --git a/ios/include/filament/image/ColorTransform.h b/thermion_dart/native/include/filament/image/ColorTransform.h similarity index 100% rename from ios/include/filament/image/ColorTransform.h rename to thermion_dart/native/include/filament/image/ColorTransform.h diff --git a/ios/include/filament/image/ImageOps.h b/thermion_dart/native/include/filament/image/ImageOps.h similarity index 100% rename from ios/include/filament/image/ImageOps.h rename to thermion_dart/native/include/filament/image/ImageOps.h diff --git a/ios/include/filament/image/ImageSampler.h b/thermion_dart/native/include/filament/image/ImageSampler.h similarity index 100% rename from ios/include/filament/image/ImageSampler.h rename to thermion_dart/native/include/filament/image/ImageSampler.h diff --git a/ios/include/filament/image/Ktx1Bundle.h b/thermion_dart/native/include/filament/image/Ktx1Bundle.h similarity index 100% rename from ios/include/filament/image/Ktx1Bundle.h rename to thermion_dart/native/include/filament/image/Ktx1Bundle.h diff --git a/ios/include/filament/image/LinearImage.h b/thermion_dart/native/include/filament/image/LinearImage.h similarity index 100% rename from ios/include/filament/image/LinearImage.h rename to thermion_dart/native/include/filament/image/LinearImage.h diff --git a/ios/include/filament/imageio/BasisEncoder.h b/thermion_dart/native/include/filament/imageio/BasisEncoder.h similarity index 100% rename from ios/include/filament/imageio/BasisEncoder.h rename to thermion_dart/native/include/filament/imageio/BasisEncoder.h diff --git a/ios/include/filament/imageio/HDRDecoder.h b/thermion_dart/native/include/filament/imageio/HDRDecoder.h similarity index 100% rename from ios/include/filament/imageio/HDRDecoder.h rename to thermion_dart/native/include/filament/imageio/HDRDecoder.h diff --git a/ios/include/filament/imageio/ImageDecoder.h b/thermion_dart/native/include/filament/imageio/ImageDecoder.h similarity index 100% rename from ios/include/filament/imageio/ImageDecoder.h rename to thermion_dart/native/include/filament/imageio/ImageDecoder.h diff --git a/ios/include/filament/imageio/ImageDiffer.h b/thermion_dart/native/include/filament/imageio/ImageDiffer.h similarity index 100% rename from ios/include/filament/imageio/ImageDiffer.h rename to thermion_dart/native/include/filament/imageio/ImageDiffer.h diff --git a/ios/include/filament/imageio/ImageEncoder.h b/thermion_dart/native/include/filament/imageio/ImageEncoder.h similarity index 100% rename from ios/include/filament/imageio/ImageEncoder.h rename to thermion_dart/native/include/filament/imageio/ImageEncoder.h diff --git a/ios/include/filament/ktxreader/Ktx1Reader.h b/thermion_dart/native/include/filament/ktxreader/Ktx1Reader.h similarity index 100% rename from ios/include/filament/ktxreader/Ktx1Reader.h rename to thermion_dart/native/include/filament/ktxreader/Ktx1Reader.h diff --git a/ios/include/filament/ktxreader/Ktx2Reader.h b/thermion_dart/native/include/filament/ktxreader/Ktx2Reader.h similarity index 100% rename from ios/include/filament/ktxreader/Ktx2Reader.h rename to thermion_dart/native/include/filament/ktxreader/Ktx2Reader.h diff --git a/ios/include/filament/math/TMatHelpers.h b/thermion_dart/native/include/filament/math/TMatHelpers.h similarity index 100% rename from ios/include/filament/math/TMatHelpers.h rename to thermion_dart/native/include/filament/math/TMatHelpers.h diff --git a/ios/include/filament/math/TQuatHelpers.h b/thermion_dart/native/include/filament/math/TQuatHelpers.h similarity index 81% rename from ios/include/filament/math/TQuatHelpers.h rename to thermion_dart/native/include/filament/math/TQuatHelpers.h index cd3342c0..0439b971 100644 --- a/ios/include/filament/math/TQuatHelpers.h +++ b/thermion_dart/native/include/filament/math/TQuatHelpers.h @@ -58,7 +58,8 @@ public: /* compound assignment products by a scalar */ - constexpr QUATERNION& operator*=(T v) { + template>> + constexpr QUATERNION& operator*=(U v) { QUATERNION& lhs = static_cast&>(*this); for (size_t i = 0; i < QUATERNION::size(); i++) { lhs[i] *= v; @@ -66,7 +67,8 @@ public: return lhs; } - constexpr QUATERNION& operator/=(T v) { + template>> + constexpr QUATERNION& operator/=(U v) { QUATERNION& lhs = static_cast&>(*this); for (size_t i = 0; i < QUATERNION::size(); i++) { lhs[i] /= v; @@ -85,28 +87,29 @@ public: /* The operators below handle operation between quaternions of the same size * but of a different element type. */ - template - friend inline - constexpr QUATERNION MATH_PURE operator*(const QUATERNION& q, const QUATERNION& r) { + template + friend inline constexpr + QUATERNION> MATH_PURE operator*( + const QUATERNION& q, const QUATERNION& r) { // could be written as: // return QUATERNION( // q.w*r.w - dot(q.xyz, r.xyz), // q.w*r.xyz + r.w*q.xyz + cross(q.xyz, r.xyz)); - - return QUATERNION( + return { q.w * r.w - q.x * r.x - q.y * r.y - q.z * r.z, q.w * r.x + q.x * r.w + q.y * r.z - q.z * r.y, q.w * r.y - q.x * r.z + q.y * r.w + q.z * r.x, - q.w * r.z + q.x * r.y - q.y * r.x + q.z * r.w); + q.w * r.z + q.x * r.y - q.y * r.x + q.z * r.w + }; } - template - friend inline - constexpr TVec3 MATH_PURE operator*(const QUATERNION& q, const TVec3& v) { + template + friend inline constexpr + TVec3> MATH_PURE operator*(const QUATERNION& q, const TVec3& v) { // note: if q is known to be a unit quaternion, then this simplifies to: // TVec3 t = 2 * cross(q.xyz, v) // return v + (q.w * t) + cross(q.xyz, t) - return imaginary(q * QUATERNION(v, 0) * inverse(q)); + return imaginary(q * QUATERNION(v, 0) * inverse(q)); } @@ -122,22 +125,25 @@ public: * q.w*r.z + q.x*r.y - q.y*r.x + q.z*r.w); * */ - friend inline - constexpr QUATERNION MATH_PURE operator*(QUATERNION q, T scalar) { + template>> + friend inline constexpr + QUATERNION> MATH_PURE operator*(QUATERNION q, U scalar) { // don't pass q by reference because we need a copy anyway - return q *= scalar; + return QUATERNION>(q *= scalar); } - friend inline - constexpr QUATERNION MATH_PURE operator*(T scalar, QUATERNION q) { + template>> + friend inline constexpr + QUATERNION> MATH_PURE operator*(U scalar, QUATERNION q) { // don't pass q by reference because we need a copy anyway - return q *= scalar; + return QUATERNION>(q *= scalar); } - friend inline - constexpr QUATERNION MATH_PURE operator/(QUATERNION q, T scalar) { + template>> + friend inline constexpr + QUATERNION> MATH_PURE operator/(QUATERNION q, U scalar) { // don't pass q by reference because we need a copy anyway - return q /= scalar; + return QUATERNION>(q /= scalar); } }; @@ -160,9 +166,10 @@ public: * (the first one, BASE being known). */ - template - friend inline - constexpr T MATH_PURE dot(const QUATERNION& p, const QUATERNION& q) { + template + friend inline constexpr + arithmetic_result_t MATH_PURE dot( + const QUATERNION& p, const QUATERNION& q) { return p.x * q.x + p.y * q.y + p.z * q.z + @@ -196,7 +203,7 @@ public: friend inline constexpr QUATERNION MATH_PURE inverse(const QUATERNION& q) { - return conj(q) * (1 / dot(q, q)); + return conj(q) * (T(1) / dot(q, q)); } friend inline @@ -214,8 +221,10 @@ public: return QUATERNION(q.xyz, 0); } - friend inline - constexpr QUATERNION MATH_PURE cross(const QUATERNION& p, const QUATERNION& q) { + template + friend inline constexpr + QUATERNION> MATH_PURE cross( + const QUATERNION& p, const QUATERNION& q) { return unreal(p * q); } diff --git a/ios/include/filament/math/TVecHelpers.h b/thermion_dart/native/include/filament/math/TVecHelpers.h similarity index 100% rename from ios/include/filament/math/TVecHelpers.h rename to thermion_dart/native/include/filament/math/TVecHelpers.h diff --git a/ios/include/filament/math/compiler.h b/thermion_dart/native/include/filament/math/compiler.h similarity index 100% rename from ios/include/filament/math/compiler.h rename to thermion_dart/native/include/filament/math/compiler.h diff --git a/ios/include/filament/math/fast.h b/thermion_dart/native/include/filament/math/fast.h similarity index 100% rename from ios/include/filament/math/fast.h rename to thermion_dart/native/include/filament/math/fast.h diff --git a/ios/include/filament/math/half.h b/thermion_dart/native/include/filament/math/half.h similarity index 100% rename from ios/include/filament/math/half.h rename to thermion_dart/native/include/filament/math/half.h diff --git a/ios/include/filament/math/mat2.h b/thermion_dart/native/include/filament/math/mat2.h similarity index 100% rename from ios/include/filament/math/mat2.h rename to thermion_dart/native/include/filament/math/mat2.h diff --git a/ios/include/filament/math/mat3.h b/thermion_dart/native/include/filament/math/mat3.h similarity index 92% rename from ios/include/filament/math/mat3.h rename to thermion_dart/native/include/filament/math/mat3.h index 8ebb93df..035865fe 100644 --- a/ios/include/filament/math/mat3.h +++ b/thermion_dart/native/include/filament/math/mat3.h @@ -17,15 +17,21 @@ #ifndef TNT_MATH_MAT3_H #define TNT_MATH_MAT3_H -#include #include #include #include +#include +#include #include #include #include +#include + +#include +#include + namespace filament { namespace math { // ------------------------------------------------------------------------------------- @@ -289,6 +295,14 @@ public: return matrix::cof(m); } + /* + * Returns a matrix representing the pose of a virtual camera looking towards -Z in its + * local Y-up coordinate system. "up" defines where the Y axis of the camera's local coordinate + * system is. + */ + template + static TMat33 lookTo(const TVec3& direction, const TVec3& up) noexcept; + /** * Packs the tangent frame represented by the specified matrix into a quaternion. * Reflection is preserved by encoding it as the sign of the w component in the @@ -406,6 +420,29 @@ constexpr TMat33::TMat33(const TQuaternion& q) noexcept : m_value{} { m_value[2] = col_type(xz + yw, yz - xw, 1 - xx - yy); // NOLINT } +template +constexpr T dot_tolerance() noexcept; + +template<> +constexpr float dot_tolerance() noexcept { return 0.999f; } + +template<> +constexpr double dot_tolerance() noexcept { return 0.9999; } + +template +template +TMat33 TMat33::lookTo(const TVec3& direction, const TVec3& up) noexcept { + auto const z_axis = direction; + auto norm_up = up; + if (std::abs(dot(z_axis, norm_up)) > dot_tolerance< arithmetic_result_t >()) { + // Fix up vector if we're degenerate (looking straight up, basically) + norm_up = { norm_up.z, norm_up.x, norm_up.y }; + } + auto const x_axis = normalize(cross(z_axis, norm_up)); + auto const y_axis = cross(x_axis, z_axis); + return { x_axis, y_axis, -z_axis }; +} + //------------------------------------------------------------------------------ template constexpr TQuaternion TMat33::packTangentFrame(const TMat33& m, size_t storageSize) noexcept { diff --git a/ios/include/filament/math/mat4.h b/thermion_dart/native/include/filament/math/mat4.h similarity index 96% rename from ios/include/filament/math/mat4.h rename to thermion_dart/native/include/filament/math/mat4.h index d44081b2..57058539 100644 --- a/ios/include/filament/math/mat4.h +++ b/thermion_dart/native/include/filament/math/mat4.h @@ -285,6 +285,9 @@ public: template static TMat44 lookAt(const TVec3& eye, const TVec3& center, const TVec3& up) noexcept; + template + static TMat44 lookTo(const TVec3& direction, const TVec3& position, const TVec3& up) noexcept; + template static constexpr TVec3 project(const TMat44& projectionMatrix, TVec3 vertice) noexcept{ TVec4 r = projectionMatrix * TVec4{ vertice, 1 }; @@ -517,19 +520,19 @@ template template TMat44 TMat44::lookAt(const TVec3& eye, const TVec3& center, const TVec3& up) noexcept { - TVec3 z_axis(normalize(center - eye)); - TVec3 norm_up(normalize(up)); - if (std::abs(dot(z_axis, norm_up)) > T(0.999)) { - // Fix up vector if we're degenerate (looking straight up, basically) - norm_up = { norm_up.z, norm_up.x, norm_up.y }; - } - TVec3 x_axis(normalize(cross(z_axis, norm_up))); - TVec3 y_axis(cross(x_axis, z_axis)); - return TMat44( - TVec4(x_axis, 0), - TVec4(y_axis, 0), - TVec4(-z_axis, 0), - TVec4(eye, 1)); + return lookTo(normalize(center - eye), eye, normalize(up)); +} + +template +template +TMat44 TMat44::lookTo(const TVec3& direction, const TVec3& position, + const TVec3& up) noexcept { + auto r = TMat33::lookTo(direction, up); + return TMat44{ + TVec4{ r[0], 0 }, + TVec4{ r[1], 0 }, + TVec4{ r[2], 0 }, + TVec4{ position, 1 } }; } // ---------------------------------------------------------------------------------------- diff --git a/ios/include/filament/math/mathfwd.h b/thermion_dart/native/include/filament/math/mathfwd.h similarity index 100% rename from ios/include/filament/math/mathfwd.h rename to thermion_dart/native/include/filament/math/mathfwd.h diff --git a/ios/include/filament/math/norm.h b/thermion_dart/native/include/filament/math/norm.h similarity index 100% rename from ios/include/filament/math/norm.h rename to thermion_dart/native/include/filament/math/norm.h diff --git a/ios/include/filament/math/quat.h b/thermion_dart/native/include/filament/math/quat.h similarity index 93% rename from ios/include/filament/math/quat.h rename to thermion_dart/native/include/filament/math/quat.h index a51a4eb2..af9f7467 100644 --- a/ios/include/filament/math/quat.h +++ b/thermion_dart/native/include/filament/math/quat.h @@ -171,27 +171,29 @@ typedef details::TQuaternion quat; typedef details::TQuaternion quatf; typedef details::TQuaternion quath; -constexpr inline quat operator "" _i(long double v) { +// note: don't put a space between "" and _{i,j,k}, this is deprecated + +constexpr inline quat operator ""_i(long double v) { return { 0.0, double(v), 0.0, 0.0 }; } -constexpr inline quat operator "" _j(long double v) { +constexpr inline quat operator ""_j(long double v) { return { 0.0, 0.0, double(v), 0.0 }; } -constexpr inline quat operator "" _k(long double v) { +constexpr inline quat operator ""_k(long double v) { return { 0.0, 0.0, 0.0, double(v) }; } -constexpr inline quat operator "" _i(unsigned long long v) { +constexpr inline quat operator ""_i(unsigned long long v) { return { 0.0, double(v), 0.0, 0.0 }; } -constexpr inline quat operator "" _j(unsigned long long v) { +constexpr inline quat operator ""_j(unsigned long long v) { return { 0.0, 0.0, double(v), 0.0 }; } -constexpr inline quat operator "" _k(unsigned long long v) { +constexpr inline quat operator ""_k(unsigned long long v) { return { 0.0, 0.0, 0.0, double(v) }; } diff --git a/ios/include/filament/math/scalar.h b/thermion_dart/native/include/filament/math/scalar.h similarity index 100% rename from ios/include/filament/math/scalar.h rename to thermion_dart/native/include/filament/math/scalar.h diff --git a/ios/include/filament/math/vec2.h b/thermion_dart/native/include/filament/math/vec2.h similarity index 100% rename from ios/include/filament/math/vec2.h rename to thermion_dart/native/include/filament/math/vec2.h diff --git a/ios/include/filament/math/vec3.h b/thermion_dart/native/include/filament/math/vec3.h similarity index 100% rename from ios/include/filament/math/vec3.h rename to thermion_dart/native/include/filament/math/vec3.h diff --git a/ios/include/filament/math/vec4.h b/thermion_dart/native/include/filament/math/vec4.h similarity index 100% rename from ios/include/filament/math/vec4.h rename to thermion_dart/native/include/filament/math/vec4.h diff --git a/ios/include/filament/mathio/ostream.h b/thermion_dart/native/include/filament/mathio/ostream.h similarity index 100% rename from ios/include/filament/mathio/ostream.h rename to thermion_dart/native/include/filament/mathio/ostream.h diff --git a/ios/include/filament/mikktspace/mikktspace.h b/thermion_dart/native/include/filament/mikktspace/mikktspace.h similarity index 100% rename from ios/include/filament/mikktspace/mikktspace.h rename to thermion_dart/native/include/filament/mikktspace/mikktspace.h diff --git a/ios/include/filament/tsl/robin_growth_policy.h b/thermion_dart/native/include/filament/tsl/robin_growth_policy.h similarity index 100% rename from ios/include/filament/tsl/robin_growth_policy.h rename to thermion_dart/native/include/filament/tsl/robin_growth_policy.h diff --git a/ios/include/filament/tsl/robin_hash.h b/thermion_dart/native/include/filament/tsl/robin_hash.h similarity index 100% rename from ios/include/filament/tsl/robin_hash.h rename to thermion_dart/native/include/filament/tsl/robin_hash.h diff --git a/ios/include/filament/tsl/robin_map.h b/thermion_dart/native/include/filament/tsl/robin_map.h similarity index 100% rename from ios/include/filament/tsl/robin_map.h rename to thermion_dart/native/include/filament/tsl/robin_map.h diff --git a/ios/include/filament/tsl/robin_set.h b/thermion_dart/native/include/filament/tsl/robin_set.h similarity index 100% rename from ios/include/filament/tsl/robin_set.h rename to thermion_dart/native/include/filament/tsl/robin_set.h diff --git a/ios/include/filament/uberz/ArchiveEnums.h b/thermion_dart/native/include/filament/uberz/ArchiveEnums.h similarity index 100% rename from ios/include/filament/uberz/ArchiveEnums.h rename to thermion_dart/native/include/filament/uberz/ArchiveEnums.h diff --git a/ios/include/filament/uberz/ReadableArchive.h b/thermion_dart/native/include/filament/uberz/ReadableArchive.h similarity index 100% rename from ios/include/filament/uberz/ReadableArchive.h rename to thermion_dart/native/include/filament/uberz/ReadableArchive.h diff --git a/ios/include/filament/uberz/WritableArchive.h b/thermion_dart/native/include/filament/uberz/WritableArchive.h similarity index 100% rename from ios/include/filament/uberz/WritableArchive.h rename to thermion_dart/native/include/filament/uberz/WritableArchive.h diff --git a/ios/include/filament/utils/Allocator.h b/thermion_dart/native/include/filament/utils/Allocator.h similarity index 81% rename from ios/include/filament/utils/Allocator.h rename to thermion_dart/native/include/filament/utils/Allocator.h index 82d1d1cc..7b9978f5 100644 --- a/ios/include/filament/utils/Allocator.h +++ b/thermion_dart/native/include/filament/utils/Allocator.h @@ -17,12 +17,10 @@ #ifndef TNT_UTILS_ALLOCATOR_H #define TNT_UTILS_ALLOCATOR_H - #include #include #include #include -#include #include #include @@ -31,6 +29,8 @@ #include #include +#include +#include namespace utils { @@ -44,14 +44,14 @@ static inline P* add(P* a, T b) noexcept { template static inline P* align(P* p, size_t alignment) noexcept { // alignment must be a power-of-two - assert(alignment && !(alignment & alignment-1)); + assert_invariant(alignment && !(alignment & alignment-1)); return (P*)((uintptr_t(p) + alignment - 1) & ~(alignment - 1)); } template static inline P* align(P* p, size_t alignment, size_t offset) noexcept { P* const r = align(add(p, offset), alignment); - assert(r >= add(p, offset)); + assert_invariant(r >= add(p, offset)); return r; } @@ -90,20 +90,19 @@ public: // branch-less allocation void* const p = pointermath::align(current(), alignment, extra); void* const c = pointermath::add(p, size); - bool success = c <= end(); + bool const success = c <= end(); set_current(success ? c : current()); return success ? p : nullptr; } // API specific to this allocator - void *getCurrent() UTILS_RESTRICT noexcept { return current(); } // free memory back to the specified point void rewind(void* p) UTILS_RESTRICT noexcept { - assert(p>=mBegin && p= mBegin && p < end()); set_current(p); } @@ -123,16 +122,21 @@ public: void swap(LinearAllocator& rhs) noexcept; void *base() noexcept { return mBegin; } + void const *base() const noexcept { return mBegin; } void free(void*, size_t) UTILS_RESTRICT noexcept { } -private: +protected: void* end() UTILS_RESTRICT noexcept { return pointermath::add(mBegin, mSize); } + void const* end() const UTILS_RESTRICT noexcept { return pointermath::add(mBegin, mSize); } + void* current() UTILS_RESTRICT noexcept { return pointermath::add(mBegin, mCur); } + void const* current() const UTILS_RESTRICT noexcept { return pointermath::add(mBegin, mCur); } + +private: void set_current(void* p) UTILS_RESTRICT noexcept { mCur = uint32_t(uintptr_t(p) - uintptr_t(mBegin)); } - void* mBegin = nullptr; uint32_t mSize = 0; uint32_t mCur = 0; @@ -153,9 +157,7 @@ public: explicit HeapAllocator(const AREA&) { } // our allocator concept - void* alloc(size_t size, size_t alignment = alignof(std::max_align_t), size_t extra = 0) { - // this allocator doesn't support 'extra' - assert(extra == 0); + void* alloc(size_t size, size_t alignment = alignof(std::max_align_t)) { return aligned_alloc(size, alignment); } @@ -172,6 +174,50 @@ public: void swap(HeapAllocator&) noexcept { } }; +/* ------------------------------------------------------------------------------------------------ + * LinearAllocatorWithFallback + * + * This is a LinearAllocator that falls back to a HeapAllocator when allocation fail. The Heap + * allocator memory is freed only when the LinearAllocator is reset or destroyed. + * ------------------------------------------------------------------------------------------------ + */ +class LinearAllocatorWithFallback : private LinearAllocator, private HeapAllocator { + std::vector mHeapAllocations; +public: + LinearAllocatorWithFallback(void* begin, void* end) noexcept + : LinearAllocator(begin, end) { + } + + template + explicit LinearAllocatorWithFallback(const AREA& area) + : LinearAllocatorWithFallback(area.begin(), area.end()) { + } + + ~LinearAllocatorWithFallback() noexcept { + LinearAllocatorWithFallback::reset(); + } + + void* alloc(size_t size, size_t alignment = alignof(std::max_align_t)); + + void *getCurrent() noexcept { + return LinearAllocator::getCurrent(); + } + + void rewind(void* p) noexcept { + if (p >= LinearAllocator::base() && p < LinearAllocator::end()) { + LinearAllocator::rewind(p); + } + } + + void reset() noexcept; + + void free(void*, size_t) noexcept { } + + bool isHeapAllocation(void* p) const noexcept { + return p < LinearAllocator::base() || p >= LinearAllocator::end(); + } +}; + // ------------------------------------------------------------------------------------------------ class FreeList { @@ -187,13 +233,13 @@ public: Node* const head = mHead; mHead = head ? head->next : nullptr; // this could indicate a use after free - assert(!mHead || mHead >= mBegin && mHead < mEnd); + assert_invariant(!mHead || mHead >= mBegin && mHead < mEnd); return head; } void push(void* p) noexcept { - assert(p); - assert(p >= mBegin && p < mEnd); + assert_invariant(p); + assert_invariant(p >= mBegin && p < mEnd); // TODO: assert this is one of our pointer (i.e.: it's address match one of ours) Node* const head = static_cast(p); head->next = mHead; @@ -204,11 +250,11 @@ public: return mHead; } -private: struct Node { Node* next; }; +private: static Node* init(void* begin, void* end, size_t elementSize, size_t alignment, size_t extra) noexcept; @@ -226,20 +272,20 @@ public: AtomicFreeList() noexcept = default; AtomicFreeList(void* begin, void* end, size_t elementSize, size_t alignment, size_t extra) noexcept; - AtomicFreeList(const FreeList& rhs) = delete; - AtomicFreeList& operator=(const FreeList& rhs) = delete; + AtomicFreeList(const AtomicFreeList& rhs) = delete; + AtomicFreeList& operator=(const AtomicFreeList& rhs) = delete; void* pop() noexcept { - Node* const storage = mStorage; + Node* const pStorage = mStorage; HeadPtr currentHead = mHead.load(); while (currentHead.offset >= 0) { - // The value of "next" we load here might already contain application data if another + // The value of "pNext" we load here might already contain application data if another // thread raced ahead of us. But in that case, the computed "newHead" will be discarded // since compare_exchange_weak fails. Then this thread will loop with the updated // value of currentHead, and try again. - Node* const next = storage[currentHead.offset].next.load(std::memory_order_relaxed); - const HeadPtr newHead{ next ? int32_t(next - storage) : -1, currentHead.tag + 1 }; + Node* const pNext = pStorage[currentHead.offset].next.load(std::memory_order_relaxed); + const HeadPtr newHead{ pNext ? int32_t(pNext - pStorage) : -1, currentHead.tag + 1 }; // In the rare case that the other thread that raced ahead of us already returned the // same mHead we just loaded, but it now has a different "next" value, the tag field will not // match, and compare_exchange_weak will fail and prevent that particular race condition. @@ -247,18 +293,18 @@ public: // This assert needs to occur after we have validated that there was no race condition // Otherwise, next might already contain application data, if another thread // raced ahead of us after we loaded mHead, but before we loaded mHead->next. - assert(!next || next >= storage); + assert_invariant(!pNext || pNext >= pStorage); break; } } - void* p = (currentHead.offset >= 0) ? (storage + currentHead.offset) : nullptr; - assert(!p || p >= storage); + void* p = (currentHead.offset >= 0) ? (pStorage + currentHead.offset) : nullptr; + assert_invariant(!p || p >= pStorage); return p; } void push(void* p) noexcept { Node* const storage = mStorage; - assert(p && p >= storage); + assert_invariant(p && p >= storage); Node* const node = static_cast(p); HeadPtr currentHead = mHead.load(); HeadPtr newHead = { int32_t(node - storage), currentHead.tag + 1 }; @@ -273,7 +319,6 @@ public: return mStorage + mHead.load(std::memory_order_relaxed).offset; } -private: struct Node { // This should be a regular (non-atomic) pointer, but this causes TSAN to complain // about a data-race that exists but is benin. We always use this atomic<> in @@ -304,6 +349,7 @@ private: std::atomic next; }; +private: // This struct is using a 32-bit offset into the arena rather than // a direct pointer, because together with the 32-bit tag, it needs to // fit into 8 bytes. If it was any larger, it would not be possible to @@ -326,14 +372,15 @@ template < size_t OFFSET = 0, typename FREELIST = FreeList> class PoolAllocator { - static_assert(ELEMENT_SIZE >= sizeof(void*), "ELEMENT_SIZE must accommodate at least a pointer"); + static_assert(ELEMENT_SIZE >= sizeof(typename FREELIST::Node), + "ELEMENT_SIZE must accommodate at least a FreeList::Node"); public: // our allocator concept void* alloc(size_t size = ELEMENT_SIZE, size_t alignment = ALIGNMENT, size_t offset = OFFSET) noexcept { - assert(size <= ELEMENT_SIZE); - assert(alignment <= ALIGNMENT); - assert(offset == OFFSET); + assert_invariant(size <= ELEMENT_SIZE); + assert_invariant(alignment <= ALIGNMENT); + assert_invariant(offset == OFFSET); return mFreeList.pop(); } @@ -347,7 +394,11 @@ public: : mFreeList(begin, end, ELEMENT_SIZE, ALIGNMENT, OFFSET) { } - template + PoolAllocator(void* begin, size_t size) noexcept + : PoolAllocator(begin, static_cast(begin) + size) { + } + + template explicit PoolAllocator(const AREA& area) noexcept : PoolAllocator(area.begin(), area.end()) { } @@ -373,6 +424,53 @@ private: FREELIST mFreeList; }; +template < + size_t ELEMENT_SIZE, + size_t ALIGNMENT = alignof(std::max_align_t), + typename FREELIST = FreeList> +class PoolAllocatorWithFallback : + private PoolAllocator, + private HeapAllocator { + using PoolAllocator = PoolAllocator; + void* mBegin; + void* mEnd; +public: + PoolAllocatorWithFallback(void* begin, void* end) noexcept + : PoolAllocator(begin, end), mBegin(begin), mEnd(end) { + } + + PoolAllocatorWithFallback(void* begin, size_t size) noexcept + : PoolAllocatorWithFallback(begin, static_cast(begin) + size) { + } + + template + explicit PoolAllocatorWithFallback(const AREA& area) noexcept + : PoolAllocatorWithFallback(area.begin(), area.end()) { + } + + bool isHeapAllocation(void* p) const noexcept { + return p < mBegin || p >= mEnd; + } + + // our allocator concept + void* alloc(size_t size = ELEMENT_SIZE, size_t alignment = ALIGNMENT) noexcept { + void* p = PoolAllocator::alloc(size, alignment); + if (UTILS_UNLIKELY(!p)) { + p = HeapAllocator::alloc(size, alignment); + } + assert_invariant(p); + return p; + } + + void free(void* p, size_t size) noexcept { + if (UTILS_LIKELY(!isHeapAllocation(p))) { + PoolAllocator::free(p, size); + } else { + HeapAllocator::free(p); + } + } +}; + #define UTILS_MAX(a,b) ((a) > (b) ? (a) : (b)) template @@ -478,7 +576,6 @@ struct NoLock { void unlock() noexcept { } }; -using SpinLock = utils::SpinLock; using Mutex = utils::Mutex; } // namespace LockingPolicy @@ -587,32 +684,54 @@ public: mListener(name, mArea.data(), mArea.size()) { } + template + void* alloc(size_t size, size_t alignment, size_t extra, ARGS&& ... args) noexcept { + std::lock_guard guard(mLock); + void* p = mAllocator.alloc(size, alignment, extra, std::forward(args) ...); + mListener.onAlloc(p, size, alignment, extra); + return p; + } + + // allocate memory from arena with given size and alignment // (acceptable size/alignment may depend on the allocator provided) - void* alloc(size_t size, size_t alignment = alignof(std::max_align_t), size_t extra = 0) noexcept { + void* alloc(size_t size, size_t alignment, size_t extra) noexcept { std::lock_guard guard(mLock); void* p = mAllocator.alloc(size, alignment, extra); mListener.onAlloc(p, size, alignment, extra); return p; } + void* alloc(size_t size, size_t alignment = alignof(std::max_align_t)) noexcept { + std::lock_guard guard(mLock); + void* p = mAllocator.alloc(size, alignment); + mListener.onAlloc(p, size, alignment, 0); + return p; + } + // Allocate an array of trivially destructible objects // for safety, we disable the object-based alloc method if the object type is not // trivially destructible, since free() won't call the destructor and this is allocating // an array. template ::value>::type> - T* alloc(size_t count, size_t alignment = alignof(T), size_t extra = 0) noexcept { + T* alloc(size_t count, size_t alignment, size_t extra) noexcept { return (T*)alloc(count * sizeof(T), alignment, extra); } - // return memory pointed by p to the arena - // (actual behaviour may depend on allocator provided) - void free(void* p) noexcept { + template ::value>::type> + T* alloc(size_t count, size_t alignment = alignof(T)) noexcept { + return (T*)alloc(count * sizeof(T), alignment); + } + + // some allocators require more parameters + template + void free(void* p, size_t size, ARGS&& ... args) noexcept { if (p) { std::lock_guard guard(mLock); - mListener.onFree(p); - mAllocator.free(p); + mListener.onFree(p, size); + mAllocator.free(p, size, std::forward(args) ...); } } @@ -625,6 +744,16 @@ public: } } + // return memory pointed by p to the arena + // (actual behaviour may depend on allocator provided) + void free(void* p) noexcept { + if (p) { + std::lock_guard guard(mLock); + mListener.onFree(p); + mAllocator.free(p); + } + } + // some allocators don't have a free() call, but a single reset() or rewind() instead void reset() noexcept { std::lock_guard guard(mLock); @@ -722,6 +851,8 @@ class ArenaScope { } public: + using Arena = ARENA; + explicit ArenaScope(ARENA& allocator) : mArena(allocator), mRewind(allocator.getCurrent()) { } @@ -773,7 +904,7 @@ public: } // use with caution - ARENA& getAllocator() noexcept { return mArena; } + ARENA& getArena() noexcept { return mArena; } private: ARENA& mArena; @@ -800,7 +931,7 @@ public: public: // we don't make this explicit, so that we can initialize a vector using a STLAllocator - // from an Arena, avoiding to have to repeat the vector type. + // from an Arena, avoiding having to repeat the vector type. STLAllocator(ARENA& arena) : mArena(arena) { } // NOLINT(google-explicit-constructor) template diff --git a/ios/include/filament/utils/BitmaskEnum.h b/thermion_dart/native/include/filament/utils/BitmaskEnum.h similarity index 99% rename from ios/include/filament/utils/BitmaskEnum.h rename to thermion_dart/native/include/filament/utils/BitmaskEnum.h index 56354956..17f94d21 100644 --- a/ios/include/filament/utils/BitmaskEnum.h +++ b/thermion_dart/native/include/filament/utils/BitmaskEnum.h @@ -17,13 +17,10 @@ #ifndef TNT_UTILS_BITMASKENUM_H #define TNT_UTILS_BITMASKENUM_H -#include - #include // for std::false_type #include #include -#include namespace utils { diff --git a/ios/include/filament/utils/CString.h b/thermion_dart/native/include/filament/utils/CString.h similarity index 90% rename from ios/include/filament/utils/CString.h rename to thermion_dart/native/include/filament/utils/CString.h index 46a823b4..d5b76951 100644 --- a/ios/include/filament/utils/CString.h +++ b/thermion_dart/native/include/filament/utils/CString.h @@ -35,7 +35,7 @@ struct hashCStrings { typedef size_t result_type; result_type operator()(argument_type cstr) const noexcept { size_t hash = 5381; - while (int c = *cstr++) { + while (int const c = *cstr++) { hash = (hash * 33u) ^ size_t(c); } return hash; @@ -192,8 +192,8 @@ private: }; int compare(const CString& rhs) const noexcept { - size_type lhs_size = size(); - size_type rhs_size = rhs.size(); + size_type const lhs_size = size(); + size_type const rhs_size = rhs.size(); if (lhs_size < rhs_size) return -1; if (lhs_size > rhs_size) return 1; return strncmp(data(), rhs.data(), size()); @@ -225,6 +225,28 @@ private: template CString to_string(T value) noexcept; +// ------------------------------------------------------------------------------------------------ + +template +class UTILS_PUBLIC FixedSizeString { +public: + using value_type = char; + using pointer = value_type*; + using const_pointer = const value_type*; + static_assert(N > 0); + + FixedSizeString() noexcept = default; + explicit FixedSizeString(const char* str) noexcept { + strncpy(mData, str, N - 1); // leave room for the null terminator + } + + const_pointer c_str() const noexcept { return mData; } + pointer c_str() noexcept { return mData; } + +private: + value_type mData[N] = {0}; +}; + } // namespace utils #endif // TNT_UTILS_CSTRING_H diff --git a/ios/include/filament/utils/CallStack.h b/thermion_dart/native/include/filament/utils/CallStack.h similarity index 98% rename from ios/include/filament/utils/CallStack.h rename to thermion_dart/native/include/filament/utils/CallStack.h index 291a748c..33ac0b50 100644 --- a/ios/include/filament/utils/CallStack.h +++ b/thermion_dart/native/include/filament/utils/CallStack.h @@ -22,7 +22,8 @@ #include #include -#include +#include +#include namespace utils { diff --git a/ios/include/filament/utils/Entity.h b/thermion_dart/native/include/filament/utils/Entity.h similarity index 100% rename from ios/include/filament/utils/Entity.h rename to thermion_dart/native/include/filament/utils/Entity.h diff --git a/windows/include/filament/utils/EntityInstance.h b/thermion_dart/native/include/filament/utils/EntityInstance.h similarity index 98% rename from windows/include/filament/utils/EntityInstance.h rename to thermion_dart/native/include/filament/utils/EntityInstance.h index b164ed3f..75419493 100644 --- a/windows/include/filament/utils/EntityInstance.h +++ b/thermion_dart/native/include/filament/utils/EntityInstance.h @@ -23,7 +23,6 @@ #include - namespace utils { class UTILS_PUBLIC EntityInstanceBase { @@ -77,7 +76,7 @@ public: // return a value for this Instance (mostly needed for debugging constexpr uint32_t asValue() const noexcept { return mInstance; } - // auto convert to Type so it can be used as an index + // auto convert to Type, so it can be used as an index constexpr operator Type() const noexcept { return mInstance; } // NOLINT(google-explicit-constructor) // conversion from Type so we can initialize from an index diff --git a/windows/include/filament/utils/EntityManager.h b/thermion_dart/native/include/filament/utils/EntityManager.h similarity index 88% rename from windows/include/filament/utils/EntityManager.h rename to thermion_dart/native/include/filament/utils/EntityManager.h index 9674cac2..5e2eaa1b 100644 --- a/windows/include/filament/utils/EntityManager.h +++ b/thermion_dart/native/include/filament/utils/EntityManager.h @@ -17,12 +17,13 @@ #ifndef TNT_UTILS_ENTITYMANAGER_H #define TNT_UTILS_ENTITYMANAGER_H -#include -#include - #include #include +#include +#include +#include + #ifndef FILAMENT_UTILS_TRACK_ENTITIES #define FILAMENT_UTILS_TRACK_ENTITIES false #endif @@ -44,23 +45,25 @@ public: public: virtual void onEntitiesDestroyed(size_t n, Entity const* entities) noexcept = 0; protected: - ~Listener() noexcept; + virtual ~Listener() noexcept; }; - // maximum number of entities that can exist at the same time static size_t getMaxEntityCount() noexcept { // because index 0 is reserved, we only have 2^GENERATION_SHIFT - 1 valid indices return RAW_INDEX_COUNT - 1; } - // create n entities. Thread safe. + // number of active Entities + size_t getEntityCount() const noexcept; + + // Create n entities. Thread safe. void create(size_t n, Entity* entities); // destroys n entities. Thread safe. void destroy(size_t n, Entity* entities) noexcept; - // create a new Entity. Thread safe. + // Create a new Entity. Thread safe. // Return Entity.isNull() if the entity cannot be allocated. Entity create() { Entity e; @@ -68,20 +71,20 @@ public: return e; } - // destroys an Entity. Thread safe. + // Destroys an Entity. Thread safe. void destroy(Entity e) noexcept { destroy(1, &e); } - // return whether the given Entity has been destroyed (false) or not (true). + // Return whether the given Entity has been destroyed (false) or not (true). // Thread safe. bool isAlive(Entity e) const noexcept { assert(getIndex(e) < RAW_INDEX_COUNT); return (!e.isNull()) && (getGeneration(e) == mGens[getIndex(e)]); } - // registers a listener to be called when an entity is destroyed. thread safe. - // if the listener is already register, this method has no effect. + // Registers a listener to be called when an entity is destroyed. Thread safe. + // If the listener is already registered, this method has no effect. void registerListener(Listener* l) noexcept; // unregisters a listener. @@ -94,6 +97,7 @@ public: uint8_t getGenerationForIndex(size_t index) const noexcept { return mGens[index]; } + // singleton, can't be copied EntityManager(const EntityManager& rhs) = delete; EntityManager& operator=(const EntityManager& rhs) = delete; diff --git a/windows/include/filament/utils/FixedCapacityVector.h b/thermion_dart/native/include/filament/utils/FixedCapacityVector.h similarity index 99% rename from windows/include/filament/utils/FixedCapacityVector.h rename to thermion_dart/native/include/filament/utils/FixedCapacityVector.h index 540b42b2..f3990124 100644 --- a/windows/include/filament/utils/FixedCapacityVector.h +++ b/thermion_dart/native/include/filament/utils/FixedCapacityVector.h @@ -17,16 +17,18 @@ #ifndef TNT_UTILS_FIXEDCAPACITYVECTOR_H #define TNT_UTILS_FIXEDCAPACITYVECTOR_H +#include #include #include #include +#include #include #include #include #include -#include // TODO: is this necessary? +#include #include #include diff --git a/ios/include/filament/utils/Invocable.h b/thermion_dart/native/include/filament/utils/Invocable.h similarity index 100% rename from ios/include/filament/utils/Invocable.h rename to thermion_dart/native/include/filament/utils/Invocable.h diff --git a/ios/include/filament/utils/Log.h b/thermion_dart/native/include/filament/utils/Log.h similarity index 100% rename from ios/include/filament/utils/Log.h rename to thermion_dart/native/include/filament/utils/Log.h diff --git a/ios/include/filament/utils/Mutex.h b/thermion_dart/native/include/filament/utils/Mutex.h similarity index 100% rename from ios/include/filament/utils/Mutex.h rename to thermion_dart/native/include/filament/utils/Mutex.h diff --git a/windows/include/filament/utils/NameComponentManager.h b/thermion_dart/native/include/filament/utils/NameComponentManager.h similarity index 85% rename from windows/include/filament/utils/NameComponentManager.h rename to thermion_dart/native/include/filament/utils/NameComponentManager.h index 9e31e461..4ac7435a 100644 --- a/windows/include/filament/utils/NameComponentManager.h +++ b/thermion_dart/native/include/filament/utils/NameComponentManager.h @@ -24,7 +24,6 @@ #include #include -#include namespace utils { @@ -48,7 +47,7 @@ class EntityManager; * printf("%s\n", names->getName(names->getInstance(myEntity)); * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -class UTILS_PUBLIC NameComponentManager : public SingleInstanceComponentManager { +class UTILS_PUBLIC NameComponentManager : private SingleInstanceComponentManager { public: using Instance = EntityInstance; @@ -75,15 +74,6 @@ public: return { SingleInstanceComponentManager::getInstance(e) }; } - /*! \cond PRIVATE */ - // these are implemented in SingleInstanceComponentManager<>, but we need to - // reimplement them in each manager, to ensure they are generated in an implementation file - // for backward binary compatibility reasons. - size_t getComponentCount() const noexcept; - Entity const* getEntities() const noexcept; - void gc(const EntityManager& em, size_t ratio = 4) noexcept; - /*! \endcond */ - /** * Adds a name component to the given entity if it doesn't already exist. */ @@ -105,6 +95,12 @@ public: * @return pointer to the copy that was made during setName() */ const char* getName(Instance instance) const noexcept; + + void gc(EntityManager& em) noexcept { + SingleInstanceComponentManager::gc(em, [this](Entity e) { + removeComponent(e); + }); + } }; } // namespace utils diff --git a/windows/include/filament/utils/Panic.h b/thermion_dart/native/include/filament/utils/Panic.h similarity index 100% rename from windows/include/filament/utils/Panic.h rename to thermion_dart/native/include/filament/utils/Panic.h index df24cac2..b4ec032c 100644 --- a/windows/include/filament/utils/Panic.h +++ b/thermion_dart/native/include/filament/utils/Panic.h @@ -17,11 +17,11 @@ #ifndef TNT_UTILS_PANIC_H #define TNT_UTILS_PANIC_H -#include - #include #include +#include + #ifdef __EXCEPTIONS # define UTILS_EXCEPTIONS 1 #else diff --git a/ios/include/filament/utils/Path.h b/thermion_dart/native/include/filament/utils/Path.h similarity index 100% rename from ios/include/filament/utils/Path.h rename to thermion_dart/native/include/filament/utils/Path.h diff --git a/ios/include/filament/utils/PrivateImplementation-impl.h b/thermion_dart/native/include/filament/utils/PrivateImplementation-impl.h similarity index 100% rename from ios/include/filament/utils/PrivateImplementation-impl.h rename to thermion_dart/native/include/filament/utils/PrivateImplementation-impl.h diff --git a/ios/include/filament/utils/PrivateImplementation.h b/thermion_dart/native/include/filament/utils/PrivateImplementation.h similarity index 98% rename from ios/include/filament/utils/PrivateImplementation.h rename to thermion_dart/native/include/filament/utils/PrivateImplementation.h index 7cb510fa..ee0ac48a 100644 --- a/ios/include/filament/utils/PrivateImplementation.h +++ b/thermion_dart/native/include/filament/utils/PrivateImplementation.h @@ -17,8 +17,6 @@ #ifndef UTILS_PRIVATEIMPLEMENTATION_H #define UTILS_PRIVATEIMPLEMENTATION_H -#include - #include namespace utils { diff --git a/ios/include/filament/utils/SingleInstanceComponentManager.h b/thermion_dart/native/include/filament/utils/SingleInstanceComponentManager.h similarity index 91% rename from ios/include/filament/utils/SingleInstanceComponentManager.h rename to thermion_dart/native/include/filament/utils/SingleInstanceComponentManager.h index c03ec5f1..ddd538f5 100644 --- a/ios/include/filament/utils/SingleInstanceComponentManager.h +++ b/thermion_dart/native/include/filament/utils/SingleInstanceComponentManager.h @@ -98,7 +98,7 @@ public: return pos != map.end() ? pos->second : 0; } - // returns the number of components (i.e. size of each arrays) + // Returns the number of components (i.e. size of each array) size_t getComponentCount() const noexcept { // The array as an extra dummy component at index 0, so the visible count is 1 less. return mData.size() - 1; @@ -108,11 +108,8 @@ public: return getComponentCount() == 0; } - // returns a pointer to the Entity array. This is basically the list - // of entities this component manager handles. - // The pointer becomes invalid when adding or removing a component. - Entity const* getEntities() const noexcept { - return begin(); + utils::Entity const* getEntities() const noexcept { + return data() + 1; } Entity getEntity(Instance i) const noexcept { @@ -128,14 +125,6 @@ public: // This invalidates all pointers components. inline Instance removeComponent(Entity e); - // trigger one round of garbage collection. this is intended to be called on a regular - // basis. This gc gives up after it cannot randomly free 'ratio' component in a row. - void gc(const EntityManager& em, size_t ratio = 4) noexcept { - gc(em, ratio, [this](Entity e) { - removeComponent(e); - }); - } - // return the first instance Instance begin() const noexcept { return 1u; } @@ -234,24 +223,33 @@ protected: } } + template + void gc(const EntityManager& em, + REMOVE&& removeComponent) noexcept { + gc(em, 4, std::forward(removeComponent)); + } + template void gc(const EntityManager& em, size_t ratio, - REMOVE removeComponent) noexcept { - Entity const* entities = getEntities(); + REMOVE&& removeComponent) noexcept { + Entity const* const pEntities = begin(); size_t count = getComponentCount(); size_t aliveInARow = 0; default_random_engine& rng = mRng; UTILS_NOUNROLL while (count && aliveInARow < ratio) { + assert_invariant(count == getComponentCount()); // note: using the modulo favorizes lower number - size_t i = rng() % count; - if (UTILS_LIKELY(em.isAlive(entities[i]))) { + size_t const i = rng() % count; + Entity const entity = pEntities[i]; + assert_invariant(entity); + if (UTILS_LIKELY(em.isAlive(entity))) { ++aliveInARow; continue; } + removeComponent(entity); aliveInARow = 0; count--; - removeComponent(entities[i]); } } diff --git a/ios/include/filament/utils/Slice.h b/thermion_dart/native/include/filament/utils/Slice.h similarity index 100% rename from ios/include/filament/utils/Slice.h rename to thermion_dart/native/include/filament/utils/Slice.h diff --git a/windows/include/filament/utils/StructureOfArrays.h b/thermion_dart/native/include/filament/utils/StructureOfArrays.h similarity index 93% rename from windows/include/filament/utils/StructureOfArrays.h rename to thermion_dart/native/include/filament/utils/StructureOfArrays.h index b6ea3bfb..a4309584 100644 --- a/windows/include/filament/utils/StructureOfArrays.h +++ b/thermion_dart/native/include/filament/utils/StructureOfArrays.h @@ -17,8 +17,10 @@ #ifndef TNT_UTILS_STRUCTUREOFARRAYS_H #define TNT_UTILS_STRUCTUREOFARRAYS_H +#include #include #include +#include #include #include @@ -352,33 +354,55 @@ public: return push_back_unsafe(std::forward(args)...); } - // in C++20 we could use a lambda with explicit template parameter instead - struct PushBackUnsafeClosure { - size_t last; - std::tuple args; - inline explicit PushBackUnsafeClosure(size_t last, Structure&& args) - : last(last), args(std::forward(args)) {} - template - inline void operator()(TypeAt* p) { - new(p + last) TypeAt{ std::get(args) }; - } - }; + template + struct ElementIndices {}; + + template + struct BuildElementIndices : BuildElementIndices {}; + + template + struct BuildElementIndices<0, Indices...> : ElementIndices {}; + + template + void push_back_unsafe(Structure&& args, ElementIndices){ + size_t last = mSize++; + // Fold expression on the comma operator + ([&]{ + new(std::get(mArrays) + last) Elements{std::get(args)}; + }() , ...); + } + + template + void push_back_unsafe(Elements const& ... args, ElementIndices){ + size_t last = mSize++; + // Fold expression on the comma operator + ([&]{ + new(std::get(mArrays) + last) Elements{args}; + }() , ...); + } + + template + void push_back_unsafe(Elements && ... args, ElementIndices){ + size_t last = mSize++; + // Fold expression on the comma operator + ([&]{ + new(std::get(mArrays) + last) Elements{std::forward(args)}; + }() , ...); + } StructureOfArraysBase& push_back_unsafe(Structure&& args) noexcept { - for_each_index(mArrays, - PushBackUnsafeClosure{ mSize++, std::forward(args) }); + push_back_unsafe(std::forward(args), BuildElementIndices{}); return *this; } StructureOfArraysBase& push_back_unsafe(Elements const& ... args) noexcept { - for_each_index(mArrays, - PushBackUnsafeClosure{ mSize++, { args... } }); + push_back_unsafe(args..., BuildElementIndices{}); + return *this; } StructureOfArraysBase& push_back_unsafe(Elements&& ... args) noexcept { - for_each_index(mArrays, - PushBackUnsafeClosure{ mSize++, { std::forward(args)... }}); + push_back_unsafe(std::forward(args)..., BuildElementIndices{}); return *this; } @@ -533,7 +557,7 @@ private: } inline void resizeNoCheck(size_t needed) noexcept { - assert(mCapacity >= needed); + assert_invariant(mCapacity >= needed); if (needed < mSize) { // we shrink the arrays destroy_each(needed, mSize); diff --git a/ios/include/filament/utils/algorithm.h b/thermion_dart/native/include/filament/utils/algorithm.h similarity index 100% rename from ios/include/filament/utils/algorithm.h rename to thermion_dart/native/include/filament/utils/algorithm.h diff --git a/ios/include/filament/utils/bitset.h b/thermion_dart/native/include/filament/utils/bitset.h similarity index 100% rename from ios/include/filament/utils/bitset.h rename to thermion_dart/native/include/filament/utils/bitset.h diff --git a/ios/include/filament/utils/compiler.h b/thermion_dart/native/include/filament/utils/compiler.h similarity index 98% rename from ios/include/filament/utils/compiler.h rename to thermion_dart/native/include/filament/utils/compiler.h index 7d62a389..710c901e 100644 --- a/ios/include/filament/utils/compiler.h +++ b/thermion_dart/native/include/filament/utils/compiler.h @@ -179,6 +179,14 @@ # define UTILS_HAS_FEATURE_CXX_THREAD_LOCAL 0 #endif +#if defined(__clang__) +#define UTILS_NONNULL _Nonnull +#define UTILS_NULLABLE _Nullable +#else +#define UTILS_NONNULL +#define UTILS_NULLABLE +#endif + #if defined(_MSC_VER) // MSVC does not support loop unrolling hints # define UTILS_UNROLL diff --git a/ios/include/filament/utils/compressed_pair.h b/thermion_dart/native/include/filament/utils/compressed_pair.h similarity index 100% rename from ios/include/filament/utils/compressed_pair.h rename to thermion_dart/native/include/filament/utils/compressed_pair.h diff --git a/ios/include/filament/utils/debug.h b/thermion_dart/native/include/filament/utils/debug.h similarity index 100% rename from ios/include/filament/utils/debug.h rename to thermion_dart/native/include/filament/utils/debug.h diff --git a/ios/include/filament/utils/generic/Mutex.h b/thermion_dart/native/include/filament/utils/generic/Mutex.h similarity index 100% rename from ios/include/filament/utils/generic/Mutex.h rename to thermion_dart/native/include/filament/utils/generic/Mutex.h diff --git a/ios/include/filament/utils/linux/Condition.h b/thermion_dart/native/include/filament/utils/linux/Condition.h similarity index 100% rename from ios/include/filament/utils/linux/Condition.h rename to thermion_dart/native/include/filament/utils/linux/Condition.h diff --git a/ios/include/filament/utils/linux/Mutex.h b/thermion_dart/native/include/filament/utils/linux/Mutex.h similarity index 98% rename from ios/include/filament/utils/linux/Mutex.h rename to thermion_dart/native/include/filament/utils/linux/Mutex.h index 2dcc7ebc..f548d53e 100644 --- a/ios/include/filament/utils/linux/Mutex.h +++ b/thermion_dart/native/include/filament/utils/linux/Mutex.h @@ -17,9 +17,11 @@ #ifndef TNT_UTILS_LINUX_MUTEX_H #define TNT_UTILS_LINUX_MUTEX_H +#include + #include -#include +#include namespace utils { diff --git a/ios/include/filament/utils/memalign.h b/thermion_dart/native/include/filament/utils/memalign.h similarity index 100% rename from ios/include/filament/utils/memalign.h rename to thermion_dart/native/include/filament/utils/memalign.h diff --git a/windows/include/filament/utils/ostream.h b/thermion_dart/native/include/filament/utils/ostream.h similarity index 87% rename from windows/include/filament/utils/ostream.h rename to thermion_dart/native/include/filament/utils/ostream.h index cc4df031..cde8e75b 100644 --- a/windows/include/filament/utils/ostream.h +++ b/thermion_dart/native/include/filament/utils/ostream.h @@ -29,7 +29,7 @@ namespace utils::io { struct ostream_; -class UTILS_PUBLIC ostream : protected utils::PrivateImplementation { +class UTILS_PUBLIC ostream : protected utils::PrivateImplementation { friend struct ostream_; public: @@ -69,6 +69,13 @@ public: ostream& dec() noexcept; ostream& hex() noexcept; + /*! @cond PRIVATE */ + // Sets a consumer of the log. The consumer is invoked on flush() and replaces the default. + // Thread safe and reentrant. + using ConsumerCallback = void(*)(void*, char const*); + void setConsumer(ConsumerCallback consumer, void* user) noexcept; + /*! @endcond */ + protected: ostream& print(const char* format, ...) noexcept; @@ -85,6 +92,7 @@ protected: std::pair grow(size_t s) noexcept; void advance(ssize_t n) noexcept; void reset() noexcept; + size_t length() const noexcept; private: void reserve(size_t newSize) noexcept; @@ -104,7 +112,7 @@ private: friend ostream& hex(ostream& s) noexcept; friend ostream& dec(ostream& s) noexcept; friend ostream& endl(ostream& s) noexcept; - friend ostream& flush(ostream& s) noexcept; + UTILS_PUBLIC friend ostream& flush(ostream& s) noexcept; enum type { SHORT, USHORT, CHAR, UCHAR, INT, UINT, LONG, ULONG, LONG_LONG, ULONG_LONG, FLOAT, DOUBLE, @@ -132,8 +140,7 @@ inline ostream& operator<<(ostream& stream, const VECTOR& v) { inline ostream& hex(ostream& s) noexcept { return s.hex(); } inline ostream& dec(ostream& s) noexcept { return s.dec(); } -inline ostream& endl(ostream& s) noexcept { s << '\n'; return s.flush(); } -inline ostream& flush(ostream& s) noexcept { return s.flush(); } +inline ostream& endl(ostream& s) noexcept { return flush(s << '\n'); } } // namespace utils::io diff --git a/ios/include/filament/utils/unwindows.h b/thermion_dart/native/include/filament/utils/unwindows.h similarity index 100% rename from ios/include/filament/utils/unwindows.h rename to thermion_dart/native/include/filament/utils/unwindows.h diff --git a/ios/include/filament/viewer/AutomationEngine.h b/thermion_dart/native/include/filament/viewer/AutomationEngine.h similarity index 100% rename from ios/include/filament/viewer/AutomationEngine.h rename to thermion_dart/native/include/filament/viewer/AutomationEngine.h diff --git a/ios/include/filament/viewer/AutomationSpec.h b/thermion_dart/native/include/filament/viewer/AutomationSpec.h similarity index 100% rename from ios/include/filament/viewer/AutomationSpec.h rename to thermion_dart/native/include/filament/viewer/AutomationSpec.h diff --git a/ios/include/filament/viewer/RemoteServer.h b/thermion_dart/native/include/filament/viewer/RemoteServer.h similarity index 100% rename from ios/include/filament/viewer/RemoteServer.h rename to thermion_dart/native/include/filament/viewer/RemoteServer.h diff --git a/ios/include/filament/viewer/Settings.h b/thermion_dart/native/include/filament/viewer/Settings.h similarity index 92% rename from ios/include/filament/viewer/Settings.h rename to thermion_dart/native/include/filament/viewer/Settings.h index eeb62e2a..2094296b 100644 --- a/ios/include/filament/viewer/Settings.h +++ b/thermion_dart/native/include/filament/viewer/Settings.h @@ -57,8 +57,10 @@ enum class ToneMapping : uint8_t { ACES_LEGACY = 1, ACES = 2, FILMIC = 3, - GENERIC = 4, - DISPLAY_RANGE = 5, + AGX = 4, + GENERIC = 5, + PBR_NEUTRAL = 6, + DISPLAY_RANGE = 7, }; using AmbientOcclusionOptions = filament::View::AmbientOcclusionOptions; @@ -76,6 +78,7 @@ using TemporalAntiAliasingOptions = filament::View::TemporalAntiAliasingOptions; using VignetteOptions = filament::View::VignetteOptions; using VsmShadowOptions = filament::View::VsmShadowOptions; using GuardBandOptions = filament::View::GuardBandOptions; +using StereoscopicOptions = filament::View::StereoscopicOptions; using LightManager = filament::LightManager; // These functions push all editable property values to their respective Filament objects. @@ -114,8 +117,14 @@ struct GenericToneMapperSettings { float midGrayIn = 0.18f; float midGrayOut = 0.215f; float hdrMax = 10.0f; - bool operator!=(const GenericToneMapperSettings &rhs) const { return !(rhs == *this); } - bool operator==(const GenericToneMapperSettings &rhs) const; + bool operator!=(const GenericToneMapperSettings& rhs) const { return !(rhs == *this); } + bool operator==(const GenericToneMapperSettings& rhs) const; +}; + +struct AgxToneMapperSettings { + AgxToneMapper::AgxLook look = AgxToneMapper::AgxLook::NONE; + bool operator!=(const AgxToneMapperSettings& rhs) const { return !(rhs == *this); } + bool operator==(const AgxToneMapperSettings& rhs) const; }; struct ColorGradingSettings { @@ -127,7 +136,7 @@ struct ColorGradingSettings { filament::ColorGrading::QualityLevel quality = filament::ColorGrading::QualityLevel::MEDIUM; ToneMapping toneMapping = ToneMapping::ACES_LEGACY; bool padding0{}; - bool padding1{}; + AgxToneMapperSettings agxToneMapper; color::ColorSpace colorspace = Rec709-sRGB-D65; GenericToneMapperSettings genericToneMapper; math::float4 shadows{1.0f, 1.0f, 1.0f, 0.0f}; @@ -185,6 +194,7 @@ struct ViewSettings { VignetteOptions vignette; VsmShadowOptions vsmShadowOptions; GuardBandOptions guardBand; + StereoscopicOptions stereoscopicOptions; // Custom View Options ColorGradingSettings colorGrading; @@ -224,6 +234,8 @@ struct ViewerOptions { float cameraISO = 100.0f; float cameraNear = 0.1f; float cameraFar = 100.0f; + float cameraEyeOcularDistance = 0.0f; + float cameraEyeToeIn = 0.0f; float groundShadowStrength = 0.75f; bool groundPlaneEnabled = false; bool skyboxEnabled = true; diff --git a/windows/include/filament/viewer/ViewerGui.h b/thermion_dart/native/include/filament/viewer/ViewerGui.h similarity index 97% rename from windows/include/filament/viewer/ViewerGui.h rename to thermion_dart/native/include/filament/viewer/ViewerGui.h index 76b5f3a4..8f843357 100644 --- a/windows/include/filament/viewer/ViewerGui.h +++ b/thermion_dart/native/include/filament/viewer/ViewerGui.h @@ -227,7 +227,7 @@ public: */ Settings& getSettings() { return mSettings; } - void stopAnimation() { mCurrentAnimation = 0; } + void stopAnimation() { mCurrentAnimation = -1; } int getCurrentCamera() const { return mCurrentCamera; } @@ -254,7 +254,7 @@ private: std::function mCustomUI; // Properties that can be changed from the UI. - int mCurrentAnimation = 1; // It is a 1-based index and 0 means not playing animation + int mCurrentAnimation = 0; // -1 means not playing animation and count means plays all of them (0-based index) int mCurrentVariant = 0; bool mEnableWireframe = false; int mVsmMsaaSamplesLog2 = 1; @@ -271,7 +271,7 @@ private: // Cross fade animation parameters. float mCrossFadeDuration = 0.5f; // number of seconds to transition between animations - int mPreviousAnimation = 0; // one-based index of the previous animation + int mPreviousAnimation = -1; // zero-based index of the previous animation double mCurrentStartTime = 0.0f; // start time of most recent cross-fade (seconds) double mPreviousStartTime = 0.0f; // start time of previous cross-fade (seconds) bool mResetAnimation = true; // set when building ImGui widgets, honored in applyAnimation diff --git a/ios/include/material/FileMaterialProvider.hpp b/thermion_dart/native/include/material/FileMaterialProvider.hpp similarity index 66% rename from ios/include/material/FileMaterialProvider.hpp rename to thermion_dart/native/include/material/FileMaterialProvider.hpp index 64d63074..00b76859 100644 --- a/ios/include/material/FileMaterialProvider.hpp +++ b/thermion_dart/native/include/material/FileMaterialProvider.hpp @@ -1,6 +1,7 @@ #ifndef FILE_MATERIAL_PROVIDER #define FILE_MATERIAL_PROVIDER +#include #include #include #include @@ -8,31 +9,34 @@ #include #include #include +#include "Log.hpp" -namespace polyvox { - class FileMaterialProvider : public MaterialProvider { +namespace thermion_filament { - Material* _m; - const Material* _ms[1]; - Texture* mDummyTexture = nullptr; + + class FileMaterialProvider : public filament::gltfio::MaterialProvider { + + filament::Material* _m; + const filament::Material* _ms[1]; + filament::Texture* mDummyTexture = nullptr; public: - FileMaterialProvider(Engine* engine, const void* const data, const size_t size) { - _m = Material::Builder() + FileMaterialProvider(filament::Engine* engine, const void* const data, const size_t size) { + _m = filament::Material::Builder() .package(data, size) .build(*engine); _ms[0] = _m; unsigned char texels[4] = {}; - mDummyTexture = Texture::Builder() + mDummyTexture = filament::Texture::Builder() .width(1).height(1) - .format(Texture::InternalFormat::RGBA8) + .format(filament::Texture::InternalFormat::RGBA8) .build(*engine); - Texture::PixelBufferDescriptor pbd(texels, sizeof(texels), Texture::Format::RGBA, - Texture::Type::UBYTE); + filament::Texture::PixelBufferDescriptor pbd(texels, sizeof(texels), filament::Texture::Format::RGBA, + filament::Texture::Type::UBYTE); mDummyTexture->setImage(*engine, 0, std::move(pbd)); } - filament::MaterialInstance* createMaterialInstance(MaterialKey* config, UvMap* uvmap, + filament::MaterialInstance* createMaterialInstance(filament::gltfio::MaterialKey* config, filament::gltfio::UvMap* uvmap, const char* label = "material", const char* extras = nullptr) { auto getUvIndex = [uvmap](uint8_t srcIndex, bool hasTexture) -> int { @@ -40,14 +44,14 @@ namespace polyvox { }; auto instance = _m->createInstance(); - math::mat3f identity; + filament::math::mat3f identity; instance->setParameter("baseColorUvMatrix", identity); instance->setParameter("normalUvMatrix", identity); instance->setParameter("baseColorIndex", getUvIndex(config->baseColorUV, config->hasBaseColorTexture)); instance->setParameter("normalIndex", getUvIndex(config->normalUV, config->hasNormalTexture)); if(config->hasNormalTexture) { - TextureSampler sampler; + filament::TextureSampler sampler; instance->setParameter("normalMap", mDummyTexture, sampler); instance->setParameter("baseColorMap", mDummyTexture, sampler); } else { @@ -60,7 +64,7 @@ namespace polyvox { /** * Creates or fetches a compiled Filament material corresponding to the given config. */ - virtual Material* getMaterial(MaterialKey* config, UvMap* uvmap, const char* label = "material") { + virtual filament::Material* getMaterial(filament::gltfio::MaterialKey* config, filament::gltfio::UvMap* uvmap, const char* label = "material") { return _m; } diff --git a/thermion_dart/native/include/material/gizmo.S b/thermion_dart/native/include/material/gizmo.S new file mode 100644 index 00000000..e3cc4f49 --- /dev/null +++ b/thermion_dart/native/include/material/gizmo.S @@ -0,0 +1,12 @@ + .global GIZMO_GIZMO_OFFSET; + .global GIZMO_GIZMO_SIZE; + + .global GIZMO_PACKAGE + .section .rodata +GIZMO_PACKAGE: + .incbin "gizmo.bin" +GIZMO_GIZMO_OFFSET: + .int 0 +GIZMO_GIZMO_SIZE: + .int 26876 + diff --git a/thermion_dart/native/include/material/gizmo.apple.S b/thermion_dart/native/include/material/gizmo.apple.S new file mode 100644 index 00000000..ccc7f03a --- /dev/null +++ b/thermion_dart/native/include/material/gizmo.apple.S @@ -0,0 +1,12 @@ + .global _GIZMO_GIZMO_OFFSET; + .global _GIZMO_GIZMO_SIZE; + + .global _GIZMO_PACKAGE + .section __TEXT,__const +_GIZMO_PACKAGE: + .incbin "gizmo.bin" +_GIZMO_GIZMO_OFFSET: + .int 0 +_GIZMO_GIZMO_SIZE: + .int 26876 + diff --git a/thermion_dart/native/include/material/gizmo.bin b/thermion_dart/native/include/material/gizmo.bin new file mode 100644 index 00000000..0fc109c2 Binary files /dev/null and b/thermion_dart/native/include/material/gizmo.bin differ diff --git a/thermion_dart/native/include/material/gizmo.c b/thermion_dart/native/include/material/gizmo.c new file mode 100644 index 00000000..f2c45a7c --- /dev/null +++ b/thermion_dart/native/include/material/gizmo.c @@ -0,0 +1,26885 @@ +#include +#include "gizmo.h" +const uint8_t GIZMO_PACKAGE[] = { + // GIZMO + 0x53, + 0x52, + 0x45, + 0x56, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x04, + 0x00, + 0x00, + 0x00, + 0x33, + 0x00, + 0x00, + 0x00, + 0x54, + 0x41, + 0x45, + 0x46, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x45, + 0x4d, + 0x41, + 0x4e, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x06, + 0x00, + 0x00, + 0x00, + 0x47, + 0x69, + 0x7a, + 0x6d, + 0x6f, + 0x00, + 0x4c, + 0x44, + 0x4d, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x04, + 0x00, + 0x00, + 0x00, + 0x06, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x4d, + 0x4f, + 0x44, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x54, + 0x4c, + 0x46, + 0x56, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x04, + 0x00, + 0x00, + 0x00, + 0x2c, + 0x00, + 0x00, + 0x00, + 0x46, + 0x49, + 0x4e, + 0x55, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x98, + 0x00, + 0x00, + 0x00, + 0x09, + 0x46, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x00, + 0x4f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x01, + 0x4c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x73, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x04, + 0x53, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x05, + 0x46, + 0x72, + 0x6f, + 0x78, + 0x65, + 0x6c, + 0x52, + 0x65, + 0x63, + 0x6f, + 0x72, + 0x64, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x06, + 0x46, + 0x72, + 0x6f, + 0x78, + 0x65, + 0x6c, + 0x73, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x07, + 0x42, + 0x6f, + 0x6e, + 0x65, + 0x73, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x02, + 0x4d, + 0x6f, + 0x72, + 0x70, + 0x68, + 0x69, + 0x6e, + 0x67, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x03, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x00, + 0x08, + 0x50, + 0x4d, + 0x41, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0xcb, + 0x00, + 0x00, + 0x00, + 0x04, + 0x00, + 0x02, + 0x07, + 0x07, + 0x01, + 0x02, + 0x09, + 0x07, + 0x00, + 0x09, + 0x01, + 0x01, + 0x0a, + 0x00, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x4d, + 0x61, + 0x70, + 0x00, + 0x01, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x69, + 0x62, + 0x6c, + 0x44, + 0x46, + 0x47, + 0x00, + 0x02, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x69, + 0x62, + 0x6c, + 0x53, + 0x70, + 0x65, + 0x63, + 0x75, + 0x6c, + 0x61, + 0x72, + 0x00, + 0x03, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x73, + 0x61, + 0x6f, + 0x00, + 0x04, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x73, + 0x72, + 0x00, + 0x05, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x75, + 0x72, + 0x65, + 0x00, + 0x06, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x00, + 0x07, + 0x6d, + 0x6f, + 0x72, + 0x70, + 0x68, + 0x54, + 0x61, + 0x72, + 0x67, + 0x65, + 0x74, + 0x42, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x73, + 0x00, + 0x08, + 0x6d, + 0x6f, + 0x72, + 0x70, + 0x68, + 0x54, + 0x61, + 0x72, + 0x67, + 0x65, + 0x74, + 0x42, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x5f, + 0x74, + 0x61, + 0x6e, + 0x67, + 0x65, + 0x6e, + 0x74, + 0x73, + 0x00, + 0x09, + 0x62, + 0x6f, + 0x6e, + 0x65, + 0x73, + 0x42, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x69, + 0x63, + 0x65, + 0x73, + 0x41, + 0x6e, + 0x64, + 0x57, + 0x65, + 0x69, + 0x67, + 0x68, + 0x74, + 0x73, + 0x00, + 0x20, + 0x42, + 0x49, + 0x55, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x3b, + 0x00, + 0x00, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x00, + 0x02, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x11, + 0x02, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x06, + 0x00, + 0x20, + 0x42, + 0x49, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x17, + 0x00, + 0x00, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x53, + 0x4e, + 0x4f, + 0x43, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x08, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x20, + 0x42, + 0x55, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x17, + 0x00, + 0x00, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x53, + 0x53, + 0x4f, + 0x44, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x49, + 0x53, + 0x4f, + 0x44, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x45, + 0x4c, + 0x42, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x44, + 0x4d, + 0x52, + 0x54, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x4c, + 0x46, + 0x45, + 0x52, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x49, + 0x52, + 0x57, + 0x43, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x53, + 0x57, + 0x45, + 0x44, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x49, + 0x52, + 0x57, + 0x44, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x53, + 0x45, + 0x54, + 0x44, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x54, + 0x53, + 0x4e, + 0x49, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x53, + 0x43, + 0x32, + 0x41, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x4f, + 0x43, + 0x32, + 0x41, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x4f, + 0x4d, + 0x55, + 0x43, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x50, + 0x4f, + 0x52, + 0x50, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x08, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x44, + 0x49, + 0x55, + 0x55, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x08, + 0x00, + 0x00, + 0x00, + 0xfe, + 0x16, + 0xc9, + 0x46, + 0x7d, + 0x50, + 0x8b, + 0x83, + 0x44, + 0x41, + 0x48, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x4c, + 0x4d, + 0x48, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x4d, + 0x46, + 0x45, + 0x52, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x54, + 0x46, + 0x45, + 0x52, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x52, + 0x4f, + 0x49, + 0x43, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x41, + 0x51, + 0x45, + 0x52, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x04, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x00, + 0x41, + 0x41, + 0x50, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x52, + 0x41, + 0x56, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x04, + 0x00, + 0x00, + 0x00, + 0x9a, + 0x99, + 0x19, + 0x3e, + 0x52, + 0x48, + 0x54, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x04, + 0x00, + 0x00, + 0x00, + 0xcd, + 0xcc, + 0x4c, + 0x3e, + 0x4f, + 0x44, + 0x45, + 0x56, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x52, + 0x54, + 0x4e, + 0x49, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x50, + 0x44, + 0x53, + 0x43, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x54, + 0x58, + 0x45, + 0x54, + 0x5f, + 0x43, + 0x49, + 0x44, + 0x74, + 0x53, + 0x00, + 0x00, + 0x49, + 0x02, + 0x00, + 0x00, + 0x23, + 0x76, + 0x65, + 0x72, + 0x73, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x33, + 0x30, + 0x30, + 0x20, + 0x65, + 0x73, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x00, + 0x7b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x7d, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x50, + 0x65, + 0x72, + 0x52, + 0x65, + 0x6e, + 0x64, + 0x65, + 0x72, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x44, + 0x61, + 0x74, + 0x61, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x33, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x6f, + 0x72, + 0x70, + 0x68, + 0x54, + 0x61, + 0x72, + 0x67, + 0x65, + 0x74, + 0x43, + 0x6f, + 0x75, + 0x6e, + 0x74, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x66, + 0x6c, + 0x61, + 0x67, + 0x73, + 0x43, + 0x68, + 0x61, + 0x6e, + 0x6e, + 0x65, + 0x6c, + 0x73, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x49, + 0x64, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x73, + 0x65, + 0x72, + 0x44, + 0x61, + 0x74, + 0x61, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x72, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x5b, + 0x38, + 0x5d, + 0x3b, + 0x00, + 0x23, + 0x69, + 0x66, + 0x6e, + 0x64, + 0x65, + 0x66, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x31, + 0x00, + 0x23, + 0x64, + 0x65, + 0x66, + 0x69, + 0x6e, + 0x65, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x31, + 0x20, + 0x36, + 0x34, + 0x00, + 0x23, + 0x65, + 0x6e, + 0x64, + 0x69, + 0x66, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x4d, + 0x41, + 0x58, + 0x5f, + 0x49, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x43, + 0x45, + 0x53, + 0x20, + 0x3d, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x31, + 0x3b, + 0x00, + 0x23, + 0x69, + 0x66, + 0x6e, + 0x64, + 0x65, + 0x66, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x35, + 0x00, + 0x23, + 0x64, + 0x65, + 0x66, + 0x69, + 0x6e, + 0x65, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x35, + 0x20, + 0x66, + 0x61, + 0x6c, + 0x73, + 0x65, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x20, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x50, + 0x4f, + 0x57, + 0x45, + 0x52, + 0x5f, + 0x56, + 0x52, + 0x5f, + 0x53, + 0x48, + 0x41, + 0x44, + 0x45, + 0x52, + 0x5f, + 0x57, + 0x4f, + 0x52, + 0x4b, + 0x41, + 0x52, + 0x4f, + 0x55, + 0x4e, + 0x44, + 0x53, + 0x20, + 0x3d, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x35, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x73, + 0x74, + 0x64, + 0x31, + 0x34, + 0x30, + 0x29, + 0x20, + 0x75, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x4f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x50, + 0x65, + 0x72, + 0x52, + 0x65, + 0x6e, + 0x64, + 0x65, + 0x72, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x44, + 0x61, + 0x74, + 0x61, + 0x20, + 0x61, + 0x5b, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x4d, + 0x41, + 0x58, + 0x5f, + 0x49, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x43, + 0x45, + 0x53, + 0x5d, + 0x3b, + 0x00, + 0x7d, + 0x20, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x73, + 0x74, + 0x64, + 0x31, + 0x34, + 0x30, + 0x29, + 0x20, + 0x75, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x46, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x61, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x62, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x63, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x64, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x65, + 0x5b, + 0x34, + 0x5d, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x66, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x67, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x68, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x69, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6b, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6c, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6d, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6f, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x70, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x71, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x72, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x76, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x77, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x78, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x79, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x61, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x75, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x62, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x63, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x64, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x67, + 0x7a, + 0x5b, + 0x39, + 0x5d, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x68, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x69, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6b, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6c, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6e, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6f, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x70, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x71, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x72, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x76, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x77, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x78, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x61, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x62, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x63, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x64, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x67, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x68, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x33, + 0x20, + 0x69, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x6a, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x6b, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6c, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6d, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6e, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6f, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x70, + 0x7a, + 0x7a, + 0x5b, + 0x34, + 0x5d, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x71, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x72, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x75, + 0x7a, + 0x7a, + 0x5b, + 0x34, + 0x30, + 0x5d, + 0x3b, + 0x00, + 0x7d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x29, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x61, + 0x74, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x3b, + 0x00, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x6f, + 0x69, + 0x64, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x28, + 0x29, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x50, + 0x4f, + 0x57, + 0x45, + 0x52, + 0x5f, + 0x56, + 0x52, + 0x5f, + 0x53, + 0x48, + 0x41, + 0x44, + 0x45, + 0x52, + 0x5f, + 0x57, + 0x4f, + 0x52, + 0x4b, + 0x41, + 0x52, + 0x4f, + 0x55, + 0x4e, + 0x44, + 0x53, + 0x29, + 0x00, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x31, + 0x20, + 0x2b, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x49, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x49, + 0x44, + 0x29, + 0x20, + 0x2d, + 0x20, + 0x31, + 0x3b, + 0x00, + 0x7d, + 0x00, + 0x65, + 0x6c, + 0x73, + 0x65, + 0x00, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x49, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x49, + 0x44, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x31, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x5b, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x5d, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x31, + 0x36, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x2e, + 0x39, + 0x39, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x31, + 0x36, + 0x29, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x32, + 0x30, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x36, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x30, + 0x35, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x30, + 0x35, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x30, + 0x35, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x36, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x37, + 0x3b, + 0x00, + 0x5f, + 0x32, + 0x31, + 0x37, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x31, + 0x37, + 0x2e, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x78, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x31, + 0x37, + 0x2e, + 0x77, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x79, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x37, + 0x3b, + 0x00, + 0x70, + 0x72, + 0x65, + 0x63, + 0x69, + 0x73, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3b, + 0x00, + 0x70, + 0x72, + 0x65, + 0x63, + 0x69, + 0x73, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x65, + 0x6d, + 0x69, + 0x73, + 0x73, + 0x69, + 0x76, + 0x65, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x63, + 0x6c, + 0x65, + 0x61, + 0x72, + 0x43, + 0x6f, + 0x61, + 0x74, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x63, + 0x6c, + 0x65, + 0x61, + 0x72, + 0x43, + 0x6f, + 0x61, + 0x74, + 0x52, + 0x6f, + 0x75, + 0x67, + 0x68, + 0x6e, + 0x65, + 0x73, + 0x73, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x61, + 0x6e, + 0x69, + 0x73, + 0x6f, + 0x74, + 0x72, + 0x6f, + 0x70, + 0x79, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x61, + 0x6e, + 0x69, + 0x73, + 0x6f, + 0x74, + 0x72, + 0x6f, + 0x70, + 0x79, + 0x44, + 0x69, + 0x72, + 0x65, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x36, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x37, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x38, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x73, + 0x74, + 0x64, + 0x31, + 0x34, + 0x30, + 0x29, + 0x20, + 0x75, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x61, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x62, + 0x3b, + 0x00, + 0x7d, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x29, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x36, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x37, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x37, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x37, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x38, + 0x29, + 0x2e, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x36, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x37, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x37, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x37, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x38, + 0x29, + 0x2e, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x36, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x37, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x38, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x62, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x63, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x64, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x65, + 0x5b, + 0x34, + 0x5d, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x66, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x67, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x68, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x69, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6b, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6c, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6d, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6e, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6f, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x70, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x71, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x72, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x76, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x77, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x78, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x79, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x61, + 0x7a, + 0x3b, + 0x00, + 0x75, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x62, + 0x7a, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x63, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x64, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x67, + 0x7a, + 0x5b, + 0x39, + 0x5d, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x68, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x69, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6a, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6b, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6c, + 0x7a, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6e, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6f, + 0x7a, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x70, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x71, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x72, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x7a, + 0x3b, + 0x00, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x76, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x77, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x78, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x61, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x62, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x63, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x64, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x67, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x68, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x33, + 0x20, + 0x69, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x6a, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x6b, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6c, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6d, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6e, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6f, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x70, + 0x7a, + 0x7a, + 0x5b, + 0x34, + 0x5d, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x71, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x72, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x75, + 0x7a, + 0x7a, + 0x5b, + 0x34, + 0x30, + 0x5d, + 0x3b, + 0x00, + 0x75, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x43, + 0x75, + 0x62, + 0x65, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x20, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x28, + 0x69, + 0x6e, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2c, + 0x20, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x29, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x6c, + 0x65, + 0x6e, + 0x67, + 0x74, + 0x68, + 0x28, + 0x76, + 0x69, + 0x65, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x3e, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x7a, + 0x7a, + 0x29, + 0x00, + 0x72, + 0x65, + 0x74, + 0x75, + 0x72, + 0x6e, + 0x20, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x7a, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x61, + 0x62, + 0x73, + 0x28, + 0x5f, + 0x32, + 0x31, + 0x34, + 0x29, + 0x20, + 0x3e, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x30, + 0x31, + 0x32, + 0x35, + 0x29, + 0x00, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x7a, + 0x2e, + 0x7a, + 0x20, + 0x2d, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x7a, + 0x2e, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x7a, + 0x2e, + 0x79, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x34, + 0x29, + 0x29, + 0x29, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x34, + 0x3b, + 0x00, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x7a, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x34, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x20, + 0x2a, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x78, + 0x7a, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x32, + 0x34, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x34, + 0x37, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x35, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x69, + 0x6e, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x32, + 0x34, + 0x37, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x79, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x36, + 0x30, + 0x36, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x64, + 0x7a, + 0x7a, + 0x20, + 0x3e, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x37, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x7a, + 0x7a, + 0x29, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x68, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x32, + 0x37, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x37, + 0x34, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x75, + 0x6e, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x48, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x78, + 0x31, + 0x36, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x7a, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x36, + 0x30, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x7a, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x4c, + 0x6f, + 0x64, + 0x28, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x2c, + 0x20, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x70, + 0x6f, + 0x73, + 0x65, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x5b, + 0x30, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x5b, + 0x31, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x5b, + 0x32, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x2c, + 0x20, + 0x6d, + 0x69, + 0x78, + 0x28, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x2e, + 0x79, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x2e, + 0x78, + 0x2c, + 0x20, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x32, + 0x37, + 0x34, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x5f, + 0x36, + 0x30, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x30, + 0x36, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x32, + 0x35, + 0x34, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x36, + 0x30, + 0x38, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x7a, + 0x7a, + 0x20, + 0x3e, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x20, + 0x2a, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x7a, + 0x7a, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x33, + 0x34, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x31, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x64, + 0x6f, + 0x74, + 0x28, + 0x6e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x69, + 0x7a, + 0x65, + 0x28, + 0x76, + 0x69, + 0x65, + 0x77, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x68, + 0x7a, + 0x29, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x33, + 0x35, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x37, + 0x3b, + 0x00, + 0x5f, + 0x36, + 0x30, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x32, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6a, + 0x7a, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6a, + 0x7a, + 0x2e, + 0x77, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x70, + 0x6f, + 0x77, + 0x28, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x33, + 0x35, + 0x37, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x7a, + 0x7a, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x33, + 0x34, + 0x31, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x36, + 0x30, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x32, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x37, + 0x31, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x32, + 0x35, + 0x34, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x36, + 0x30, + 0x38, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x37, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x37, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x37, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x36, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x37, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x37, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x37, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x38, + 0x29, + 0x2e, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x36, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x37, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x37, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x37, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x38, + 0x29, + 0x2e, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x70, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x70, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x5f, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x7a, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x5b, + 0x33, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x28, + 0x70, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x2c, + 0x20, + 0x70, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x5f, + 0x31, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x33, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x33, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x6f, + 0x72, + 0x70, + 0x68, + 0x54, + 0x61, + 0x72, + 0x67, + 0x65, + 0x74, + 0x43, + 0x6f, + 0x75, + 0x6e, + 0x74, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x66, + 0x6c, + 0x61, + 0x67, + 0x73, + 0x43, + 0x68, + 0x61, + 0x6e, + 0x6e, + 0x65, + 0x6c, + 0x73, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x49, + 0x64, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x73, + 0x65, + 0x72, + 0x44, + 0x61, + 0x74, + 0x61, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x72, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x5b, + 0x38, + 0x5d, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x36, + 0x35, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x29, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x20, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x42, + 0x69, + 0x74, + 0x73, + 0x54, + 0x6f, + 0x46, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x5b, + 0x5f, + 0x31, + 0x36, + 0x35, + 0x5d, + 0x2e, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x49, + 0x64, + 0x29, + 0x3b, + 0x00, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x2f, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x23, + 0x65, + 0x78, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x47, + 0x4c, + 0x5f, + 0x45, + 0x58, + 0x54, + 0x5f, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x5f, + 0x63, + 0x75, + 0x6c, + 0x6c, + 0x5f, + 0x64, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x20, + 0x3a, + 0x20, + 0x72, + 0x65, + 0x71, + 0x75, + 0x69, + 0x72, + 0x65, + 0x00, + 0x23, + 0x69, + 0x66, + 0x6e, + 0x64, + 0x65, + 0x66, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x38, + 0x00, + 0x23, + 0x64, + 0x65, + 0x66, + 0x69, + 0x6e, + 0x65, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x38, + 0x20, + 0x32, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x20, + 0x3d, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x38, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x37, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x2f, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x38, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x5b, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x5b, + 0x5f, + 0x37, + 0x35, + 0x5d, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x34, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x2e, + 0x39, + 0x39, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x39, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x38, + 0x34, + 0x29, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x39, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x30, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x31, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x31, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x31, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x5b, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x39, + 0x30, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x32, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x35, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x31, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x36, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x34, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x2e, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x2e, + 0x78, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x28, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x36, + 0x20, + 0x2f, + 0x20, + 0x32, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x31, + 0x31, + 0x30, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x2e, + 0x78, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x31, + 0x31, + 0x30, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x31, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x2d, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x2e, + 0x78, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x36, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x34, + 0x20, + 0x2b, + 0x20, + 0x31, + 0x29, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x2e, + 0x77, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x2e, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x78, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x2e, + 0x77, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x79, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x35, + 0x3b, + 0x00, + 0x23, + 0x76, + 0x65, + 0x72, + 0x73, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x34, + 0x31, + 0x30, + 0x00, + 0x23, + 0x65, + 0x78, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x47, + 0x4c, + 0x5f, + 0x41, + 0x52, + 0x42, + 0x5f, + 0x73, + 0x68, + 0x61, + 0x64, + 0x69, + 0x6e, + 0x67, + 0x5f, + 0x6c, + 0x61, + 0x6e, + 0x67, + 0x75, + 0x61, + 0x67, + 0x65, + 0x5f, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x20, + 0x3a, + 0x20, + 0x65, + 0x6e, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x38, + 0x29, + 0x20, + 0x66, + 0x6c, + 0x61, + 0x74, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x34, + 0x29, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x37, + 0x29, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x31, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x5b, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x5d, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x31, + 0x37, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x2e, + 0x39, + 0x39, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x31, + 0x37, + 0x29, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x32, + 0x30, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x37, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x37, + 0x3b, + 0x00, + 0x75, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x43, + 0x75, + 0x62, + 0x65, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x34, + 0x29, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x28, + 0x69, + 0x6e, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x29, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x6c, + 0x65, + 0x6e, + 0x67, + 0x74, + 0x68, + 0x28, + 0x76, + 0x69, + 0x65, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x7a, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x35, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x69, + 0x6e, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x20, + 0x2a, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x78, + 0x7a, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x79, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x75, + 0x6e, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x48, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x78, + 0x31, + 0x36, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x7a, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x36, + 0x30, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x7a, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x4c, + 0x6f, + 0x64, + 0x28, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x2c, + 0x20, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x70, + 0x6f, + 0x73, + 0x65, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x5b, + 0x30, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x5b, + 0x31, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x5b, + 0x32, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x2c, + 0x20, + 0x6d, + 0x69, + 0x78, + 0x28, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x2e, + 0x79, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x2e, + 0x78, + 0x2c, + 0x20, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x7a, + 0x7a, + 0x29, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x68, + 0x7a, + 0x7a, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x5f, + 0x36, + 0x30, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x32, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6a, + 0x7a, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6a, + 0x7a, + 0x2e, + 0x77, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x70, + 0x6f, + 0x77, + 0x28, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x64, + 0x6f, + 0x74, + 0x28, + 0x6e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x69, + 0x7a, + 0x65, + 0x28, + 0x76, + 0x69, + 0x65, + 0x77, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x68, + 0x7a, + 0x29, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x7a, + 0x7a, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x20, + 0x2a, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x7a, + 0x7a, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x70, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x5f, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x7a, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x5b, + 0x33, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x29, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x37, + 0x29, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x39, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x2f, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x38, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x5b, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x5b, + 0x5f, + 0x31, + 0x39, + 0x38, + 0x5d, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x38, + 0x39, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x2e, + 0x39, + 0x39, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x38, + 0x39, + 0x29, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x37, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x32, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x32, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x32, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x5b, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x37, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x33, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x33, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x32, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x32, + 0x33, + 0x32, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x34, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x33, + 0x33, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x32, + 0x32, + 0x39, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x32, + 0x33, + 0x32, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x28, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x33, + 0x33, + 0x20, + 0x2f, + 0x20, + 0x32, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x32, + 0x34, + 0x34, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x32, + 0x34, + 0x34, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x31, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x2d, + 0x28, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x33, + 0x33, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x32, + 0x32, + 0x39, + 0x20, + 0x2b, + 0x20, + 0x31, + 0x29, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x2e, + 0x77, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x2e, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x78, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x2e, + 0x77, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x79, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x39, + 0x38, + 0x3b, + 0x00, + 0x23, + 0x69, + 0x6e, + 0x63, + 0x6c, + 0x75, + 0x64, + 0x65, + 0x20, + 0x3c, + 0x6d, + 0x65, + 0x74, + 0x61, + 0x6c, + 0x5f, + 0x73, + 0x74, + 0x64, + 0x6c, + 0x69, + 0x62, + 0x3e, + 0x00, + 0x23, + 0x69, + 0x6e, + 0x63, + 0x6c, + 0x75, + 0x64, + 0x65, + 0x20, + 0x3c, + 0x73, + 0x69, + 0x6d, + 0x64, + 0x2f, + 0x73, + 0x69, + 0x6d, + 0x64, + 0x2e, + 0x68, + 0x3e, + 0x00, + 0x00, + 0x75, + 0x73, + 0x69, + 0x6e, + 0x67, + 0x20, + 0x6e, + 0x61, + 0x6d, + 0x65, + 0x73, + 0x70, + 0x61, + 0x63, + 0x65, + 0x20, + 0x6d, + 0x65, + 0x74, + 0x61, + 0x6c, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x78, + 0x33, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x6f, + 0x72, + 0x70, + 0x68, + 0x54, + 0x61, + 0x72, + 0x67, + 0x65, + 0x74, + 0x43, + 0x6f, + 0x75, + 0x6e, + 0x74, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x66, + 0x6c, + 0x61, + 0x67, + 0x73, + 0x43, + 0x68, + 0x61, + 0x6e, + 0x6e, + 0x65, + 0x6c, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x49, + 0x64, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x73, + 0x65, + 0x72, + 0x44, + 0x61, + 0x74, + 0x61, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x72, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x5b, + 0x38, + 0x5d, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x4d, + 0x41, + 0x58, + 0x5f, + 0x49, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x43, + 0x45, + 0x53, + 0x20, + 0x3d, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x31, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x4f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x50, + 0x65, + 0x72, + 0x52, + 0x65, + 0x6e, + 0x64, + 0x65, + 0x72, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x44, + 0x61, + 0x74, + 0x61, + 0x20, + 0x64, + 0x61, + 0x74, + 0x61, + 0x5b, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x4d, + 0x41, + 0x58, + 0x5f, + 0x49, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x43, + 0x45, + 0x53, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x46, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x56, + 0x69, + 0x65, + 0x77, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x56, + 0x69, + 0x65, + 0x77, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x34, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x54, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x43, + 0x6f, + 0x6e, + 0x74, + 0x72, + 0x6f, + 0x6c, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x69, + 0x6d, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x65, + 0x6d, + 0x70, + 0x6f, + 0x72, + 0x61, + 0x6c, + 0x4e, + 0x6f, + 0x69, + 0x73, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x75, + 0x73, + 0x65, + 0x72, + 0x54, + 0x69, + 0x6d, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x72, + 0x65, + 0x73, + 0x6f, + 0x6c, + 0x75, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x6c, + 0x6f, + 0x67, + 0x69, + 0x63, + 0x61, + 0x6c, + 0x56, + 0x69, + 0x65, + 0x77, + 0x70, + 0x6f, + 0x72, + 0x74, + 0x53, + 0x63, + 0x61, + 0x6c, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x6c, + 0x6f, + 0x67, + 0x69, + 0x63, + 0x61, + 0x6c, + 0x56, + 0x69, + 0x65, + 0x77, + 0x70, + 0x6f, + 0x72, + 0x74, + 0x4f, + 0x66, + 0x66, + 0x73, + 0x65, + 0x74, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6c, + 0x6f, + 0x64, + 0x42, + 0x69, + 0x61, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x72, + 0x65, + 0x66, + 0x72, + 0x61, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x4c, + 0x6f, + 0x64, + 0x4f, + 0x66, + 0x66, + 0x73, + 0x65, + 0x74, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x64, + 0x65, + 0x72, + 0x69, + 0x76, + 0x61, + 0x74, + 0x69, + 0x76, + 0x65, + 0x73, + 0x53, + 0x63, + 0x61, + 0x6c, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6f, + 0x6e, + 0x65, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6e, + 0x65, + 0x61, + 0x72, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x63, + 0x61, + 0x6d, + 0x65, + 0x72, + 0x61, + 0x46, + 0x61, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x78, + 0x70, + 0x6f, + 0x73, + 0x75, + 0x72, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x76, + 0x31, + 0x30, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6e, + 0x65, + 0x65, + 0x64, + 0x73, + 0x41, + 0x6c, + 0x70, + 0x68, + 0x61, + 0x43, + 0x68, + 0x61, + 0x6e, + 0x6e, + 0x65, + 0x6c, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x61, + 0x6f, + 0x53, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x69, + 0x6e, + 0x67, + 0x51, + 0x75, + 0x61, + 0x6c, + 0x69, + 0x74, + 0x79, + 0x41, + 0x6e, + 0x64, + 0x45, + 0x64, + 0x67, + 0x65, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x61, + 0x6f, + 0x42, + 0x65, + 0x6e, + 0x74, + 0x4e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x7a, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x65, + 0x64, + 0x5f, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x33, + 0x20, + 0x66, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x43, + 0x68, + 0x61, + 0x6e, + 0x6e, + 0x65, + 0x6c, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x66, + 0x72, + 0x6f, + 0x78, + 0x65, + 0x6c, + 0x43, + 0x6f, + 0x75, + 0x6e, + 0x74, + 0x58, + 0x59, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x69, + 0x62, + 0x6c, + 0x4c, + 0x75, + 0x6d, + 0x69, + 0x6e, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x69, + 0x62, + 0x6c, + 0x52, + 0x6f, + 0x75, + 0x67, + 0x68, + 0x6e, + 0x65, + 0x73, + 0x73, + 0x4f, + 0x6e, + 0x65, + 0x4c, + 0x65, + 0x76, + 0x65, + 0x6c, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x69, + 0x62, + 0x6c, + 0x53, + 0x48, + 0x5b, + 0x39, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x65, + 0x64, + 0x5f, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x44, + 0x69, + 0x72, + 0x65, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x70, + 0x61, + 0x64, + 0x64, + 0x69, + 0x6e, + 0x67, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x49, + 0x6e, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x73, + 0x75, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x73, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x46, + 0x61, + 0x72, + 0x41, + 0x74, + 0x74, + 0x65, + 0x6e, + 0x75, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x64, + 0x69, + 0x72, + 0x65, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x61, + 0x6c, + 0x53, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x73, + 0x43, + 0x6f, + 0x6e, + 0x74, + 0x61, + 0x63, + 0x74, + 0x53, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x63, + 0x61, + 0x73, + 0x63, + 0x61, + 0x64, + 0x65, + 0x53, + 0x70, + 0x6c, + 0x69, + 0x74, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x63, + 0x61, + 0x73, + 0x63, + 0x61, + 0x64, + 0x65, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x50, + 0x65, + 0x6e, + 0x75, + 0x6d, + 0x62, + 0x72, + 0x61, + 0x52, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x53, + 0x63, + 0x61, + 0x6c, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x46, + 0x61, + 0x72, + 0x41, + 0x74, + 0x74, + 0x65, + 0x6e, + 0x75, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x76, + 0x73, + 0x6d, + 0x45, + 0x78, + 0x70, + 0x6f, + 0x6e, + 0x65, + 0x6e, + 0x74, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x76, + 0x73, + 0x6d, + 0x44, + 0x65, + 0x70, + 0x74, + 0x68, + 0x53, + 0x63, + 0x61, + 0x6c, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x76, + 0x73, + 0x6d, + 0x4c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x42, + 0x6c, + 0x65, + 0x65, + 0x64, + 0x52, + 0x65, + 0x64, + 0x75, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x73, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x53, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x69, + 0x6e, + 0x67, + 0x54, + 0x79, + 0x70, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x65, + 0x64, + 0x5f, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x44, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x53, + 0x74, + 0x61, + 0x72, + 0x74, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x4d, + 0x61, + 0x78, + 0x4f, + 0x70, + 0x61, + 0x63, + 0x69, + 0x74, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x4d, + 0x69, + 0x6e, + 0x4d, + 0x61, + 0x78, + 0x4d, + 0x69, + 0x70, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x48, + 0x65, + 0x69, + 0x67, + 0x68, + 0x74, + 0x46, + 0x61, + 0x6c, + 0x6c, + 0x6f, + 0x66, + 0x66, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x75, + 0x74, + 0x4f, + 0x66, + 0x66, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x65, + 0x64, + 0x5f, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x49, + 0x62, + 0x6c, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x74, + 0x61, + 0x72, + 0x74, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x69, + 0x7a, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x4f, + 0x6e, + 0x65, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x78, + 0x33, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x73, + 0x73, + 0x72, + 0x52, + 0x65, + 0x70, + 0x72, + 0x6f, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x73, + 0x73, + 0x72, + 0x55, + 0x76, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x56, + 0x69, + 0x65, + 0x77, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x73, + 0x72, + 0x54, + 0x68, + 0x69, + 0x63, + 0x6b, + 0x6e, + 0x65, + 0x73, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x73, + 0x72, + 0x42, + 0x69, + 0x61, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x73, + 0x72, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x73, + 0x72, + 0x53, + 0x74, + 0x72, + 0x69, + 0x64, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x63, + 0x75, + 0x73, + 0x74, + 0x6f, + 0x6d, + 0x5b, + 0x34, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x72, + 0x65, + 0x63, + 0x37, + 0x30, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x73, + 0x32, + 0x52, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x73, + 0x32, + 0x52, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x73, + 0x32, + 0x52, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x72, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x5b, + 0x34, + 0x30, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x75, + 0x73, + 0x65, + 0x72, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x6e, + 0x34, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x75, + 0x73, + 0x65, + 0x72, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x6e, + 0x37, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x5b, + 0x5b, + 0x75, + 0x73, + 0x65, + 0x72, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x6e, + 0x38, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x69, + 0x6e, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x61, + 0x74, + 0x74, + 0x72, + 0x69, + 0x62, + 0x75, + 0x74, + 0x65, + 0x28, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x28, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x69, + 0x6e, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x73, + 0x74, + 0x61, + 0x67, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x46, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x26, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x31, + 0x37, + 0x29, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x4f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x26, + 0x20, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x31, + 0x38, + 0x29, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x49, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x49, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x64, + 0x5d, + 0x5d, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x3d, + 0x20, + 0x7b, + 0x7d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x28, + 0x67, + 0x6c, + 0x5f, + 0x49, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x49, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x64, + 0x61, + 0x74, + 0x61, + 0x5b, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x5d, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x69, + 0x6e, + 0x2e, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x35, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x2e, + 0x39, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x35, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x39, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x39, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x39, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x30, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x30, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x30, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x72, + 0x65, + 0x74, + 0x75, + 0x72, + 0x6e, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x28, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x6d, + 0x65, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x28, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x26, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x32, + 0x35, + 0x29, + 0x5d, + 0x5d, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x2c, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x6d, + 0x65, + 0x6e, + 0x74, + 0x20, + 0x76, + 0x6f, + 0x69, + 0x64, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x28, + 0x29, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x42, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x31, + 0x20, + 0x7b, + 0x00, + 0x64, + 0x65, + 0x70, + 0x74, + 0x68, + 0x32, + 0x64, + 0x5f, + 0x61, + 0x72, + 0x72, + 0x61, + 0x79, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x4d, + 0x61, + 0x70, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x4d, + 0x61, + 0x70, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x31, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x32, + 0x64, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x69, + 0x62, + 0x6c, + 0x44, + 0x46, + 0x47, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x32, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x69, + 0x62, + 0x6c, + 0x44, + 0x46, + 0x47, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x33, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x63, + 0x75, + 0x62, + 0x65, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x69, + 0x62, + 0x6c, + 0x53, + 0x70, + 0x65, + 0x63, + 0x75, + 0x6c, + 0x61, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x34, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x69, + 0x62, + 0x6c, + 0x53, + 0x70, + 0x65, + 0x63, + 0x75, + 0x6c, + 0x61, + 0x72, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x35, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x32, + 0x64, + 0x5f, + 0x61, + 0x72, + 0x72, + 0x61, + 0x79, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x73, + 0x61, + 0x6f, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x36, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x73, + 0x61, + 0x6f, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x37, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x32, + 0x64, + 0x5f, + 0x61, + 0x72, + 0x72, + 0x61, + 0x79, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x73, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x38, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x73, + 0x72, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x39, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x32, + 0x64, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x75, + 0x72, + 0x65, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x31, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x75, + 0x72, + 0x65, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x31, + 0x31, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x63, + 0x75, + 0x62, + 0x65, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x31, + 0x32, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x31, + 0x33, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x6d, + 0x65, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x28, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x69, + 0x6e, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x73, + 0x74, + 0x61, + 0x67, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x42, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x31, + 0x26, + 0x20, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x31, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x32, + 0x37, + 0x29, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x46, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x26, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x31, + 0x37, + 0x29, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x26, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x32, + 0x35, + 0x29, + 0x5d, + 0x5d, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x33, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x34, + 0x34, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x69, + 0x6e, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x56, + 0x69, + 0x65, + 0x77, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x33, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x64, + 0x6f, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x7b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x6c, + 0x65, + 0x6e, + 0x67, + 0x74, + 0x68, + 0x28, + 0x5f, + 0x34, + 0x34, + 0x38, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x20, + 0x3e, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x75, + 0x74, + 0x4f, + 0x66, + 0x66, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x7b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x72, + 0x65, + 0x61, + 0x6b, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x7d, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x36, + 0x32, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x34, + 0x38, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x36, + 0x32, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x48, + 0x65, + 0x69, + 0x67, + 0x68, + 0x74, + 0x46, + 0x61, + 0x6c, + 0x6c, + 0x6f, + 0x66, + 0x66, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x36, + 0x32, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x37, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x61, + 0x62, + 0x73, + 0x28, + 0x5f, + 0x36, + 0x32, + 0x32, + 0x29, + 0x20, + 0x3e, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x30, + 0x31, + 0x32, + 0x35, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x2d, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x44, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x5b, + 0x30, + 0x5d, + 0x2c, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x2d, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x48, + 0x65, + 0x69, + 0x67, + 0x68, + 0x74, + 0x46, + 0x61, + 0x6c, + 0x6c, + 0x6f, + 0x66, + 0x66, + 0x2c, + 0x20, + 0x5f, + 0x36, + 0x32, + 0x31, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x44, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x5b, + 0x31, + 0x5d, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x44, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x5b, + 0x32, + 0x5d, + 0x29, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x36, + 0x32, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x65, + 0x6c, + 0x73, + 0x65, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x44, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x5b, + 0x32, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x69, + 0x6e, + 0x28, + 0x5f, + 0x38, + 0x31, + 0x33, + 0x20, + 0x2d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x37, + 0x39, + 0x37, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x53, + 0x74, + 0x61, + 0x72, + 0x74, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4d, + 0x61, + 0x78, + 0x4f, + 0x70, + 0x61, + 0x63, + 0x69, + 0x74, + 0x79, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x38, + 0x32, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x49, + 0x62, + 0x6c, + 0x20, + 0x3e, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x20, + 0x5f, + 0x38, + 0x32, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x61, + 0x73, + 0x5f, + 0x74, + 0x79, + 0x70, + 0x65, + 0x3c, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x3e, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4d, + 0x69, + 0x6e, + 0x4d, + 0x61, + 0x78, + 0x4d, + 0x69, + 0x70, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x32, + 0x38, + 0x20, + 0x2a, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x31, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x2e, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x31, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x2c, + 0x20, + 0x28, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x70, + 0x6f, + 0x73, + 0x65, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x78, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x30, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x31, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x32, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x34, + 0x34, + 0x38, + 0x29, + 0x2c, + 0x20, + 0x6c, + 0x65, + 0x76, + 0x65, + 0x6c, + 0x28, + 0x6d, + 0x69, + 0x78, + 0x28, + 0x5f, + 0x38, + 0x32, + 0x30, + 0x2e, + 0x79, + 0x2c, + 0x20, + 0x5f, + 0x38, + 0x32, + 0x30, + 0x2e, + 0x78, + 0x2c, + 0x20, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4f, + 0x6e, + 0x65, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x2c, + 0x20, + 0x2d, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x33, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x32, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x38, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x62, + 0x6c, + 0x4c, + 0x75, + 0x6d, + 0x69, + 0x6e, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x69, + 0x7a, + 0x65, + 0x20, + 0x3e, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x34, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x49, + 0x6e, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x49, + 0x6e, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x2e, + 0x77, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x70, + 0x6f, + 0x77, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x64, + 0x6f, + 0x74, + 0x28, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x69, + 0x7a, + 0x65, + 0x28, + 0x5f, + 0x34, + 0x34, + 0x38, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x44, + 0x69, + 0x72, + 0x65, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x69, + 0x7a, + 0x65, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x5f, + 0x38, + 0x31, + 0x33, + 0x20, + 0x2d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x37, + 0x39, + 0x37, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x74, + 0x61, + 0x72, + 0x74, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x38, + 0x33, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x37, + 0x35, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x38, + 0x33, + 0x37, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x5f, + 0x38, + 0x31, + 0x33, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x33, + 0x37, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x32, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x35, + 0x30, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x32, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x35, + 0x30, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x32, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x35, + 0x30, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x72, + 0x65, + 0x61, + 0x6b, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x7d, + 0x20, + 0x77, + 0x68, + 0x69, + 0x6c, + 0x65, + 0x28, + 0x66, + 0x61, + 0x6c, + 0x73, + 0x65, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x5f, + 0x38, + 0x30, + 0x34, + 0x29, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x36, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x7b, + 0x7d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x20, + 0x5b, + 0x5b, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x28, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x6d, + 0x65, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x28, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x69, + 0x6e, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x73, + 0x74, + 0x61, + 0x67, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x4f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x26, + 0x20, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x31, + 0x38, + 0x29, + 0x5d, + 0x5d, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x61, + 0x73, + 0x5f, + 0x74, + 0x79, + 0x70, + 0x65, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x28, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x64, + 0x61, + 0x74, + 0x61, + 0x5b, + 0x5f, + 0x31, + 0x36, + 0x35, + 0x5d, + 0x2e, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x49, + 0x64, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x2f, + 0x20, + 0x69, + 0x6e, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x6d, + 0x65, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x28, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5f, + 0x74, + 0x6d, + 0x70, + 0x20, + 0x5b, + 0x5b, + 0x66, + 0x75, + 0x6e, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x5f, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x28, + 0x38, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x73, + 0x5f, + 0x66, + 0x75, + 0x6e, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x5f, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x5f, + 0x64, + 0x65, + 0x66, + 0x69, + 0x6e, + 0x65, + 0x64, + 0x28, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5f, + 0x74, + 0x6d, + 0x70, + 0x29, + 0x20, + 0x3f, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5f, + 0x74, + 0x6d, + 0x70, + 0x20, + 0x3a, + 0x20, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x20, + 0x5b, + 0x5b, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x5f, + 0x64, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5d, + 0x5d, + 0x20, + 0x5b, + 0x32, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x30, + 0x20, + 0x5b, + 0x5b, + 0x75, + 0x73, + 0x65, + 0x72, + 0x28, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x31, + 0x20, + 0x5b, + 0x5b, + 0x75, + 0x73, + 0x65, + 0x72, + 0x28, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x31, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x2f, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x64, + 0x61, + 0x74, + 0x61, + 0x5b, + 0x5f, + 0x36, + 0x35, + 0x5d, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x69, + 0x6e, + 0x2e, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x2e, + 0x39, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x37, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x38, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x38, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x38, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x38, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x37, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x39, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x39, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x39, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x39, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x39, + 0x31, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x39, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x38, + 0x39, + 0x2e, + 0x78, + 0x2c, + 0x20, + 0x5f, + 0x39, + 0x34, + 0x2c, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x32, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x39, + 0x32, + 0x2c, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x2c, + 0x20, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x39, + 0x34, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x2d, + 0x32, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x39, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x33, + 0x2c, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x2c, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x31, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x31, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x2d, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x33, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x39, + 0x31, + 0x20, + 0x2b, + 0x20, + 0x31, + 0x29, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x2c, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x31, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x31, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x64, + 0x61, + 0x74, + 0x61, + 0x5b, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x5d, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x69, + 0x6e, + 0x2e, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x36, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x2e, + 0x39, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x30, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x30, + 0x30, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x30, + 0x30, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x30, + 0x30, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x30, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x30, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x69, + 0x6e, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x37, + 0x39, + 0x37, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x53, + 0x74, + 0x61, + 0x72, + 0x74, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4d, + 0x61, + 0x78, + 0x4f, + 0x70, + 0x61, + 0x63, + 0x69, + 0x74, + 0x79, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x61, + 0x73, + 0x5f, + 0x74, + 0x79, + 0x70, + 0x65, + 0x3c, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x3e, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4d, + 0x69, + 0x6e, + 0x4d, + 0x61, + 0x78, + 0x4d, + 0x69, + 0x70, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x31, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x2e, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x31, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x2c, + 0x20, + 0x28, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x70, + 0x6f, + 0x73, + 0x65, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x78, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x30, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x31, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x32, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x34, + 0x34, + 0x38, + 0x29, + 0x2c, + 0x20, + 0x6c, + 0x65, + 0x76, + 0x65, + 0x6c, + 0x28, + 0x6d, + 0x69, + 0x78, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x38, + 0x31, + 0x37, + 0x2e, + 0x79, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x38, + 0x31, + 0x37, + 0x2e, + 0x78, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4f, + 0x6e, + 0x65, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x2c, + 0x20, + 0x2d, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x29, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x38, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x62, + 0x6c, + 0x4c, + 0x75, + 0x6d, + 0x69, + 0x6e, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x34, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x49, + 0x6e, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x49, + 0x6e, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x2e, + 0x77, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x70, + 0x6f, + 0x77, + 0x28, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x64, + 0x6f, + 0x74, + 0x28, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x69, + 0x7a, + 0x65, + 0x28, + 0x5f, + 0x34, + 0x34, + 0x38, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x44, + 0x69, + 0x72, + 0x65, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x69, + 0x7a, + 0x65, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x37, + 0x39, + 0x37, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x36, + 0x30, + 0x35, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x74, + 0x61, + 0x72, + 0x74, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x37, + 0x35, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x34, + 0x35, + 0x30, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x39, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x2f, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x36, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x64, + 0x61, + 0x74, + 0x61, + 0x5b, + 0x5f, + 0x31, + 0x39, + 0x30, + 0x5d, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x69, + 0x6e, + 0x2e, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x36, + 0x39, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x2e, + 0x39, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x36, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x33, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x33, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x33, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5d, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x33, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x32, + 0x32, + 0x31, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x34, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x36, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x35, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x32, + 0x31, + 0x36, + 0x2e, + 0x78, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x39, + 0x2c, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x32, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x33, + 0x35, + 0x2c, + 0x20, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x39, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x32, + 0x34, + 0x38, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x33, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x35, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x2d, + 0x32, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x34, + 0x32, + 0x39, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x33, + 0x35, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x34, + 0x38, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x35, + 0x32, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x31, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x2d, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x34, + 0x32, + 0x39, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x32, + 0x32, + 0x31, + 0x20, + 0x2b, + 0x20, + 0x31, + 0x29, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x34, + 0x38, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x35, + 0x32, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x39, + 0x30, + 0x3b, + 0x00, + 0x4c, + 0x53, + 0x4c, + 0x47, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0xb2, + 0x08, + 0x00, + 0x00, + 0x12, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x86, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x01, + 0x90, + 0x01, + 0x00, + 0x00, + 0x01, + 0x10, + 0x00, + 0x86, + 0x00, + 0x00, + 0x00, + 0x01, + 0x10, + 0x01, + 0xca, + 0x01, + 0x00, + 0x00, + 0x01, + 0x20, + 0x01, + 0xde, + 0x01, + 0x00, + 0x00, + 0x01, + 0x30, + 0x01, + 0x26, + 0x03, + 0x00, + 0x00, + 0x01, + 0x44, + 0x01, + 0x68, + 0x03, + 0x00, + 0x00, + 0x01, + 0x80, + 0x00, + 0x80, + 0x03, + 0x00, + 0x00, + 0x01, + 0x90, + 0x00, + 0x80, + 0x03, + 0x00, + 0x00, + 0x02, + 0x00, + 0x00, + 0xa8, + 0x04, + 0x00, + 0x00, + 0x02, + 0x00, + 0x01, + 0xb4, + 0x05, + 0x00, + 0x00, + 0x02, + 0x10, + 0x00, + 0xa8, + 0x04, + 0x00, + 0x00, + 0x02, + 0x10, + 0x01, + 0xec, + 0x05, + 0x00, + 0x00, + 0x02, + 0x20, + 0x01, + 0xfe, + 0x05, + 0x00, + 0x00, + 0x02, + 0x30, + 0x01, + 0x34, + 0x07, + 0x00, + 0x00, + 0x02, + 0x44, + 0x01, + 0x74, + 0x07, + 0x00, + 0x00, + 0x02, + 0x80, + 0x00, + 0x8a, + 0x07, + 0x00, + 0x00, + 0x02, + 0x90, + 0x00, + 0x8a, + 0x07, + 0x00, + 0x00, + 0x8a, + 0x09, + 0x00, + 0x00, + 0x81, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x02, + 0x00, + 0x03, + 0x00, + 0x04, + 0x00, + 0x05, + 0x00, + 0x02, + 0x00, + 0x06, + 0x00, + 0x07, + 0x00, + 0x08, + 0x00, + 0x09, + 0x00, + 0x0a, + 0x00, + 0x0b, + 0x00, + 0x0c, + 0x00, + 0x04, + 0x00, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x10, + 0x00, + 0x11, + 0x00, + 0x12, + 0x00, + 0x0f, + 0x00, + 0x13, + 0x00, + 0x14, + 0x00, + 0x02, + 0x00, + 0x15, + 0x00, + 0x16, + 0x00, + 0x17, + 0x00, + 0x02, + 0x00, + 0x18, + 0x00, + 0x19, + 0x00, + 0x1a, + 0x00, + 0x1b, + 0x00, + 0x1c, + 0x00, + 0x1d, + 0x00, + 0x1e, + 0x00, + 0x1f, + 0x00, + 0x20, + 0x00, + 0x21, + 0x00, + 0x22, + 0x00, + 0x23, + 0x00, + 0x24, + 0x00, + 0x25, + 0x00, + 0x26, + 0x00, + 0x27, + 0x00, + 0x28, + 0x00, + 0x29, + 0x00, + 0x2a, + 0x00, + 0x2b, + 0x00, + 0x2c, + 0x00, + 0x2d, + 0x00, + 0x2e, + 0x00, + 0x2f, + 0x00, + 0x30, + 0x00, + 0x31, + 0x00, + 0x32, + 0x00, + 0x33, + 0x00, + 0x34, + 0x00, + 0x35, + 0x00, + 0x36, + 0x00, + 0x37, + 0x00, + 0x38, + 0x00, + 0x39, + 0x00, + 0x3a, + 0x00, + 0x3b, + 0x00, + 0x3c, + 0x00, + 0x3d, + 0x00, + 0x3e, + 0x00, + 0x3f, + 0x00, + 0x40, + 0x00, + 0x41, + 0x00, + 0x42, + 0x00, + 0x43, + 0x00, + 0x44, + 0x00, + 0x45, + 0x00, + 0x46, + 0x00, + 0x47, + 0x00, + 0x48, + 0x00, + 0x49, + 0x00, + 0x4a, + 0x00, + 0x4b, + 0x00, + 0x4c, + 0x00, + 0x4d, + 0x00, + 0x4e, + 0x00, + 0x4f, + 0x00, + 0x50, + 0x00, + 0x51, + 0x00, + 0x52, + 0x00, + 0x53, + 0x00, + 0x54, + 0x00, + 0x55, + 0x00, + 0x56, + 0x00, + 0x57, + 0x00, + 0x58, + 0x00, + 0x59, + 0x00, + 0x5a, + 0x00, + 0x5b, + 0x00, + 0x5c, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x5f, + 0x00, + 0x60, + 0x00, + 0x61, + 0x00, + 0x62, + 0x00, + 0x63, + 0x00, + 0x64, + 0x00, + 0x65, + 0x00, + 0x66, + 0x00, + 0x02, + 0x00, + 0x67, + 0x00, + 0x02, + 0x00, + 0x68, + 0x00, + 0x69, + 0x00, + 0x6a, + 0x00, + 0x02, + 0x00, + 0x6b, + 0x00, + 0x69, + 0x00, + 0x6c, + 0x00, + 0x6d, + 0x00, + 0x6e, + 0x00, + 0x6f, + 0x00, + 0x70, + 0x00, + 0x71, + 0x00, + 0x72, + 0x00, + 0x73, + 0x00, + 0x74, + 0x00, + 0x75, + 0x00, + 0x76, + 0x00, + 0x69, + 0x00, + 0x16, + 0x02, + 0x00, + 0x00, + 0x19, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x77, + 0x00, + 0x78, + 0x00, + 0x79, + 0x00, + 0x02, + 0x00, + 0x7a, + 0x00, + 0x7b, + 0x00, + 0x7c, + 0x00, + 0x7d, + 0x00, + 0x7e, + 0x00, + 0x7f, + 0x00, + 0x04, + 0x00, + 0x80, + 0x00, + 0x81, + 0x00, + 0x82, + 0x00, + 0x83, + 0x00, + 0x02, + 0x00, + 0x84, + 0x00, + 0x85, + 0x00, + 0x86, + 0x00, + 0x87, + 0x00, + 0x66, + 0x00, + 0x02, + 0x00, + 0x88, + 0x00, + 0x69, + 0x00, + 0x51, + 0x00, + 0x00, + 0x00, + 0x06, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x77, + 0x00, + 0x78, + 0x00, + 0x66, + 0x00, + 0x02, + 0x00, + 0x69, + 0x00, + 0x9b, + 0x0c, + 0x00, + 0x00, + 0xa0, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x77, + 0x00, + 0x78, + 0x00, + 0x79, + 0x00, + 0x02, + 0x00, + 0x7a, + 0x00, + 0x7b, + 0x00, + 0x7c, + 0x00, + 0x7d, + 0x00, + 0x7e, + 0x00, + 0x7f, + 0x00, + 0x04, + 0x00, + 0x89, + 0x00, + 0x8a, + 0x00, + 0x8b, + 0x00, + 0x17, + 0x00, + 0x02, + 0x00, + 0x84, + 0x00, + 0x8c, + 0x00, + 0x8d, + 0x00, + 0x8e, + 0x00, + 0x8f, + 0x00, + 0x90, + 0x00, + 0x91, + 0x00, + 0x92, + 0x00, + 0x93, + 0x00, + 0x94, + 0x00, + 0x95, + 0x00, + 0x96, + 0x00, + 0x97, + 0x00, + 0x98, + 0x00, + 0x99, + 0x00, + 0x9a, + 0x00, + 0x9b, + 0x00, + 0x9c, + 0x00, + 0x9d, + 0x00, + 0x9e, + 0x00, + 0x9f, + 0x00, + 0xa0, + 0x00, + 0xa1, + 0x00, + 0xa2, + 0x00, + 0xa3, + 0x00, + 0xa4, + 0x00, + 0xa5, + 0x00, + 0xa6, + 0x00, + 0xa7, + 0x00, + 0xa8, + 0x00, + 0xa9, + 0x00, + 0xaa, + 0x00, + 0xab, + 0x00, + 0xac, + 0x00, + 0xad, + 0x00, + 0xae, + 0x00, + 0xaf, + 0x00, + 0xb0, + 0x00, + 0xb1, + 0x00, + 0xb2, + 0x00, + 0xb3, + 0x00, + 0xb4, + 0x00, + 0xb5, + 0x00, + 0xb6, + 0x00, + 0xb7, + 0x00, + 0xb8, + 0x00, + 0xb9, + 0x00, + 0xba, + 0x00, + 0xbb, + 0x00, + 0xbc, + 0x00, + 0xbd, + 0x00, + 0xbe, + 0x00, + 0xbf, + 0x00, + 0xc0, + 0x00, + 0xc1, + 0x00, + 0xc2, + 0x00, + 0xc3, + 0x00, + 0xc4, + 0x00, + 0xc5, + 0x00, + 0xc6, + 0x00, + 0xc7, + 0x00, + 0xc8, + 0x00, + 0xc9, + 0x00, + 0xca, + 0x00, + 0xcb, + 0x00, + 0xcc, + 0x00, + 0xcd, + 0x00, + 0xce, + 0x00, + 0xcf, + 0x00, + 0xd0, + 0x00, + 0xd1, + 0x00, + 0xd2, + 0x00, + 0xd3, + 0x00, + 0x61, + 0x00, + 0x83, + 0x00, + 0x02, + 0x00, + 0x84, + 0x00, + 0x85, + 0x00, + 0x86, + 0x00, + 0xd4, + 0x00, + 0xd5, + 0x00, + 0x87, + 0x00, + 0xd6, + 0x00, + 0x02, + 0x00, + 0xd7, + 0x00, + 0xd8, + 0x00, + 0x02, + 0x00, + 0xd9, + 0x00, + 0x69, + 0x00, + 0xda, + 0x00, + 0xdb, + 0x00, + 0xdc, + 0x00, + 0x02, + 0x00, + 0xdd, + 0x00, + 0x69, + 0x00, + 0x6a, + 0x00, + 0x02, + 0x00, + 0xde, + 0x00, + 0x69, + 0x00, + 0xdf, + 0x00, + 0xe0, + 0x00, + 0xe1, + 0x00, + 0xe2, + 0x00, + 0xe3, + 0x00, + 0x02, + 0x00, + 0xe4, + 0x00, + 0xe5, + 0x00, + 0xe6, + 0x00, + 0xe7, + 0x00, + 0x69, + 0x00, + 0x6a, + 0x00, + 0x02, + 0x00, + 0xe8, + 0x00, + 0x69, + 0x00, + 0xe9, + 0x00, + 0xea, + 0x00, + 0xeb, + 0x00, + 0x02, + 0x00, + 0xec, + 0x00, + 0xed, + 0x00, + 0xee, + 0x00, + 0xef, + 0x00, + 0xf0, + 0x00, + 0x69, + 0x00, + 0x6a, + 0x00, + 0x02, + 0x00, + 0xf1, + 0x00, + 0x69, + 0x00, + 0xf2, + 0x00, + 0xf3, + 0x00, + 0xf4, + 0x00, + 0xf5, + 0x00, + 0xf6, + 0x00, + 0xd9, + 0x00, + 0x69, + 0x00, + 0x66, + 0x00, + 0x02, + 0x00, + 0xf7, + 0x00, + 0xf8, + 0x00, + 0xf9, + 0x00, + 0xfa, + 0x00, + 0xfb, + 0x00, + 0x69, + 0x00, + 0xec, + 0x02, + 0x00, + 0x00, + 0x1d, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x77, + 0x00, + 0x78, + 0x00, + 0x05, + 0x00, + 0x02, + 0x00, + 0xfc, + 0x00, + 0xfd, + 0x00, + 0xfe, + 0x00, + 0xff, + 0x00, + 0x00, + 0x01, + 0x01, + 0x01, + 0x02, + 0x01, + 0x04, + 0x00, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x10, + 0x00, + 0x03, + 0x01, + 0x14, + 0x00, + 0x02, + 0x00, + 0x15, + 0x00, + 0x16, + 0x00, + 0x04, + 0x01, + 0x05, + 0x01, + 0x66, + 0x00, + 0x02, + 0x00, + 0x06, + 0x01, + 0x07, + 0x01, + 0x69, + 0x00, + 0x91, + 0x00, + 0x00, + 0x00, + 0x08, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x77, + 0x00, + 0x78, + 0x00, + 0x87, + 0x00, + 0x66, + 0x00, + 0x02, + 0x00, + 0x08, + 0x01, + 0x69, + 0x00, + 0x48, + 0x0c, + 0x00, + 0x00, + 0x90, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x09, + 0x01, + 0x01, + 0x00, + 0x02, + 0x00, + 0x03, + 0x00, + 0x04, + 0x00, + 0x05, + 0x00, + 0x02, + 0x00, + 0x06, + 0x00, + 0x07, + 0x00, + 0x08, + 0x00, + 0x09, + 0x00, + 0x0a, + 0x00, + 0x0b, + 0x00, + 0x0c, + 0x00, + 0x04, + 0x00, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x10, + 0x00, + 0x0a, + 0x01, + 0x0b, + 0x01, + 0x0f, + 0x00, + 0x0c, + 0x01, + 0x11, + 0x00, + 0x12, + 0x00, + 0x0f, + 0x00, + 0x13, + 0x00, + 0x14, + 0x00, + 0x02, + 0x00, + 0x15, + 0x00, + 0x16, + 0x00, + 0x17, + 0x00, + 0x02, + 0x00, + 0x18, + 0x00, + 0x19, + 0x00, + 0x1a, + 0x00, + 0x1b, + 0x00, + 0x1c, + 0x00, + 0x1d, + 0x00, + 0x1e, + 0x00, + 0x1f, + 0x00, + 0x20, + 0x00, + 0x21, + 0x00, + 0x22, + 0x00, + 0x23, + 0x00, + 0x24, + 0x00, + 0x25, + 0x00, + 0x26, + 0x00, + 0x27, + 0x00, + 0x28, + 0x00, + 0x29, + 0x00, + 0x2a, + 0x00, + 0x2b, + 0x00, + 0x2c, + 0x00, + 0x2d, + 0x00, + 0x2e, + 0x00, + 0x2f, + 0x00, + 0x30, + 0x00, + 0x31, + 0x00, + 0x32, + 0x00, + 0x33, + 0x00, + 0x34, + 0x00, + 0x35, + 0x00, + 0x36, + 0x00, + 0x37, + 0x00, + 0x38, + 0x00, + 0x39, + 0x00, + 0x3a, + 0x00, + 0x3b, + 0x00, + 0x3c, + 0x00, + 0x3d, + 0x00, + 0x3e, + 0x00, + 0x3f, + 0x00, + 0x40, + 0x00, + 0x41, + 0x00, + 0x42, + 0x00, + 0x43, + 0x00, + 0x44, + 0x00, + 0x45, + 0x00, + 0x46, + 0x00, + 0x47, + 0x00, + 0x48, + 0x00, + 0x49, + 0x00, + 0x4a, + 0x00, + 0x4b, + 0x00, + 0x4c, + 0x00, + 0x4d, + 0x00, + 0x4e, + 0x00, + 0x4f, + 0x00, + 0x50, + 0x00, + 0x51, + 0x00, + 0x52, + 0x00, + 0x53, + 0x00, + 0x54, + 0x00, + 0x55, + 0x00, + 0x56, + 0x00, + 0x57, + 0x00, + 0x58, + 0x00, + 0x59, + 0x00, + 0x5a, + 0x00, + 0x5b, + 0x00, + 0x5c, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x5f, + 0x00, + 0x60, + 0x00, + 0x61, + 0x00, + 0x63, + 0x00, + 0x62, + 0x00, + 0x64, + 0x00, + 0x65, + 0x00, + 0x66, + 0x00, + 0x02, + 0x00, + 0x67, + 0x00, + 0x02, + 0x00, + 0x68, + 0x00, + 0x69, + 0x00, + 0x6a, + 0x00, + 0x02, + 0x00, + 0x6b, + 0x00, + 0x69, + 0x00, + 0x0d, + 0x01, + 0x0e, + 0x01, + 0x0f, + 0x01, + 0x10, + 0x01, + 0x11, + 0x01, + 0x12, + 0x01, + 0x13, + 0x01, + 0x14, + 0x01, + 0x15, + 0x01, + 0x16, + 0x01, + 0x17, + 0x01, + 0x18, + 0x01, + 0x19, + 0x01, + 0x1a, + 0x01, + 0x1b, + 0x01, + 0x1c, + 0x01, + 0x1d, + 0x01, + 0x1e, + 0x01, + 0x1f, + 0x01, + 0x20, + 0x01, + 0x21, + 0x01, + 0x69, + 0x00, + 0xca, + 0x08, + 0x00, + 0x00, + 0x82, + 0x00, + 0x00, + 0x00, + 0x22, + 0x01, + 0x23, + 0x01, + 0x01, + 0x00, + 0x02, + 0x00, + 0x03, + 0x00, + 0x04, + 0x00, + 0x05, + 0x00, + 0x02, + 0x00, + 0x06, + 0x00, + 0x07, + 0x00, + 0x08, + 0x00, + 0x09, + 0x00, + 0x0a, + 0x00, + 0x0b, + 0x00, + 0x0c, + 0x00, + 0x04, + 0x00, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x10, + 0x00, + 0x11, + 0x00, + 0x12, + 0x00, + 0x0f, + 0x00, + 0x13, + 0x00, + 0x14, + 0x00, + 0x02, + 0x00, + 0x15, + 0x00, + 0x16, + 0x00, + 0x17, + 0x00, + 0x02, + 0x00, + 0x18, + 0x00, + 0x19, + 0x00, + 0x1a, + 0x00, + 0x1b, + 0x00, + 0x1c, + 0x00, + 0x1d, + 0x00, + 0x1e, + 0x00, + 0x1f, + 0x00, + 0x20, + 0x00, + 0x21, + 0x00, + 0x22, + 0x00, + 0x23, + 0x00, + 0x24, + 0x00, + 0x25, + 0x00, + 0x26, + 0x00, + 0x9a, + 0x00, + 0x9b, + 0x00, + 0x9c, + 0x00, + 0x2a, + 0x00, + 0x2b, + 0x00, + 0x2c, + 0x00, + 0x2d, + 0x00, + 0xa1, + 0x00, + 0xa2, + 0x00, + 0xa3, + 0x00, + 0xa4, + 0x00, + 0xa5, + 0x00, + 0xa6, + 0x00, + 0xa7, + 0x00, + 0xa8, + 0x00, + 0xa9, + 0x00, + 0xaa, + 0x00, + 0xab, + 0x00, + 0x39, + 0x00, + 0xad, + 0x00, + 0xae, + 0x00, + 0xaf, + 0x00, + 0x3d, + 0x00, + 0xb1, + 0x00, + 0xb2, + 0x00, + 0x40, + 0x00, + 0xb4, + 0x00, + 0xb5, + 0x00, + 0x43, + 0x00, + 0xb7, + 0x00, + 0xb8, + 0x00, + 0xb9, + 0x00, + 0xba, + 0x00, + 0x48, + 0x00, + 0x49, + 0x00, + 0xbd, + 0x00, + 0x4b, + 0x00, + 0x4c, + 0x00, + 0x4d, + 0x00, + 0xc1, + 0x00, + 0xc2, + 0x00, + 0x50, + 0x00, + 0xc4, + 0x00, + 0x52, + 0x00, + 0x53, + 0x00, + 0x54, + 0x00, + 0x55, + 0x00, + 0x56, + 0x00, + 0xca, + 0x00, + 0xcb, + 0x00, + 0xcc, + 0x00, + 0xcd, + 0x00, + 0x5b, + 0x00, + 0xcf, + 0x00, + 0xd0, + 0x00, + 0xd1, + 0x00, + 0xd2, + 0x00, + 0xd3, + 0x00, + 0x61, + 0x00, + 0x62, + 0x00, + 0x24, + 0x01, + 0x25, + 0x01, + 0x26, + 0x01, + 0x66, + 0x00, + 0x02, + 0x00, + 0x67, + 0x00, + 0x02, + 0x00, + 0x68, + 0x00, + 0x69, + 0x00, + 0x6a, + 0x00, + 0x02, + 0x00, + 0x6b, + 0x00, + 0x69, + 0x00, + 0x27, + 0x01, + 0x28, + 0x01, + 0x29, + 0x01, + 0x2a, + 0x01, + 0x70, + 0x00, + 0x71, + 0x00, + 0x72, + 0x00, + 0x2b, + 0x01, + 0x74, + 0x00, + 0x75, + 0x00, + 0x76, + 0x00, + 0x69, + 0x00, + 0x11, + 0x02, + 0x00, + 0x00, + 0x18, + 0x00, + 0x00, + 0x00, + 0x22, + 0x01, + 0x23, + 0x01, + 0x79, + 0x00, + 0x02, + 0x00, + 0x7a, + 0x00, + 0x7b, + 0x00, + 0x7c, + 0x00, + 0x7d, + 0x00, + 0x7e, + 0x00, + 0x7f, + 0x00, + 0x04, + 0x00, + 0x80, + 0x00, + 0x81, + 0x00, + 0x82, + 0x00, + 0x83, + 0x00, + 0x02, + 0x00, + 0x18, + 0x00, + 0x85, + 0x00, + 0x86, + 0x00, + 0x87, + 0x00, + 0x66, + 0x00, + 0x02, + 0x00, + 0x88, + 0x00, + 0x69, + 0x00, + 0x52, + 0x00, + 0x00, + 0x00, + 0x05, + 0x00, + 0x00, + 0x00, + 0x22, + 0x01, + 0x23, + 0x01, + 0x66, + 0x00, + 0x02, + 0x00, + 0x69, + 0x00, + 0xbf, + 0x0a, + 0x00, + 0x00, + 0x97, + 0x00, + 0x00, + 0x00, + 0x22, + 0x01, + 0x23, + 0x01, + 0x79, + 0x00, + 0x02, + 0x00, + 0x7a, + 0x00, + 0x7b, + 0x00, + 0x7c, + 0x00, + 0x7d, + 0x00, + 0x7e, + 0x00, + 0x7f, + 0x00, + 0x04, + 0x00, + 0x89, + 0x00, + 0x8a, + 0x00, + 0x8b, + 0x00, + 0x17, + 0x00, + 0x02, + 0x00, + 0x18, + 0x00, + 0x19, + 0x00, + 0x1a, + 0x00, + 0x1b, + 0x00, + 0x1c, + 0x00, + 0x1d, + 0x00, + 0x1e, + 0x00, + 0x1f, + 0x00, + 0x20, + 0x00, + 0x21, + 0x00, + 0x22, + 0x00, + 0x23, + 0x00, + 0x24, + 0x00, + 0x25, + 0x00, + 0x26, + 0x00, + 0x9a, + 0x00, + 0x9b, + 0x00, + 0x9c, + 0x00, + 0x2a, + 0x00, + 0x2b, + 0x00, + 0x2c, + 0x00, + 0x2d, + 0x00, + 0xa1, + 0x00, + 0xa2, + 0x00, + 0xa3, + 0x00, + 0xa4, + 0x00, + 0xa5, + 0x00, + 0xa6, + 0x00, + 0xa7, + 0x00, + 0xa8, + 0x00, + 0xa9, + 0x00, + 0xaa, + 0x00, + 0xab, + 0x00, + 0x39, + 0x00, + 0xad, + 0x00, + 0xae, + 0x00, + 0xaf, + 0x00, + 0x3d, + 0x00, + 0xb1, + 0x00, + 0xb2, + 0x00, + 0x40, + 0x00, + 0xb4, + 0x00, + 0xb5, + 0x00, + 0x43, + 0x00, + 0xb7, + 0x00, + 0xb8, + 0x00, + 0xb9, + 0x00, + 0xba, + 0x00, + 0x48, + 0x00, + 0x49, + 0x00, + 0xbd, + 0x00, + 0x4b, + 0x00, + 0x4c, + 0x00, + 0x4d, + 0x00, + 0xc1, + 0x00, + 0xc2, + 0x00, + 0x50, + 0x00, + 0xc4, + 0x00, + 0x52, + 0x00, + 0x53, + 0x00, + 0x54, + 0x00, + 0x55, + 0x00, + 0x56, + 0x00, + 0xca, + 0x00, + 0xcb, + 0x00, + 0xcc, + 0x00, + 0xcd, + 0x00, + 0x5b, + 0x00, + 0xcf, + 0x00, + 0xd0, + 0x00, + 0xd1, + 0x00, + 0xd2, + 0x00, + 0xd3, + 0x00, + 0x61, + 0x00, + 0x83, + 0x00, + 0x02, + 0x00, + 0x18, + 0x00, + 0x85, + 0x00, + 0x86, + 0x00, + 0x2c, + 0x01, + 0x2d, + 0x01, + 0x87, + 0x00, + 0x2e, + 0x01, + 0x02, + 0x00, + 0x2f, + 0x01, + 0xd8, + 0x00, + 0x02, + 0x00, + 0xd9, + 0x00, + 0x69, + 0x00, + 0x30, + 0x01, + 0x31, + 0x01, + 0xdc, + 0x00, + 0x02, + 0x00, + 0xdd, + 0x00, + 0x69, + 0x00, + 0x6a, + 0x00, + 0x02, + 0x00, + 0xde, + 0x00, + 0x69, + 0x00, + 0x32, + 0x01, + 0xe2, + 0x00, + 0xe3, + 0x00, + 0x02, + 0x00, + 0x33, + 0x01, + 0x34, + 0x01, + 0x69, + 0x00, + 0x6a, + 0x00, + 0x02, + 0x00, + 0xe8, + 0x00, + 0x69, + 0x00, + 0xe9, + 0x00, + 0xea, + 0x00, + 0xeb, + 0x00, + 0x02, + 0x00, + 0x35, + 0x01, + 0x69, + 0x00, + 0x6a, + 0x00, + 0x02, + 0x00, + 0xf1, + 0x00, + 0x69, + 0x00, + 0xf2, + 0x00, + 0xf3, + 0x00, + 0xf4, + 0x00, + 0xf5, + 0x00, + 0xf6, + 0x00, + 0xd9, + 0x00, + 0x69, + 0x00, + 0x66, + 0x00, + 0x02, + 0x00, + 0xf7, + 0x00, + 0xf8, + 0x00, + 0x36, + 0x01, + 0xfa, + 0x00, + 0xfb, + 0x00, + 0x69, + 0x00, + 0xcc, + 0x02, + 0x00, + 0x00, + 0x1c, + 0x00, + 0x00, + 0x00, + 0x22, + 0x01, + 0x23, + 0x01, + 0x05, + 0x00, + 0x02, + 0x00, + 0x06, + 0x00, + 0x07, + 0x00, + 0x08, + 0x00, + 0x09, + 0x00, + 0x0a, + 0x00, + 0x0b, + 0x00, + 0x0c, + 0x00, + 0x04, + 0x00, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x10, + 0x00, + 0x03, + 0x01, + 0x14, + 0x00, + 0x02, + 0x00, + 0x15, + 0x00, + 0x16, + 0x00, + 0x37, + 0x01, + 0x38, + 0x01, + 0x66, + 0x00, + 0x02, + 0x00, + 0x06, + 0x01, + 0x07, + 0x01, + 0x69, + 0x00, + 0x92, + 0x00, + 0x00, + 0x00, + 0x07, + 0x00, + 0x00, + 0x00, + 0x22, + 0x01, + 0x23, + 0x01, + 0x87, + 0x00, + 0x66, + 0x00, + 0x02, + 0x00, + 0x08, + 0x01, + 0x69, + 0x00, + 0x66, + 0x0b, + 0x00, + 0x00, + 0x90, + 0x00, + 0x00, + 0x00, + 0x22, + 0x01, + 0x23, + 0x01, + 0x01, + 0x00, + 0x02, + 0x00, + 0x03, + 0x00, + 0x04, + 0x00, + 0x05, + 0x00, + 0x02, + 0x00, + 0x06, + 0x00, + 0x07, + 0x00, + 0x08, + 0x00, + 0x09, + 0x00, + 0x0a, + 0x00, + 0x0b, + 0x00, + 0x0c, + 0x00, + 0x04, + 0x00, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x10, + 0x00, + 0x0a, + 0x01, + 0x0b, + 0x01, + 0x0f, + 0x00, + 0x0c, + 0x01, + 0x11, + 0x00, + 0x12, + 0x00, + 0x0f, + 0x00, + 0x13, + 0x00, + 0x14, + 0x00, + 0x02, + 0x00, + 0x15, + 0x00, + 0x16, + 0x00, + 0x17, + 0x00, + 0x02, + 0x00, + 0x18, + 0x00, + 0x19, + 0x00, + 0x1a, + 0x00, + 0x1b, + 0x00, + 0x1c, + 0x00, + 0x1d, + 0x00, + 0x1e, + 0x00, + 0x1f, + 0x00, + 0x20, + 0x00, + 0x21, + 0x00, + 0x22, + 0x00, + 0x23, + 0x00, + 0x24, + 0x00, + 0x25, + 0x00, + 0x26, + 0x00, + 0x9a, + 0x00, + 0x9b, + 0x00, + 0x9c, + 0x00, + 0x2a, + 0x00, + 0x2b, + 0x00, + 0x2c, + 0x00, + 0x2d, + 0x00, + 0xa1, + 0x00, + 0xa2, + 0x00, + 0xa3, + 0x00, + 0xa4, + 0x00, + 0xa5, + 0x00, + 0xa6, + 0x00, + 0xa7, + 0x00, + 0xa8, + 0x00, + 0xa9, + 0x00, + 0xaa, + 0x00, + 0xab, + 0x00, + 0x39, + 0x00, + 0xad, + 0x00, + 0xae, + 0x00, + 0xaf, + 0x00, + 0x3d, + 0x00, + 0xb1, + 0x00, + 0xb2, + 0x00, + 0x40, + 0x00, + 0xb4, + 0x00, + 0xb5, + 0x00, + 0x43, + 0x00, + 0xb7, + 0x00, + 0xb8, + 0x00, + 0xb9, + 0x00, + 0xba, + 0x00, + 0x48, + 0x00, + 0x49, + 0x00, + 0xbd, + 0x00, + 0x4b, + 0x00, + 0x4c, + 0x00, + 0x4d, + 0x00, + 0xc1, + 0x00, + 0xc2, + 0x00, + 0x50, + 0x00, + 0xc4, + 0x00, + 0x52, + 0x00, + 0x53, + 0x00, + 0x54, + 0x00, + 0x55, + 0x00, + 0x56, + 0x00, + 0xca, + 0x00, + 0xcb, + 0x00, + 0xcc, + 0x00, + 0xcd, + 0x00, + 0x5b, + 0x00, + 0xcf, + 0x00, + 0xd0, + 0x00, + 0xd1, + 0x00, + 0xd2, + 0x00, + 0xd3, + 0x00, + 0x61, + 0x00, + 0x24, + 0x01, + 0x62, + 0x00, + 0x25, + 0x01, + 0x26, + 0x01, + 0x66, + 0x00, + 0x02, + 0x00, + 0x67, + 0x00, + 0x02, + 0x00, + 0x68, + 0x00, + 0x69, + 0x00, + 0x6a, + 0x00, + 0x02, + 0x00, + 0x6b, + 0x00, + 0x69, + 0x00, + 0x39, + 0x01, + 0x3a, + 0x01, + 0x3b, + 0x01, + 0x3c, + 0x01, + 0x3d, + 0x01, + 0x3e, + 0x01, + 0x3f, + 0x01, + 0x40, + 0x01, + 0x41, + 0x01, + 0x42, + 0x01, + 0x43, + 0x01, + 0x44, + 0x01, + 0x45, + 0x01, + 0x46, + 0x01, + 0x47, + 0x01, + 0x48, + 0x01, + 0x49, + 0x01, + 0x4a, + 0x01, + 0x4b, + 0x01, + 0x4c, + 0x01, + 0x4d, + 0x01, + 0x69, + 0x00, + 0x4c, + 0x54, + 0x45, + 0x4d, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0xc4, + 0x08, + 0x00, + 0x00, + 0x12, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x86, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x01, + 0x96, + 0x01, + 0x00, + 0x00, + 0x01, + 0x10, + 0x00, + 0x86, + 0x00, + 0x00, + 0x00, + 0x01, + 0x10, + 0x01, + 0xcc, + 0x01, + 0x00, + 0x00, + 0x01, + 0x20, + 0x01, + 0xe6, + 0x01, + 0x00, + 0x00, + 0x01, + 0x30, + 0x01, + 0x4e, + 0x03, + 0x00, + 0x00, + 0x01, + 0x44, + 0x01, + 0xb2, + 0x03, + 0x00, + 0x00, + 0x01, + 0x80, + 0x00, + 0xdc, + 0x03, + 0x00, + 0x00, + 0x01, + 0x90, + 0x00, + 0xdc, + 0x03, + 0x00, + 0x00, + 0x02, + 0x00, + 0x00, + 0x16, + 0x05, + 0x00, + 0x00, + 0x02, + 0x00, + 0x01, + 0x96, + 0x01, + 0x00, + 0x00, + 0x02, + 0x10, + 0x00, + 0x16, + 0x05, + 0x00, + 0x00, + 0x02, + 0x10, + 0x01, + 0xcc, + 0x01, + 0x00, + 0x00, + 0x02, + 0x20, + 0x01, + 0x26, + 0x06, + 0x00, + 0x00, + 0x02, + 0x30, + 0x01, + 0x4e, + 0x03, + 0x00, + 0x00, + 0x02, + 0x44, + 0x01, + 0xb2, + 0x03, + 0x00, + 0x00, + 0x02, + 0x80, + 0x00, + 0x8a, + 0x07, + 0x00, + 0x00, + 0x02, + 0x90, + 0x00, + 0x8a, + 0x07, + 0x00, + 0x00, + 0xea, + 0x0d, + 0x00, + 0x00, + 0x84, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x01, + 0x4f, + 0x01, + 0x50, + 0x01, + 0x51, + 0x01, + 0x50, + 0x01, + 0x05, + 0x00, + 0x02, + 0x00, + 0x52, + 0x01, + 0x53, + 0x01, + 0x54, + 0x01, + 0x55, + 0x01, + 0x56, + 0x01, + 0x57, + 0x01, + 0x58, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x59, + 0x01, + 0x50, + 0x01, + 0x5a, + 0x01, + 0x02, + 0x00, + 0x5b, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0x5c, + 0x01, + 0x02, + 0x00, + 0x5d, + 0x01, + 0x5e, + 0x01, + 0x5f, + 0x01, + 0x60, + 0x01, + 0x61, + 0x01, + 0x62, + 0x01, + 0x63, + 0x01, + 0x64, + 0x01, + 0x65, + 0x01, + 0x66, + 0x01, + 0x67, + 0x01, + 0x68, + 0x01, + 0x69, + 0x01, + 0x6a, + 0x01, + 0x6b, + 0x01, + 0x6c, + 0x01, + 0x6d, + 0x01, + 0x6e, + 0x01, + 0x6f, + 0x01, + 0x70, + 0x01, + 0x71, + 0x01, + 0x72, + 0x01, + 0x73, + 0x01, + 0x74, + 0x01, + 0x75, + 0x01, + 0x76, + 0x01, + 0x77, + 0x01, + 0x78, + 0x01, + 0x79, + 0x01, + 0x7a, + 0x01, + 0x7b, + 0x01, + 0x7c, + 0x01, + 0x7d, + 0x01, + 0x7e, + 0x01, + 0x7f, + 0x01, + 0x80, + 0x01, + 0x81, + 0x01, + 0x82, + 0x01, + 0x83, + 0x01, + 0x84, + 0x01, + 0x85, + 0x01, + 0x86, + 0x01, + 0x87, + 0x01, + 0x88, + 0x01, + 0x89, + 0x01, + 0x8a, + 0x01, + 0x8b, + 0x01, + 0x8c, + 0x01, + 0x8d, + 0x01, + 0x8e, + 0x01, + 0x8f, + 0x01, + 0x90, + 0x01, + 0x91, + 0x01, + 0x92, + 0x01, + 0x93, + 0x01, + 0x94, + 0x01, + 0x95, + 0x01, + 0x96, + 0x01, + 0x97, + 0x01, + 0x98, + 0x01, + 0x99, + 0x01, + 0x9a, + 0x01, + 0x9b, + 0x01, + 0x9c, + 0x01, + 0x9d, + 0x01, + 0x9e, + 0x01, + 0x9f, + 0x01, + 0xa0, + 0x01, + 0xa1, + 0x01, + 0xa2, + 0x01, + 0xa3, + 0x01, + 0xa4, + 0x01, + 0xa5, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xa6, + 0x01, + 0x02, + 0x00, + 0xa7, + 0x01, + 0xa8, + 0x01, + 0xa9, + 0x01, + 0xaa, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xab, + 0x01, + 0x02, + 0x00, + 0xac, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xad, + 0x01, + 0x02, + 0x00, + 0xae, + 0x01, + 0xaf, + 0x01, + 0xb0, + 0x01, + 0xb1, + 0x01, + 0xb2, + 0x01, + 0xb3, + 0x01, + 0xb4, + 0x01, + 0xb5, + 0x01, + 0xb6, + 0x01, + 0xb7, + 0x01, + 0xb8, + 0x01, + 0xb9, + 0x01, + 0x69, + 0x00, + 0x50, + 0x01, + 0x92, + 0x01, + 0x00, + 0x00, + 0x17, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x01, + 0x4f, + 0x01, + 0x50, + 0x01, + 0x51, + 0x01, + 0x50, + 0x01, + 0xba, + 0x01, + 0x02, + 0x00, + 0xbb, + 0x01, + 0xbc, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xa6, + 0x01, + 0x02, + 0x00, + 0xbd, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xbe, + 0x01, + 0x02, + 0x00, + 0xae, + 0x01, + 0xbf, + 0x01, + 0xb9, + 0x01, + 0x69, + 0x00, + 0x50, + 0x01, + 0x64, + 0x00, + 0x00, + 0x00, + 0x09, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x01, + 0x4f, + 0x01, + 0x50, + 0x01, + 0x51, + 0x01, + 0x50, + 0x01, + 0xc0, + 0x01, + 0x02, + 0x00, + 0x69, + 0x00, + 0x50, + 0x01, + 0x6a, + 0x16, + 0x00, + 0x00, + 0xb0, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x01, + 0x4f, + 0x01, + 0x50, + 0x01, + 0x51, + 0x01, + 0x50, + 0x01, + 0x5c, + 0x01, + 0x02, + 0x00, + 0x5d, + 0x01, + 0x5e, + 0x01, + 0x5f, + 0x01, + 0x60, + 0x01, + 0x61, + 0x01, + 0x62, + 0x01, + 0x63, + 0x01, + 0x64, + 0x01, + 0x65, + 0x01, + 0x66, + 0x01, + 0x67, + 0x01, + 0x68, + 0x01, + 0x69, + 0x01, + 0x6a, + 0x01, + 0x6b, + 0x01, + 0x6c, + 0x01, + 0x6d, + 0x01, + 0x6e, + 0x01, + 0x6f, + 0x01, + 0x70, + 0x01, + 0x71, + 0x01, + 0x72, + 0x01, + 0x73, + 0x01, + 0x74, + 0x01, + 0x75, + 0x01, + 0x76, + 0x01, + 0x77, + 0x01, + 0x78, + 0x01, + 0x79, + 0x01, + 0x7a, + 0x01, + 0x7b, + 0x01, + 0x7c, + 0x01, + 0x7d, + 0x01, + 0x7e, + 0x01, + 0x7f, + 0x01, + 0x80, + 0x01, + 0x81, + 0x01, + 0x82, + 0x01, + 0x83, + 0x01, + 0x84, + 0x01, + 0x85, + 0x01, + 0x86, + 0x01, + 0x87, + 0x01, + 0x88, + 0x01, + 0x89, + 0x01, + 0x8a, + 0x01, + 0x8b, + 0x01, + 0x8c, + 0x01, + 0x8d, + 0x01, + 0x8e, + 0x01, + 0x8f, + 0x01, + 0x90, + 0x01, + 0x91, + 0x01, + 0x92, + 0x01, + 0x93, + 0x01, + 0x94, + 0x01, + 0x95, + 0x01, + 0x96, + 0x01, + 0x97, + 0x01, + 0x98, + 0x01, + 0x99, + 0x01, + 0x9a, + 0x01, + 0x9b, + 0x01, + 0x9c, + 0x01, + 0x9d, + 0x01, + 0x9e, + 0x01, + 0x9f, + 0x01, + 0xa0, + 0x01, + 0xa1, + 0x01, + 0xa2, + 0x01, + 0xa3, + 0x01, + 0xa4, + 0x01, + 0xa5, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xba, + 0x01, + 0x02, + 0x00, + 0xbb, + 0x01, + 0xbc, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xc1, + 0x01, + 0xc2, + 0x01, + 0xc3, + 0x01, + 0xc4, + 0x01, + 0xc5, + 0x01, + 0xc6, + 0x01, + 0xc7, + 0x01, + 0xc8, + 0x01, + 0xc9, + 0x01, + 0xca, + 0x01, + 0xcb, + 0x01, + 0xcc, + 0x01, + 0xcd, + 0x01, + 0xce, + 0x01, + 0xcf, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xa6, + 0x01, + 0x02, + 0x00, + 0xbd, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xab, + 0x01, + 0x02, + 0x00, + 0xa7, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xd0, + 0x01, + 0x02, + 0x00, + 0xae, + 0x01, + 0xd1, + 0x01, + 0xd2, + 0x01, + 0xd3, + 0x01, + 0xd4, + 0x01, + 0xd5, + 0x01, + 0xd6, + 0x01, + 0xd7, + 0x01, + 0xd8, + 0x01, + 0xd9, + 0x01, + 0xda, + 0x01, + 0xdb, + 0x01, + 0xdc, + 0x01, + 0xdd, + 0x01, + 0xde, + 0x01, + 0xdf, + 0x01, + 0xe0, + 0x01, + 0xd9, + 0x01, + 0xe1, + 0x01, + 0xdc, + 0x01, + 0xe2, + 0x01, + 0xd9, + 0x01, + 0xe3, + 0x01, + 0xdc, + 0x01, + 0xe4, + 0x01, + 0xe5, + 0x01, + 0xe6, + 0x01, + 0xe7, + 0x01, + 0xd9, + 0x01, + 0xe8, + 0x01, + 0xe9, + 0x01, + 0xdc, + 0x01, + 0xe2, + 0x01, + 0xd9, + 0x01, + 0xea, + 0x01, + 0xdc, + 0x01, + 0xeb, + 0x01, + 0xec, + 0x01, + 0xed, + 0x01, + 0xd9, + 0x01, + 0xee, + 0x01, + 0xdc, + 0x01, + 0xe2, + 0x01, + 0xd9, + 0x01, + 0xef, + 0x01, + 0xdc, + 0x01, + 0xf0, + 0x01, + 0xf1, + 0x01, + 0xf2, + 0x01, + 0xf3, + 0x01, + 0xf4, + 0x01, + 0xf5, + 0x01, + 0xf6, + 0x01, + 0xf7, + 0x01, + 0xf8, + 0x01, + 0xf9, + 0x01, + 0xb9, + 0x01, + 0x69, + 0x00, + 0x50, + 0x01, + 0xbc, + 0x03, + 0x00, + 0x00, + 0x2e, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x01, + 0x4f, + 0x01, + 0x50, + 0x01, + 0x51, + 0x01, + 0x50, + 0x01, + 0x05, + 0x00, + 0x02, + 0x00, + 0x52, + 0x01, + 0x53, + 0x01, + 0x54, + 0x01, + 0x55, + 0x01, + 0x56, + 0x01, + 0x57, + 0x01, + 0x58, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x59, + 0x01, + 0x50, + 0x01, + 0x5a, + 0x01, + 0x02, + 0x00, + 0x5b, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xfa, + 0x01, + 0x50, + 0x01, + 0xa6, + 0x01, + 0x02, + 0x00, + 0xfb, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xab, + 0x01, + 0x02, + 0x00, + 0xa8, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xfc, + 0x01, + 0x02, + 0x00, + 0xae, + 0x01, + 0xfd, + 0x01, + 0xfe, + 0x01, + 0xb9, + 0x01, + 0x69, + 0x00, + 0x50, + 0x01, + 0xec, + 0x00, + 0x00, + 0x00, + 0x11, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x01, + 0x4f, + 0x01, + 0x50, + 0x01, + 0x51, + 0x01, + 0x50, + 0x01, + 0xa6, + 0x01, + 0x02, + 0x00, + 0xbd, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xff, + 0x01, + 0x02, + 0x00, + 0xae, + 0x01, + 0x00, + 0x02, + 0xb9, + 0x01, + 0x69, + 0x00, + 0x50, + 0x01, + 0x1a, + 0x12, + 0x00, + 0x00, + 0x99, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x01, + 0x4f, + 0x01, + 0x50, + 0x01, + 0x51, + 0x01, + 0x50, + 0x01, + 0x05, + 0x00, + 0x02, + 0x00, + 0x52, + 0x01, + 0x53, + 0x01, + 0x54, + 0x01, + 0x55, + 0x01, + 0x56, + 0x01, + 0x57, + 0x01, + 0x58, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x59, + 0x01, + 0x50, + 0x01, + 0x5a, + 0x01, + 0x02, + 0x00, + 0x5b, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0x01, + 0x02, + 0x02, + 0x02, + 0x50, + 0x01, + 0x5c, + 0x01, + 0x02, + 0x00, + 0x5d, + 0x01, + 0x5e, + 0x01, + 0x5f, + 0x01, + 0x60, + 0x01, + 0x61, + 0x01, + 0x62, + 0x01, + 0x63, + 0x01, + 0x64, + 0x01, + 0x65, + 0x01, + 0x66, + 0x01, + 0x67, + 0x01, + 0x68, + 0x01, + 0x69, + 0x01, + 0x6a, + 0x01, + 0x6b, + 0x01, + 0x6c, + 0x01, + 0x6d, + 0x01, + 0x6e, + 0x01, + 0x6f, + 0x01, + 0x70, + 0x01, + 0x71, + 0x01, + 0x72, + 0x01, + 0x73, + 0x01, + 0x74, + 0x01, + 0x75, + 0x01, + 0x76, + 0x01, + 0x77, + 0x01, + 0x78, + 0x01, + 0x79, + 0x01, + 0x7a, + 0x01, + 0x7b, + 0x01, + 0x7c, + 0x01, + 0x7d, + 0x01, + 0x7e, + 0x01, + 0x7f, + 0x01, + 0x80, + 0x01, + 0x81, + 0x01, + 0x82, + 0x01, + 0x83, + 0x01, + 0x84, + 0x01, + 0x85, + 0x01, + 0x86, + 0x01, + 0x87, + 0x01, + 0x88, + 0x01, + 0x89, + 0x01, + 0x8a, + 0x01, + 0x8b, + 0x01, + 0x8c, + 0x01, + 0x8d, + 0x01, + 0x8e, + 0x01, + 0x8f, + 0x01, + 0x90, + 0x01, + 0x91, + 0x01, + 0x92, + 0x01, + 0x93, + 0x01, + 0x94, + 0x01, + 0x95, + 0x01, + 0x96, + 0x01, + 0x97, + 0x01, + 0x98, + 0x01, + 0x99, + 0x01, + 0x9a, + 0x01, + 0x9b, + 0x01, + 0x9c, + 0x01, + 0x9d, + 0x01, + 0x9e, + 0x01, + 0x9f, + 0x01, + 0xa0, + 0x01, + 0xa1, + 0x01, + 0xa2, + 0x01, + 0xa3, + 0x01, + 0xa4, + 0x01, + 0xa5, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xa6, + 0x01, + 0x02, + 0x00, + 0xa7, + 0x01, + 0xa8, + 0x01, + 0xa9, + 0x01, + 0xaa, + 0x01, + 0x03, + 0x02, + 0x04, + 0x02, + 0x05, + 0x02, + 0x04, + 0x00, + 0x50, + 0x01, + 0xab, + 0x01, + 0x02, + 0x00, + 0xac, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xad, + 0x01, + 0x02, + 0x00, + 0xae, + 0x01, + 0xaf, + 0x01, + 0x06, + 0x02, + 0x07, + 0x02, + 0x08, + 0x02, + 0x09, + 0x02, + 0x0a, + 0x02, + 0x0b, + 0x02, + 0x0c, + 0x02, + 0x0d, + 0x02, + 0x0e, + 0x02, + 0x0f, + 0x02, + 0x10, + 0x02, + 0x11, + 0x02, + 0x12, + 0x02, + 0x13, + 0x02, + 0x14, + 0x02, + 0x15, + 0x02, + 0x16, + 0x02, + 0x17, + 0x02, + 0x18, + 0x02, + 0x19, + 0x02, + 0x1a, + 0x02, + 0x1b, + 0x02, + 0x1c, + 0x02, + 0x1d, + 0x02, + 0xb9, + 0x01, + 0x69, + 0x00, + 0x50, + 0x01, + 0xea, + 0x0d, + 0x00, + 0x00, + 0x84, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x01, + 0x4f, + 0x01, + 0x50, + 0x01, + 0x51, + 0x01, + 0x50, + 0x01, + 0x05, + 0x00, + 0x02, + 0x00, + 0x52, + 0x01, + 0x53, + 0x01, + 0x54, + 0x01, + 0x55, + 0x01, + 0x56, + 0x01, + 0x57, + 0x01, + 0x58, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x59, + 0x01, + 0x50, + 0x01, + 0x5a, + 0x01, + 0x02, + 0x00, + 0x5b, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0x5c, + 0x01, + 0x02, + 0x00, + 0x5d, + 0x01, + 0x5e, + 0x01, + 0x5f, + 0x01, + 0x60, + 0x01, + 0x61, + 0x01, + 0x62, + 0x01, + 0x63, + 0x01, + 0x64, + 0x01, + 0x65, + 0x01, + 0x66, + 0x01, + 0x67, + 0x01, + 0x68, + 0x01, + 0x69, + 0x01, + 0x6a, + 0x01, + 0x6b, + 0x01, + 0x6c, + 0x01, + 0x6d, + 0x01, + 0x6e, + 0x01, + 0x6f, + 0x01, + 0x70, + 0x01, + 0x71, + 0x01, + 0x72, + 0x01, + 0x73, + 0x01, + 0x74, + 0x01, + 0x75, + 0x01, + 0x76, + 0x01, + 0x77, + 0x01, + 0x78, + 0x01, + 0x79, + 0x01, + 0x7a, + 0x01, + 0x7b, + 0x01, + 0x7c, + 0x01, + 0x7d, + 0x01, + 0x7e, + 0x01, + 0x7f, + 0x01, + 0x80, + 0x01, + 0x81, + 0x01, + 0x82, + 0x01, + 0x83, + 0x01, + 0x84, + 0x01, + 0x85, + 0x01, + 0x86, + 0x01, + 0x87, + 0x01, + 0x88, + 0x01, + 0x89, + 0x01, + 0x8a, + 0x01, + 0x8b, + 0x01, + 0x8c, + 0x01, + 0x8d, + 0x01, + 0x8e, + 0x01, + 0x8f, + 0x01, + 0x90, + 0x01, + 0x91, + 0x01, + 0x92, + 0x01, + 0x93, + 0x01, + 0x94, + 0x01, + 0x95, + 0x01, + 0x96, + 0x01, + 0x97, + 0x01, + 0x98, + 0x01, + 0x99, + 0x01, + 0x9a, + 0x01, + 0x9b, + 0x01, + 0x9c, + 0x01, + 0x9d, + 0x01, + 0x9e, + 0x01, + 0x9f, + 0x01, + 0xa0, + 0x01, + 0xa1, + 0x01, + 0xa2, + 0x01, + 0xa3, + 0x01, + 0xa4, + 0x01, + 0xa5, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xa6, + 0x01, + 0x02, + 0x00, + 0xa7, + 0x01, + 0xa8, + 0x01, + 0xa9, + 0x01, + 0xaa, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xab, + 0x01, + 0x02, + 0x00, + 0xac, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xad, + 0x01, + 0x02, + 0x00, + 0xae, + 0x01, + 0xaf, + 0x01, + 0x1e, + 0x02, + 0x1f, + 0x02, + 0x20, + 0x02, + 0x21, + 0x02, + 0x22, + 0x02, + 0x23, + 0x02, + 0x24, + 0x02, + 0xb7, + 0x01, + 0xb8, + 0x01, + 0xb9, + 0x01, + 0x69, + 0x00, + 0x50, + 0x01, + 0x12, + 0x16, + 0x00, + 0x00, + 0xae, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x01, + 0x4f, + 0x01, + 0x50, + 0x01, + 0x51, + 0x01, + 0x50, + 0x01, + 0x5c, + 0x01, + 0x02, + 0x00, + 0x5d, + 0x01, + 0x5e, + 0x01, + 0x5f, + 0x01, + 0x60, + 0x01, + 0x61, + 0x01, + 0x62, + 0x01, + 0x63, + 0x01, + 0x64, + 0x01, + 0x65, + 0x01, + 0x66, + 0x01, + 0x67, + 0x01, + 0x68, + 0x01, + 0x69, + 0x01, + 0x6a, + 0x01, + 0x6b, + 0x01, + 0x6c, + 0x01, + 0x6d, + 0x01, + 0x6e, + 0x01, + 0x6f, + 0x01, + 0x70, + 0x01, + 0x71, + 0x01, + 0x72, + 0x01, + 0x73, + 0x01, + 0x74, + 0x01, + 0x75, + 0x01, + 0x76, + 0x01, + 0x77, + 0x01, + 0x78, + 0x01, + 0x79, + 0x01, + 0x7a, + 0x01, + 0x7b, + 0x01, + 0x7c, + 0x01, + 0x7d, + 0x01, + 0x7e, + 0x01, + 0x7f, + 0x01, + 0x80, + 0x01, + 0x81, + 0x01, + 0x82, + 0x01, + 0x83, + 0x01, + 0x84, + 0x01, + 0x85, + 0x01, + 0x86, + 0x01, + 0x87, + 0x01, + 0x88, + 0x01, + 0x89, + 0x01, + 0x8a, + 0x01, + 0x8b, + 0x01, + 0x8c, + 0x01, + 0x8d, + 0x01, + 0x8e, + 0x01, + 0x8f, + 0x01, + 0x90, + 0x01, + 0x91, + 0x01, + 0x92, + 0x01, + 0x93, + 0x01, + 0x94, + 0x01, + 0x95, + 0x01, + 0x96, + 0x01, + 0x97, + 0x01, + 0x98, + 0x01, + 0x99, + 0x01, + 0x9a, + 0x01, + 0x9b, + 0x01, + 0x9c, + 0x01, + 0x9d, + 0x01, + 0x9e, + 0x01, + 0x9f, + 0x01, + 0xa0, + 0x01, + 0xa1, + 0x01, + 0xa2, + 0x01, + 0xa3, + 0x01, + 0xa4, + 0x01, + 0xa5, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xba, + 0x01, + 0x02, + 0x00, + 0xbb, + 0x01, + 0xbc, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xc1, + 0x01, + 0xc2, + 0x01, + 0xc3, + 0x01, + 0xc4, + 0x01, + 0xc5, + 0x01, + 0xc6, + 0x01, + 0xc7, + 0x01, + 0xc8, + 0x01, + 0xc9, + 0x01, + 0xca, + 0x01, + 0xcb, + 0x01, + 0xcc, + 0x01, + 0xcd, + 0x01, + 0xce, + 0x01, + 0xcf, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xa6, + 0x01, + 0x02, + 0x00, + 0xbd, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xab, + 0x01, + 0x02, + 0x00, + 0xa7, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xd0, + 0x01, + 0x02, + 0x00, + 0xae, + 0x01, + 0xbf, + 0x01, + 0xd3, + 0x01, + 0x25, + 0x02, + 0x26, + 0x02, + 0xd5, + 0x01, + 0xd6, + 0x01, + 0xd7, + 0x01, + 0xd8, + 0x01, + 0xd9, + 0x01, + 0x27, + 0x02, + 0xdb, + 0x01, + 0xdc, + 0x01, + 0xdd, + 0x01, + 0xde, + 0x01, + 0xdf, + 0x01, + 0xe0, + 0x01, + 0xd9, + 0x01, + 0xe1, + 0x01, + 0xdc, + 0x01, + 0xe2, + 0x01, + 0xd9, + 0x01, + 0xe3, + 0x01, + 0xdc, + 0x01, + 0x28, + 0x02, + 0x29, + 0x02, + 0xe7, + 0x01, + 0xd9, + 0x01, + 0x2a, + 0x02, + 0x2b, + 0x02, + 0xdc, + 0x01, + 0xe2, + 0x01, + 0xd9, + 0x01, + 0x2c, + 0x02, + 0xdc, + 0x01, + 0x2d, + 0x02, + 0x2e, + 0x02, + 0xed, + 0x01, + 0xd9, + 0x01, + 0x2f, + 0x02, + 0xdc, + 0x01, + 0xe2, + 0x01, + 0xd9, + 0x01, + 0xef, + 0x01, + 0xdc, + 0x01, + 0x30, + 0x02, + 0x31, + 0x02, + 0xf3, + 0x01, + 0xf4, + 0x01, + 0xf5, + 0x01, + 0xf6, + 0x01, + 0xf7, + 0x01, + 0xf8, + 0x01, + 0x32, + 0x02, + 0xb9, + 0x01, + 0x69, + 0x00, + 0x50, + 0x01, + 0x3b, + 0x12, + 0x00, + 0x00, + 0x99, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x01, + 0x4f, + 0x01, + 0x50, + 0x01, + 0x51, + 0x01, + 0x50, + 0x01, + 0x05, + 0x00, + 0x02, + 0x00, + 0x52, + 0x01, + 0x53, + 0x01, + 0x54, + 0x01, + 0x55, + 0x01, + 0x56, + 0x01, + 0x57, + 0x01, + 0x58, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x59, + 0x01, + 0x50, + 0x01, + 0x5a, + 0x01, + 0x02, + 0x00, + 0x5b, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0x01, + 0x02, + 0x02, + 0x02, + 0x50, + 0x01, + 0x5c, + 0x01, + 0x02, + 0x00, + 0x5d, + 0x01, + 0x5e, + 0x01, + 0x5f, + 0x01, + 0x60, + 0x01, + 0x61, + 0x01, + 0x62, + 0x01, + 0x63, + 0x01, + 0x64, + 0x01, + 0x65, + 0x01, + 0x66, + 0x01, + 0x67, + 0x01, + 0x68, + 0x01, + 0x69, + 0x01, + 0x6a, + 0x01, + 0x6b, + 0x01, + 0x6c, + 0x01, + 0x6d, + 0x01, + 0x6e, + 0x01, + 0x6f, + 0x01, + 0x70, + 0x01, + 0x71, + 0x01, + 0x72, + 0x01, + 0x73, + 0x01, + 0x74, + 0x01, + 0x75, + 0x01, + 0x76, + 0x01, + 0x77, + 0x01, + 0x78, + 0x01, + 0x79, + 0x01, + 0x7a, + 0x01, + 0x7b, + 0x01, + 0x7c, + 0x01, + 0x7d, + 0x01, + 0x7e, + 0x01, + 0x7f, + 0x01, + 0x80, + 0x01, + 0x81, + 0x01, + 0x82, + 0x01, + 0x83, + 0x01, + 0x84, + 0x01, + 0x85, + 0x01, + 0x86, + 0x01, + 0x87, + 0x01, + 0x88, + 0x01, + 0x89, + 0x01, + 0x8a, + 0x01, + 0x8b, + 0x01, + 0x8c, + 0x01, + 0x8d, + 0x01, + 0x8e, + 0x01, + 0x8f, + 0x01, + 0x90, + 0x01, + 0x91, + 0x01, + 0x92, + 0x01, + 0x93, + 0x01, + 0x94, + 0x01, + 0x95, + 0x01, + 0x96, + 0x01, + 0x97, + 0x01, + 0x98, + 0x01, + 0x99, + 0x01, + 0x9a, + 0x01, + 0x9b, + 0x01, + 0x9c, + 0x01, + 0x9d, + 0x01, + 0x9e, + 0x01, + 0x9f, + 0x01, + 0xa0, + 0x01, + 0xa1, + 0x01, + 0xa2, + 0x01, + 0xa3, + 0x01, + 0xa4, + 0x01, + 0xa5, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xa6, + 0x01, + 0x02, + 0x00, + 0xa7, + 0x01, + 0xa8, + 0x01, + 0xa9, + 0x01, + 0xaa, + 0x01, + 0x03, + 0x02, + 0x04, + 0x02, + 0x05, + 0x02, + 0x04, + 0x00, + 0x50, + 0x01, + 0xab, + 0x01, + 0x02, + 0x00, + 0xac, + 0x01, + 0x04, + 0x00, + 0x50, + 0x01, + 0xad, + 0x01, + 0x02, + 0x00, + 0xae, + 0x01, + 0xaf, + 0x01, + 0x33, + 0x02, + 0x34, + 0x02, + 0x35, + 0x02, + 0x36, + 0x02, + 0x37, + 0x02, + 0x38, + 0x02, + 0x39, + 0x02, + 0x3a, + 0x02, + 0x3b, + 0x02, + 0x3c, + 0x02, + 0x3d, + 0x02, + 0x3e, + 0x02, + 0x3f, + 0x02, + 0x40, + 0x02, + 0x41, + 0x02, + 0x42, + 0x02, + 0x43, + 0x02, + 0x44, + 0x02, + 0x45, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x48, + 0x02, + 0x1c, + 0x02, + 0x1d, + 0x02, + 0xb9, + 0x01, + 0x69, + 0x00, + 0x50, + 0x01, + +}; + +int GIZMO_GIZMO_OFFSET = 0; +int GIZMO_GIZMO_SIZE = 26876; diff --git a/thermion_dart/native/include/material/gizmo.h b/thermion_dart/native/include/material/gizmo.h new file mode 100644 index 00000000..fd62c71d --- /dev/null +++ b/thermion_dart/native/include/material/gizmo.h @@ -0,0 +1,18 @@ +#ifndef GIZMO_H_ +#define GIZMO_H_ + +#include + +#if defined(__cplusplus) +extern "C" +{ +#endif + extern const uint8_t GIZMO_PACKAGE[]; + extern int GIZMO_GIZMO_OFFSET; + extern int GIZMO_GIZMO_SIZE; +#if defined(__cplusplus) +} +#endif +#define GIZMO_GIZMO_DATA (GIZMO_PACKAGE + GIZMO_GIZMO_OFFSET) + +#endif diff --git a/ios/include/material/image.S b/thermion_dart/native/include/material/image.S similarity index 92% rename from ios/include/material/image.S rename to thermion_dart/native/include/material/image.S index 7b56aec6..f4b3dec5 100644 --- a/ios/include/material/image.S +++ b/thermion_dart/native/include/material/image.S @@ -8,5 +8,5 @@ IMAGE_PACKAGE: IMAGE_IMAGE_OFFSET: .int 0 IMAGE_IMAGE_SIZE: - .int 36070 + .int 37409 diff --git a/windows/include/material/image.apple.S b/thermion_dart/native/include/material/image.apple.S similarity index 93% rename from windows/include/material/image.apple.S rename to thermion_dart/native/include/material/image.apple.S index 8cd37a22..6b75e0d5 100644 --- a/windows/include/material/image.apple.S +++ b/thermion_dart/native/include/material/image.apple.S @@ -8,5 +8,5 @@ _IMAGE_PACKAGE: _IMAGE_IMAGE_OFFSET: .int 0 _IMAGE_IMAGE_SIZE: - .int 13681 + .int 37409 diff --git a/thermion_dart/native/include/material/image.bin b/thermion_dart/native/include/material/image.bin new file mode 100644 index 00000000..72fb882e Binary files /dev/null and b/thermion_dart/native/include/material/image.bin differ diff --git a/thermion_dart/native/include/material/image.c b/thermion_dart/native/include/material/image.c new file mode 100644 index 00000000..cb4390c0 --- /dev/null +++ b/thermion_dart/native/include/material/image.c @@ -0,0 +1,37420 @@ +#include + +#include "image.h" + +const uint8_t IMAGE_PACKAGE[] = { + // IMAGE + 0x53, + 0x52, + 0x45, + 0x56, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x04, + 0x00, + 0x00, + 0x00, + 0x33, + 0x00, + 0x00, + 0x00, + 0x54, + 0x41, + 0x45, + 0x46, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x45, + 0x4d, + 0x41, + 0x4e, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x06, + 0x00, + 0x00, + 0x00, + 0x49, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x00, + 0x4c, + 0x44, + 0x4d, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x04, + 0x00, + 0x00, + 0x00, + 0x06, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x4d, + 0x4f, + 0x44, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x54, + 0x4c, + 0x46, + 0x56, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x04, + 0x00, + 0x00, + 0x00, + 0x2c, + 0x00, + 0x00, + 0x00, + 0x46, + 0x49, + 0x4e, + 0x55, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x98, + 0x00, + 0x00, + 0x00, + 0x09, + 0x46, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x00, + 0x4f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x01, + 0x4c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x73, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x04, + 0x53, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x05, + 0x46, + 0x72, + 0x6f, + 0x78, + 0x65, + 0x6c, + 0x52, + 0x65, + 0x63, + 0x6f, + 0x72, + 0x64, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x06, + 0x46, + 0x72, + 0x6f, + 0x78, + 0x65, + 0x6c, + 0x73, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x07, + 0x42, + 0x6f, + 0x6e, + 0x65, + 0x73, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x02, + 0x4d, + 0x6f, + 0x72, + 0x70, + 0x68, + 0x69, + 0x6e, + 0x67, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x03, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x00, + 0x08, + 0x50, + 0x4d, + 0x41, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0xe1, + 0x00, + 0x00, + 0x00, + 0x04, + 0x00, + 0x02, + 0x07, + 0x07, + 0x01, + 0x02, + 0x09, + 0x07, + 0x01, + 0x0a, + 0x01, + 0x01, + 0x0b, + 0x00, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x4d, + 0x61, + 0x70, + 0x00, + 0x01, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x69, + 0x62, + 0x6c, + 0x44, + 0x46, + 0x47, + 0x00, + 0x02, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x69, + 0x62, + 0x6c, + 0x53, + 0x70, + 0x65, + 0x63, + 0x75, + 0x6c, + 0x61, + 0x72, + 0x00, + 0x03, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x73, + 0x61, + 0x6f, + 0x00, + 0x04, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x73, + 0x72, + 0x00, + 0x05, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x75, + 0x72, + 0x65, + 0x00, + 0x06, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x00, + 0x07, + 0x6d, + 0x6f, + 0x72, + 0x70, + 0x68, + 0x54, + 0x61, + 0x72, + 0x67, + 0x65, + 0x74, + 0x42, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x73, + 0x00, + 0x08, + 0x6d, + 0x6f, + 0x72, + 0x70, + 0x68, + 0x54, + 0x61, + 0x72, + 0x67, + 0x65, + 0x74, + 0x42, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x5f, + 0x74, + 0x61, + 0x6e, + 0x67, + 0x65, + 0x6e, + 0x74, + 0x73, + 0x00, + 0x09, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x00, + 0x0a, + 0x62, + 0x6f, + 0x6e, + 0x65, + 0x73, + 0x42, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x69, + 0x63, + 0x65, + 0x73, + 0x41, + 0x6e, + 0x64, + 0x57, + 0x65, + 0x69, + 0x67, + 0x68, + 0x74, + 0x73, + 0x00, + 0x20, + 0x42, + 0x49, + 0x55, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x59, + 0x00, + 0x00, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x00, + 0x03, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x11, + 0x02, + 0x62, + 0x61, + 0x63, + 0x6b, + 0x67, + 0x72, + 0x6f, + 0x75, + 0x6e, + 0x64, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x07, + 0x03, + 0x73, + 0x68, + 0x6f, + 0x77, + 0x49, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x08, + 0x03, + 0x20, + 0x42, + 0x49, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x21, + 0x00, + 0x00, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x00, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x00, + 0x00, + 0x02, + 0x03, + 0x00, + 0x53, + 0x4e, + 0x4f, + 0x43, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x08, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x20, + 0x42, + 0x55, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x17, + 0x00, + 0x00, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x53, + 0x53, + 0x4f, + 0x44, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x49, + 0x53, + 0x4f, + 0x44, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x4e, + 0x45, + 0x4c, + 0x42, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x44, + 0x4d, + 0x52, + 0x54, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x4c, + 0x46, + 0x45, + 0x52, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x49, + 0x52, + 0x57, + 0x43, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x53, + 0x57, + 0x45, + 0x44, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x49, + 0x52, + 0x57, + 0x44, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x53, + 0x45, + 0x54, + 0x44, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x54, + 0x53, + 0x4e, + 0x49, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x53, + 0x43, + 0x32, + 0x41, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x4f, + 0x43, + 0x32, + 0x41, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x4f, + 0x4d, + 0x55, + 0x43, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x50, + 0x4f, + 0x52, + 0x50, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x08, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x44, + 0x49, + 0x55, + 0x55, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x08, + 0x00, + 0x00, + 0x00, + 0x71, + 0x20, + 0x8a, + 0x14, + 0xbe, + 0xed, + 0x26, + 0x66, + 0x44, + 0x41, + 0x48, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x4c, + 0x4d, + 0x48, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x4d, + 0x46, + 0x45, + 0x52, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x54, + 0x46, + 0x45, + 0x52, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x52, + 0x4f, + 0x49, + 0x43, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x41, + 0x51, + 0x45, + 0x52, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x04, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x00, + 0x41, + 0x41, + 0x50, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x52, + 0x41, + 0x56, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x04, + 0x00, + 0x00, + 0x00, + 0x9a, + 0x99, + 0x19, + 0x3e, + 0x52, + 0x48, + 0x54, + 0x53, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x04, + 0x00, + 0x00, + 0x00, + 0xcd, + 0xcc, + 0x4c, + 0x3e, + 0x4f, + 0x44, + 0x45, + 0x56, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x03, + 0x52, + 0x54, + 0x4e, + 0x49, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x50, + 0x44, + 0x53, + 0x43, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x54, + 0x58, + 0x45, + 0x54, + 0x5f, + 0x43, + 0x49, + 0x44, + 0x89, + 0x75, + 0x00, + 0x00, + 0x7d, + 0x03, + 0x00, + 0x00, + 0x23, + 0x76, + 0x65, + 0x72, + 0x73, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x33, + 0x30, + 0x30, + 0x20, + 0x65, + 0x73, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x00, + 0x7b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x7d, + 0x3b, + 0x00, + 0x23, + 0x69, + 0x66, + 0x6e, + 0x64, + 0x65, + 0x66, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x35, + 0x00, + 0x23, + 0x64, + 0x65, + 0x66, + 0x69, + 0x6e, + 0x65, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x35, + 0x20, + 0x66, + 0x61, + 0x6c, + 0x73, + 0x65, + 0x00, + 0x23, + 0x65, + 0x6e, + 0x64, + 0x69, + 0x66, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x20, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x50, + 0x4f, + 0x57, + 0x45, + 0x52, + 0x5f, + 0x56, + 0x52, + 0x5f, + 0x53, + 0x48, + 0x41, + 0x44, + 0x45, + 0x52, + 0x5f, + 0x57, + 0x4f, + 0x52, + 0x4b, + 0x41, + 0x52, + 0x4f, + 0x55, + 0x4e, + 0x44, + 0x53, + 0x20, + 0x3d, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x35, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x73, + 0x74, + 0x64, + 0x31, + 0x34, + 0x30, + 0x29, + 0x20, + 0x75, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x46, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x61, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x62, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x63, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x64, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x65, + 0x5b, + 0x34, + 0x5d, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x66, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x67, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x68, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x69, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6b, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6c, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6d, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6f, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x70, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x71, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x72, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x76, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x77, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x78, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x79, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x61, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x75, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x62, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x63, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x64, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x67, + 0x7a, + 0x5b, + 0x39, + 0x5d, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x68, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x69, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6b, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6c, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6e, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6f, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x70, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x71, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x72, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x76, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x77, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x78, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x61, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x62, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x63, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x64, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x67, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x68, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x33, + 0x20, + 0x69, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x6a, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x6b, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6c, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6d, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6e, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6f, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x70, + 0x7a, + 0x7a, + 0x5b, + 0x34, + 0x5d, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x71, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x72, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x75, + 0x7a, + 0x7a, + 0x5b, + 0x34, + 0x30, + 0x5d, + 0x3b, + 0x00, + 0x7d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x29, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x61, + 0x74, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x3b, + 0x00, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x3b, + 0x00, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x6f, + 0x69, + 0x64, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x28, + 0x29, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x50, + 0x4f, + 0x57, + 0x45, + 0x52, + 0x5f, + 0x56, + 0x52, + 0x5f, + 0x53, + 0x48, + 0x41, + 0x44, + 0x45, + 0x52, + 0x5f, + 0x57, + 0x4f, + 0x52, + 0x4b, + 0x41, + 0x52, + 0x4f, + 0x55, + 0x4e, + 0x44, + 0x53, + 0x29, + 0x00, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x31, + 0x20, + 0x2b, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x49, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x49, + 0x44, + 0x29, + 0x20, + 0x2d, + 0x20, + 0x31, + 0x3b, + 0x00, + 0x7d, + 0x00, + 0x65, + 0x6c, + 0x73, + 0x65, + 0x00, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x49, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x49, + 0x44, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x30, + 0x34, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x34, + 0x36, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x30, + 0x34, + 0x2e, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x2d, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x36, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x30, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x36, + 0x33, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x61, + 0x62, + 0x73, + 0x28, + 0x5f, + 0x32, + 0x38, + 0x32, + 0x29, + 0x20, + 0x3c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x30, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x35, + 0x30, + 0x2e, + 0x77, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x38, + 0x32, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x3f, + 0x20, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x20, + 0x3a, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x36, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x30, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x36, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x30, + 0x3b, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x36, + 0x33, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x33, + 0x36, + 0x33, + 0x2e, + 0x77, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x34, + 0x2e, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x5f, + 0x33, + 0x31, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x30, + 0x34, + 0x2e, + 0x78, + 0x79, + 0x20, + 0x2a, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x33, + 0x37, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x31, + 0x31, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x33, + 0x37, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x31, + 0x31, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x5f, + 0x33, + 0x33, + 0x37, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x34, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x31, + 0x2e, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x31, + 0x39, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x31, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x39, + 0x32, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x39, + 0x32, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x39, + 0x32, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x36, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x34, + 0x36, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x34, + 0x36, + 0x2e, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x78, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x34, + 0x36, + 0x2e, + 0x77, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x79, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x36, + 0x3b, + 0x00, + 0x70, + 0x72, + 0x65, + 0x63, + 0x69, + 0x73, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3b, + 0x00, + 0x70, + 0x72, + 0x65, + 0x63, + 0x69, + 0x73, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x65, + 0x6d, + 0x69, + 0x73, + 0x73, + 0x69, + 0x76, + 0x65, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x63, + 0x6c, + 0x65, + 0x61, + 0x72, + 0x43, + 0x6f, + 0x61, + 0x74, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x63, + 0x6c, + 0x65, + 0x61, + 0x72, + 0x43, + 0x6f, + 0x61, + 0x74, + 0x52, + 0x6f, + 0x75, + 0x67, + 0x68, + 0x6e, + 0x65, + 0x73, + 0x73, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x61, + 0x6e, + 0x69, + 0x73, + 0x6f, + 0x74, + 0x72, + 0x6f, + 0x70, + 0x79, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x61, + 0x6e, + 0x69, + 0x73, + 0x6f, + 0x74, + 0x72, + 0x6f, + 0x70, + 0x79, + 0x44, + 0x69, + 0x72, + 0x65, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x30, + 0x34, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x35, + 0x30, + 0x35, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x35, + 0x30, + 0x36, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x35, + 0x35, + 0x33, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x35, + 0x35, + 0x34, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x61, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x62, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x63, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x64, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x65, + 0x5b, + 0x34, + 0x5d, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x66, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x67, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x68, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x69, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6b, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6c, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6d, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6e, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6f, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x70, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x71, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x72, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x76, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x77, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x78, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x79, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x61, + 0x7a, + 0x3b, + 0x00, + 0x75, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x62, + 0x7a, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x63, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x64, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x67, + 0x7a, + 0x5b, + 0x39, + 0x5d, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x68, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x69, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6a, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6b, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6c, + 0x7a, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6e, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x6f, + 0x7a, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x70, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x71, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x72, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x7a, + 0x3b, + 0x00, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x76, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x77, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x78, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x61, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x62, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x63, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x64, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x67, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x68, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x33, + 0x20, + 0x69, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x6a, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x6b, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6c, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6d, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6e, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6f, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x70, + 0x7a, + 0x7a, + 0x5b, + 0x34, + 0x5d, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x71, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x72, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x75, + 0x7a, + 0x7a, + 0x5b, + 0x34, + 0x30, + 0x5d, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x73, + 0x74, + 0x64, + 0x31, + 0x34, + 0x30, + 0x29, + 0x20, + 0x75, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x62, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x63, + 0x3b, + 0x00, + 0x7d, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x75, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x32, + 0x44, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x20, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x29, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x20, + 0x2a, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x2e, + 0x78, + 0x79, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x3b, + 0x00, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x20, + 0x3d, + 0x3d, + 0x20, + 0x30, + 0x3b, + 0x00, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x31, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x29, + 0x00, + 0x5f, + 0x34, + 0x32, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x2e, + 0x78, + 0x20, + 0x3e, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x32, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x3b, + 0x00, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x38, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x34, + 0x32, + 0x31, + 0x29, + 0x00, + 0x5f, + 0x34, + 0x32, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x2e, + 0x78, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x32, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x31, + 0x3b, + 0x00, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x34, + 0x33, + 0x35, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x34, + 0x32, + 0x38, + 0x29, + 0x00, + 0x5f, + 0x34, + 0x33, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x2e, + 0x79, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x33, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x38, + 0x3b, + 0x00, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x34, + 0x34, + 0x32, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x34, + 0x33, + 0x35, + 0x29, + 0x00, + 0x5f, + 0x34, + 0x34, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x2e, + 0x79, + 0x20, + 0x3e, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x34, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x33, + 0x35, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x36, + 0x33, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x5f, + 0x34, + 0x34, + 0x32, + 0x29, + 0x00, + 0x5f, + 0x35, + 0x36, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x2c, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x70, + 0x29, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x34, + 0x36, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x37, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x37, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x37, + 0x3b, + 0x00, + 0x5f, + 0x35, + 0x34, + 0x31, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x36, + 0x32, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x5f, + 0x35, + 0x34, + 0x31, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x36, + 0x32, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x5f, + 0x35, + 0x34, + 0x31, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x36, + 0x32, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x31, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x31, + 0x2e, + 0x77, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x35, + 0x34, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x35, + 0x34, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x35, + 0x34, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x35, + 0x33, + 0x29, + 0x2e, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x5f, + 0x35, + 0x34, + 0x38, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x5f, + 0x35, + 0x34, + 0x38, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x5f, + 0x35, + 0x34, + 0x38, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x5f, + 0x35, + 0x36, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x38, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x5f, + 0x35, + 0x36, + 0x33, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x30, + 0x34, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x30, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x30, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x30, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x30, + 0x36, + 0x29, + 0x2e, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x30, + 0x34, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x30, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x30, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x30, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x30, + 0x36, + 0x29, + 0x2e, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x30, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x31, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x32, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x34, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x35, + 0x3b, + 0x00, + 0x75, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x6d, + 0x65, + 0x64, + 0x69, + 0x75, + 0x6d, + 0x70, + 0x20, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x43, + 0x75, + 0x62, + 0x65, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x20, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x28, + 0x69, + 0x6e, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2c, + 0x20, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x29, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x6c, + 0x65, + 0x6e, + 0x67, + 0x74, + 0x68, + 0x28, + 0x76, + 0x69, + 0x65, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x3e, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x7a, + 0x7a, + 0x29, + 0x00, + 0x72, + 0x65, + 0x74, + 0x75, + 0x72, + 0x6e, + 0x20, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x7a, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x35, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x61, + 0x62, + 0x73, + 0x28, + 0x5f, + 0x32, + 0x31, + 0x34, + 0x29, + 0x20, + 0x3e, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x30, + 0x31, + 0x32, + 0x35, + 0x29, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x7a, + 0x2e, + 0x7a, + 0x20, + 0x2d, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x7a, + 0x2e, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x7a, + 0x2e, + 0x79, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x34, + 0x29, + 0x29, + 0x29, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x34, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x7a, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x34, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x38, + 0x30, + 0x35, + 0x20, + 0x2a, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x78, + 0x7a, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x32, + 0x34, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x34, + 0x37, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x35, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x69, + 0x6e, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x32, + 0x34, + 0x37, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x79, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x36, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x64, + 0x7a, + 0x7a, + 0x20, + 0x3e, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x37, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x7a, + 0x7a, + 0x29, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x68, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x32, + 0x37, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x37, + 0x34, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x75, + 0x6e, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x48, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x78, + 0x31, + 0x36, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x7a, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x7a, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x4c, + 0x6f, + 0x64, + 0x28, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x2c, + 0x20, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x70, + 0x6f, + 0x73, + 0x65, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x5b, + 0x30, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x5b, + 0x31, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x5b, + 0x32, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x2c, + 0x20, + 0x6d, + 0x69, + 0x78, + 0x28, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x2e, + 0x79, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x2e, + 0x78, + 0x2c, + 0x20, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x32, + 0x37, + 0x34, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x7a, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x36, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x32, + 0x35, + 0x34, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x38, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x7a, + 0x7a, + 0x20, + 0x3e, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x38, + 0x30, + 0x35, + 0x20, + 0x2a, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x7a, + 0x7a, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x33, + 0x34, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x31, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x64, + 0x6f, + 0x74, + 0x28, + 0x6e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x69, + 0x7a, + 0x65, + 0x28, + 0x76, + 0x69, + 0x65, + 0x77, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x68, + 0x7a, + 0x29, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x33, + 0x35, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x37, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x32, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6a, + 0x7a, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6a, + 0x7a, + 0x2e, + 0x77, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x70, + 0x6f, + 0x77, + 0x28, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x33, + 0x35, + 0x37, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x7a, + 0x7a, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x6d, + 0x70, + 0x5f, + 0x63, + 0x6f, + 0x70, + 0x79, + 0x5f, + 0x33, + 0x34, + 0x31, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x32, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x37, + 0x31, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x32, + 0x35, + 0x34, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x38, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x37, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x37, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x37, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x5f, + 0x36, + 0x33, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x20, + 0x2a, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x2e, + 0x78, + 0x79, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x3b, + 0x00, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x20, + 0x3d, + 0x3d, + 0x20, + 0x30, + 0x3b, + 0x00, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x38, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x36, + 0x34, + 0x31, + 0x29, + 0x00, + 0x5f, + 0x36, + 0x34, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x33, + 0x38, + 0x2e, + 0x78, + 0x20, + 0x3e, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x5f, + 0x36, + 0x34, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x31, + 0x3b, + 0x00, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x36, + 0x34, + 0x38, + 0x29, + 0x00, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x33, + 0x38, + 0x2e, + 0x78, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x38, + 0x3b, + 0x00, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x36, + 0x36, + 0x32, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x29, + 0x00, + 0x5f, + 0x36, + 0x36, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x33, + 0x38, + 0x2e, + 0x79, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x5f, + 0x36, + 0x36, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x3b, + 0x00, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x36, + 0x36, + 0x39, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x36, + 0x36, + 0x32, + 0x29, + 0x00, + 0x5f, + 0x36, + 0x36, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x33, + 0x38, + 0x2e, + 0x79, + 0x20, + 0x3e, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x5f, + 0x36, + 0x36, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x36, + 0x32, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x34, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x5f, + 0x36, + 0x36, + 0x39, + 0x29, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x3b, + 0x00, + 0x5f, + 0x36, + 0x33, + 0x38, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x36, + 0x33, + 0x38, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x36, + 0x38, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x2c, + 0x20, + 0x5f, + 0x36, + 0x33, + 0x38, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x70, + 0x29, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x36, + 0x38, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x38, + 0x34, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x36, + 0x38, + 0x34, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x37, + 0x37, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x38, + 0x34, + 0x3b, + 0x00, + 0x5f, + 0x37, + 0x37, + 0x36, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x38, + 0x39, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x5f, + 0x37, + 0x37, + 0x36, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x38, + 0x39, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x5f, + 0x37, + 0x37, + 0x36, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x38, + 0x39, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x37, + 0x36, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x37, + 0x37, + 0x36, + 0x2e, + 0x77, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x37, + 0x38, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x34, + 0x29, + 0x2e, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x5f, + 0x37, + 0x38, + 0x33, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x35, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x5f, + 0x37, + 0x38, + 0x33, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x35, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x5f, + 0x37, + 0x38, + 0x33, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x35, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x38, + 0x33, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x5f, + 0x38, + 0x30, + 0x34, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x30, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x31, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x31, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x31, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x32, + 0x29, + 0x2e, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x30, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x31, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x31, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x31, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x34, + 0x32, + 0x29, + 0x2e, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x70, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x70, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x5f, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x7a, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x5b, + 0x33, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x33, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x28, + 0x70, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x2c, + 0x20, + 0x70, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x5f, + 0x31, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x35, + 0x33, + 0x39, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x50, + 0x65, + 0x72, + 0x52, + 0x65, + 0x6e, + 0x64, + 0x65, + 0x72, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x44, + 0x61, + 0x74, + 0x61, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x33, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x6f, + 0x72, + 0x70, + 0x68, + 0x54, + 0x61, + 0x72, + 0x67, + 0x65, + 0x74, + 0x43, + 0x6f, + 0x75, + 0x6e, + 0x74, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x66, + 0x6c, + 0x61, + 0x67, + 0x73, + 0x43, + 0x68, + 0x61, + 0x6e, + 0x6e, + 0x65, + 0x6c, + 0x73, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x49, + 0x64, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x73, + 0x65, + 0x72, + 0x44, + 0x61, + 0x74, + 0x61, + 0x3b, + 0x00, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x72, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x5b, + 0x38, + 0x5d, + 0x3b, + 0x00, + 0x23, + 0x69, + 0x66, + 0x6e, + 0x64, + 0x65, + 0x66, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x31, + 0x00, + 0x23, + 0x64, + 0x65, + 0x66, + 0x69, + 0x6e, + 0x65, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x31, + 0x20, + 0x36, + 0x34, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x4d, + 0x41, + 0x58, + 0x5f, + 0x49, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x43, + 0x45, + 0x53, + 0x20, + 0x3d, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x31, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x36, + 0x37, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x73, + 0x74, + 0x64, + 0x31, + 0x34, + 0x30, + 0x29, + 0x20, + 0x75, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x4f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x50, + 0x65, + 0x72, + 0x52, + 0x65, + 0x6e, + 0x64, + 0x65, + 0x72, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x44, + 0x61, + 0x74, + 0x61, + 0x20, + 0x61, + 0x5b, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x4d, + 0x41, + 0x58, + 0x5f, + 0x49, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x43, + 0x45, + 0x53, + 0x5d, + 0x3b, + 0x00, + 0x7d, + 0x20, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x29, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x20, + 0x68, + 0x69, + 0x67, + 0x68, + 0x70, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x42, + 0x69, + 0x74, + 0x73, + 0x54, + 0x6f, + 0x46, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x5b, + 0x5f, + 0x31, + 0x36, + 0x37, + 0x5d, + 0x2e, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x49, + 0x64, + 0x29, + 0x3b, + 0x00, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x2f, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x23, + 0x65, + 0x78, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x47, + 0x4c, + 0x5f, + 0x45, + 0x58, + 0x54, + 0x5f, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x5f, + 0x63, + 0x75, + 0x6c, + 0x6c, + 0x5f, + 0x64, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x20, + 0x3a, + 0x20, + 0x72, + 0x65, + 0x71, + 0x75, + 0x69, + 0x72, + 0x65, + 0x00, + 0x23, + 0x69, + 0x66, + 0x6e, + 0x64, + 0x65, + 0x66, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x38, + 0x00, + 0x23, + 0x64, + 0x65, + 0x66, + 0x69, + 0x6e, + 0x65, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x38, + 0x20, + 0x32, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x20, + 0x3d, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x38, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x37, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x36, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x37, + 0x36, + 0x2e, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x2d, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x38, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x39, + 0x30, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x61, + 0x62, + 0x73, + 0x28, + 0x5f, + 0x38, + 0x32, + 0x29, + 0x20, + 0x3c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x38, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x39, + 0x2e, + 0x77, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x38, + 0x32, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x3f, + 0x20, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x20, + 0x3a, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x3b, + 0x00, + 0x5f, + 0x39, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x39, + 0x3b, + 0x00, + 0x5f, + 0x39, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x3b, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x20, + 0x5f, + 0x39, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x39, + 0x30, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x39, + 0x30, + 0x2e, + 0x77, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x39, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x34, + 0x2e, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x37, + 0x36, + 0x2e, + 0x78, + 0x79, + 0x20, + 0x2a, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x39, + 0x35, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x5f, + 0x39, + 0x35, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x5f, + 0x39, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x39, + 0x34, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x34, + 0x2e, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x34, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x37, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x37, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x37, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x31, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x31, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x31, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x32, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x31, + 0x31, + 0x36, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x32, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x31, + 0x37, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x31, + 0x31, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x31, + 0x31, + 0x36, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x78, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x28, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x5f, + 0x31, + 0x31, + 0x37, + 0x20, + 0x2f, + 0x20, + 0x32, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x31, + 0x32, + 0x31, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x78, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x31, + 0x32, + 0x31, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x31, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x2d, + 0x28, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x78, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x28, + 0x5f, + 0x31, + 0x31, + 0x37, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x31, + 0x31, + 0x35, + 0x20, + 0x2b, + 0x20, + 0x31, + 0x29, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x77, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x78, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x77, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x79, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x2f, + 0x3d, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x23, + 0x76, + 0x65, + 0x72, + 0x73, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x34, + 0x31, + 0x30, + 0x00, + 0x23, + 0x65, + 0x78, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x47, + 0x4c, + 0x5f, + 0x41, + 0x52, + 0x42, + 0x5f, + 0x73, + 0x68, + 0x61, + 0x64, + 0x69, + 0x6e, + 0x67, + 0x5f, + 0x6c, + 0x61, + 0x6e, + 0x67, + 0x75, + 0x61, + 0x67, + 0x65, + 0x5f, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x20, + 0x3a, + 0x20, + 0x65, + 0x6e, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x38, + 0x29, + 0x20, + 0x66, + 0x6c, + 0x61, + 0x74, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x29, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x34, + 0x29, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x37, + 0x29, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x30, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x30, + 0x35, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x34, + 0x37, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x30, + 0x35, + 0x2e, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x2d, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x37, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x36, + 0x34, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x61, + 0x62, + 0x73, + 0x28, + 0x5f, + 0x32, + 0x38, + 0x33, + 0x29, + 0x20, + 0x3c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x35, + 0x31, + 0x2e, + 0x77, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x38, + 0x33, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x3f, + 0x20, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x20, + 0x3a, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x36, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x31, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x36, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x3b, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x36, + 0x34, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x33, + 0x36, + 0x34, + 0x2e, + 0x77, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x35, + 0x2e, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x5f, + 0x33, + 0x31, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x30, + 0x35, + 0x2e, + 0x78, + 0x79, + 0x20, + 0x2a, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x33, + 0x38, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x31, + 0x32, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x33, + 0x38, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x31, + 0x32, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x5f, + 0x33, + 0x33, + 0x38, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x35, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x32, + 0x2e, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x31, + 0x39, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x32, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x37, + 0x3b, + 0x00, + 0x5f, + 0x33, + 0x34, + 0x37, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x34, + 0x37, + 0x2e, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x78, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x34, + 0x37, + 0x2e, + 0x77, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x79, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x37, + 0x3b, + 0x00, + 0x75, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x32, + 0x44, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x29, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x32, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x35, + 0x34, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x35, + 0x34, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x35, + 0x34, + 0x2c, + 0x20, + 0x5f, + 0x35, + 0x35, + 0x33, + 0x29, + 0x2e, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x20, + 0x2a, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x2e, + 0x78, + 0x79, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x3b, + 0x00, + 0x5f, + 0x35, + 0x32, + 0x36, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x5f, + 0x35, + 0x32, + 0x36, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x5f, + 0x35, + 0x32, + 0x36, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x5f, + 0x35, + 0x36, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x35, + 0x32, + 0x36, + 0x3b, + 0x00, + 0x75, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x43, + 0x75, + 0x62, + 0x65, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x34, + 0x29, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x28, + 0x69, + 0x6e, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x29, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x6c, + 0x65, + 0x6e, + 0x67, + 0x74, + 0x68, + 0x28, + 0x76, + 0x69, + 0x65, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x7a, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x35, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x35, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x69, + 0x6e, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x38, + 0x30, + 0x35, + 0x20, + 0x2a, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x78, + 0x7a, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x79, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x75, + 0x6e, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x48, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x78, + 0x31, + 0x36, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x7a, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x63, + 0x7a, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x4c, + 0x6f, + 0x64, + 0x28, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x2c, + 0x20, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x70, + 0x6f, + 0x73, + 0x65, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x5b, + 0x30, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x5b, + 0x31, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x5b, + 0x32, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x2c, + 0x20, + 0x6d, + 0x69, + 0x78, + 0x28, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x2e, + 0x79, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x31, + 0x2e, + 0x78, + 0x2c, + 0x20, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x67, + 0x7a, + 0x7a, + 0x29, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x68, + 0x7a, + 0x7a, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x32, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6a, + 0x7a, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6a, + 0x7a, + 0x2e, + 0x77, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x70, + 0x6f, + 0x77, + 0x28, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x64, + 0x6f, + 0x74, + 0x28, + 0x6e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x69, + 0x7a, + 0x65, + 0x28, + 0x76, + 0x69, + 0x65, + 0x77, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x68, + 0x7a, + 0x29, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x7a, + 0x7a, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x38, + 0x30, + 0x35, + 0x20, + 0x2a, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x31, + 0x38, + 0x36, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x65, + 0x7a, + 0x7a, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x37, + 0x36, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x34, + 0x29, + 0x2e, + 0x62, + 0x61, + 0x73, + 0x65, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x5f, + 0x36, + 0x33, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x61, + 0x20, + 0x2a, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x2e, + 0x78, + 0x79, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x3b, + 0x00, + 0x5f, + 0x37, + 0x36, + 0x31, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x35, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x5f, + 0x37, + 0x36, + 0x31, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x35, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x5f, + 0x37, + 0x36, + 0x31, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x35, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x5f, + 0x38, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x36, + 0x31, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x70, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x5f, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x7a, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x5b, + 0x33, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x34, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x6d, + 0x61, + 0x74, + 0x33, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x6f, + 0x72, + 0x70, + 0x68, + 0x54, + 0x61, + 0x72, + 0x67, + 0x65, + 0x74, + 0x43, + 0x6f, + 0x75, + 0x6e, + 0x74, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x66, + 0x6c, + 0x61, + 0x67, + 0x73, + 0x43, + 0x68, + 0x61, + 0x6e, + 0x6e, + 0x65, + 0x6c, + 0x73, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x49, + 0x64, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x73, + 0x65, + 0x72, + 0x44, + 0x61, + 0x74, + 0x61, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x72, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x5b, + 0x38, + 0x5d, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x30, + 0x29, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x3b, + 0x00, + 0x6c, + 0x61, + 0x79, + 0x6f, + 0x75, + 0x74, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x37, + 0x29, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x32, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x37, + 0x32, + 0x2e, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x2d, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x38, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x34, + 0x32, + 0x3b, + 0x00, + 0x69, + 0x66, + 0x20, + 0x28, + 0x61, + 0x62, + 0x73, + 0x28, + 0x5f, + 0x33, + 0x35, + 0x30, + 0x29, + 0x20, + 0x3c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x38, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x31, + 0x38, + 0x2e, + 0x77, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x35, + 0x30, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x3f, + 0x20, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x20, + 0x3a, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x34, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x38, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x34, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x38, + 0x3b, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x20, + 0x5f, + 0x34, + 0x30, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x76, + 0x65, + 0x63, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x34, + 0x34, + 0x32, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x34, + 0x34, + 0x32, + 0x2e, + 0x77, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x30, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x30, + 0x32, + 0x2e, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x32, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x37, + 0x32, + 0x2e, + 0x78, + 0x79, + 0x20, + 0x2a, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x76, + 0x65, + 0x63, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x30, + 0x35, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x39, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x30, + 0x35, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x37, + 0x39, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x20, + 0x5f, + 0x34, + 0x30, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x56, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x49, + 0x6e, + 0x70, + 0x75, + 0x74, + 0x73, + 0x28, + 0x5f, + 0x34, + 0x30, + 0x35, + 0x2c, + 0x20, + 0x5f, + 0x34, + 0x30, + 0x32, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x3b, + 0x00, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x30, + 0x39, + 0x2e, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x63, + 0x33, + 0x20, + 0x5f, + 0x31, + 0x39, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x30, + 0x39, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x39, + 0x35, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x39, + 0x35, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x39, + 0x35, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x3b, + 0x00, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x32, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x37, + 0x3b, + 0x00, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x38, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x32, + 0x31, + 0x34, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x37, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x28, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x31, + 0x38, + 0x20, + 0x2f, + 0x20, + 0x32, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x39, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x39, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x31, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x2d, + 0x28, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x31, + 0x38, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x32, + 0x31, + 0x34, + 0x20, + 0x2b, + 0x20, + 0x31, + 0x29, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x2e, + 0x77, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x2e, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x78, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x2e, + 0x77, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x2e, + 0x79, + 0x29, + 0x3b, + 0x00, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x3b, + 0x00, + 0x23, + 0x69, + 0x6e, + 0x63, + 0x6c, + 0x75, + 0x64, + 0x65, + 0x20, + 0x3c, + 0x6d, + 0x65, + 0x74, + 0x61, + 0x6c, + 0x5f, + 0x73, + 0x74, + 0x64, + 0x6c, + 0x69, + 0x62, + 0x3e, + 0x00, + 0x23, + 0x69, + 0x6e, + 0x63, + 0x6c, + 0x75, + 0x64, + 0x65, + 0x20, + 0x3c, + 0x73, + 0x69, + 0x6d, + 0x64, + 0x2f, + 0x73, + 0x69, + 0x6d, + 0x64, + 0x2e, + 0x68, + 0x3e, + 0x00, + 0x00, + 0x75, + 0x73, + 0x69, + 0x6e, + 0x67, + 0x20, + 0x6e, + 0x61, + 0x6d, + 0x65, + 0x73, + 0x70, + 0x61, + 0x63, + 0x65, + 0x20, + 0x6d, + 0x65, + 0x74, + 0x61, + 0x6c, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x46, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x56, + 0x69, + 0x65, + 0x77, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x56, + 0x69, + 0x65, + 0x77, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x76, + 0x69, + 0x65, + 0x77, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x34, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x54, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x43, + 0x6f, + 0x6e, + 0x74, + 0x72, + 0x6f, + 0x6c, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x69, + 0x6d, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x74, + 0x65, + 0x6d, + 0x70, + 0x6f, + 0x72, + 0x61, + 0x6c, + 0x4e, + 0x6f, + 0x69, + 0x73, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x75, + 0x73, + 0x65, + 0x72, + 0x54, + 0x69, + 0x6d, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x72, + 0x65, + 0x73, + 0x6f, + 0x6c, + 0x75, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x6c, + 0x6f, + 0x67, + 0x69, + 0x63, + 0x61, + 0x6c, + 0x56, + 0x69, + 0x65, + 0x77, + 0x70, + 0x6f, + 0x72, + 0x74, + 0x53, + 0x63, + 0x61, + 0x6c, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x6c, + 0x6f, + 0x67, + 0x69, + 0x63, + 0x61, + 0x6c, + 0x56, + 0x69, + 0x65, + 0x77, + 0x70, + 0x6f, + 0x72, + 0x74, + 0x4f, + 0x66, + 0x66, + 0x73, + 0x65, + 0x74, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6c, + 0x6f, + 0x64, + 0x42, + 0x69, + 0x61, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x72, + 0x65, + 0x66, + 0x72, + 0x61, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x4c, + 0x6f, + 0x64, + 0x4f, + 0x66, + 0x66, + 0x73, + 0x65, + 0x74, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x64, + 0x65, + 0x72, + 0x69, + 0x76, + 0x61, + 0x74, + 0x69, + 0x76, + 0x65, + 0x73, + 0x53, + 0x63, + 0x61, + 0x6c, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6f, + 0x6e, + 0x65, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6e, + 0x65, + 0x61, + 0x72, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x63, + 0x61, + 0x6d, + 0x65, + 0x72, + 0x61, + 0x46, + 0x61, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x78, + 0x70, + 0x6f, + 0x73, + 0x75, + 0x72, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x76, + 0x31, + 0x30, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x6e, + 0x65, + 0x65, + 0x64, + 0x73, + 0x41, + 0x6c, + 0x70, + 0x68, + 0x61, + 0x43, + 0x68, + 0x61, + 0x6e, + 0x6e, + 0x65, + 0x6c, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x61, + 0x6f, + 0x53, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x69, + 0x6e, + 0x67, + 0x51, + 0x75, + 0x61, + 0x6c, + 0x69, + 0x74, + 0x79, + 0x41, + 0x6e, + 0x64, + 0x45, + 0x64, + 0x67, + 0x65, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x61, + 0x6f, + 0x42, + 0x65, + 0x6e, + 0x74, + 0x4e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x7a, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x65, + 0x64, + 0x5f, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x33, + 0x20, + 0x66, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x43, + 0x68, + 0x61, + 0x6e, + 0x6e, + 0x65, + 0x6c, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x66, + 0x72, + 0x6f, + 0x78, + 0x65, + 0x6c, + 0x43, + 0x6f, + 0x75, + 0x6e, + 0x74, + 0x58, + 0x59, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x69, + 0x62, + 0x6c, + 0x4c, + 0x75, + 0x6d, + 0x69, + 0x6e, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x69, + 0x62, + 0x6c, + 0x52, + 0x6f, + 0x75, + 0x67, + 0x68, + 0x6e, + 0x65, + 0x73, + 0x73, + 0x4f, + 0x6e, + 0x65, + 0x4c, + 0x65, + 0x76, + 0x65, + 0x6c, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x69, + 0x62, + 0x6c, + 0x53, + 0x48, + 0x5b, + 0x39, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x65, + 0x64, + 0x5f, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x44, + 0x69, + 0x72, + 0x65, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x70, + 0x61, + 0x64, + 0x64, + 0x69, + 0x6e, + 0x67, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x49, + 0x6e, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x73, + 0x75, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x73, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x46, + 0x61, + 0x72, + 0x41, + 0x74, + 0x74, + 0x65, + 0x6e, + 0x75, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x64, + 0x69, + 0x72, + 0x65, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x61, + 0x6c, + 0x53, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x73, + 0x43, + 0x6f, + 0x6e, + 0x74, + 0x61, + 0x63, + 0x74, + 0x53, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x63, + 0x61, + 0x73, + 0x63, + 0x61, + 0x64, + 0x65, + 0x53, + 0x70, + 0x6c, + 0x69, + 0x74, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x63, + 0x61, + 0x73, + 0x63, + 0x61, + 0x64, + 0x65, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x50, + 0x65, + 0x6e, + 0x75, + 0x6d, + 0x62, + 0x72, + 0x61, + 0x52, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x53, + 0x63, + 0x61, + 0x6c, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x46, + 0x61, + 0x72, + 0x41, + 0x74, + 0x74, + 0x65, + 0x6e, + 0x75, + 0x61, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x76, + 0x73, + 0x6d, + 0x45, + 0x78, + 0x70, + 0x6f, + 0x6e, + 0x65, + 0x6e, + 0x74, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x76, + 0x73, + 0x6d, + 0x44, + 0x65, + 0x70, + 0x74, + 0x68, + 0x53, + 0x63, + 0x61, + 0x6c, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x76, + 0x73, + 0x6d, + 0x4c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x42, + 0x6c, + 0x65, + 0x65, + 0x64, + 0x52, + 0x65, + 0x64, + 0x75, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x73, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x53, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x69, + 0x6e, + 0x67, + 0x54, + 0x79, + 0x70, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x65, + 0x64, + 0x5f, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x44, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x53, + 0x74, + 0x61, + 0x72, + 0x74, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x4d, + 0x61, + 0x78, + 0x4f, + 0x70, + 0x61, + 0x63, + 0x69, + 0x74, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x4d, + 0x69, + 0x6e, + 0x4d, + 0x61, + 0x78, + 0x4d, + 0x69, + 0x70, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x48, + 0x65, + 0x69, + 0x67, + 0x68, + 0x74, + 0x46, + 0x61, + 0x6c, + 0x6c, + 0x6f, + 0x66, + 0x66, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x75, + 0x74, + 0x4f, + 0x66, + 0x66, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x70, + 0x61, + 0x63, + 0x6b, + 0x65, + 0x64, + 0x5f, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x49, + 0x62, + 0x6c, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x74, + 0x61, + 0x72, + 0x74, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x69, + 0x7a, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x4f, + 0x6e, + 0x65, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x78, + 0x33, + 0x20, + 0x66, + 0x6f, + 0x67, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x73, + 0x73, + 0x72, + 0x52, + 0x65, + 0x70, + 0x72, + 0x6f, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x73, + 0x73, + 0x72, + 0x55, + 0x76, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x56, + 0x69, + 0x65, + 0x77, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x73, + 0x72, + 0x54, + 0x68, + 0x69, + 0x63, + 0x6b, + 0x6e, + 0x65, + 0x73, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x73, + 0x72, + 0x42, + 0x69, + 0x61, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x73, + 0x72, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x73, + 0x73, + 0x72, + 0x53, + 0x74, + 0x72, + 0x69, + 0x64, + 0x65, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x63, + 0x75, + 0x73, + 0x74, + 0x6f, + 0x6d, + 0x5b, + 0x34, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x72, + 0x65, + 0x63, + 0x37, + 0x30, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x73, + 0x32, + 0x52, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x73, + 0x32, + 0x52, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x65, + 0x73, + 0x32, + 0x52, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x72, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x5b, + 0x34, + 0x30, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x20, + 0x5b, + 0x5b, + 0x75, + 0x73, + 0x65, + 0x72, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x6e, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x75, + 0x73, + 0x65, + 0x72, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x6e, + 0x34, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x75, + 0x73, + 0x65, + 0x72, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x6e, + 0x37, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x5b, + 0x5b, + 0x75, + 0x73, + 0x65, + 0x72, + 0x28, + 0x6c, + 0x6f, + 0x63, + 0x6e, + 0x38, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x69, + 0x6e, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x61, + 0x74, + 0x74, + 0x72, + 0x69, + 0x62, + 0x75, + 0x74, + 0x65, + 0x28, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x28, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x69, + 0x6e, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x73, + 0x74, + 0x61, + 0x67, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x46, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x26, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x31, + 0x37, + 0x29, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x75, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x49, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x49, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x64, + 0x5d, + 0x5d, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x3d, + 0x20, + 0x7b, + 0x7d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x28, + 0x67, + 0x6c, + 0x5f, + 0x49, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x49, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x2e, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x36, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x32, + 0x38, + 0x34, + 0x2e, + 0x7a, + 0x2c, + 0x20, + 0x2d, + 0x30, + 0x2e, + 0x35, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x36, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x36, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x36, + 0x30, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x61, + 0x62, + 0x73, + 0x28, + 0x5f, + 0x32, + 0x36, + 0x32, + 0x29, + 0x20, + 0x3c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x7b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x36, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x30, + 0x2e, + 0x77, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x36, + 0x32, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x3f, + 0x20, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x20, + 0x3a, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x7d, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x65, + 0x6c, + 0x73, + 0x65, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x36, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x37, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x39, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x39, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x38, + 0x34, + 0x2e, + 0x78, + 0x79, + 0x20, + 0x2a, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x33, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x31, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x33, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x31, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x37, + 0x36, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x37, + 0x36, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x37, + 0x36, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x72, + 0x65, + 0x74, + 0x75, + 0x72, + 0x6e, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x62, + 0x61, + 0x63, + 0x6b, + 0x67, + 0x72, + 0x6f, + 0x75, + 0x6e, + 0x64, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x73, + 0x68, + 0x6f, + 0x77, + 0x49, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x37, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x7b, + 0x7d, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x42, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x33, + 0x20, + 0x7b, + 0x00, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x32, + 0x64, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x31, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x28, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x6d, + 0x65, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x28, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x69, + 0x6e, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x73, + 0x74, + 0x61, + 0x67, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x42, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x33, + 0x26, + 0x20, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x33, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x32, + 0x39, + 0x29, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x46, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x26, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x31, + 0x37, + 0x29, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x26, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x32, + 0x35, + 0x29, + 0x5d, + 0x5d, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x69, + 0x6e, + 0x2e, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x2e, + 0x78, + 0x79, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x5f, + 0x34, + 0x31, + 0x30, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x73, + 0x68, + 0x6f, + 0x77, + 0x49, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x20, + 0x3d, + 0x3d, + 0x20, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x30, + 0x2e, + 0x78, + 0x20, + 0x3e, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x34, + 0x32, + 0x31, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x30, + 0x2e, + 0x78, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x34, + 0x33, + 0x35, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x34, + 0x32, + 0x38, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x33, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x30, + 0x2e, + 0x79, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x33, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x34, + 0x34, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x34, + 0x33, + 0x35, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x34, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x30, + 0x2e, + 0x79, + 0x20, + 0x3e, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x34, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x33, + 0x35, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x36, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x5f, + 0x34, + 0x34, + 0x32, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x35, + 0x36, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x61, + 0x63, + 0x6b, + 0x67, + 0x72, + 0x6f, + 0x75, + 0x6e, + 0x64, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x30, + 0x2e, + 0x79, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x33, + 0x2e, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x2e, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x33, + 0x2e, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x29, + 0x2c, + 0x20, + 0x62, + 0x69, + 0x61, + 0x73, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x6f, + 0x64, + 0x42, + 0x69, + 0x61, + 0x73, + 0x29, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x37, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x34, + 0x36, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x37, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x31, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x36, + 0x32, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x31, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x36, + 0x32, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x31, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x36, + 0x32, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x31, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x61, + 0x63, + 0x6b, + 0x67, + 0x72, + 0x6f, + 0x75, + 0x6e, + 0x64, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x39, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x38, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x35, + 0x38, + 0x31, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x35, + 0x38, + 0x31, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x35, + 0x38, + 0x31, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x35, + 0x36, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x35, + 0x38, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x5f, + 0x35, + 0x36, + 0x33, + 0x29, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x6d, + 0x65, + 0x6e, + 0x74, + 0x20, + 0x76, + 0x6f, + 0x69, + 0x64, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x28, + 0x29, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x7b, + 0x7d, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x42, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x31, + 0x20, + 0x7b, + 0x00, + 0x64, + 0x65, + 0x70, + 0x74, + 0x68, + 0x32, + 0x64, + 0x5f, + 0x61, + 0x72, + 0x72, + 0x61, + 0x79, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x4d, + 0x61, + 0x70, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x68, + 0x61, + 0x64, + 0x6f, + 0x77, + 0x4d, + 0x61, + 0x70, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x31, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x32, + 0x64, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x69, + 0x62, + 0x6c, + 0x44, + 0x46, + 0x47, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x32, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x69, + 0x62, + 0x6c, + 0x44, + 0x46, + 0x47, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x33, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x63, + 0x75, + 0x62, + 0x65, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x69, + 0x62, + 0x6c, + 0x53, + 0x70, + 0x65, + 0x63, + 0x75, + 0x6c, + 0x61, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x34, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x69, + 0x62, + 0x6c, + 0x53, + 0x70, + 0x65, + 0x63, + 0x75, + 0x6c, + 0x61, + 0x72, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x35, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x32, + 0x64, + 0x5f, + 0x61, + 0x72, + 0x72, + 0x61, + 0x79, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x73, + 0x61, + 0x6f, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x36, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x73, + 0x61, + 0x6f, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x37, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x32, + 0x64, + 0x5f, + 0x61, + 0x72, + 0x72, + 0x61, + 0x79, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x73, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x38, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x73, + 0x72, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x39, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x32, + 0x64, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x75, + 0x72, + 0x65, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x31, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x75, + 0x72, + 0x65, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x31, + 0x31, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x74, + 0x65, + 0x78, + 0x74, + 0x75, + 0x72, + 0x65, + 0x63, + 0x75, + 0x62, + 0x65, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x31, + 0x32, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x72, + 0x20, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x20, + 0x5b, + 0x5b, + 0x69, + 0x64, + 0x28, + 0x31, + 0x33, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x6d, + 0x65, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x28, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x69, + 0x6e, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x73, + 0x74, + 0x61, + 0x67, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x42, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x31, + 0x26, + 0x20, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x31, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x32, + 0x37, + 0x29, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x42, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x33, + 0x26, + 0x20, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x33, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x32, + 0x39, + 0x29, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x46, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x26, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x31, + 0x37, + 0x29, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x4d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x26, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x32, + 0x35, + 0x29, + 0x5d, + 0x5d, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x69, + 0x6e, + 0x2e, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x2e, + 0x78, + 0x79, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x5f, + 0x36, + 0x34, + 0x34, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x73, + 0x68, + 0x6f, + 0x77, + 0x49, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x20, + 0x3d, + 0x3d, + 0x20, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x36, + 0x34, + 0x38, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x3e, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x36, + 0x36, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x36, + 0x36, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x36, + 0x36, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x35, + 0x35, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x36, + 0x36, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x36, + 0x36, + 0x32, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x36, + 0x36, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x34, + 0x2e, + 0x79, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x36, + 0x36, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x36, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x6f, + 0x6f, + 0x6c, + 0x20, + 0x5f, + 0x36, + 0x37, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x21, + 0x5f, + 0x36, + 0x36, + 0x39, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x36, + 0x37, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x34, + 0x2e, + 0x79, + 0x20, + 0x3e, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x36, + 0x37, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x36, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x5f, + 0x36, + 0x37, + 0x36, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x61, + 0x63, + 0x6b, + 0x67, + 0x72, + 0x6f, + 0x75, + 0x6e, + 0x64, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x35, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x34, + 0x2e, + 0x79, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x33, + 0x2e, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x2e, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x33, + 0x2e, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x5f, + 0x36, + 0x34, + 0x35, + 0x29, + 0x2c, + 0x20, + 0x62, + 0x69, + 0x61, + 0x73, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x6f, + 0x64, + 0x42, + 0x69, + 0x61, + 0x73, + 0x29, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x31, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x31, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x31, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x36, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x31, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x36, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x31, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x36, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x37, + 0x31, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x31, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x61, + 0x63, + 0x6b, + 0x67, + 0x72, + 0x6f, + 0x75, + 0x6e, + 0x64, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x33, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x35, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x31, + 0x32, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x35, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x31, + 0x32, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x35, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x31, + 0x32, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x35, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x5f, + 0x39, + 0x39, + 0x36, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x35, + 0x33, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x69, + 0x6e, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x56, + 0x69, + 0x65, + 0x77, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x33, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x64, + 0x6f, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x37, + 0x36, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x6c, + 0x65, + 0x6e, + 0x67, + 0x74, + 0x68, + 0x28, + 0x5f, + 0x35, + 0x33, + 0x34, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x5f, + 0x37, + 0x36, + 0x39, + 0x20, + 0x3e, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x75, + 0x74, + 0x4f, + 0x66, + 0x66, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x7b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x72, + 0x65, + 0x61, + 0x6b, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x7d, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x37, + 0x38, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x35, + 0x33, + 0x34, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x37, + 0x38, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x48, + 0x65, + 0x69, + 0x67, + 0x68, + 0x74, + 0x46, + 0x61, + 0x6c, + 0x6c, + 0x6f, + 0x66, + 0x66, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x37, + 0x38, + 0x35, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x37, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x61, + 0x62, + 0x73, + 0x28, + 0x5f, + 0x37, + 0x38, + 0x36, + 0x29, + 0x20, + 0x3e, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x30, + 0x31, + 0x32, + 0x35, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x2d, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x44, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x5b, + 0x30, + 0x5d, + 0x2c, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x2d, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x48, + 0x65, + 0x69, + 0x67, + 0x68, + 0x74, + 0x46, + 0x61, + 0x6c, + 0x6c, + 0x6f, + 0x66, + 0x66, + 0x2c, + 0x20, + 0x5f, + 0x37, + 0x38, + 0x35, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x44, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x5b, + 0x31, + 0x5d, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x44, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x5b, + 0x32, + 0x5d, + 0x29, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x37, + 0x38, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x65, + 0x6c, + 0x73, + 0x65, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x44, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x5b, + 0x32, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x69, + 0x6e, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x38, + 0x20, + 0x2d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x39, + 0x39, + 0x37, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x37, + 0x36, + 0x39, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x53, + 0x74, + 0x61, + 0x72, + 0x74, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4d, + 0x61, + 0x78, + 0x4f, + 0x70, + 0x61, + 0x63, + 0x69, + 0x74, + 0x79, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x33, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x49, + 0x62, + 0x6c, + 0x20, + 0x3e, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x33, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x61, + 0x73, + 0x5f, + 0x74, + 0x79, + 0x70, + 0x65, + 0x3c, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x3e, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4d, + 0x69, + 0x6e, + 0x4d, + 0x61, + 0x78, + 0x4d, + 0x69, + 0x70, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x33, + 0x39, + 0x20, + 0x2a, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x31, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x2e, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x31, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x2c, + 0x20, + 0x28, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x70, + 0x6f, + 0x73, + 0x65, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x78, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x30, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x31, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x32, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x35, + 0x33, + 0x34, + 0x29, + 0x2c, + 0x20, + 0x6c, + 0x65, + 0x76, + 0x65, + 0x6c, + 0x28, + 0x6d, + 0x69, + 0x78, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x33, + 0x31, + 0x2e, + 0x79, + 0x2c, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x33, + 0x31, + 0x2e, + 0x78, + 0x2c, + 0x20, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x37, + 0x36, + 0x39, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4f, + 0x6e, + 0x65, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x2c, + 0x20, + 0x2d, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x38, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x33, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x38, + 0x36, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x38, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x62, + 0x6c, + 0x4c, + 0x75, + 0x6d, + 0x69, + 0x6e, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x39, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x69, + 0x7a, + 0x65, + 0x20, + 0x3e, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x36, + 0x38, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x49, + 0x6e, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x49, + 0x6e, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x2e, + 0x77, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x70, + 0x6f, + 0x77, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x64, + 0x6f, + 0x74, + 0x28, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x69, + 0x7a, + 0x65, + 0x28, + 0x5f, + 0x35, + 0x33, + 0x34, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x44, + 0x69, + 0x72, + 0x65, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x69, + 0x7a, + 0x65, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x38, + 0x20, + 0x2d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x28, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x39, + 0x39, + 0x37, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x37, + 0x36, + 0x39, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x74, + 0x61, + 0x72, + 0x74, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x36, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x34, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x33, + 0x20, + 0x5f, + 0x39, + 0x31, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x34, + 0x38, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x32, + 0x38, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x39, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x20, + 0x5f, + 0x39, + 0x38, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x34, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x38, + 0x31, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x31, + 0x34, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x38, + 0x31, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x31, + 0x34, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x38, + 0x31, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x31, + 0x34, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x38, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x62, + 0x72, + 0x65, + 0x61, + 0x6b, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x7d, + 0x20, + 0x77, + 0x68, + 0x69, + 0x6c, + 0x65, + 0x28, + 0x66, + 0x61, + 0x6c, + 0x73, + 0x65, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x34, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x78, + 0x34, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x78, + 0x33, + 0x20, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x4d, + 0x6f, + 0x64, + 0x65, + 0x6c, + 0x4e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x6f, + 0x72, + 0x70, + 0x68, + 0x54, + 0x61, + 0x72, + 0x67, + 0x65, + 0x74, + 0x43, + 0x6f, + 0x75, + 0x6e, + 0x74, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x66, + 0x6c, + 0x61, + 0x67, + 0x73, + 0x43, + 0x68, + 0x61, + 0x6e, + 0x6e, + 0x65, + 0x6c, + 0x73, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x49, + 0x64, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x75, + 0x73, + 0x65, + 0x72, + 0x44, + 0x61, + 0x74, + 0x61, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x72, + 0x65, + 0x73, + 0x65, + 0x72, + 0x76, + 0x65, + 0x64, + 0x5b, + 0x38, + 0x5d, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x4d, + 0x41, + 0x58, + 0x5f, + 0x49, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x43, + 0x45, + 0x53, + 0x20, + 0x3d, + 0x20, + 0x53, + 0x50, + 0x49, + 0x52, + 0x56, + 0x5f, + 0x43, + 0x52, + 0x4f, + 0x53, + 0x53, + 0x5f, + 0x43, + 0x4f, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x54, + 0x5f, + 0x49, + 0x44, + 0x5f, + 0x31, + 0x3b, + 0x00, + 0x73, + 0x74, + 0x72, + 0x75, + 0x63, + 0x74, + 0x20, + 0x4f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x50, + 0x65, + 0x72, + 0x52, + 0x65, + 0x6e, + 0x64, + 0x65, + 0x72, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x44, + 0x61, + 0x74, + 0x61, + 0x20, + 0x64, + 0x61, + 0x74, + 0x61, + 0x5b, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x4d, + 0x41, + 0x58, + 0x5f, + 0x49, + 0x4e, + 0x53, + 0x54, + 0x41, + 0x4e, + 0x43, + 0x45, + 0x53, + 0x5d, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x36, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x7b, + 0x7d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x20, + 0x5b, + 0x5b, + 0x63, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x28, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x6d, + 0x65, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x28, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x69, + 0x6e, + 0x20, + 0x69, + 0x6e, + 0x20, + 0x5b, + 0x5b, + 0x73, + 0x74, + 0x61, + 0x67, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x5d, + 0x5d, + 0x2c, + 0x20, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x4f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x26, + 0x20, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x20, + 0x5b, + 0x5b, + 0x62, + 0x75, + 0x66, + 0x66, + 0x65, + 0x72, + 0x28, + 0x31, + 0x38, + 0x29, + 0x5d, + 0x5d, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x61, + 0x73, + 0x5f, + 0x74, + 0x79, + 0x70, + 0x65, + 0x3c, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x3e, + 0x28, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x64, + 0x61, + 0x74, + 0x61, + 0x5b, + 0x5f, + 0x31, + 0x36, + 0x37, + 0x5d, + 0x2e, + 0x6f, + 0x62, + 0x6a, + 0x65, + 0x63, + 0x74, + 0x49, + 0x64, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x6f, + 0x75, + 0x74, + 0x50, + 0x69, + 0x63, + 0x6b, + 0x69, + 0x6e, + 0x67, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x2f, + 0x20, + 0x69, + 0x6e, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x66, + 0x72, + 0x61, + 0x67, + 0x6d, + 0x65, + 0x6e, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x5f, + 0x6f, + 0x75, + 0x74, + 0x20, + 0x6d, + 0x61, + 0x69, + 0x6e, + 0x30, + 0x28, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5f, + 0x74, + 0x6d, + 0x70, + 0x20, + 0x5b, + 0x5b, + 0x66, + 0x75, + 0x6e, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x5f, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x28, + 0x38, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x73, + 0x5f, + 0x66, + 0x75, + 0x6e, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x5f, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x5f, + 0x64, + 0x65, + 0x66, + 0x69, + 0x6e, + 0x65, + 0x64, + 0x28, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5f, + 0x74, + 0x6d, + 0x70, + 0x29, + 0x20, + 0x3f, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x5f, + 0x74, + 0x6d, + 0x70, + 0x20, + 0x3a, + 0x20, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x20, + 0x5b, + 0x5b, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x5f, + 0x64, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5d, + 0x5d, + 0x20, + 0x5b, + 0x32, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x30, + 0x20, + 0x5b, + 0x5b, + 0x75, + 0x73, + 0x65, + 0x72, + 0x28, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x30, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x31, + 0x20, + 0x5b, + 0x5b, + 0x75, + 0x73, + 0x65, + 0x72, + 0x28, + 0x63, + 0x6c, + 0x69, + 0x70, + 0x31, + 0x29, + 0x5d, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x36, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x2e, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x37, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x36, + 0x37, + 0x2e, + 0x7a, + 0x2c, + 0x20, + 0x2d, + 0x30, + 0x2e, + 0x35, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x37, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x37, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x31, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x61, + 0x62, + 0x73, + 0x28, + 0x5f, + 0x37, + 0x32, + 0x29, + 0x20, + 0x3c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x2e, + 0x77, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x37, + 0x32, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x3f, + 0x20, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x20, + 0x3a, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x38, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x38, + 0x30, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x5f, + 0x38, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x36, + 0x37, + 0x2e, + 0x78, + 0x79, + 0x20, + 0x2a, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x38, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x38, + 0x38, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x36, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x38, + 0x38, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x36, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x33, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x33, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x33, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x39, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x39, + 0x38, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x36, + 0x37, + 0x2e, + 0x78, + 0x2c, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x31, + 0x2c, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x32, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x2c, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x33, + 0x2c, + 0x20, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x31, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x36, + 0x37, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x31, + 0x31, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x2d, + 0x32, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x31, + 0x31, + 0x30, + 0x2c, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x33, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x36, + 0x37, + 0x2e, + 0x77, + 0x2c, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x38, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x31, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x2d, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x31, + 0x31, + 0x30, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x39, + 0x38, + 0x20, + 0x2b, + 0x20, + 0x31, + 0x29, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x36, + 0x37, + 0x2e, + 0x77, + 0x2c, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x38, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x2f, + 0x3d, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x31, + 0x5d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x2e, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x38, + 0x35, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x37, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x32, + 0x38, + 0x35, + 0x2e, + 0x7a, + 0x2c, + 0x20, + 0x2d, + 0x30, + 0x2e, + 0x35, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x36, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x37, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x36, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x36, + 0x31, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x61, + 0x62, + 0x73, + 0x28, + 0x5f, + 0x32, + 0x36, + 0x33, + 0x29, + 0x20, + 0x3c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x36, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x31, + 0x2e, + 0x77, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x36, + 0x33, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x3f, + 0x20, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x20, + 0x3a, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x36, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x32, + 0x37, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x30, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x30, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x32, + 0x38, + 0x35, + 0x2e, + 0x78, + 0x79, + 0x20, + 0x2a, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x32, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x34, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x39, + 0x32, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x37, + 0x37, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x37, + 0x37, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x37, + 0x37, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x37, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x37, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x36, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x7b, + 0x7d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x30, + 0x2e, + 0x78, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x36, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x35, + 0x36, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x61, + 0x63, + 0x6b, + 0x67, + 0x72, + 0x6f, + 0x75, + 0x6e, + 0x64, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x30, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x33, + 0x2e, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x2e, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x33, + 0x2e, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x2c, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x31, + 0x2c, + 0x20, + 0x62, + 0x69, + 0x61, + 0x73, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x6f, + 0x64, + 0x42, + 0x69, + 0x61, + 0x73, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x37, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x34, + 0x36, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x37, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x31, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x61, + 0x63, + 0x6b, + 0x67, + 0x72, + 0x6f, + 0x75, + 0x6e, + 0x64, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x34, + 0x35, + 0x39, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x38, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x38, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x38, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x37, + 0x38, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x35, + 0x36, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x35, + 0x34, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x35, + 0x36, + 0x33, + 0x3b, + 0x00, + 0x63, + 0x6f, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x74, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x31, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x7b, + 0x7d, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x34, + 0x2e, + 0x78, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x61, + 0x63, + 0x6b, + 0x67, + 0x72, + 0x6f, + 0x75, + 0x6e, + 0x64, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x35, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x34, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x33, + 0x2e, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x2e, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x33, + 0x2e, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x2c, + 0x20, + 0x5f, + 0x36, + 0x34, + 0x35, + 0x2c, + 0x20, + 0x62, + 0x69, + 0x61, + 0x73, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x6f, + 0x64, + 0x42, + 0x69, + 0x61, + 0x73, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x31, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x31, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x37, + 0x31, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x31, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x6d, + 0x61, + 0x74, + 0x65, + 0x72, + 0x69, + 0x61, + 0x6c, + 0x50, + 0x61, + 0x72, + 0x61, + 0x6d, + 0x73, + 0x2e, + 0x62, + 0x61, + 0x63, + 0x6b, + 0x67, + 0x72, + 0x6f, + 0x75, + 0x6e, + 0x64, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x36, + 0x39, + 0x33, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x38, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x31, + 0x32, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x38, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x31, + 0x32, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x38, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x37, + 0x31, + 0x32, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x36, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x35, + 0x33, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x35, + 0x33, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x69, + 0x6e, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x39, + 0x39, + 0x37, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x37, + 0x36, + 0x39, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x53, + 0x74, + 0x61, + 0x72, + 0x74, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4d, + 0x61, + 0x78, + 0x4f, + 0x70, + 0x61, + 0x63, + 0x69, + 0x74, + 0x79, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x31, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x61, + 0x73, + 0x5f, + 0x74, + 0x79, + 0x70, + 0x65, + 0x3c, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x32, + 0x3e, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4d, + 0x69, + 0x6e, + 0x4d, + 0x61, + 0x78, + 0x4d, + 0x69, + 0x70, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x28, + 0x68, + 0x61, + 0x6c, + 0x66, + 0x34, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x31, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x2e, + 0x73, + 0x61, + 0x6d, + 0x70, + 0x6c, + 0x65, + 0x28, + 0x73, + 0x70, + 0x76, + 0x44, + 0x65, + 0x73, + 0x63, + 0x72, + 0x69, + 0x70, + 0x74, + 0x6f, + 0x72, + 0x53, + 0x65, + 0x74, + 0x31, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x5f, + 0x66, + 0x6f, + 0x67, + 0x53, + 0x6d, + 0x70, + 0x6c, + 0x72, + 0x2c, + 0x20, + 0x28, + 0x74, + 0x72, + 0x61, + 0x6e, + 0x73, + 0x70, + 0x6f, + 0x73, + 0x65, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x78, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x30, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x31, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x75, + 0x73, + 0x65, + 0x72, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x57, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x5b, + 0x32, + 0x5d, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x35, + 0x33, + 0x34, + 0x29, + 0x2c, + 0x20, + 0x6c, + 0x65, + 0x76, + 0x65, + 0x6c, + 0x28, + 0x6d, + 0x69, + 0x78, + 0x28, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x31, + 0x34, + 0x2e, + 0x79, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x31, + 0x30, + 0x31, + 0x34, + 0x2e, + 0x78, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x63, + 0x6c, + 0x61, + 0x6d, + 0x70, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x37, + 0x36, + 0x39, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4f, + 0x6e, + 0x65, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x2c, + 0x20, + 0x2d, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x4f, + 0x76, + 0x65, + 0x72, + 0x46, + 0x61, + 0x72, + 0x4d, + 0x69, + 0x6e, + 0x75, + 0x73, + 0x4e, + 0x65, + 0x61, + 0x72, + 0x29, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x38, + 0x36, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x39, + 0x39, + 0x38, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x69, + 0x62, + 0x6c, + 0x4c, + 0x75, + 0x6d, + 0x69, + 0x6e, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x39, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x33, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x38, + 0x36, + 0x38, + 0x20, + 0x2b, + 0x20, + 0x28, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x49, + 0x6e, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x49, + 0x6e, + 0x74, + 0x65, + 0x6e, + 0x73, + 0x69, + 0x74, + 0x79, + 0x2e, + 0x77, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x70, + 0x6f, + 0x77, + 0x28, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x64, + 0x6f, + 0x74, + 0x28, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6e, + 0x6f, + 0x72, + 0x6d, + 0x61, + 0x6c, + 0x69, + 0x7a, + 0x65, + 0x28, + 0x5f, + 0x35, + 0x33, + 0x34, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x28, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x6c, + 0x69, + 0x67, + 0x68, + 0x74, + 0x44, + 0x69, + 0x72, + 0x65, + 0x63, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x29, + 0x29, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x69, + 0x7a, + 0x65, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x65, + 0x78, + 0x70, + 0x28, + 0x2d, + 0x28, + 0x5f, + 0x39, + 0x39, + 0x37, + 0x20, + 0x2a, + 0x20, + 0x66, + 0x61, + 0x73, + 0x74, + 0x3a, + 0x3a, + 0x6d, + 0x61, + 0x78, + 0x28, + 0x5f, + 0x37, + 0x36, + 0x39, + 0x20, + 0x2d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x66, + 0x6f, + 0x67, + 0x49, + 0x6e, + 0x73, + 0x63, + 0x61, + 0x74, + 0x74, + 0x65, + 0x72, + 0x69, + 0x6e, + 0x67, + 0x53, + 0x74, + 0x61, + 0x72, + 0x74, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x33, + 0x20, + 0x5f, + 0x39, + 0x31, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x35, + 0x33, + 0x36, + 0x2e, + 0x78, + 0x79, + 0x7a, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2d, + 0x20, + 0x5f, + 0x38, + 0x31, + 0x39, + 0x29, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x33, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x39, + 0x38, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x35, + 0x33, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x66, + 0x72, + 0x61, + 0x67, + 0x43, + 0x6f, + 0x6c, + 0x6f, + 0x72, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x31, + 0x30, + 0x30, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x32, + 0x20, + 0x3d, + 0x20, + 0x69, + 0x6e, + 0x2e, + 0x6d, + 0x65, + 0x73, + 0x68, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x39, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x32, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x39, + 0x34, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x33, + 0x35, + 0x32, + 0x2e, + 0x7a, + 0x2c, + 0x20, + 0x2d, + 0x30, + 0x2e, + 0x35, + 0x2c, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x72, + 0x61, + 0x6d, + 0x65, + 0x55, + 0x6e, + 0x69, + 0x66, + 0x6f, + 0x72, + 0x6d, + 0x73, + 0x2e, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x46, + 0x72, + 0x6f, + 0x6d, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x4d, + 0x61, + 0x74, + 0x72, + 0x69, + 0x78, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x39, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x33, + 0x33, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x38, + 0x2e, + 0x77, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x66, + 0x20, + 0x28, + 0x61, + 0x62, + 0x73, + 0x28, + 0x5f, + 0x33, + 0x33, + 0x30, + 0x29, + 0x20, + 0x3c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x39, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x39, + 0x38, + 0x2e, + 0x77, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x33, + 0x30, + 0x20, + 0x3c, + 0x20, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x3f, + 0x20, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x29, + 0x20, + 0x3a, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x38, + 0x34, + 0x32, + 0x30, + 0x32, + 0x32, + 0x65, + 0x2d, + 0x31, + 0x39, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x39, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x38, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x32, + 0x38, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x34, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x38, + 0x20, + 0x2a, + 0x20, + 0x28, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x34, + 0x31, + 0x38, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x39, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x5f, + 0x33, + 0x35, + 0x32, + 0x2e, + 0x78, + 0x79, + 0x20, + 0x2a, + 0x20, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x32, + 0x28, + 0x30, + 0x2e, + 0x35, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x20, + 0x5f, + 0x34, + 0x30, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x34, + 0x28, + 0x30, + 0x2e, + 0x30, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x30, + 0x31, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x39, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x34, + 0x30, + 0x31, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x39, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x61, + 0x72, + 0x69, + 0x61, + 0x62, + 0x6c, + 0x65, + 0x5f, + 0x69, + 0x6d, + 0x61, + 0x67, + 0x65, + 0x55, + 0x56, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x34, + 0x30, + 0x31, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x34, + 0x2e, + 0x78, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x79, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x34, + 0x2e, + 0x79, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x77, + 0x6f, + 0x72, + 0x6c, + 0x64, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x2e, + 0x7a, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x34, + 0x34, + 0x2e, + 0x7a, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x76, + 0x65, + 0x72, + 0x74, + 0x65, + 0x78, + 0x5f, + 0x70, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x39, + 0x34, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x69, + 0x6e, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x30, + 0x37, + 0x20, + 0x3d, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x69, + 0x6e, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5f, + 0x69, + 0x6e, + 0x64, + 0x65, + 0x78, + 0x20, + 0x25, + 0x20, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x43, + 0x4f, + 0x4e, + 0x46, + 0x49, + 0x47, + 0x5f, + 0x53, + 0x54, + 0x45, + 0x52, + 0x45, + 0x4f, + 0x5f, + 0x45, + 0x59, + 0x45, + 0x5f, + 0x43, + 0x4f, + 0x55, + 0x4e, + 0x54, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x35, + 0x20, + 0x3d, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x31, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x32, + 0x30, + 0x37, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x32, + 0x33, + 0x36, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x33, + 0x35, + 0x32, + 0x2e, + 0x78, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x35, + 0x2c, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x32, + 0x2e, + 0x30, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x30, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x31, + 0x2c, + 0x20, + 0x28, + 0x2d, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2b, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x35, + 0x29, + 0x20, + 0x2a, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x32, + 0x2e, + 0x77, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5f, + 0x33, + 0x39, + 0x34, + 0x2e, + 0x78, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x32, + 0x33, + 0x36, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x20, + 0x5f, + 0x34, + 0x32, + 0x30, + 0x20, + 0x3d, + 0x20, + 0x28, + 0x2d, + 0x32, + 0x2e, + 0x30, + 0x29, + 0x20, + 0x2f, + 0x20, + 0x5f, + 0x32, + 0x31, + 0x30, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x30, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x34, + 0x32, + 0x30, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x32, + 0x31, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x32, + 0x2e, + 0x77, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x33, + 0x36, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x43, + 0x6c, + 0x69, + 0x70, + 0x44, + 0x69, + 0x73, + 0x74, + 0x61, + 0x6e, + 0x63, + 0x65, + 0x5b, + 0x31, + 0x5d, + 0x20, + 0x3d, + 0x20, + 0x2d, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x66, + 0x6d, + 0x61, + 0x28, + 0x5f, + 0x34, + 0x32, + 0x30, + 0x2c, + 0x20, + 0x66, + 0x6c, + 0x6f, + 0x61, + 0x74, + 0x28, + 0x5f, + 0x32, + 0x30, + 0x37, + 0x20, + 0x2b, + 0x20, + 0x31, + 0x29, + 0x2c, + 0x20, + 0x31, + 0x2e, + 0x30, + 0x29, + 0x2c, + 0x20, + 0x5f, + 0x33, + 0x35, + 0x32, + 0x2e, + 0x77, + 0x2c, + 0x20, + 0x5f, + 0x32, + 0x33, + 0x36, + 0x29, + 0x3b, + 0x00, + 0x20, + 0x20, + 0x20, + 0x20, + 0x6f, + 0x75, + 0x74, + 0x2e, + 0x67, + 0x6c, + 0x5f, + 0x50, + 0x6f, + 0x73, + 0x69, + 0x74, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x3d, + 0x20, + 0x5f, + 0x33, + 0x39, + 0x34, + 0x3b, + 0x00, + 0x4c, + 0x53, + 0x4c, + 0x47, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0xf6, + 0x0b, + 0x00, + 0x00, + 0x12, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x86, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x01, + 0x96, + 0x01, + 0x00, + 0x00, + 0x01, + 0x10, + 0x00, + 0x86, + 0x00, + 0x00, + 0x00, + 0x01, + 0x10, + 0x01, + 0xe8, + 0x02, + 0x00, + 0x00, + 0x01, + 0x20, + 0x01, + 0xfc, + 0x02, + 0x00, + 0x00, + 0x01, + 0x30, + 0x01, + 0xc4, + 0x04, + 0x00, + 0x00, + 0x01, + 0x44, + 0x01, + 0x06, + 0x05, + 0x00, + 0x00, + 0x01, + 0x80, + 0x00, + 0x1e, + 0x05, + 0x00, + 0x00, + 0x01, + 0x90, + 0x00, + 0x1e, + 0x05, + 0x00, + 0x00, + 0x02, + 0x00, + 0x00, + 0x4a, + 0x06, + 0x00, + 0x00, + 0x02, + 0x00, + 0x01, + 0x5c, + 0x07, + 0x00, + 0x00, + 0x02, + 0x10, + 0x00, + 0x4a, + 0x06, + 0x00, + 0x00, + 0x02, + 0x10, + 0x01, + 0xac, + 0x08, + 0x00, + 0x00, + 0x02, + 0x20, + 0x01, + 0xbe, + 0x08, + 0x00, + 0x00, + 0x02, + 0x30, + 0x01, + 0x74, + 0x0a, + 0x00, + 0x00, + 0x02, + 0x44, + 0x01, + 0xb4, + 0x0a, + 0x00, + 0x00, + 0x02, + 0x80, + 0x00, + 0xca, + 0x0a, + 0x00, + 0x00, + 0x02, + 0x90, + 0x00, + 0xca, + 0x0a, + 0x00, + 0x00, + 0x82, + 0x09, + 0x00, + 0x00, + 0x84, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x02, + 0x00, + 0x03, + 0x00, + 0x04, + 0x00, + 0x05, + 0x00, + 0x06, + 0x00, + 0x07, + 0x00, + 0x08, + 0x00, + 0x09, + 0x00, + 0x0a, + 0x00, + 0x02, + 0x00, + 0x0b, + 0x00, + 0x0c, + 0x00, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x10, + 0x00, + 0x11, + 0x00, + 0x12, + 0x00, + 0x13, + 0x00, + 0x14, + 0x00, + 0x15, + 0x00, + 0x16, + 0x00, + 0x17, + 0x00, + 0x18, + 0x00, + 0x19, + 0x00, + 0x1a, + 0x00, + 0x1b, + 0x00, + 0x1c, + 0x00, + 0x1d, + 0x00, + 0x1e, + 0x00, + 0x1f, + 0x00, + 0x20, + 0x00, + 0x21, + 0x00, + 0x22, + 0x00, + 0x23, + 0x00, + 0x24, + 0x00, + 0x25, + 0x00, + 0x26, + 0x00, + 0x27, + 0x00, + 0x28, + 0x00, + 0x29, + 0x00, + 0x2a, + 0x00, + 0x2b, + 0x00, + 0x2c, + 0x00, + 0x2d, + 0x00, + 0x2e, + 0x00, + 0x2f, + 0x00, + 0x30, + 0x00, + 0x31, + 0x00, + 0x32, + 0x00, + 0x33, + 0x00, + 0x34, + 0x00, + 0x35, + 0x00, + 0x36, + 0x00, + 0x37, + 0x00, + 0x38, + 0x00, + 0x39, + 0x00, + 0x3a, + 0x00, + 0x3b, + 0x00, + 0x3c, + 0x00, + 0x3d, + 0x00, + 0x3e, + 0x00, + 0x3f, + 0x00, + 0x40, + 0x00, + 0x41, + 0x00, + 0x42, + 0x00, + 0x43, + 0x00, + 0x44, + 0x00, + 0x45, + 0x00, + 0x46, + 0x00, + 0x47, + 0x00, + 0x48, + 0x00, + 0x49, + 0x00, + 0x4a, + 0x00, + 0x4b, + 0x00, + 0x4c, + 0x00, + 0x4d, + 0x00, + 0x4e, + 0x00, + 0x4f, + 0x00, + 0x50, + 0x00, + 0x51, + 0x00, + 0x52, + 0x00, + 0x53, + 0x00, + 0x54, + 0x00, + 0x55, + 0x00, + 0x56, + 0x00, + 0x57, + 0x00, + 0x58, + 0x00, + 0x59, + 0x00, + 0x5a, + 0x00, + 0x02, + 0x00, + 0x5b, + 0x00, + 0x02, + 0x00, + 0x5c, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x5f, + 0x00, + 0x5d, + 0x00, + 0x60, + 0x00, + 0x61, + 0x00, + 0x62, + 0x00, + 0x63, + 0x00, + 0x64, + 0x00, + 0x65, + 0x00, + 0x66, + 0x00, + 0x02, + 0x00, + 0x67, + 0x00, + 0x68, + 0x00, + 0x69, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x6a, + 0x00, + 0x5d, + 0x00, + 0x6b, + 0x00, + 0x6c, + 0x00, + 0x6d, + 0x00, + 0x6e, + 0x00, + 0x6f, + 0x00, + 0x70, + 0x00, + 0x71, + 0x00, + 0x72, + 0x00, + 0x73, + 0x00, + 0x74, + 0x00, + 0x75, + 0x00, + 0x76, + 0x00, + 0x77, + 0x00, + 0x78, + 0x00, + 0x5d, + 0x00, + 0xbf, + 0x09, + 0x00, + 0x00, + 0xa5, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x79, + 0x00, + 0x7a, + 0x00, + 0x7b, + 0x00, + 0x02, + 0x00, + 0x7c, + 0x00, + 0x7d, + 0x00, + 0x7e, + 0x00, + 0x7f, + 0x00, + 0x80, + 0x00, + 0x81, + 0x00, + 0x05, + 0x00, + 0x82, + 0x00, + 0x83, + 0x00, + 0x84, + 0x00, + 0x85, + 0x00, + 0x86, + 0x00, + 0x0a, + 0x00, + 0x02, + 0x00, + 0x87, + 0x00, + 0x88, + 0x00, + 0x89, + 0x00, + 0x8a, + 0x00, + 0x8b, + 0x00, + 0x8c, + 0x00, + 0x8d, + 0x00, + 0x8e, + 0x00, + 0x8f, + 0x00, + 0x90, + 0x00, + 0x91, + 0x00, + 0x92, + 0x00, + 0x93, + 0x00, + 0x94, + 0x00, + 0x95, + 0x00, + 0x96, + 0x00, + 0x97, + 0x00, + 0x98, + 0x00, + 0x99, + 0x00, + 0x9a, + 0x00, + 0x9b, + 0x00, + 0x9c, + 0x00, + 0x9d, + 0x00, + 0x9e, + 0x00, + 0x9f, + 0x00, + 0xa0, + 0x00, + 0xa1, + 0x00, + 0xa2, + 0x00, + 0xa3, + 0x00, + 0xa4, + 0x00, + 0xa5, + 0x00, + 0xa6, + 0x00, + 0xa7, + 0x00, + 0xa8, + 0x00, + 0xa9, + 0x00, + 0xaa, + 0x00, + 0xab, + 0x00, + 0xac, + 0x00, + 0xad, + 0x00, + 0xae, + 0x00, + 0xaf, + 0x00, + 0xb0, + 0x00, + 0xb1, + 0x00, + 0xb2, + 0x00, + 0xb3, + 0x00, + 0xb4, + 0x00, + 0xb5, + 0x00, + 0xb6, + 0x00, + 0xb7, + 0x00, + 0xb8, + 0x00, + 0xb9, + 0x00, + 0xba, + 0x00, + 0xbb, + 0x00, + 0xbc, + 0x00, + 0xbd, + 0x00, + 0xbe, + 0x00, + 0xbf, + 0x00, + 0xc0, + 0x00, + 0xc1, + 0x00, + 0xc2, + 0x00, + 0xc3, + 0x00, + 0xc4, + 0x00, + 0xc5, + 0x00, + 0xc6, + 0x00, + 0xc7, + 0x00, + 0xc8, + 0x00, + 0xc9, + 0x00, + 0xca, + 0x00, + 0xcb, + 0x00, + 0xcc, + 0x00, + 0xcd, + 0x00, + 0xce, + 0x00, + 0xcf, + 0x00, + 0x54, + 0x00, + 0xd0, + 0x00, + 0x02, + 0x00, + 0x87, + 0x00, + 0xd1, + 0x00, + 0xd2, + 0x00, + 0xd3, + 0x00, + 0xd4, + 0x00, + 0xd5, + 0x00, + 0xd6, + 0x00, + 0x5a, + 0x00, + 0x02, + 0x00, + 0xd7, + 0x00, + 0xd8, + 0x00, + 0xd9, + 0x00, + 0xda, + 0x00, + 0x02, + 0x00, + 0xdb, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0xdc, + 0x00, + 0x5d, + 0x00, + 0xdd, + 0x00, + 0xde, + 0x00, + 0x02, + 0x00, + 0xdf, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0xe0, + 0x00, + 0x5d, + 0x00, + 0xe1, + 0x00, + 0xe2, + 0x00, + 0x02, + 0x00, + 0xe3, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0xe4, + 0x00, + 0x5d, + 0x00, + 0xe5, + 0x00, + 0xe6, + 0x00, + 0x02, + 0x00, + 0xe7, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0xe8, + 0x00, + 0x5d, + 0x00, + 0xe9, + 0x00, + 0xea, + 0x00, + 0x02, + 0x00, + 0xeb, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0xec, + 0x00, + 0xed, + 0x00, + 0xee, + 0x00, + 0xef, + 0x00, + 0xf0, + 0x00, + 0xf1, + 0x00, + 0xf2, + 0x00, + 0xf3, + 0x00, + 0xf4, + 0x00, + 0xf5, + 0x00, + 0xf6, + 0x00, + 0xf7, + 0x00, + 0xf8, + 0x00, + 0x5d, + 0x00, + 0xf9, + 0x00, + 0x5d, + 0x00, + 0x51, + 0x00, + 0x00, + 0x00, + 0x06, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x79, + 0x00, + 0x7a, + 0x00, + 0x5a, + 0x00, + 0x02, + 0x00, + 0x5d, + 0x00, + 0x80, + 0x10, + 0x00, + 0x00, + 0xe0, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x79, + 0x00, + 0x7a, + 0x00, + 0x7b, + 0x00, + 0x02, + 0x00, + 0x7c, + 0x00, + 0x7d, + 0x00, + 0x7e, + 0x00, + 0x7f, + 0x00, + 0x80, + 0x00, + 0x81, + 0x00, + 0x05, + 0x00, + 0xfa, + 0x00, + 0xfb, + 0x00, + 0xfc, + 0x00, + 0xfd, + 0x00, + 0xfe, + 0x00, + 0x0a, + 0x00, + 0x02, + 0x00, + 0x87, + 0x00, + 0x88, + 0x00, + 0x89, + 0x00, + 0x8a, + 0x00, + 0x8b, + 0x00, + 0x8c, + 0x00, + 0x8d, + 0x00, + 0x8e, + 0x00, + 0x8f, + 0x00, + 0x90, + 0x00, + 0x91, + 0x00, + 0x92, + 0x00, + 0x93, + 0x00, + 0x94, + 0x00, + 0x95, + 0x00, + 0x96, + 0x00, + 0x97, + 0x00, + 0x98, + 0x00, + 0x99, + 0x00, + 0x9a, + 0x00, + 0x9b, + 0x00, + 0x9c, + 0x00, + 0x9d, + 0x00, + 0x9e, + 0x00, + 0x9f, + 0x00, + 0xa0, + 0x00, + 0xa1, + 0x00, + 0xa2, + 0x00, + 0xa3, + 0x00, + 0xa4, + 0x00, + 0xa5, + 0x00, + 0xa6, + 0x00, + 0xa7, + 0x00, + 0xa8, + 0x00, + 0xa9, + 0x00, + 0xaa, + 0x00, + 0xab, + 0x00, + 0xac, + 0x00, + 0xad, + 0x00, + 0xae, + 0x00, + 0xaf, + 0x00, + 0xb0, + 0x00, + 0xb1, + 0x00, + 0xb2, + 0x00, + 0xb3, + 0x00, + 0xb4, + 0x00, + 0xb5, + 0x00, + 0xb6, + 0x00, + 0xb7, + 0x00, + 0xb8, + 0x00, + 0xb9, + 0x00, + 0xba, + 0x00, + 0xbb, + 0x00, + 0xbc, + 0x00, + 0xbd, + 0x00, + 0xbe, + 0x00, + 0xbf, + 0x00, + 0xc0, + 0x00, + 0xc1, + 0x00, + 0xc2, + 0x00, + 0xc3, + 0x00, + 0xc4, + 0x00, + 0xc5, + 0x00, + 0xc6, + 0x00, + 0xc7, + 0x00, + 0xc8, + 0x00, + 0xc9, + 0x00, + 0xca, + 0x00, + 0xcb, + 0x00, + 0xcc, + 0x00, + 0xcd, + 0x00, + 0xce, + 0x00, + 0xcf, + 0x00, + 0x54, + 0x00, + 0xd0, + 0x00, + 0x02, + 0x00, + 0x87, + 0x00, + 0xd1, + 0x00, + 0xd2, + 0x00, + 0xd3, + 0x00, + 0xff, + 0x00, + 0xd4, + 0x00, + 0x00, + 0x01, + 0xd5, + 0x00, + 0xd6, + 0x00, + 0x01, + 0x01, + 0x02, + 0x00, + 0x02, + 0x01, + 0x03, + 0x01, + 0x02, + 0x00, + 0x04, + 0x01, + 0x5d, + 0x00, + 0x05, + 0x01, + 0x06, + 0x01, + 0x07, + 0x01, + 0x02, + 0x00, + 0x08, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x09, + 0x01, + 0x5d, + 0x00, + 0x0a, + 0x01, + 0x0b, + 0x01, + 0x0c, + 0x01, + 0x0d, + 0x01, + 0x0e, + 0x01, + 0x02, + 0x00, + 0x0f, + 0x01, + 0x10, + 0x01, + 0x11, + 0x01, + 0x12, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x13, + 0x01, + 0x5d, + 0x00, + 0x14, + 0x01, + 0x15, + 0x01, + 0x16, + 0x01, + 0x02, + 0x00, + 0x17, + 0x01, + 0x18, + 0x01, + 0x19, + 0x01, + 0x1a, + 0x01, + 0x1b, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x1c, + 0x01, + 0x5d, + 0x00, + 0x1d, + 0x01, + 0x1e, + 0x01, + 0x1f, + 0x01, + 0x20, + 0x01, + 0x21, + 0x01, + 0x04, + 0x01, + 0x5d, + 0x00, + 0x5a, + 0x00, + 0x02, + 0x00, + 0x22, + 0x01, + 0x23, + 0x01, + 0x24, + 0x01, + 0x25, + 0x01, + 0x02, + 0x00, + 0x26, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x27, + 0x01, + 0x5d, + 0x00, + 0x28, + 0x01, + 0x29, + 0x01, + 0x02, + 0x00, + 0x2a, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x2b, + 0x01, + 0x5d, + 0x00, + 0x2c, + 0x01, + 0x2d, + 0x01, + 0x02, + 0x00, + 0x2e, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x2f, + 0x01, + 0x5d, + 0x00, + 0x30, + 0x01, + 0x31, + 0x01, + 0x02, + 0x00, + 0x32, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x33, + 0x01, + 0x5d, + 0x00, + 0x34, + 0x01, + 0x35, + 0x01, + 0x02, + 0x00, + 0x36, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x37, + 0x01, + 0x38, + 0x01, + 0x39, + 0x01, + 0x3a, + 0x01, + 0x3b, + 0x01, + 0x3c, + 0x01, + 0x3d, + 0x01, + 0x3e, + 0x01, + 0x3f, + 0x01, + 0x40, + 0x01, + 0x41, + 0x01, + 0x42, + 0x01, + 0x43, + 0x01, + 0x5d, + 0x00, + 0x44, + 0x01, + 0x45, + 0x01, + 0x46, + 0x01, + 0x47, + 0x01, + 0x48, + 0x01, + 0x5d, + 0x00, + 0xec, + 0x02, + 0x00, + 0x00, + 0x1d, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x79, + 0x00, + 0x7a, + 0x00, + 0x49, + 0x01, + 0x02, + 0x00, + 0x4a, + 0x01, + 0x4b, + 0x01, + 0x4c, + 0x01, + 0x4d, + 0x01, + 0x4e, + 0x01, + 0x4f, + 0x01, + 0x50, + 0x01, + 0x05, + 0x00, + 0x51, + 0x01, + 0x52, + 0x01, + 0x08, + 0x00, + 0x53, + 0x01, + 0x54, + 0x01, + 0x55, + 0x01, + 0x02, + 0x00, + 0x56, + 0x01, + 0x57, + 0x01, + 0x58, + 0x01, + 0x59, + 0x01, + 0x5a, + 0x00, + 0x02, + 0x00, + 0x5a, + 0x01, + 0x5b, + 0x01, + 0x5d, + 0x00, + 0x91, + 0x00, + 0x00, + 0x00, + 0x08, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x79, + 0x00, + 0x7a, + 0x00, + 0xd6, + 0x00, + 0x5a, + 0x00, + 0x02, + 0x00, + 0x5c, + 0x01, + 0x5d, + 0x00, + 0xba, + 0x0b, + 0x00, + 0x00, + 0x92, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x5d, + 0x01, + 0x01, + 0x00, + 0x02, + 0x00, + 0x03, + 0x00, + 0x04, + 0x00, + 0x05, + 0x00, + 0x06, + 0x00, + 0x07, + 0x00, + 0x08, + 0x00, + 0x09, + 0x00, + 0x5e, + 0x01, + 0x5f, + 0x01, + 0x08, + 0x00, + 0x60, + 0x01, + 0x0a, + 0x00, + 0x02, + 0x00, + 0x0b, + 0x00, + 0x0c, + 0x00, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x10, + 0x00, + 0x11, + 0x00, + 0x12, + 0x00, + 0x13, + 0x00, + 0x14, + 0x00, + 0x15, + 0x00, + 0x16, + 0x00, + 0x17, + 0x00, + 0x18, + 0x00, + 0x19, + 0x00, + 0x1a, + 0x00, + 0x1b, + 0x00, + 0x1c, + 0x00, + 0x1d, + 0x00, + 0x1e, + 0x00, + 0x1f, + 0x00, + 0x20, + 0x00, + 0x21, + 0x00, + 0x22, + 0x00, + 0x23, + 0x00, + 0x24, + 0x00, + 0x25, + 0x00, + 0x26, + 0x00, + 0x27, + 0x00, + 0x28, + 0x00, + 0x29, + 0x00, + 0x2a, + 0x00, + 0x2b, + 0x00, + 0x2c, + 0x00, + 0x2d, + 0x00, + 0x2e, + 0x00, + 0x2f, + 0x00, + 0x30, + 0x00, + 0x31, + 0x00, + 0x32, + 0x00, + 0x33, + 0x00, + 0x34, + 0x00, + 0x35, + 0x00, + 0x36, + 0x00, + 0x37, + 0x00, + 0x38, + 0x00, + 0x39, + 0x00, + 0x3a, + 0x00, + 0x3b, + 0x00, + 0x3c, + 0x00, + 0x3d, + 0x00, + 0x3e, + 0x00, + 0x3f, + 0x00, + 0x40, + 0x00, + 0x41, + 0x00, + 0x42, + 0x00, + 0x43, + 0x00, + 0x44, + 0x00, + 0x45, + 0x00, + 0x46, + 0x00, + 0x47, + 0x00, + 0x48, + 0x00, + 0x49, + 0x00, + 0x4a, + 0x00, + 0x4b, + 0x00, + 0x4c, + 0x00, + 0x4d, + 0x00, + 0x4e, + 0x00, + 0x4f, + 0x00, + 0x50, + 0x00, + 0x51, + 0x00, + 0x52, + 0x00, + 0x53, + 0x00, + 0x54, + 0x00, + 0x55, + 0x00, + 0x56, + 0x00, + 0x57, + 0x00, + 0x58, + 0x00, + 0x59, + 0x00, + 0x5a, + 0x00, + 0x02, + 0x00, + 0x5b, + 0x00, + 0x02, + 0x00, + 0x5c, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x5f, + 0x00, + 0x5d, + 0x00, + 0x61, + 0x01, + 0x62, + 0x01, + 0x63, + 0x01, + 0x64, + 0x01, + 0x65, + 0x01, + 0x66, + 0x01, + 0x67, + 0x01, + 0x02, + 0x00, + 0x68, + 0x01, + 0x69, + 0x01, + 0x6a, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x6b, + 0x01, + 0x5d, + 0x00, + 0x6c, + 0x01, + 0x6d, + 0x01, + 0x6e, + 0x01, + 0x6f, + 0x01, + 0x70, + 0x01, + 0x71, + 0x01, + 0x72, + 0x01, + 0x73, + 0x01, + 0x74, + 0x01, + 0x75, + 0x01, + 0x76, + 0x01, + 0x77, + 0x01, + 0x78, + 0x01, + 0x79, + 0x01, + 0x7a, + 0x01, + 0x7b, + 0x01, + 0x7c, + 0x01, + 0x7d, + 0x01, + 0x7e, + 0x01, + 0x7f, + 0x01, + 0x80, + 0x01, + 0x81, + 0x01, + 0x82, + 0x01, + 0x5d, + 0x00, + 0xd7, + 0x08, + 0x00, + 0x00, + 0x85, + 0x00, + 0x00, + 0x00, + 0x83, + 0x01, + 0x84, + 0x01, + 0x01, + 0x00, + 0x02, + 0x00, + 0x03, + 0x00, + 0x04, + 0x00, + 0x05, + 0x00, + 0x06, + 0x00, + 0x07, + 0x00, + 0x08, + 0x00, + 0x09, + 0x00, + 0x0a, + 0x00, + 0x02, + 0x00, + 0x0b, + 0x00, + 0x0c, + 0x00, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x10, + 0x00, + 0x11, + 0x00, + 0x12, + 0x00, + 0x13, + 0x00, + 0x14, + 0x00, + 0x15, + 0x00, + 0x16, + 0x00, + 0x17, + 0x00, + 0x18, + 0x00, + 0x19, + 0x00, + 0x96, + 0x00, + 0x97, + 0x00, + 0x98, + 0x00, + 0x1d, + 0x00, + 0x1e, + 0x00, + 0x1f, + 0x00, + 0x20, + 0x00, + 0x9d, + 0x00, + 0x9e, + 0x00, + 0x9f, + 0x00, + 0xa0, + 0x00, + 0xa1, + 0x00, + 0xa2, + 0x00, + 0xa3, + 0x00, + 0xa4, + 0x00, + 0xa5, + 0x00, + 0xa6, + 0x00, + 0xa7, + 0x00, + 0x2c, + 0x00, + 0xa9, + 0x00, + 0xaa, + 0x00, + 0xab, + 0x00, + 0x30, + 0x00, + 0xad, + 0x00, + 0xae, + 0x00, + 0x33, + 0x00, + 0xb0, + 0x00, + 0xb1, + 0x00, + 0x36, + 0x00, + 0xb3, + 0x00, + 0xb4, + 0x00, + 0xb5, + 0x00, + 0xb6, + 0x00, + 0x3b, + 0x00, + 0x3c, + 0x00, + 0xb9, + 0x00, + 0x3e, + 0x00, + 0x3f, + 0x00, + 0x40, + 0x00, + 0xbd, + 0x00, + 0xbe, + 0x00, + 0x43, + 0x00, + 0xc0, + 0x00, + 0x45, + 0x00, + 0x46, + 0x00, + 0x47, + 0x00, + 0x48, + 0x00, + 0x49, + 0x00, + 0xc6, + 0x00, + 0xc7, + 0x00, + 0xc8, + 0x00, + 0xc9, + 0x00, + 0x4e, + 0x00, + 0xcb, + 0x00, + 0xcc, + 0x00, + 0xcd, + 0x00, + 0xce, + 0x00, + 0xcf, + 0x00, + 0x54, + 0x00, + 0x55, + 0x00, + 0x85, + 0x01, + 0x86, + 0x01, + 0x87, + 0x01, + 0x88, + 0x01, + 0x5a, + 0x00, + 0x02, + 0x00, + 0x5b, + 0x00, + 0x02, + 0x00, + 0x5c, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x5f, + 0x00, + 0x5d, + 0x00, + 0x89, + 0x01, + 0x8a, + 0x01, + 0x8b, + 0x01, + 0x8c, + 0x01, + 0x8d, + 0x01, + 0x8e, + 0x01, + 0x8f, + 0x01, + 0x02, + 0x00, + 0x90, + 0x01, + 0x91, + 0x01, + 0x92, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x93, + 0x01, + 0x5d, + 0x00, + 0x94, + 0x01, + 0x95, + 0x01, + 0x96, + 0x01, + 0x97, + 0x01, + 0x98, + 0x01, + 0x99, + 0x01, + 0x9a, + 0x01, + 0x9b, + 0x01, + 0x73, + 0x00, + 0x74, + 0x00, + 0x75, + 0x00, + 0x9c, + 0x01, + 0x9d, + 0x01, + 0x9e, + 0x01, + 0x5d, + 0x00, + 0xe9, + 0x08, + 0x00, + 0x00, + 0xa4, + 0x00, + 0x00, + 0x00, + 0x83, + 0x01, + 0x84, + 0x01, + 0x7b, + 0x00, + 0x02, + 0x00, + 0x7c, + 0x00, + 0x7d, + 0x00, + 0x7e, + 0x00, + 0x7f, + 0x00, + 0x80, + 0x00, + 0x81, + 0x00, + 0x05, + 0x00, + 0x82, + 0x00, + 0x83, + 0x00, + 0x84, + 0x00, + 0x85, + 0x00, + 0x86, + 0x00, + 0x0a, + 0x00, + 0x02, + 0x00, + 0x0b, + 0x00, + 0x0c, + 0x00, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x10, + 0x00, + 0x11, + 0x00, + 0x12, + 0x00, + 0x13, + 0x00, + 0x14, + 0x00, + 0x15, + 0x00, + 0x16, + 0x00, + 0x17, + 0x00, + 0x18, + 0x00, + 0x19, + 0x00, + 0x96, + 0x00, + 0x97, + 0x00, + 0x98, + 0x00, + 0x1d, + 0x00, + 0x1e, + 0x00, + 0x1f, + 0x00, + 0x20, + 0x00, + 0x9d, + 0x00, + 0x9e, + 0x00, + 0x9f, + 0x00, + 0xa0, + 0x00, + 0xa1, + 0x00, + 0xa2, + 0x00, + 0xa3, + 0x00, + 0xa4, + 0x00, + 0xa5, + 0x00, + 0xa6, + 0x00, + 0xa7, + 0x00, + 0x2c, + 0x00, + 0xa9, + 0x00, + 0xaa, + 0x00, + 0xab, + 0x00, + 0x30, + 0x00, + 0xad, + 0x00, + 0xae, + 0x00, + 0x33, + 0x00, + 0xb0, + 0x00, + 0xb1, + 0x00, + 0x36, + 0x00, + 0xb3, + 0x00, + 0xb4, + 0x00, + 0xb5, + 0x00, + 0xb6, + 0x00, + 0x3b, + 0x00, + 0x3c, + 0x00, + 0xb9, + 0x00, + 0x3e, + 0x00, + 0x3f, + 0x00, + 0x40, + 0x00, + 0xbd, + 0x00, + 0xbe, + 0x00, + 0x43, + 0x00, + 0xc0, + 0x00, + 0x45, + 0x00, + 0x46, + 0x00, + 0x47, + 0x00, + 0x48, + 0x00, + 0x49, + 0x00, + 0xc6, + 0x00, + 0xc7, + 0x00, + 0xc8, + 0x00, + 0xc9, + 0x00, + 0x4e, + 0x00, + 0xcb, + 0x00, + 0xcc, + 0x00, + 0xcd, + 0x00, + 0xce, + 0x00, + 0xcf, + 0x00, + 0x54, + 0x00, + 0xd0, + 0x00, + 0x02, + 0x00, + 0x0b, + 0x00, + 0xd1, + 0x00, + 0xd2, + 0x00, + 0xd3, + 0x00, + 0x9f, + 0x01, + 0xa0, + 0x01, + 0xd6, + 0x00, + 0x5a, + 0x00, + 0x02, + 0x00, + 0xa1, + 0x01, + 0xa2, + 0x01, + 0xd8, + 0x00, + 0xd9, + 0x00, + 0xda, + 0x00, + 0x02, + 0x00, + 0xdb, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0xdc, + 0x00, + 0x5d, + 0x00, + 0xdd, + 0x00, + 0xde, + 0x00, + 0x02, + 0x00, + 0xdf, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0xe0, + 0x00, + 0x5d, + 0x00, + 0xe1, + 0x00, + 0xe2, + 0x00, + 0x02, + 0x00, + 0xe3, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0xe4, + 0x00, + 0x5d, + 0x00, + 0xe5, + 0x00, + 0xe6, + 0x00, + 0x02, + 0x00, + 0xe7, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0xe8, + 0x00, + 0x5d, + 0x00, + 0xe9, + 0x00, + 0xea, + 0x00, + 0x02, + 0x00, + 0xeb, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0xec, + 0x00, + 0xed, + 0x00, + 0xee, + 0x00, + 0xef, + 0x00, + 0xf0, + 0x00, + 0xf1, + 0x00, + 0xf2, + 0x00, + 0xf3, + 0x00, + 0xa3, + 0x01, + 0xa4, + 0x01, + 0xa5, + 0x01, + 0xa6, + 0x01, + 0x5d, + 0x00, + 0xf9, + 0x00, + 0x5d, + 0x00, + 0x52, + 0x00, + 0x00, + 0x00, + 0x05, + 0x00, + 0x00, + 0x00, + 0x83, + 0x01, + 0x84, + 0x01, + 0x5a, + 0x00, + 0x02, + 0x00, + 0x5d, + 0x00, + 0xa5, + 0x0e, + 0x00, + 0x00, + 0xd7, + 0x00, + 0x00, + 0x00, + 0x83, + 0x01, + 0x84, + 0x01, + 0x7b, + 0x00, + 0x02, + 0x00, + 0x7c, + 0x00, + 0x7d, + 0x00, + 0x7e, + 0x00, + 0x7f, + 0x00, + 0x80, + 0x00, + 0x81, + 0x00, + 0x05, + 0x00, + 0xfa, + 0x00, + 0xfb, + 0x00, + 0xfc, + 0x00, + 0xfd, + 0x00, + 0xfe, + 0x00, + 0x0a, + 0x00, + 0x02, + 0x00, + 0x0b, + 0x00, + 0x0c, + 0x00, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x10, + 0x00, + 0x11, + 0x00, + 0x12, + 0x00, + 0x13, + 0x00, + 0x14, + 0x00, + 0x15, + 0x00, + 0x16, + 0x00, + 0x17, + 0x00, + 0x18, + 0x00, + 0x19, + 0x00, + 0x96, + 0x00, + 0x97, + 0x00, + 0x98, + 0x00, + 0x1d, + 0x00, + 0x1e, + 0x00, + 0x1f, + 0x00, + 0x20, + 0x00, + 0x9d, + 0x00, + 0x9e, + 0x00, + 0x9f, + 0x00, + 0xa0, + 0x00, + 0xa1, + 0x00, + 0xa2, + 0x00, + 0xa3, + 0x00, + 0xa4, + 0x00, + 0xa5, + 0x00, + 0xa6, + 0x00, + 0xa7, + 0x00, + 0x2c, + 0x00, + 0xa9, + 0x00, + 0xaa, + 0x00, + 0xab, + 0x00, + 0x30, + 0x00, + 0xad, + 0x00, + 0xae, + 0x00, + 0x33, + 0x00, + 0xb0, + 0x00, + 0xb1, + 0x00, + 0x36, + 0x00, + 0xb3, + 0x00, + 0xb4, + 0x00, + 0xb5, + 0x00, + 0xb6, + 0x00, + 0x3b, + 0x00, + 0x3c, + 0x00, + 0xb9, + 0x00, + 0x3e, + 0x00, + 0x3f, + 0x00, + 0x40, + 0x00, + 0xbd, + 0x00, + 0xbe, + 0x00, + 0x43, + 0x00, + 0xc0, + 0x00, + 0x45, + 0x00, + 0x46, + 0x00, + 0x47, + 0x00, + 0x48, + 0x00, + 0x49, + 0x00, + 0xc6, + 0x00, + 0xc7, + 0x00, + 0xc8, + 0x00, + 0xc9, + 0x00, + 0x4e, + 0x00, + 0xcb, + 0x00, + 0xcc, + 0x00, + 0xcd, + 0x00, + 0xce, + 0x00, + 0xcf, + 0x00, + 0x54, + 0x00, + 0xd0, + 0x00, + 0x02, + 0x00, + 0x0b, + 0x00, + 0xd1, + 0x00, + 0xd2, + 0x00, + 0xd3, + 0x00, + 0xa7, + 0x01, + 0x9f, + 0x01, + 0xa8, + 0x01, + 0xa0, + 0x01, + 0xd6, + 0x00, + 0xa9, + 0x01, + 0x02, + 0x00, + 0xaa, + 0x01, + 0x03, + 0x01, + 0x02, + 0x00, + 0x04, + 0x01, + 0x5d, + 0x00, + 0xab, + 0x01, + 0xac, + 0x01, + 0x07, + 0x01, + 0x02, + 0x00, + 0x08, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x09, + 0x01, + 0x5d, + 0x00, + 0xad, + 0x01, + 0x0d, + 0x01, + 0x0e, + 0x01, + 0x02, + 0x00, + 0xae, + 0x01, + 0xaf, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x13, + 0x01, + 0x5d, + 0x00, + 0x14, + 0x01, + 0x15, + 0x01, + 0x16, + 0x01, + 0x02, + 0x00, + 0xb0, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x1c, + 0x01, + 0x5d, + 0x00, + 0x1d, + 0x01, + 0x1e, + 0x01, + 0x1f, + 0x01, + 0x20, + 0x01, + 0x21, + 0x01, + 0x04, + 0x01, + 0x5d, + 0x00, + 0x5a, + 0x00, + 0x02, + 0x00, + 0xb1, + 0x01, + 0xb2, + 0x01, + 0x23, + 0x01, + 0x24, + 0x01, + 0x25, + 0x01, + 0x02, + 0x00, + 0x26, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x27, + 0x01, + 0x5d, + 0x00, + 0x28, + 0x01, + 0x29, + 0x01, + 0x02, + 0x00, + 0x2a, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x2b, + 0x01, + 0x5d, + 0x00, + 0x2c, + 0x01, + 0x2d, + 0x01, + 0x02, + 0x00, + 0x2e, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x2f, + 0x01, + 0x5d, + 0x00, + 0x30, + 0x01, + 0x31, + 0x01, + 0x02, + 0x00, + 0x32, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x33, + 0x01, + 0x5d, + 0x00, + 0x34, + 0x01, + 0x35, + 0x01, + 0x02, + 0x00, + 0x36, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x37, + 0x01, + 0x38, + 0x01, + 0x39, + 0x01, + 0x3a, + 0x01, + 0x3b, + 0x01, + 0x3c, + 0x01, + 0x3d, + 0x01, + 0x3e, + 0x01, + 0xb3, + 0x01, + 0xb4, + 0x01, + 0xb5, + 0x01, + 0xb6, + 0x01, + 0x5d, + 0x00, + 0x44, + 0x01, + 0x45, + 0x01, + 0xb7, + 0x01, + 0x47, + 0x01, + 0x48, + 0x01, + 0x5d, + 0x00, + 0xcc, + 0x02, + 0x00, + 0x00, + 0x1c, + 0x00, + 0x00, + 0x00, + 0x83, + 0x01, + 0x84, + 0x01, + 0x49, + 0x01, + 0x02, + 0x00, + 0xb8, + 0x01, + 0xb9, + 0x01, + 0xba, + 0x01, + 0xbb, + 0x01, + 0xbc, + 0x01, + 0xbd, + 0x01, + 0xbe, + 0x01, + 0x05, + 0x00, + 0x51, + 0x01, + 0x52, + 0x01, + 0x08, + 0x00, + 0x53, + 0x01, + 0x54, + 0x01, + 0x55, + 0x01, + 0x02, + 0x00, + 0x56, + 0x01, + 0x57, + 0x01, + 0xbf, + 0x01, + 0xc0, + 0x01, + 0x5a, + 0x00, + 0x02, + 0x00, + 0x5a, + 0x01, + 0x5b, + 0x01, + 0x5d, + 0x00, + 0x92, + 0x00, + 0x00, + 0x00, + 0x07, + 0x00, + 0x00, + 0x00, + 0x83, + 0x01, + 0x84, + 0x01, + 0xd6, + 0x00, + 0x5a, + 0x00, + 0x02, + 0x00, + 0x5c, + 0x01, + 0x5d, + 0x00, + 0x0e, + 0x0b, + 0x00, + 0x00, + 0x92, + 0x00, + 0x00, + 0x00, + 0x83, + 0x01, + 0x84, + 0x01, + 0x01, + 0x00, + 0x02, + 0x00, + 0x03, + 0x00, + 0x04, + 0x00, + 0x05, + 0x00, + 0x06, + 0x00, + 0x07, + 0x00, + 0x08, + 0x00, + 0x09, + 0x00, + 0x5e, + 0x01, + 0x5f, + 0x01, + 0x08, + 0x00, + 0x60, + 0x01, + 0x0a, + 0x00, + 0x02, + 0x00, + 0x0b, + 0x00, + 0x0c, + 0x00, + 0x0d, + 0x00, + 0x0e, + 0x00, + 0x0f, + 0x00, + 0x10, + 0x00, + 0x11, + 0x00, + 0x12, + 0x00, + 0x13, + 0x00, + 0x14, + 0x00, + 0x15, + 0x00, + 0x16, + 0x00, + 0x17, + 0x00, + 0x18, + 0x00, + 0x19, + 0x00, + 0x96, + 0x00, + 0x97, + 0x00, + 0x98, + 0x00, + 0x1d, + 0x00, + 0x1e, + 0x00, + 0x1f, + 0x00, + 0x20, + 0x00, + 0x9d, + 0x00, + 0x9e, + 0x00, + 0x9f, + 0x00, + 0xa0, + 0x00, + 0xa1, + 0x00, + 0xa2, + 0x00, + 0xa3, + 0x00, + 0xa4, + 0x00, + 0xa5, + 0x00, + 0xa6, + 0x00, + 0xa7, + 0x00, + 0x2c, + 0x00, + 0xa9, + 0x00, + 0xaa, + 0x00, + 0xab, + 0x00, + 0x30, + 0x00, + 0xad, + 0x00, + 0xae, + 0x00, + 0x33, + 0x00, + 0xb0, + 0x00, + 0xb1, + 0x00, + 0x36, + 0x00, + 0xb3, + 0x00, + 0xb4, + 0x00, + 0xb5, + 0x00, + 0xb6, + 0x00, + 0x3b, + 0x00, + 0x3c, + 0x00, + 0xb9, + 0x00, + 0x3e, + 0x00, + 0x3f, + 0x00, + 0x40, + 0x00, + 0xbd, + 0x00, + 0xbe, + 0x00, + 0x43, + 0x00, + 0xc0, + 0x00, + 0x45, + 0x00, + 0x46, + 0x00, + 0x47, + 0x00, + 0x48, + 0x00, + 0x49, + 0x00, + 0xc6, + 0x00, + 0xc7, + 0x00, + 0xc8, + 0x00, + 0xc9, + 0x00, + 0x4e, + 0x00, + 0xcb, + 0x00, + 0xcc, + 0x00, + 0xcd, + 0x00, + 0xce, + 0x00, + 0xcf, + 0x00, + 0x54, + 0x00, + 0x55, + 0x00, + 0x85, + 0x01, + 0x86, + 0x01, + 0x87, + 0x01, + 0x88, + 0x01, + 0x5a, + 0x00, + 0x02, + 0x00, + 0x5b, + 0x00, + 0x02, + 0x00, + 0x5c, + 0x00, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0x5f, + 0x00, + 0x5d, + 0x00, + 0xc1, + 0x01, + 0xc2, + 0x01, + 0xc3, + 0x01, + 0xc4, + 0x01, + 0xc5, + 0x01, + 0xc6, + 0x01, + 0xc7, + 0x01, + 0x02, + 0x00, + 0xc8, + 0x01, + 0xc9, + 0x01, + 0xca, + 0x01, + 0x5d, + 0x00, + 0x5e, + 0x00, + 0x02, + 0x00, + 0xcb, + 0x01, + 0x5d, + 0x00, + 0xcc, + 0x01, + 0xcd, + 0x01, + 0xce, + 0x01, + 0xcf, + 0x01, + 0xd0, + 0x01, + 0xd1, + 0x01, + 0xd2, + 0x01, + 0xd3, + 0x01, + 0xd4, + 0x01, + 0xd5, + 0x01, + 0xd6, + 0x01, + 0xd7, + 0x01, + 0xd8, + 0x01, + 0xd9, + 0x01, + 0xda, + 0x01, + 0xdb, + 0x01, + 0xdc, + 0x01, + 0xdd, + 0x01, + 0xde, + 0x01, + 0xdf, + 0x01, + 0xe0, + 0x01, + 0xe1, + 0x01, + 0x82, + 0x01, + 0x5d, + 0x00, + 0x4c, + 0x54, + 0x45, + 0x4d, + 0x5f, + 0x54, + 0x41, + 0x4d, + 0x52, + 0x0c, + 0x00, + 0x00, + 0x12, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x86, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x01, + 0x92, + 0x01, + 0x00, + 0x00, + 0x01, + 0x10, + 0x00, + 0x86, + 0x00, + 0x00, + 0x00, + 0x01, + 0x10, + 0x01, + 0xf6, + 0x02, + 0x00, + 0x00, + 0x01, + 0x20, + 0x01, + 0x10, + 0x03, + 0x00, + 0x00, + 0x01, + 0x30, + 0x01, + 0x04, + 0x05, + 0x00, + 0x00, + 0x01, + 0x44, + 0x01, + 0x68, + 0x05, + 0x00, + 0x00, + 0x01, + 0x80, + 0x00, + 0x92, + 0x05, + 0x00, + 0x00, + 0x01, + 0x90, + 0x00, + 0x92, + 0x05, + 0x00, + 0x00, + 0x02, + 0x00, + 0x00, + 0xc2, + 0x06, + 0x00, + 0x00, + 0x02, + 0x00, + 0x01, + 0xce, + 0x07, + 0x00, + 0x00, + 0x02, + 0x10, + 0x00, + 0xc2, + 0x06, + 0x00, + 0x00, + 0x02, + 0x10, + 0x01, + 0xf6, + 0x02, + 0x00, + 0x00, + 0x02, + 0x20, + 0x01, + 0x32, + 0x09, + 0x00, + 0x00, + 0x02, + 0x30, + 0x01, + 0x04, + 0x05, + 0x00, + 0x00, + 0x02, + 0x44, + 0x01, + 0x68, + 0x05, + 0x00, + 0x00, + 0x02, + 0x80, + 0x00, + 0x22, + 0x0b, + 0x00, + 0x00, + 0x02, + 0x90, + 0x00, + 0x22, + 0x0b, + 0x00, + 0x00, + 0x66, + 0x0d, + 0x00, + 0x00, + 0x82, + 0x00, + 0x00, + 0x00, + 0xe2, + 0x01, + 0xe3, + 0x01, + 0xe4, + 0x01, + 0xe5, + 0x01, + 0xe4, + 0x01, + 0xe6, + 0x01, + 0x02, + 0x00, + 0xe7, + 0x01, + 0xe8, + 0x01, + 0xe9, + 0x01, + 0xea, + 0x01, + 0xeb, + 0x01, + 0xec, + 0x01, + 0xed, + 0x01, + 0xee, + 0x01, + 0xef, + 0x01, + 0xf0, + 0x01, + 0xf1, + 0x01, + 0xf2, + 0x01, + 0xf3, + 0x01, + 0xf4, + 0x01, + 0xf5, + 0x01, + 0xf6, + 0x01, + 0xf7, + 0x01, + 0xf8, + 0x01, + 0xf9, + 0x01, + 0xfa, + 0x01, + 0xfb, + 0x01, + 0xfc, + 0x01, + 0xfd, + 0x01, + 0xfe, + 0x01, + 0xff, + 0x01, + 0x00, + 0x02, + 0x01, + 0x02, + 0x02, + 0x02, + 0x03, + 0x02, + 0x04, + 0x02, + 0x05, + 0x02, + 0x06, + 0x02, + 0x07, + 0x02, + 0x08, + 0x02, + 0x09, + 0x02, + 0x0a, + 0x02, + 0x0b, + 0x02, + 0x0c, + 0x02, + 0x0d, + 0x02, + 0x0e, + 0x02, + 0x0f, + 0x02, + 0x10, + 0x02, + 0x11, + 0x02, + 0x12, + 0x02, + 0x13, + 0x02, + 0x14, + 0x02, + 0x15, + 0x02, + 0x16, + 0x02, + 0x17, + 0x02, + 0x18, + 0x02, + 0x19, + 0x02, + 0x1a, + 0x02, + 0x1b, + 0x02, + 0x1c, + 0x02, + 0x1d, + 0x02, + 0x1e, + 0x02, + 0x1f, + 0x02, + 0x20, + 0x02, + 0x21, + 0x02, + 0x22, + 0x02, + 0x23, + 0x02, + 0x24, + 0x02, + 0x25, + 0x02, + 0x26, + 0x02, + 0x27, + 0x02, + 0x28, + 0x02, + 0x29, + 0x02, + 0x2a, + 0x02, + 0x2b, + 0x02, + 0x2c, + 0x02, + 0x2d, + 0x02, + 0x2e, + 0x02, + 0x2f, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x30, + 0x02, + 0x02, + 0x00, + 0x31, + 0x02, + 0x32, + 0x02, + 0x33, + 0x02, + 0x34, + 0x02, + 0x35, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x36, + 0x02, + 0x02, + 0x00, + 0x37, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x38, + 0x02, + 0x02, + 0x00, + 0x39, + 0x02, + 0x3a, + 0x02, + 0x3b, + 0x02, + 0x3c, + 0x02, + 0x3d, + 0x02, + 0x3e, + 0x02, + 0x3f, + 0x02, + 0x40, + 0x02, + 0x41, + 0x02, + 0x42, + 0x02, + 0x43, + 0x02, + 0x44, + 0x02, + 0x45, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x48, + 0x02, + 0x46, + 0x02, + 0x49, + 0x02, + 0x4a, + 0x02, + 0x4b, + 0x02, + 0x4c, + 0x02, + 0x4d, + 0x02, + 0x4e, + 0x02, + 0x4f, + 0x02, + 0x50, + 0x02, + 0x51, + 0x02, + 0x52, + 0x02, + 0x53, + 0x02, + 0x54, + 0x02, + 0x5d, + 0x00, + 0xe4, + 0x01, + 0x64, + 0x10, + 0x00, + 0x00, + 0xae, + 0x00, + 0x00, + 0x00, + 0xe2, + 0x01, + 0xe3, + 0x01, + 0xe4, + 0x01, + 0xe5, + 0x01, + 0xe4, + 0x01, + 0xe6, + 0x01, + 0x02, + 0x00, + 0xe7, + 0x01, + 0xe8, + 0x01, + 0xe9, + 0x01, + 0xea, + 0x01, + 0xeb, + 0x01, + 0xec, + 0x01, + 0xed, + 0x01, + 0xee, + 0x01, + 0xef, + 0x01, + 0xf0, + 0x01, + 0xf1, + 0x01, + 0xf2, + 0x01, + 0xf3, + 0x01, + 0xf4, + 0x01, + 0xf5, + 0x01, + 0xf6, + 0x01, + 0xf7, + 0x01, + 0xf8, + 0x01, + 0xf9, + 0x01, + 0xfa, + 0x01, + 0xfb, + 0x01, + 0xfc, + 0x01, + 0xfd, + 0x01, + 0xfe, + 0x01, + 0xff, + 0x01, + 0x00, + 0x02, + 0x01, + 0x02, + 0x02, + 0x02, + 0x03, + 0x02, + 0x04, + 0x02, + 0x05, + 0x02, + 0x06, + 0x02, + 0x07, + 0x02, + 0x08, + 0x02, + 0x09, + 0x02, + 0x0a, + 0x02, + 0x0b, + 0x02, + 0x0c, + 0x02, + 0x0d, + 0x02, + 0x0e, + 0x02, + 0x0f, + 0x02, + 0x10, + 0x02, + 0x11, + 0x02, + 0x12, + 0x02, + 0x13, + 0x02, + 0x14, + 0x02, + 0x15, + 0x02, + 0x16, + 0x02, + 0x17, + 0x02, + 0x18, + 0x02, + 0x19, + 0x02, + 0x1a, + 0x02, + 0x1b, + 0x02, + 0x1c, + 0x02, + 0x1d, + 0x02, + 0x1e, + 0x02, + 0x1f, + 0x02, + 0x20, + 0x02, + 0x21, + 0x02, + 0x22, + 0x02, + 0x23, + 0x02, + 0x24, + 0x02, + 0x25, + 0x02, + 0x26, + 0x02, + 0x27, + 0x02, + 0x28, + 0x02, + 0x29, + 0x02, + 0x2a, + 0x02, + 0x2b, + 0x02, + 0x2c, + 0x02, + 0x2d, + 0x02, + 0x2e, + 0x02, + 0x2f, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x55, + 0x02, + 0x02, + 0x00, + 0x56, + 0x02, + 0x57, + 0x02, + 0x58, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x59, + 0x02, + 0xe4, + 0x01, + 0x5a, + 0x02, + 0x5b, + 0x02, + 0x5c, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x30, + 0x02, + 0x02, + 0x00, + 0x5d, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x36, + 0x02, + 0x02, + 0x00, + 0x31, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x5e, + 0x02, + 0x02, + 0x00, + 0x39, + 0x02, + 0x5f, + 0x02, + 0x60, + 0x02, + 0x61, + 0x02, + 0x62, + 0x02, + 0x63, + 0x02, + 0x42, + 0x02, + 0x64, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x65, + 0x02, + 0x46, + 0x02, + 0x66, + 0x02, + 0x67, + 0x02, + 0x42, + 0x02, + 0x68, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x69, + 0x02, + 0x46, + 0x02, + 0x6a, + 0x02, + 0x6b, + 0x02, + 0x42, + 0x02, + 0x6c, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x6d, + 0x02, + 0x46, + 0x02, + 0x6e, + 0x02, + 0x6f, + 0x02, + 0x42, + 0x02, + 0x70, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x71, + 0x02, + 0x46, + 0x02, + 0x72, + 0x02, + 0x73, + 0x02, + 0x42, + 0x02, + 0x74, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x75, + 0x02, + 0x76, + 0x02, + 0x77, + 0x02, + 0x78, + 0x02, + 0x79, + 0x02, + 0x7a, + 0x02, + 0x7b, + 0x02, + 0x7c, + 0x02, + 0x7d, + 0x02, + 0x7e, + 0x02, + 0x7f, + 0x02, + 0x80, + 0x02, + 0x81, + 0x02, + 0x82, + 0x02, + 0x46, + 0x02, + 0x83, + 0x02, + 0x54, + 0x02, + 0x5d, + 0x00, + 0xe4, + 0x01, + 0x64, + 0x00, + 0x00, + 0x00, + 0x09, + 0x00, + 0x00, + 0x00, + 0xe2, + 0x01, + 0xe3, + 0x01, + 0xe4, + 0x01, + 0xe5, + 0x01, + 0xe4, + 0x01, + 0x84, + 0x02, + 0x02, + 0x00, + 0x5d, + 0x00, + 0xe4, + 0x01, + 0x06, + 0x1d, + 0x00, + 0x00, + 0xf6, + 0x00, + 0x00, + 0x00, + 0xe2, + 0x01, + 0xe3, + 0x01, + 0xe4, + 0x01, + 0xe5, + 0x01, + 0xe4, + 0x01, + 0xe6, + 0x01, + 0x02, + 0x00, + 0xe7, + 0x01, + 0xe8, + 0x01, + 0xe9, + 0x01, + 0xea, + 0x01, + 0xeb, + 0x01, + 0xec, + 0x01, + 0xed, + 0x01, + 0xee, + 0x01, + 0xef, + 0x01, + 0xf0, + 0x01, + 0xf1, + 0x01, + 0xf2, + 0x01, + 0xf3, + 0x01, + 0xf4, + 0x01, + 0xf5, + 0x01, + 0xf6, + 0x01, + 0xf7, + 0x01, + 0xf8, + 0x01, + 0xf9, + 0x01, + 0xfa, + 0x01, + 0xfb, + 0x01, + 0xfc, + 0x01, + 0xfd, + 0x01, + 0xfe, + 0x01, + 0xff, + 0x01, + 0x00, + 0x02, + 0x01, + 0x02, + 0x02, + 0x02, + 0x03, + 0x02, + 0x04, + 0x02, + 0x05, + 0x02, + 0x06, + 0x02, + 0x07, + 0x02, + 0x08, + 0x02, + 0x09, + 0x02, + 0x0a, + 0x02, + 0x0b, + 0x02, + 0x0c, + 0x02, + 0x0d, + 0x02, + 0x0e, + 0x02, + 0x0f, + 0x02, + 0x10, + 0x02, + 0x11, + 0x02, + 0x12, + 0x02, + 0x13, + 0x02, + 0x14, + 0x02, + 0x15, + 0x02, + 0x16, + 0x02, + 0x17, + 0x02, + 0x18, + 0x02, + 0x19, + 0x02, + 0x1a, + 0x02, + 0x1b, + 0x02, + 0x1c, + 0x02, + 0x1d, + 0x02, + 0x1e, + 0x02, + 0x1f, + 0x02, + 0x20, + 0x02, + 0x21, + 0x02, + 0x22, + 0x02, + 0x23, + 0x02, + 0x24, + 0x02, + 0x25, + 0x02, + 0x26, + 0x02, + 0x27, + 0x02, + 0x28, + 0x02, + 0x29, + 0x02, + 0x2a, + 0x02, + 0x2b, + 0x02, + 0x2c, + 0x02, + 0x2d, + 0x02, + 0x2e, + 0x02, + 0x2f, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x55, + 0x02, + 0x02, + 0x00, + 0x56, + 0x02, + 0x57, + 0x02, + 0x58, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x85, + 0x02, + 0xe4, + 0x01, + 0x86, + 0x02, + 0x87, + 0x02, + 0x88, + 0x02, + 0x89, + 0x02, + 0x8a, + 0x02, + 0x8b, + 0x02, + 0x8c, + 0x02, + 0x8d, + 0x02, + 0x8e, + 0x02, + 0x8f, + 0x02, + 0x90, + 0x02, + 0x91, + 0x02, + 0x92, + 0x02, + 0x93, + 0x02, + 0x94, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x5a, + 0x02, + 0x5b, + 0x02, + 0x5c, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x30, + 0x02, + 0x02, + 0x00, + 0x5d, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x36, + 0x02, + 0x02, + 0x00, + 0x31, + 0x02, + 0x32, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x95, + 0x02, + 0x02, + 0x00, + 0x39, + 0x02, + 0x96, + 0x02, + 0x97, + 0x02, + 0x98, + 0x02, + 0x99, + 0x02, + 0x9a, + 0x02, + 0x42, + 0x02, + 0x9b, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x9c, + 0x02, + 0x46, + 0x02, + 0x9d, + 0x02, + 0x9e, + 0x02, + 0x42, + 0x02, + 0x9f, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0xa0, + 0x02, + 0x46, + 0x02, + 0xa1, + 0x02, + 0xa2, + 0x02, + 0x42, + 0x02, + 0xa3, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0xa4, + 0x02, + 0x46, + 0x02, + 0xa5, + 0x02, + 0xa6, + 0x02, + 0x42, + 0x02, + 0xa7, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0xa8, + 0x02, + 0x46, + 0x02, + 0xa9, + 0x02, + 0xaa, + 0x02, + 0x42, + 0x02, + 0xab, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0xac, + 0x02, + 0xad, + 0x02, + 0xae, + 0x02, + 0xaf, + 0x02, + 0xb0, + 0x02, + 0xb1, + 0x02, + 0xb2, + 0x02, + 0xb3, + 0x02, + 0xb4, + 0x02, + 0xb5, + 0x02, + 0xb6, + 0x02, + 0xb7, + 0x02, + 0xb8, + 0x02, + 0xb9, + 0x02, + 0x46, + 0x02, + 0xba, + 0x02, + 0xbb, + 0x02, + 0xbc, + 0x02, + 0xbd, + 0x02, + 0x42, + 0x02, + 0xbe, + 0x02, + 0xbf, + 0x02, + 0xc0, + 0x02, + 0xc1, + 0x02, + 0xc2, + 0x02, + 0xc3, + 0x02, + 0xc4, + 0x02, + 0xc5, + 0x02, + 0xc6, + 0x02, + 0xc7, + 0x02, + 0xc0, + 0x02, + 0xc8, + 0x02, + 0xc3, + 0x02, + 0xc9, + 0x02, + 0xc0, + 0x02, + 0xca, + 0x02, + 0xc3, + 0x02, + 0xcb, + 0x02, + 0xcc, + 0x02, + 0xcd, + 0x02, + 0xce, + 0x02, + 0xcf, + 0x02, + 0xc0, + 0x02, + 0xd0, + 0x02, + 0xd1, + 0x02, + 0xc3, + 0x02, + 0xc9, + 0x02, + 0xc0, + 0x02, + 0xd2, + 0x02, + 0xc3, + 0x02, + 0xd3, + 0x02, + 0xd4, + 0x02, + 0xd5, + 0x02, + 0xc0, + 0x02, + 0xd6, + 0x02, + 0xc3, + 0x02, + 0xc9, + 0x02, + 0xc0, + 0x02, + 0xd7, + 0x02, + 0xc3, + 0x02, + 0xd8, + 0x02, + 0xd9, + 0x02, + 0xda, + 0x02, + 0xdb, + 0x02, + 0xdc, + 0x02, + 0xdd, + 0x02, + 0xde, + 0x02, + 0xdf, + 0x02, + 0xe0, + 0x02, + 0xe1, + 0x02, + 0x54, + 0x02, + 0x5d, + 0x00, + 0xe4, + 0x01, + 0xbc, + 0x03, + 0x00, + 0x00, + 0x2e, + 0x00, + 0x00, + 0x00, + 0xe2, + 0x01, + 0xe3, + 0x01, + 0xe4, + 0x01, + 0xe5, + 0x01, + 0xe4, + 0x01, + 0x49, + 0x01, + 0x02, + 0x00, + 0xe2, + 0x02, + 0xe3, + 0x02, + 0xe4, + 0x02, + 0xe5, + 0x02, + 0xe6, + 0x02, + 0xe7, + 0x02, + 0xe8, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x51, + 0x01, + 0x52, + 0x01, + 0x08, + 0x00, + 0xe9, + 0x02, + 0xe4, + 0x01, + 0xea, + 0x02, + 0x02, + 0x00, + 0xeb, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0xec, + 0x02, + 0xe4, + 0x01, + 0x30, + 0x02, + 0x02, + 0x00, + 0xed, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x36, + 0x02, + 0x02, + 0x00, + 0x33, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0xee, + 0x02, + 0x02, + 0x00, + 0x39, + 0x02, + 0xef, + 0x02, + 0xf0, + 0x02, + 0x54, + 0x02, + 0x5d, + 0x00, + 0xe4, + 0x01, + 0xec, + 0x00, + 0x00, + 0x00, + 0x11, + 0x00, + 0x00, + 0x00, + 0xe2, + 0x01, + 0xe3, + 0x01, + 0xe4, + 0x01, + 0xe5, + 0x01, + 0xe4, + 0x01, + 0x30, + 0x02, + 0x02, + 0x00, + 0x5d, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0xf1, + 0x02, + 0x02, + 0x00, + 0x39, + 0x02, + 0xf2, + 0x02, + 0x54, + 0x02, + 0x5d, + 0x00, + 0xe4, + 0x01, + 0xec, + 0x10, + 0x00, + 0x00, + 0x94, + 0x00, + 0x00, + 0x00, + 0xe2, + 0x01, + 0xe3, + 0x01, + 0xe4, + 0x01, + 0xe5, + 0x01, + 0xe4, + 0x01, + 0xe6, + 0x01, + 0x02, + 0x00, + 0xe7, + 0x01, + 0xe8, + 0x01, + 0xe9, + 0x01, + 0xea, + 0x01, + 0xeb, + 0x01, + 0xec, + 0x01, + 0xed, + 0x01, + 0xee, + 0x01, + 0xef, + 0x01, + 0xf0, + 0x01, + 0xf1, + 0x01, + 0xf2, + 0x01, + 0xf3, + 0x01, + 0xf4, + 0x01, + 0xf5, + 0x01, + 0xf6, + 0x01, + 0xf7, + 0x01, + 0xf8, + 0x01, + 0xf9, + 0x01, + 0xfa, + 0x01, + 0xfb, + 0x01, + 0xfc, + 0x01, + 0xfd, + 0x01, + 0xfe, + 0x01, + 0xff, + 0x01, + 0x00, + 0x02, + 0x01, + 0x02, + 0x02, + 0x02, + 0x03, + 0x02, + 0x04, + 0x02, + 0x05, + 0x02, + 0x06, + 0x02, + 0x07, + 0x02, + 0x08, + 0x02, + 0x09, + 0x02, + 0x0a, + 0x02, + 0x0b, + 0x02, + 0x0c, + 0x02, + 0x0d, + 0x02, + 0x0e, + 0x02, + 0x0f, + 0x02, + 0x10, + 0x02, + 0x11, + 0x02, + 0x12, + 0x02, + 0x13, + 0x02, + 0x14, + 0x02, + 0x15, + 0x02, + 0x16, + 0x02, + 0x17, + 0x02, + 0x18, + 0x02, + 0x19, + 0x02, + 0x1a, + 0x02, + 0x1b, + 0x02, + 0x1c, + 0x02, + 0x1d, + 0x02, + 0x1e, + 0x02, + 0x1f, + 0x02, + 0x20, + 0x02, + 0x21, + 0x02, + 0x22, + 0x02, + 0x23, + 0x02, + 0x24, + 0x02, + 0x25, + 0x02, + 0x26, + 0x02, + 0x27, + 0x02, + 0x28, + 0x02, + 0x29, + 0x02, + 0x2a, + 0x02, + 0x2b, + 0x02, + 0x2c, + 0x02, + 0x2d, + 0x02, + 0x2e, + 0x02, + 0x2f, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0xf3, + 0x02, + 0xf4, + 0x02, + 0xe4, + 0x01, + 0x30, + 0x02, + 0x02, + 0x00, + 0x31, + 0x02, + 0x32, + 0x02, + 0x33, + 0x02, + 0x34, + 0x02, + 0x35, + 0x02, + 0xf5, + 0x02, + 0xf6, + 0x02, + 0xf7, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x36, + 0x02, + 0x02, + 0x00, + 0x37, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x38, + 0x02, + 0x02, + 0x00, + 0x39, + 0x02, + 0x3a, + 0x02, + 0xf8, + 0x02, + 0xf9, + 0x02, + 0xfa, + 0x02, + 0xfb, + 0x02, + 0xfc, + 0x02, + 0xfd, + 0x02, + 0xfe, + 0x02, + 0x42, + 0x02, + 0xff, + 0x02, + 0x00, + 0x03, + 0x01, + 0x03, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x02, + 0x03, + 0x46, + 0x02, + 0x03, + 0x03, + 0x04, + 0x03, + 0x05, + 0x03, + 0x06, + 0x03, + 0x07, + 0x03, + 0x08, + 0x03, + 0x09, + 0x03, + 0x0a, + 0x03, + 0x0b, + 0x03, + 0x0c, + 0x03, + 0x0d, + 0x03, + 0x0e, + 0x03, + 0x0f, + 0x03, + 0x10, + 0x03, + 0x11, + 0x03, + 0x12, + 0x03, + 0x13, + 0x03, + 0x14, + 0x03, + 0x15, + 0x03, + 0x16, + 0x03, + 0x17, + 0x03, + 0x18, + 0x03, + 0x19, + 0x03, + 0x54, + 0x02, + 0x5d, + 0x00, + 0xe4, + 0x01, + 0x66, + 0x0d, + 0x00, + 0x00, + 0x82, + 0x00, + 0x00, + 0x00, + 0xe2, + 0x01, + 0xe3, + 0x01, + 0xe4, + 0x01, + 0xe5, + 0x01, + 0xe4, + 0x01, + 0xe6, + 0x01, + 0x02, + 0x00, + 0xe7, + 0x01, + 0xe8, + 0x01, + 0xe9, + 0x01, + 0xea, + 0x01, + 0xeb, + 0x01, + 0xec, + 0x01, + 0xed, + 0x01, + 0xee, + 0x01, + 0xef, + 0x01, + 0xf0, + 0x01, + 0xf1, + 0x01, + 0xf2, + 0x01, + 0xf3, + 0x01, + 0xf4, + 0x01, + 0xf5, + 0x01, + 0xf6, + 0x01, + 0xf7, + 0x01, + 0xf8, + 0x01, + 0xf9, + 0x01, + 0xfa, + 0x01, + 0xfb, + 0x01, + 0xfc, + 0x01, + 0xfd, + 0x01, + 0xfe, + 0x01, + 0xff, + 0x01, + 0x00, + 0x02, + 0x01, + 0x02, + 0x02, + 0x02, + 0x03, + 0x02, + 0x04, + 0x02, + 0x05, + 0x02, + 0x06, + 0x02, + 0x07, + 0x02, + 0x08, + 0x02, + 0x09, + 0x02, + 0x0a, + 0x02, + 0x0b, + 0x02, + 0x0c, + 0x02, + 0x0d, + 0x02, + 0x0e, + 0x02, + 0x0f, + 0x02, + 0x10, + 0x02, + 0x11, + 0x02, + 0x12, + 0x02, + 0x13, + 0x02, + 0x14, + 0x02, + 0x15, + 0x02, + 0x16, + 0x02, + 0x17, + 0x02, + 0x18, + 0x02, + 0x19, + 0x02, + 0x1a, + 0x02, + 0x1b, + 0x02, + 0x1c, + 0x02, + 0x1d, + 0x02, + 0x1e, + 0x02, + 0x1f, + 0x02, + 0x20, + 0x02, + 0x21, + 0x02, + 0x22, + 0x02, + 0x23, + 0x02, + 0x24, + 0x02, + 0x25, + 0x02, + 0x26, + 0x02, + 0x27, + 0x02, + 0x28, + 0x02, + 0x29, + 0x02, + 0x2a, + 0x02, + 0x2b, + 0x02, + 0x2c, + 0x02, + 0x2d, + 0x02, + 0x2e, + 0x02, + 0x2f, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x30, + 0x02, + 0x02, + 0x00, + 0x31, + 0x02, + 0x32, + 0x02, + 0x33, + 0x02, + 0x34, + 0x02, + 0x35, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x36, + 0x02, + 0x02, + 0x00, + 0x37, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x38, + 0x02, + 0x02, + 0x00, + 0x39, + 0x02, + 0x3a, + 0x02, + 0x1a, + 0x03, + 0x1b, + 0x03, + 0x1c, + 0x03, + 0x1d, + 0x03, + 0x1e, + 0x03, + 0x1f, + 0x03, + 0x20, + 0x03, + 0x42, + 0x02, + 0x21, + 0x03, + 0x22, + 0x03, + 0x23, + 0x03, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x24, + 0x03, + 0x46, + 0x02, + 0x25, + 0x03, + 0x26, + 0x03, + 0x27, + 0x03, + 0x28, + 0x03, + 0x29, + 0x03, + 0x2a, + 0x03, + 0x2b, + 0x03, + 0x2c, + 0x03, + 0x2d, + 0x03, + 0x2e, + 0x03, + 0x2f, + 0x03, + 0x54, + 0x02, + 0x5d, + 0x00, + 0xe4, + 0x01, + 0x2d, + 0x10, + 0x00, + 0x00, + 0xae, + 0x00, + 0x00, + 0x00, + 0xe2, + 0x01, + 0xe3, + 0x01, + 0xe4, + 0x01, + 0xe5, + 0x01, + 0xe4, + 0x01, + 0xe6, + 0x01, + 0x02, + 0x00, + 0xe7, + 0x01, + 0xe8, + 0x01, + 0xe9, + 0x01, + 0xea, + 0x01, + 0xeb, + 0x01, + 0xec, + 0x01, + 0xed, + 0x01, + 0xee, + 0x01, + 0xef, + 0x01, + 0xf0, + 0x01, + 0xf1, + 0x01, + 0xf2, + 0x01, + 0xf3, + 0x01, + 0xf4, + 0x01, + 0xf5, + 0x01, + 0xf6, + 0x01, + 0xf7, + 0x01, + 0xf8, + 0x01, + 0xf9, + 0x01, + 0xfa, + 0x01, + 0xfb, + 0x01, + 0xfc, + 0x01, + 0xfd, + 0x01, + 0xfe, + 0x01, + 0xff, + 0x01, + 0x00, + 0x02, + 0x01, + 0x02, + 0x02, + 0x02, + 0x03, + 0x02, + 0x04, + 0x02, + 0x05, + 0x02, + 0x06, + 0x02, + 0x07, + 0x02, + 0x08, + 0x02, + 0x09, + 0x02, + 0x0a, + 0x02, + 0x0b, + 0x02, + 0x0c, + 0x02, + 0x0d, + 0x02, + 0x0e, + 0x02, + 0x0f, + 0x02, + 0x10, + 0x02, + 0x11, + 0x02, + 0x12, + 0x02, + 0x13, + 0x02, + 0x14, + 0x02, + 0x15, + 0x02, + 0x16, + 0x02, + 0x17, + 0x02, + 0x18, + 0x02, + 0x19, + 0x02, + 0x1a, + 0x02, + 0x1b, + 0x02, + 0x1c, + 0x02, + 0x1d, + 0x02, + 0x1e, + 0x02, + 0x1f, + 0x02, + 0x20, + 0x02, + 0x21, + 0x02, + 0x22, + 0x02, + 0x23, + 0x02, + 0x24, + 0x02, + 0x25, + 0x02, + 0x26, + 0x02, + 0x27, + 0x02, + 0x28, + 0x02, + 0x29, + 0x02, + 0x2a, + 0x02, + 0x2b, + 0x02, + 0x2c, + 0x02, + 0x2d, + 0x02, + 0x2e, + 0x02, + 0x2f, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x55, + 0x02, + 0x02, + 0x00, + 0x56, + 0x02, + 0x57, + 0x02, + 0x58, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x30, + 0x03, + 0xe4, + 0x01, + 0x5a, + 0x02, + 0x5b, + 0x02, + 0x5c, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x30, + 0x02, + 0x02, + 0x00, + 0x5d, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x36, + 0x02, + 0x02, + 0x00, + 0x31, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x5e, + 0x02, + 0x02, + 0x00, + 0x39, + 0x02, + 0x5f, + 0x02, + 0x31, + 0x03, + 0x61, + 0x02, + 0x62, + 0x02, + 0x63, + 0x02, + 0x42, + 0x02, + 0x64, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x65, + 0x02, + 0x46, + 0x02, + 0x66, + 0x02, + 0x67, + 0x02, + 0x42, + 0x02, + 0x68, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x69, + 0x02, + 0x46, + 0x02, + 0x6a, + 0x02, + 0x6b, + 0x02, + 0x42, + 0x02, + 0x6c, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x6d, + 0x02, + 0x46, + 0x02, + 0x6e, + 0x02, + 0x6f, + 0x02, + 0x42, + 0x02, + 0x70, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x71, + 0x02, + 0x46, + 0x02, + 0x32, + 0x03, + 0x73, + 0x02, + 0x42, + 0x02, + 0x33, + 0x03, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x34, + 0x03, + 0x35, + 0x03, + 0x36, + 0x03, + 0x37, + 0x03, + 0x38, + 0x03, + 0x7a, + 0x02, + 0x7b, + 0x02, + 0x7c, + 0x02, + 0x39, + 0x03, + 0x3a, + 0x03, + 0x3b, + 0x03, + 0x3c, + 0x03, + 0x3d, + 0x03, + 0x3e, + 0x03, + 0x46, + 0x02, + 0x3f, + 0x03, + 0x54, + 0x02, + 0x5d, + 0x00, + 0xe4, + 0x01, + 0x5e, + 0x1c, + 0x00, + 0x00, + 0xf4, + 0x00, + 0x00, + 0x00, + 0xe2, + 0x01, + 0xe3, + 0x01, + 0xe4, + 0x01, + 0xe5, + 0x01, + 0xe4, + 0x01, + 0xe6, + 0x01, + 0x02, + 0x00, + 0xe7, + 0x01, + 0xe8, + 0x01, + 0xe9, + 0x01, + 0xea, + 0x01, + 0xeb, + 0x01, + 0xec, + 0x01, + 0xed, + 0x01, + 0xee, + 0x01, + 0xef, + 0x01, + 0xf0, + 0x01, + 0xf1, + 0x01, + 0xf2, + 0x01, + 0xf3, + 0x01, + 0xf4, + 0x01, + 0xf5, + 0x01, + 0xf6, + 0x01, + 0xf7, + 0x01, + 0xf8, + 0x01, + 0xf9, + 0x01, + 0xfa, + 0x01, + 0xfb, + 0x01, + 0xfc, + 0x01, + 0xfd, + 0x01, + 0xfe, + 0x01, + 0xff, + 0x01, + 0x00, + 0x02, + 0x01, + 0x02, + 0x02, + 0x02, + 0x03, + 0x02, + 0x04, + 0x02, + 0x05, + 0x02, + 0x06, + 0x02, + 0x07, + 0x02, + 0x08, + 0x02, + 0x09, + 0x02, + 0x0a, + 0x02, + 0x0b, + 0x02, + 0x0c, + 0x02, + 0x0d, + 0x02, + 0x0e, + 0x02, + 0x0f, + 0x02, + 0x10, + 0x02, + 0x11, + 0x02, + 0x12, + 0x02, + 0x13, + 0x02, + 0x14, + 0x02, + 0x15, + 0x02, + 0x16, + 0x02, + 0x17, + 0x02, + 0x18, + 0x02, + 0x19, + 0x02, + 0x1a, + 0x02, + 0x1b, + 0x02, + 0x1c, + 0x02, + 0x1d, + 0x02, + 0x1e, + 0x02, + 0x1f, + 0x02, + 0x20, + 0x02, + 0x21, + 0x02, + 0x22, + 0x02, + 0x23, + 0x02, + 0x24, + 0x02, + 0x25, + 0x02, + 0x26, + 0x02, + 0x27, + 0x02, + 0x28, + 0x02, + 0x29, + 0x02, + 0x2a, + 0x02, + 0x2b, + 0x02, + 0x2c, + 0x02, + 0x2d, + 0x02, + 0x2e, + 0x02, + 0x2f, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x55, + 0x02, + 0x02, + 0x00, + 0x56, + 0x02, + 0x57, + 0x02, + 0x58, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x40, + 0x03, + 0xe4, + 0x01, + 0x86, + 0x02, + 0x87, + 0x02, + 0x88, + 0x02, + 0x89, + 0x02, + 0x8a, + 0x02, + 0x8b, + 0x02, + 0x8c, + 0x02, + 0x8d, + 0x02, + 0x8e, + 0x02, + 0x8f, + 0x02, + 0x90, + 0x02, + 0x91, + 0x02, + 0x92, + 0x02, + 0x93, + 0x02, + 0x94, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x5a, + 0x02, + 0x5b, + 0x02, + 0x5c, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x30, + 0x02, + 0x02, + 0x00, + 0x5d, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x36, + 0x02, + 0x02, + 0x00, + 0x31, + 0x02, + 0x32, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x95, + 0x02, + 0x02, + 0x00, + 0x39, + 0x02, + 0x96, + 0x02, + 0x41, + 0x03, + 0x98, + 0x02, + 0x99, + 0x02, + 0x9a, + 0x02, + 0x42, + 0x02, + 0x9b, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x9c, + 0x02, + 0x46, + 0x02, + 0x9d, + 0x02, + 0x9e, + 0x02, + 0x42, + 0x02, + 0x9f, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0xa0, + 0x02, + 0x46, + 0x02, + 0xa1, + 0x02, + 0xa2, + 0x02, + 0x42, + 0x02, + 0xa3, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0xa4, + 0x02, + 0x46, + 0x02, + 0xa5, + 0x02, + 0xa6, + 0x02, + 0x42, + 0x02, + 0xa7, + 0x02, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0xa8, + 0x02, + 0x46, + 0x02, + 0x42, + 0x03, + 0xaa, + 0x02, + 0x42, + 0x02, + 0x43, + 0x03, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x44, + 0x03, + 0x45, + 0x03, + 0x46, + 0x03, + 0x47, + 0x03, + 0x48, + 0x03, + 0xb1, + 0x02, + 0xb2, + 0x02, + 0xb3, + 0x02, + 0x49, + 0x03, + 0x4a, + 0x03, + 0x4b, + 0x03, + 0x4c, + 0x03, + 0x4d, + 0x03, + 0x4e, + 0x03, + 0x46, + 0x02, + 0x4f, + 0x03, + 0xbb, + 0x02, + 0x50, + 0x03, + 0x51, + 0x03, + 0xbd, + 0x02, + 0x42, + 0x02, + 0xbe, + 0x02, + 0xbf, + 0x02, + 0xc0, + 0x02, + 0x52, + 0x03, + 0xc2, + 0x02, + 0xc3, + 0x02, + 0xc4, + 0x02, + 0xc5, + 0x02, + 0xc6, + 0x02, + 0xc7, + 0x02, + 0xc0, + 0x02, + 0xc8, + 0x02, + 0xc3, + 0x02, + 0xc9, + 0x02, + 0xc0, + 0x02, + 0xca, + 0x02, + 0xc3, + 0x02, + 0x53, + 0x03, + 0x54, + 0x03, + 0xcf, + 0x02, + 0xc0, + 0x02, + 0x55, + 0x03, + 0x56, + 0x03, + 0xc3, + 0x02, + 0xc9, + 0x02, + 0xc0, + 0x02, + 0x57, + 0x03, + 0xc3, + 0x02, + 0x58, + 0x03, + 0x59, + 0x03, + 0xd5, + 0x02, + 0xc0, + 0x02, + 0x5a, + 0x03, + 0xc3, + 0x02, + 0xc9, + 0x02, + 0xc0, + 0x02, + 0xd7, + 0x02, + 0xc3, + 0x02, + 0x5b, + 0x03, + 0x5c, + 0x03, + 0xdb, + 0x02, + 0xdc, + 0x02, + 0xdd, + 0x02, + 0xde, + 0x02, + 0xdf, + 0x02, + 0xe0, + 0x02, + 0x5d, + 0x03, + 0x54, + 0x02, + 0x5d, + 0x00, + 0xe4, + 0x01, + 0x1b, + 0x11, + 0x00, + 0x00, + 0x94, + 0x00, + 0x00, + 0x00, + 0xe2, + 0x01, + 0xe3, + 0x01, + 0xe4, + 0x01, + 0xe5, + 0x01, + 0xe4, + 0x01, + 0xe6, + 0x01, + 0x02, + 0x00, + 0xe7, + 0x01, + 0xe8, + 0x01, + 0xe9, + 0x01, + 0xea, + 0x01, + 0xeb, + 0x01, + 0xec, + 0x01, + 0xed, + 0x01, + 0xee, + 0x01, + 0xef, + 0x01, + 0xf0, + 0x01, + 0xf1, + 0x01, + 0xf2, + 0x01, + 0xf3, + 0x01, + 0xf4, + 0x01, + 0xf5, + 0x01, + 0xf6, + 0x01, + 0xf7, + 0x01, + 0xf8, + 0x01, + 0xf9, + 0x01, + 0xfa, + 0x01, + 0xfb, + 0x01, + 0xfc, + 0x01, + 0xfd, + 0x01, + 0xfe, + 0x01, + 0xff, + 0x01, + 0x00, + 0x02, + 0x01, + 0x02, + 0x02, + 0x02, + 0x03, + 0x02, + 0x04, + 0x02, + 0x05, + 0x02, + 0x06, + 0x02, + 0x07, + 0x02, + 0x08, + 0x02, + 0x09, + 0x02, + 0x0a, + 0x02, + 0x0b, + 0x02, + 0x0c, + 0x02, + 0x0d, + 0x02, + 0x0e, + 0x02, + 0x0f, + 0x02, + 0x10, + 0x02, + 0x11, + 0x02, + 0x12, + 0x02, + 0x13, + 0x02, + 0x14, + 0x02, + 0x15, + 0x02, + 0x16, + 0x02, + 0x17, + 0x02, + 0x18, + 0x02, + 0x19, + 0x02, + 0x1a, + 0x02, + 0x1b, + 0x02, + 0x1c, + 0x02, + 0x1d, + 0x02, + 0x1e, + 0x02, + 0x1f, + 0x02, + 0x20, + 0x02, + 0x21, + 0x02, + 0x22, + 0x02, + 0x23, + 0x02, + 0x24, + 0x02, + 0x25, + 0x02, + 0x26, + 0x02, + 0x27, + 0x02, + 0x28, + 0x02, + 0x29, + 0x02, + 0x2a, + 0x02, + 0x2b, + 0x02, + 0x2c, + 0x02, + 0x2d, + 0x02, + 0x2e, + 0x02, + 0x2f, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0xf3, + 0x02, + 0xf4, + 0x02, + 0xe4, + 0x01, + 0x30, + 0x02, + 0x02, + 0x00, + 0x31, + 0x02, + 0x32, + 0x02, + 0x33, + 0x02, + 0x34, + 0x02, + 0x35, + 0x02, + 0xf5, + 0x02, + 0xf6, + 0x02, + 0xf7, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x36, + 0x02, + 0x02, + 0x00, + 0x37, + 0x02, + 0x05, + 0x00, + 0xe4, + 0x01, + 0x38, + 0x02, + 0x02, + 0x00, + 0x39, + 0x02, + 0x3a, + 0x02, + 0x5e, + 0x03, + 0x5f, + 0x03, + 0x60, + 0x03, + 0x61, + 0x03, + 0x62, + 0x03, + 0x63, + 0x03, + 0x64, + 0x03, + 0x42, + 0x02, + 0x65, + 0x03, + 0x66, + 0x03, + 0x67, + 0x03, + 0x46, + 0x02, + 0x47, + 0x02, + 0x42, + 0x02, + 0x68, + 0x03, + 0x46, + 0x02, + 0x69, + 0x03, + 0x6a, + 0x03, + 0x6b, + 0x03, + 0x6c, + 0x03, + 0x6d, + 0x03, + 0x6e, + 0x03, + 0x6f, + 0x03, + 0x70, + 0x03, + 0x71, + 0x03, + 0x72, + 0x03, + 0x73, + 0x03, + 0x74, + 0x03, + 0x75, + 0x03, + 0x76, + 0x03, + 0x77, + 0x03, + 0x78, + 0x03, + 0x79, + 0x03, + 0x7a, + 0x03, + 0x7b, + 0x03, + 0x7c, + 0x03, + 0x17, + 0x03, + 0x18, + 0x03, + 0x19, + 0x03, + 0x54, + 0x02, + 0x5d, + 0x00, + 0xe4, + 0x01, + +}; + +int IMAGE_IMAGE_OFFSET = 0; +int IMAGE_IMAGE_SIZE = 37409; diff --git a/windows/include/material/image.h b/thermion_dart/native/include/material/image.h similarity index 75% rename from windows/include/material/image.h rename to thermion_dart/native/include/material/image.h index a3d5b42b..4761bfae 100644 --- a/windows/include/material/image.h +++ b/thermion_dart/native/include/material/image.h @@ -3,11 +3,16 @@ #include -extern "C" { +#if defined(__cplusplus) +extern "C" +{ +#endif extern const uint8_t IMAGE_PACKAGE[]; extern int IMAGE_IMAGE_OFFSET; extern int IMAGE_IMAGE_SIZE; +#if defined(__cplusplus) } +#endif #define IMAGE_IMAGE_DATA (IMAGE_PACKAGE + IMAGE_IMAGE_OFFSET) #endif diff --git a/thermion_dart/native/lib/macos/swift/ThermionDartTexture.h b/thermion_dart/native/lib/macos/swift/ThermionDartTexture.h new file mode 100644 index 00000000..76c30f5d --- /dev/null +++ b/thermion_dart/native/lib/macos/swift/ThermionDartTexture.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02859acdfdc2227784553f616bf55cd34e5931413b21c6fea7aaf79d2aa56af3 +size 10694 diff --git a/thermion_dart/native/lib/macos/swift/build.sh b/thermion_dart/native/lib/macos/swift/build.sh new file mode 100644 index 00000000..be102442 --- /dev/null +++ b/thermion_dart/native/lib/macos/swift/build.sh @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d0fb1cf7f63c52b5a82a25d2038a1b2d6b9bc9f54491d73345900f58b0b8087 +size 224 diff --git a/thermion_dart/native/lib/macos/swift/libthermion_swift.dylib b/thermion_dart/native/lib/macos/swift/libthermion_swift.dylib new file mode 100644 index 00000000..8623f52b Binary files /dev/null and b/thermion_dart/native/lib/macos/swift/libthermion_swift.dylib differ diff --git a/ios/src/FilamentViewer.cpp b/thermion_dart/native/src/FilamentViewer.cpp similarity index 68% rename from ios/src/FilamentViewer.cpp rename to thermion_dart/native/src/FilamentViewer.cpp index d25a8a99..653d009b 100644 --- a/ios/src/FilamentViewer.cpp +++ b/thermion_dart/native/src/FilamentViewer.cpp @@ -25,6 +25,14 @@ #include #include +#ifdef __EMSCRIPTEN__ +#include +#include +#include +#include +#include +#include +#endif #include #include #include @@ -38,6 +46,7 @@ #include #include #include +#include #include #include @@ -55,6 +64,8 @@ #include #include +#include +#include #include "math.h" @@ -70,9 +81,13 @@ #include #include +#include +#include +#include #include - +#include #include +#include #include "Log.hpp" @@ -80,12 +95,7 @@ #include "StreamBufferAdapter.hpp" #include "material/image.h" #include "TimeIt.hpp" - -using namespace filament; -using namespace filament::math; -using namespace gltfio; -using namespace utils; -using namespace image; +#include "ThreadPool.hpp" namespace filament { @@ -93,17 +103,21 @@ namespace filament class LightManager; } // namespace filament -namespace polyvox +namespace thermion_filament { + using namespace filament; + using namespace filament::math; + using namespace gltfio; + using namespace utils; + using namespace image; + using namespace std::chrono; + + using std::string; + // const float kAperture = 1.0f; // const float kShutterSpeed = 1.0f; // const float kSensitivity = 50.0f; - struct Vertex - { - filament::math::float2 position; - uint32_t color; - }; static constexpr float4 sFullScreenTriangleVertices[3] = { {-1.0f, -1.0f, 1.0f, 1.0f}, @@ -112,9 +126,10 @@ namespace polyvox static const uint16_t sFullScreenTriangleIndices[3] = {0, 1, 2}; - FilamentViewer::FilamentViewer(const void *sharedContext, const ResourceLoaderWrapper *const resourceLoaderWrapper, void *const platform, const char *uberArchivePath) - : _resourceLoaderWrapper(resourceLoaderWrapper) + FilamentViewer::FilamentViewer(const void *sharedContext, const ResourceLoaderWrapperImpl *const ResourceLoaderWrapperImpl, void *const platform, const char *uberArchivePath) + : _resourceLoaderWrapper(ResourceLoaderWrapperImpl) { + _context = (void*) sharedContext; ASSERT_POSTCONDITION(_resourceLoaderWrapper != nullptr, "Resource loader must be non-null"); @@ -124,37 +139,57 @@ namespace polyvox #elif TARGET_OS_OSX ASSERT_POSTCONDITION(platform == nullptr, "Custom Platform not supported on macOS"); _engine = Engine::create(Engine::Backend::METAL); +#elif defined(__EMSCRIPTEN__) + _engine = Engine::create(Engine::Backend::OPENGL, (backend::Platform *)new filament::backend::PlatformWebGL(), (void *)sharedContext, nullptr); +#elif defined(_WIN32) + Engine::Config config; + config.stereoscopicEyeCount = 1; + _engine = Engine::create(Engine::Backend::OPENGL, (backend::Platform *)platform, (void *)sharedContext, &config); #else _engine = Engine::create(Engine::Backend::OPENGL, (backend::Platform *)platform, (void *)sharedContext, nullptr); #endif + Log("Created engine"); + + _engine->setAutomaticInstancingEnabled(true); _renderer = _engine->createRenderer(); - float fr = 60.0f; - _renderer->setDisplayInfo({.refreshRate = fr}); + Log("Created renderer"); - Renderer::FrameRateOptions fro; - fro.interval = 1 / fr; - _renderer->setFrameRateOptions(fro); + _frameInterval = 1000.0f / 60.0f; + + setFrameInterval(_frameInterval); _scene = _engine->createScene(); - Log("Scene created"); + Log("Created scene"); utils::Entity camera = EntityManager::get().create(); _mainCamera = _engine->createCamera(camera); - Log("Main camera created"); + Log("Created camera"); + _view = _engine->createView(); - Log("View created"); setToneMapping(ToneMapping::ACES); - Log("Set tone mapping"); + // there's a glitch on certain iGPUs where nothing will render when postprocessing is enabled and bloom is disabled + // set bloom to a small value here + setBloom(0.01); - setBloom(0.6f); - Log("Set bloom"); + _view->setAmbientOcclusionOptions({.enabled = false}); + _view->setDynamicResolutionOptions({.enabled = false}); + + #if defined(_WIN32) + _view->setStereoscopicOptions({.enabled = true}); + #endif + + _view->setDithering(filament::Dithering::NONE); + setAntiAliasing(false, false, false); + _view->setShadowingEnabled(false); + _view->setScreenSpaceRefractionEnabled(false); + setPostProcessing(false); _view->setScene(_scene); _view->setCamera(_mainCamera); @@ -170,33 +205,16 @@ namespace polyvox Log("Camera aperture %f shutter %f sensitivity %f", aperture, shutterSpeed, sens); - View::DynamicResolutionOptions options; - options.enabled = false; - // options.homogeneousScaling = homogeneousScaling; - // options.minScale = filament::math::float2{ minScale }; - // options.maxScale = filament::math::float2{ maxScale }; - // options.sharpness = sharpness; - // options.quality = View::QualityLevel::ULTRA; - _view->setDynamicResolutionOptions(options); - - View::MultiSampleAntiAliasingOptions multiSampleAntiAliasingOptions; - multiSampleAntiAliasingOptions.enabled = true; - - _view->setMultiSampleAntiAliasingOptions(multiSampleAntiAliasingOptions); - - _view->setAntiAliasing(AntiAliasing::NONE); - EntityManager &em = EntityManager::get(); - _ncm = new NameComponentManager(em); - - _assetManager = new AssetManager( + _sceneManager = new SceneManager( _resourceLoaderWrapper, - _ncm, _engine, _scene, uberArchivePath); + Log("Created scene maager"); + _imageTexture = Texture::Builder() .width(1) .height(1) @@ -211,7 +229,7 @@ namespace polyvox .package(IMAGE_IMAGE_DATA, IMAGE_IMAGE_SIZE) .build(*_engine); _imageMaterial->setDefaultParameter("showImage", 0); - _imageMaterial->setDefaultParameter("backgroundColor", RgbaType::sRGB, float4(0.5f, 0.5f, 0.5f, 1.0f)); + _imageMaterial->setDefaultParameter("backgroundColor", RgbaType::sRGB, float4(1.0f, 1.0f, 1.0f, 0.0f)); _imageMaterial->setDefaultParameter("image", _imageTexture, _imageSampler); } catch (...) @@ -242,16 +260,28 @@ namespace polyvox _imageIb->setBuffer(*_engine, {sFullScreenTriangleIndices, sizeof(sFullScreenTriangleIndices)}); - utils::Entity imageEntity = em.create(); + _imageEntity = em.create(); RenderableManager::Builder(1) .boundingBox({{}, {1.0f, 1.0f, 1.0f}}) .material(0, _imageMaterial->getDefaultInstance()) .geometry(0, RenderableManager::PrimitiveType::TRIANGLES, _imageVb, _imageIb, 0, 3) .culling(false) - .build(*_engine, imageEntity); - _imageEntity = &imageEntity; - _scene->addEntity(imageEntity); + .build(*_engine, _imageEntity); + _scene->addEntity(_imageEntity); + Log("Added imageEntity %d", _imageEntity); + } + + void FilamentViewer::setAntiAliasing(bool msaa, bool fxaa, bool taa) + { + View::MultiSampleAntiAliasingOptions multiSampleAntiAliasingOptions; + multiSampleAntiAliasingOptions.enabled = msaa; + + _view->setMultiSampleAntiAliasingOptions(multiSampleAntiAliasingOptions); + TemporalAntiAliasingOptions taaOpts; + taaOpts.enabled = taa; + _view->setTemporalAntiAliasingOptions(taaOpts); + _view->setAntiAliasing(fxaa ? AntiAliasing::FXAA : AntiAliasing::NONE); } void FilamentViewer::setPostProcessing(bool enabled) @@ -261,10 +291,12 @@ namespace polyvox void FilamentViewer::setBloom(float strength) { + #ifndef __EMSCRIPTEN__ decltype(_view->getBloomOptions()) opts; opts.enabled = true; opts.strength = strength; _view->setBloomOptions(opts); + #endif } void FilamentViewer::setToneMapping(ToneMapping toneMapping) @@ -298,26 +330,60 @@ namespace polyvox void FilamentViewer::setFrameInterval(float frameInterval) { + _frameInterval = frameInterval; Renderer::FrameRateOptions fro; - fro.interval = frameInterval; + fro.interval = 1; // frameInterval; + fro.history = 5; _renderer->setFrameRateOptions(fro); - Log("Set framerate interval to %f", frameInterval); + Log("Set frame interval to %f", frameInterval); } - int32_t FilamentViewer::addLight(LightManager::Type t, float colour, float intensity, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, bool shadows) + EntityId FilamentViewer::addLight( + LightManager::Type t, + float colour, + float intensity, + float posX, + float posY, + float posZ, + float dirX, + float dirY, + float dirZ, + float falloffRadius, + float spotLightConeInner, + float spotLightConeOuter, + float sunAngularRadius, + float sunHaloSize, + float sunHaloFallof, + bool shadows) { auto light = EntityManager::get().create(); - LightManager::Builder(t) - .color(Color::cct(colour)) - .intensity(intensity) - .position(math::float3(posX, posY, posZ)) - .direction(math::float3(dirX, dirY, dirZ)) - .castShadows(shadows) - .build(*_engine, light); - _scene->addEntity(light); - _lights.push_back(light); + auto &transformManager = _engine->getTransformManager(); + transformManager.create(light); + auto parent = transformManager.getInstance(light); + + auto result = LightManager::Builder(t) + .color(Color::cct(colour)) + .intensity(intensity) + .falloff(falloffRadius) + .spotLightCone(spotLightConeInner, spotLightConeOuter) + .sunAngularRadius(sunAngularRadius) + .sunHaloSize(sunHaloSize) + .sunHaloFalloff(sunHaloFallof) + .position(math::float3(posX, posY, posZ)) + .direction(math::float3(dirX, dirY, dirZ)) + .castShadows(shadows) + .build(*_engine, light); + if(result != LightManager::Builder::Result::Success) { + Log("ERROR : failed to create light"); + } else { + _scene->addEntity(light); + _lights.push_back(light); + } + auto entityId = Entity::smuggle(light); - Log("Added light under entity ID %d of type %d with colour %f intensity %f at (%f, %f, %f) with direction (%f, %f, %f) with shadows %d", entityId, t, colour, intensity, posX, posY, posZ, dirX, dirY, dirZ, shadows); + auto transformInstance = transformManager.getInstance(light); + transformManager.setTransform(transformInstance, math::mat4::translation(math::float3{posX, posY, posZ})); + // Log("Added light under entity ID %d of type %d with colour %f intensity %f at (%f, %f, %f) with direction (%f, %f, %f) with shadows %d", entityId, t, colour, intensity, posX, posY, posZ, dirX, dirY, dirZ, shadows); return entityId; } @@ -331,7 +397,7 @@ namespace polyvox } else { - remove(_lights.begin(), _lights.end(), entity); + auto removed = remove(_lights.begin(), _lights.end(), entity); _scene->remove(entity); EntityManager::get().destroy(1, &entity); } @@ -345,7 +411,7 @@ namespace polyvox _lights.clear(); } - static bool endsWith(string path, string ending) + static bool endsWith(std::string path, std::string ending) { return path.compare(path.length() - ending.length(), ending.length(), ending) == 0; } @@ -388,7 +454,7 @@ namespace polyvox _engine, *bundle, false, [](void *userdata) { std::vector* vec = (std::vector*)userdata; - ResourceLoaderWrapper* loader = (ResourceLoaderWrapper*)vec->at(0); + ResourceLoaderWrapperImpl* loader = (ResourceLoaderWrapperImpl*)vec->at(0); ResourceBuffer* rb = (ResourceBuffer*) vec->at(1); loader->free(*rb); delete rb; @@ -403,7 +469,7 @@ namespace polyvox void FilamentViewer::loadPngTexture(string path, ResourceBuffer rb) { - polyvox::StreamBufferAdapter sb((char *)rb.data, (char *)rb.data + rb.size); + thermion_filament::StreamBufferAdapter sb((char *)rb.data, (char *)rb.data + rb.size); std::istream inputStream(&sb); @@ -448,7 +514,7 @@ namespace polyvox void FilamentViewer::loadTextureFromPath(string path) { - string ktxExt(".ktx"); + std::string ktxExt(".ktx"); string ktx2Ext(".ktx2"); string pngExt(".png"); @@ -476,6 +542,7 @@ namespace polyvox void FilamentViewer::setBackgroundColor(const float r, const float g, const float b, const float a) { + // Log("Setting background color to rgba(%f,%f,%f,%f)", r, g, b, a); _imageMaterial->setDefaultParameter("showImage", 0); _imageMaterial->setDefaultParameter("backgroundColor", RgbaType::sRGB, float4(r, g, b, a)); _imageMaterial->setDefaultParameter("transform", _imageScale); @@ -613,8 +680,8 @@ namespace polyvox FilamentViewer::~FilamentViewer() { - clearAssets(); - delete _assetManager; + clearEntities(); + delete _sceneManager; for (auto it : _lights) { @@ -636,7 +703,7 @@ namespace polyvox void FilamentViewer::createSwapChain(const void *window, uint32_t width, uint32_t height) { #if TARGET_OS_IPHONE - _swapChain = _engine->createSwapChain((void *)window, filament::backend::SWAP_CHAIN_CONFIG_APPLE_CVPIXELBUFFER); + _swapChain = _engine->createSwapChain((void *)window, filament::backend::SWAP_CHAIN_CONFIG_TRANSPARENT | filament::backend::SWAP_CHAIN_CONFIG_APPLE_CVPIXELBUFFER); #else if (window) { @@ -675,7 +742,7 @@ namespace polyvox .build(*_engine); _view->setRenderTarget(_rt); - Log("Created render target for texture id %u (%u x %u)", texture, width, height); + Log("Created render target for texture id %ld (%u x %u)", (long)texture, width, height); } void FilamentViewer::destroySwapChain() @@ -699,27 +766,19 @@ namespace polyvox _engine->flushAndWait(); } - void FilamentViewer::clearAssets() + void FilamentViewer::clearEntities() { - Log("Clearing all assets"); - if (_mainCamera) - { - _view->setCamera(_mainCamera); - } - - _assetManager->destroyAll(); - - Log("Cleared all assets"); + _view->setCamera(_mainCamera); + _sceneManager->destroyAll(); } - void FilamentViewer::removeAsset(EntityId asset) + void FilamentViewer::removeEntity(EntityId asset) { Log("Removing asset from scene"); mtx.lock(); // todo - what if we are using a camera from this asset? - _view->setCamera(_mainCamera); - _assetManager->remove(asset); + _sceneManager->remove(asset); mtx.unlock(); } @@ -752,8 +811,19 @@ namespace polyvox Camera &cam = _view->getCamera(); _near = near; _far = far; - cam.setLensProjection(_cameraFocalLength, 1.0f, _near, - _far); + cam.setLensProjection(_cameraFocalLength, 1.0f, _near, _far); + Log("Set lens projection to focal length %f, near %f and far %f", _cameraFocalLength, _near, _far); + } + + double FilamentViewer::getCameraCullingNear() + { + Camera &cam = _view->getCamera(); + return cam.getNear(); + } + double FilamentViewer::getCameraCullingFar() + { + Camera &cam = _view->getCamera(); + return cam.getCullingFar(); } /// @@ -766,6 +836,22 @@ namespace polyvox cam.setFocusDistance(_cameraFocusDistance); } + /// + /// + /// + void FilamentViewer::setMainCamera() + { + _view->setCamera(_mainCamera); + } + + /// + /// + /// + EntityId FilamentViewer::getMainCamera() + { + return Entity::smuggle(_mainCamera->getEntity()); + } + /// /// Sets the active camera to the GLTF camera node specified by [name] (or if null, the first camera found under that node). /// N.B. Blender will generally export a three-node hierarchy - @@ -774,7 +860,7 @@ namespace polyvox bool FilamentViewer::setCamera(EntityId entityId, const char *cameraName) { - auto asset = _assetManager->getAssetByEntityId(entityId); + auto asset = _sceneManager->getAssetByEntityId(entityId); if (!asset) { Log("Failed to find asset under entity id %d.", entityId); @@ -793,17 +879,15 @@ namespace polyvox if (!cameraName) { - auto inst = _ncm->getInstance(cameras[0]); - const char *name = _ncm->getName(inst); target = cameras[0]; + const char *name = asset->getName(target); Log("No camera specified, using first camera node found (%s)", name); } else { for (int j = 0; j < count; j++) { - auto inst = _ncm->getInstance(cameras[j]); - const char *name = _ncm->getName(inst); + const char *name = asset->getName(cameras[j]); if (strcmp(name, cameraName) == 0) { target = cameras[j]; @@ -849,7 +933,7 @@ namespace polyvox ResourceBuffer skyboxBuffer = _resourceLoaderWrapper->load(skyboxPath); - // because this will go out of scope before the texture callback is invoked, we need to make a copy to the heap + // because this will go out of scope before the texture callback is invoked, we need to make a copy of the variable itself (not its contents) ResourceBuffer *skyboxBufferCopy = new ResourceBuffer(skyboxBuffer); if (skyboxBuffer.size <= 0) @@ -870,13 +954,13 @@ namespace polyvox ktxreader::Ktx1Reader::createTexture( _engine, *skyboxBundle, false, [](void *userdata) { - std::vector* vec = (std::vector*)userdata; - ResourceLoaderWrapper* loader = (ResourceLoaderWrapper*)vec->at(0); - ResourceBuffer* rb = (ResourceBuffer*) vec->at(1); - loader->free(*rb); - delete rb; - delete vec; - Log("Skybox load complete."); }, + std::vector* vec = (std::vector*)userdata; + ResourceLoaderWrapperImpl* loader = (ResourceLoaderWrapperImpl*)vec->at(0); + ResourceBuffer* rb = (ResourceBuffer*) vec->at(1); + loader->free(*rb); + delete rb; + delete vec; + }, callbackData); _skybox = filament::Skybox::Builder().environment(_skyboxTexture).build(*_engine); @@ -912,6 +996,11 @@ namespace polyvox _scene->setIndirectLight(nullptr); } + void FilamentViewer::rotateIbl(const math::mat3f &matrix) + { + _indirectLight->setRotation(matrix); + } + void FilamentViewer::loadIbl(const char *const iblPath, float intensity) { removeIbl(); @@ -943,7 +1032,7 @@ namespace polyvox _engine, *iblBundle, false, [](void *userdata) { std::vector* vec = (std::vector*)userdata; - ResourceLoaderWrapper* loader = (ResourceLoaderWrapper*)vec->at(0); + ResourceLoaderWrapperImpl* loader = (ResourceLoaderWrapperImpl*)vec->at(0); ResourceBuffer* rb = (ResourceBuffer*) vec->at(1); loader->free(*rb); delete rb; @@ -960,9 +1049,6 @@ namespace polyvox } } - double _elapsed = 0; - int _frameCount = 0; - void FilamentViewer::render( uint64_t frameTimeInNanos, void *pixelBuffer, @@ -970,25 +1056,35 @@ namespace polyvox void *data) { - if (!_view || !_mainCamera || !_swapChain) + if (!_view) { - Log("Not ready for rendering"); + Log("No view"); + return; + } + else if (!_swapChain) + { + Log("No swapchain"); return; } - if (_frameCount == 60) + auto now = std::chrono::high_resolution_clock::now(); + auto secsSinceLastFpsCheck = float(std::chrono::duration_cast(now - _fpsCounterStartTime).count()); + + if (secsSinceLastFpsCheck >= 1) { - // Log("1 sec average for asset animation update %f", _elapsed / 60); - _elapsed = 0; + auto fps = _frameCount / secsSinceLastFpsCheck; + Log("%ffps (%d skipped)", fps, _skippedFrames); _frameCount = 0; + _skippedFrames = 0; + _fpsCounterStartTime = now; } Timer tmr; - _assetManager->updateAnimations(); + _sceneManager->updateTransforms(); + _sceneManager->updateAnimations(); - _elapsed += tmr.elapsed(); - _frameCount++; + _cumulativeAnimationUpdateTime += tmr.elapsed(); // if a manipulator is active, update the active camera orientation if (_manipulator) @@ -999,34 +1095,123 @@ namespace polyvox cam.lookAt(eye, target, upward); } - // // TODO - this was an experiment but probably useful to keep for debugging - // // if pixelBuffer is provided, we will copy the framebuffer into the pixelBuffer. - // if (pixelBuffer) - // { - // auto pbd = Texture::PixelBufferDescriptor( - // pixelBuffer, size_t(1024 * 768 * 4), - // Texture::Format::RGBA, - // Texture::Type::BYTE, nullptr, callback, data); - - // _renderer->beginFrame(_swapChain, 0); - // _renderer->render(_view); - // _renderer->readPixels(0, 0, 1024, 768, std::move(pbd)); - // _renderer->endFrame(); - // } - // else - // { // Render the scene, unless the renderer wants to skip the frame. - if (_renderer->beginFrame(_swapChain, frameTimeInNanos)) + bool beginFrame = _renderer->beginFrame(_swapChain, frameTimeInNanos); + if (!beginFrame) { + _skippedFrames++; + } + + // beginFrame = true; + + if (beginFrame) + { + _renderer->render(_view); + _frameCount++; + + if (_recording) + { + Viewport const &vp = _view->getViewport(); + size_t pixelBufferSize = vp.width * vp.height * 4; + auto *pixelBuffer = new uint8_t[pixelBufferSize]; + auto callback = [](void *buf, size_t size, void *data) + { + auto frameCallbackData = (FrameCallbackData *)data; + auto viewer = (FilamentViewer *)frameCallbackData->viewer; + viewer->savePng(buf, size, frameCallbackData->frameNumber); + delete frameCallbackData; + }; + + auto now = std::chrono::high_resolution_clock::now(); + auto elapsed = float(std::chrono::duration_cast(now - _recordingStartTime).count()); + + auto frameNumber = uint32_t(floor(elapsed / _frameInterval)); + + auto userData = new FrameCallbackData{this, frameNumber}; + + auto pbd = Texture::PixelBufferDescriptor( + pixelBuffer, pixelBufferSize, + Texture::Format::RGBA, + Texture::Type::UBYTE, nullptr, callback, userData); + + _renderer->readPixels(_rt, 0, 0, vp.width, vp.height, std::move(pbd)); + } _renderer->endFrame(); } + #ifdef __EMSCRIPTEN__ + _engine->execute(); + #endif + } + + void FilamentViewer::savePng(void *buf, size_t size, int frameNumber) + { + // std::lock_guard lock(_recordingMutex); + // if (!_recording) + // { + // delete[] static_cast(buf); + // return; + // } + + Viewport const &vp = _view->getViewport(); + + std::packaged_task lambda([=]() mutable + { + int digits = 6; + std::ostringstream stringStream; + stringStream << _recordingOutputDirectory << "/output_"; + stringStream << std::setfill('0') << std::setw(digits); + stringStream << std::to_string(frameNumber); + stringStream << ".png"; + + std::string filename = stringStream.str(); + + std::ofstream wf(filename, std::ios::out | std::ios::binary); + + LinearImage image(toLinearWithAlpha(vp.width, vp.height, vp.width * 4, + static_cast(buf))); + + auto result = image::ImageEncoder::encode( + wf, image::ImageEncoder::Format::PNG, image, std::string(""), std::string("")); + + delete[] static_cast(buf); + + if (!result) + { + Log("Failed to encode"); + } + + wf.close(); + if (!wf.good()) + { + Log("Write failed!"); + } }); + _tp->add_task(lambda); + } + + void FilamentViewer::setRecordingOutputDirectory(const char *path) + { + _recordingOutputDirectory = std::string(path); + auto outputDirAsPath = std::filesystem::path(path); + if (!std::filesystem::is_directory(outputDirAsPath)) + { + std::filesystem::create_directories(outputDirAsPath); + } + } + + void FilamentViewer::setRecording(bool recording) + { + // std::lock_guard lock(_recordingMutex); + if (recording) + { + _tp = new thermion_filament::ThreadPool(16); + _recordingStartTime = std::chrono::high_resolution_clock::now(); + } else { - // std::cout << "Skipped" << std::endl; - // skipped frame + delete _tp; } - // } + this->_recording = recording; } void FilamentViewer::updateViewportAndCameraProjection( @@ -1059,17 +1244,24 @@ namespace polyvox _view->setFrustumCullingEnabled(enabled); } + void FilamentViewer::setCameraFov(double fovInDegrees, double aspect) + { + Camera &cam = _view->getCamera(); + cam.setProjection(fovInDegrees, aspect, _near, _far, Camera::Fov::HORIZONTAL); + Log("Set camera projection fov to %f", fovInDegrees); + } + void FilamentViewer::setCameraPosition(float x, float y, float z) { Camera &cam = _view->getCamera(); _cameraPosition = math::mat4f::translation(math::float3(x, y, z)); - cam.setModelMatrix(_cameraPosition * _cameraRotation); + cam.setModelMatrix(_cameraRotation * _cameraPosition); } void FilamentViewer::moveCameraToAsset(EntityId entityId) { - auto asset = _assetManager->getAssetByEntityId(entityId); + auto asset = _sceneManager->getAssetByEntityId(entityId); if (!asset) { Log("Failed to find asset attached to specified entity id."); @@ -1085,11 +1277,11 @@ namespace polyvox Log("Moved camera to %f %f %f, lookAt %f %f %f, near %f far %f", eye[0], eye[1], eye[2], lookAt[0], lookAt[1], lookAt[2], cam.getNear(), cam.getCullingFar()); } - void FilamentViewer::setCameraRotation(float rads, float x, float y, float z) + void FilamentViewer::setCameraRotation(float w, float x, float y, float z) { Camera &cam = _view->getCamera(); - _cameraRotation = math::mat4f::rotation(rads, math::float3(x, y, z)); - cam.setModelMatrix(_cameraPosition * _cameraRotation); + _cameraRotation = math::mat4f(math::quatf(w, x, y, z)); + cam.setModelMatrix(_cameraRotation * _cameraPosition); } void FilamentViewer::setCameraModelMatrix(const float *const matrix) @@ -1137,7 +1329,7 @@ namespace polyvox matrix[13], matrix[14], matrix[15]); - cam.setCustomProjection(projectionMatrix,projectionMatrix, near, far); + cam.setCustomProjection(projectionMatrix, projectionMatrix, near, far); } const math::mat4 FilamentViewer::getCameraModelMatrix() @@ -1173,20 +1365,17 @@ namespace polyvox void FilamentViewer::_createManipulator() { Camera &cam = _view->getCamera(); - auto &tm = _engine->getTransformManager(); - auto transformInstance = tm.getInstance(cam.getEntity()); - auto transform = tm.getTransform(transformInstance); - + math::double3 home = cam.getPosition(); math::double3 up = cam.getUpVector(); auto fv = cam.getForwardVector(); math::double3 target = home + fv; Viewport const &vp = _view->getViewport(); - Log("Creating manipulator for viewport size %dx%d at home %f %f %f, fv %f %f %f, up %f %f %f target %f %f %f (norm %f) with _zoomSpeed %f", vp.width, vp.height, home[0], home[1], home[2], fv[0], fv[1], fv[2], up[0], up[1], up[2], target[0], target[1], target[2], norm(home), _zoomSpeed); + // Log("Creating manipulator for viewport size %dx%d at home %f %f %f, fv %f %f %f, up %f %f %f target %f %f %f (norm %f) with _zoomSpeed %f", vp.width, vp.height, home[0], home[1], home[2], fv[0], fv[1], fv[2], up[0], up[1], up[2], target[0], target[1], target[2], norm(home), _zoomSpeed); _manipulator = Manipulator::Builder() .viewport(vp.width, vp.height) - .upVector(up.x, up.y, up.z) + .upVector(up.x, up.y, up.z) .zoomSpeed(_zoomSpeed) .targetPosition(target[0], target[1], target[2]) // only applicable to Mode::ORBIT @@ -1291,10 +1480,83 @@ namespace polyvox _manipulator = nullptr; } - void FilamentViewer::pick(uint32_t x, uint32_t y, EntityId *entityId) + void FilamentViewer::pick(uint32_t x, uint32_t y, void (*callback)(EntityId entityId, int x, int y)) { + _view->pick(x, y, [=](filament::View::PickingQueryResult const &result) - { *entityId = Entity::smuggle(result.renderable); }); + { + if(result.renderable != _imageEntity) { + callback(Entity::smuggle(result.renderable), x, y); + } }); } -} // namespace polyvox + EntityId FilamentViewer::createGeometry(float *vertices, uint32_t numVertices, uint16_t *indices, uint32_t numIndices, RenderableManager::PrimitiveType primitiveType, const char *materialPath) + { + + float *verticesCopy = (float *)malloc(numVertices * sizeof(float)); + memcpy(verticesCopy, vertices, numVertices * sizeof(float)); + VertexBuffer::BufferDescriptor::Callback vertexCallback = [](void *buf, size_t, + void *data) + { + free((void *)buf); + }; + + uint16_t *indicesCopy = (uint16_t *)malloc(numIndices * sizeof(uint16_t)); + memcpy(indicesCopy, indices, numIndices * sizeof(uint16_t)); + IndexBuffer::BufferDescriptor::Callback indexCallback = [](void *buf, size_t, + void *data) + { + free((void *)buf); + }; + + auto vb = VertexBuffer::Builder().vertexCount(numVertices).bufferCount(1).attribute(VertexAttribute::POSITION, 0, VertexBuffer::AttributeType::FLOAT3).build(*_engine); + + vb->setBufferAt(*_engine, 0, VertexBuffer::BufferDescriptor(verticesCopy, vb->getVertexCount() * sizeof(filament::math::float3), 0, vertexCallback)); + + auto ib = IndexBuffer::Builder().indexCount(numIndices).bufferType(IndexBuffer::IndexType::USHORT).build(*_engine); + ib->setBuffer(*_engine, IndexBuffer::BufferDescriptor(indicesCopy, ib->getIndexCount() * sizeof(uint16_t), 0, indexCallback)); + + filament::Material *mat = nullptr; + if (materialPath) + { + auto matData = _resourceLoaderWrapper->load(materialPath); + auto mat = Material::Builder().package(matData.data, matData.size).build(*_engine); + _resourceLoaderWrapper->free(matData); + } + + float minX, minY, minZ = 0.0f; + float maxX, maxY, maxZ = 0.0f; + + for (int i = 0; i < numVertices; i += 3) + { + minX = std::min(vertices[i], minX); + minY = std::min(vertices[i + 1], minY); + minZ = std::min(vertices[i + 2], minZ); + maxX = std::max(vertices[i], maxX); + maxY = std::max(vertices[i + 1], maxY); + maxZ = std::max(vertices[i + 2], maxZ); + } + + auto renderable = utils::EntityManager::get().create(); + RenderableManager::Builder builder = RenderableManager::Builder(1); + builder + .boundingBox({{minX, minY, minZ}, {maxX, maxY, maxZ}}) + .geometry(0, primitiveType, + vb, ib, 0, numIndices) + .culling(false) + .receiveShadows(false) + .castShadows(false); + if (mat) + { + builder.material(0, mat->getDefaultInstance()).build(*_engine, renderable); + } + auto result = builder.build(*_engine, renderable); + + _scene->addEntity(renderable); + + Log("Created geometry with primitive type %d (result %d)", primitiveType, result); + + return Entity::smuggle(renderable); + } + +} // namespace thermion_filament diff --git a/thermion_dart/native/src/SceneManager.cpp b/thermion_dart/native/src/SceneManager.cpp new file mode 100644 index 00000000..c75a6f4d --- /dev/null +++ b/thermion_dart/native/src/SceneManager.cpp @@ -0,0 +1,2116 @@ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "material/FileMaterialProvider.hpp" +#include "StreamBufferAdapter.hpp" +#include "Log.hpp" +#include "SceneManager.hpp" + +#include "gltfio/materials/uberarchive.h" + +extern "C" +{ +#include "material/image.h" +} + +namespace thermion_filament +{ + + using namespace std::chrono; + using namespace image; + using namespace utils; + using namespace filament; + using namespace filament::gltfio; + using std::unique_ptr; + + SceneManager::SceneManager(const ResourceLoaderWrapperImpl *const resourceLoaderWrapper, + Engine *engine, + Scene *scene, + const char *uberArchivePath) + : _resourceLoaderWrapper(resourceLoaderWrapper), + _engine(engine), + _scene(scene) + { + + _stbDecoder = createStbProvider(_engine); + _ktxDecoder = createKtx2Provider(_engine); + + _gltfResourceLoader = new ResourceLoader({.engine = _engine, + .normalizeSkinningWeights = true}); + if (uberArchivePath) + { + auto uberdata = resourceLoaderWrapper->load(uberArchivePath); + if (!uberdata.data) + { + Log("Failed to load ubershader material. This is fatal."); + } + _ubershaderProvider = gltfio::createUbershaderProvider(_engine, uberdata.data, uberdata.size); + resourceLoaderWrapper->free(uberdata); + } + else + { + _ubershaderProvider = gltfio::createUbershaderProvider( + _engine, UBERARCHIVE_DEFAULT_DATA, UBERARCHIVE_DEFAULT_SIZE); + } + + utils::EntityManager &em = utils::EntityManager::get(); + + _ncm = new NameComponentManager(em); + + _assetLoader = AssetLoader::create({_engine, _ubershaderProvider, _ncm, &em}); + + _gltfResourceLoader->addTextureProvider("image/ktx2", _ktxDecoder); + _gltfResourceLoader->addTextureProvider("image/png", _stbDecoder); + _gltfResourceLoader->addTextureProvider("image/jpeg", _stbDecoder); + + auto &tm = _engine->getTransformManager(); + + _collisionComponentManager = new CollisionComponentManager(tm); + _animationComponentManager = new AnimationComponentManager(tm, _engine->getRenderableManager()); + + addGizmo(); + } + + SceneManager::~SceneManager() + { + _gltfResourceLoader->asyncCancelLoad(); + _ubershaderProvider->destroyMaterials(); + destroyAll(); + AssetLoader::destroy(&_assetLoader); + } + + int SceneManager::getInstanceCount(EntityId entityId) + { + auto *asset = getAssetByEntityId(entityId); + if (!asset) + { + return -1; + } + + return asset->getAssetInstanceCount(); + } + + void SceneManager::getInstances(EntityId entityId, EntityId *out) + { + auto *asset = getAssetByEntityId(entityId); + if (!asset) + { + return; + } + auto *instances = asset->getAssetInstances(); + for (int i = 0; i < asset->getAssetInstanceCount(); i++) + { + auto instanceEntity = instances[i]->getRoot(); + out[i] = Entity::smuggle(instanceEntity); + } + } + + EntityId SceneManager::loadGltf(const char *uri, + const char *relativeResourcePath) + { + ResourceBuffer rbuf = _resourceLoaderWrapper->load(uri); + + FilamentAsset *asset = _assetLoader->createAsset((uint8_t *)rbuf.data, rbuf.size); + + if (!asset) + { + Log("Unable to parse asset"); + return 0; + } + + const char *const *const resourceUris = asset->getResourceUris(); + const size_t resourceUriCount = asset->getResourceUriCount(); + + std::vector resourceBuffers; + + for (size_t i = 0; i < resourceUriCount; i++) + { + std::string uri = std::string(relativeResourcePath) + std::string("/") + std::string(resourceUris[i]); + Log("Loading resource URI from relative path %s", resourceUris[i], uri.c_str()); + ResourceBuffer buf = _resourceLoaderWrapper->load(uri.c_str()); + + resourceBuffers.push_back(buf); + + ResourceLoader::BufferDescriptor b(buf.data, buf.size); + _gltfResourceLoader->addResourceData(resourceUris[i], std::move(b)); + } + +#ifdef __EMSCRIPTEN__ + if (!_gltfResourceLoader->asyncBeginLoad(asset)) + { + Log("Unknown error loading glTF asset"); + _resourceLoaderWrapper->free(rbuf); + for (auto &rb : resourceBuffers) + { + _resourceLoaderWrapper->free(rb); + } + return 0; + } + while (_gltfResourceLoader->asyncGetLoadProgress() < 1.0f) + { + _gltfResourceLoader->asyncUpdateLoad(); + } +#else + // load resources synchronously + if (!_gltfResourceLoader->loadResources(asset)) + { + Log("Unknown error loading glTF asset"); + _resourceLoaderWrapper->free(rbuf); + for (auto &rb : resourceBuffers) + { + _resourceLoaderWrapper->free(rb); + } + return 0; + } +#endif + + _scene->addEntities(asset->getEntities(), asset->getEntityCount()); + + FilamentInstance *inst = asset->getInstance(); + inst->getAnimator()->updateBoneMatrices(); + inst->recomputeBoundingBoxes(); + + asset->releaseSourceData(); + + EntityId eid = Entity::smuggle(asset->getRoot()); + + _assets.emplace(eid, asset); + + for (auto &rb : resourceBuffers) + { + _resourceLoaderWrapper->free(rb); + } + _resourceLoaderWrapper->free(rbuf); + + Log("Finished loading glTF from %s", uri); + + return eid; + } + + EntityId SceneManager::loadGlbFromBuffer(const uint8_t *data, size_t length, int numInstances) + { + + Log("Loading GLB from buffer of length %d", length); + + FilamentAsset *asset = nullptr; + if (numInstances > 1) + { + std::vector instances(numInstances); + asset = _assetLoader->createInstancedAsset((const uint8_t *)data, length, instances.data(), numInstances); + } + else + { + asset = _assetLoader->createAsset(data, length); + } + + if (!asset) + { + Log("Unknown error loading GLB asset."); + return 0; + } + + size_t entityCount = asset->getEntityCount(); + + _scene->addEntities(asset->getEntities(), entityCount); + +#ifdef __EMSCRIPTEN__ + if (!_gltfResourceLoader->asyncBeginLoad(asset)) + { + Log("Unknown error loading glb asset"); + return 0; + } + while (_gltfResourceLoader->asyncGetLoadProgress() < 1.0f) + { + _gltfResourceLoader->asyncUpdateLoad(); + } +#else + if (!_gltfResourceLoader->loadResources(asset)) + { + Log("Unknown error loading glb asset"); + return 0; + } +#endif + + auto lights = asset->getLightEntities(); + _scene->addEntities(lights, asset->getLightEntityCount()); + + for (int i = 0; i < asset->getAssetInstanceCount(); i++) + { + FilamentInstance *inst = asset->getAssetInstances()[i]; + inst->getAnimator()->updateBoneMatrices(); + inst->recomputeBoundingBoxes(); + auto instanceEntity = inst->getRoot(); + auto instanceEntityId = Entity::smuggle(instanceEntity); + _instances.emplace(instanceEntityId, inst); + } + + asset->releaseSourceData(); + + EntityId eid = Entity::smuggle(asset->getRoot()); + _assets.emplace(eid, asset); + return eid; + } + + void SceneManager::removeAnimationComponent(EntityId entityId) + { + + auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto *asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + } + + if (instance) + { + _animationComponentManager->removeAnimationComponent(instance); + } + else + { + _animationComponentManager->removeAnimationComponent(Entity::import(entityId)); + } + } + + bool SceneManager::addAnimationComponent(EntityId entityId) + { + + auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto *asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + } + + if (instance) + { + _animationComponentManager->addAnimationComponent(instance); + } + else + { + _animationComponentManager->addAnimationComponent(Entity::import(entityId)); + } + return true; + } + + EntityId SceneManager::createInstance(EntityId entityId) + { + std::lock_guard lock(_mutex); + + const auto &pos = _assets.find(entityId); + if (pos == _assets.end()) + { + Log("Couldn't find asset under specified entity id."); + return false; + } + const auto asset = pos->second; + auto instance = _assetLoader->createInstance(asset); + + return Entity::smuggle(instance->getRoot()); + } + + EntityId SceneManager::loadGlb(const char *uri, int numInstances) + { + ResourceBuffer rbuf = _resourceLoaderWrapper->load(uri); + auto entity = loadGlbFromBuffer((const uint8_t *)rbuf.data, rbuf.size, numInstances); + _resourceLoaderWrapper->free(rbuf); + return entity; + } + + bool SceneManager::hide(EntityId entityId, const char *meshName) + { + auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto *asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + // Log("Failed to find glTF instance under entityID %d, hiding as regular entity", entityId); + _scene->remove(Entity::import(entityId)); + return true; + } + } + + utils::Entity entity; + + if (meshName) + { + entity = findEntityByName(instance, meshName); + if (entity.isNull()) + { + Log("Failed to hide entity; specified mesh name does not exist under the target entity, or the target entity itself is no longer valid."); + return false; + } + _scene->remove(entity); + } + else + { + auto *entities = instance->getEntities(); + for (int i = 0; i < instance->getEntityCount(); i++) + { + auto entity = entities[i]; + _scene->remove(entity); + } + } + + return true; + } + + bool SceneManager::reveal(EntityId entityId, const char *meshName) + { + auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto *asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + // Log("Failed to find glTF instance under entityID %d, revealing as regular entity", entityId); + _scene->addEntity(Entity::import(entityId)); + return true; + } + } + + utils::Entity entity; + + if (meshName) + { + entity = findEntityByName(instance, meshName); + if (entity.isNull()) + { + Log("Failed to reveal entity; specified mesh name does not exist under the target entity, or the target entity itself is no longer valid."); + return false; + } + _scene->addEntity(entity); + } + else + { + // Log("Revealing all child entities"); + auto *entities = instance->getEntities(); + for (int i = 0; i < instance->getEntityCount(); i++) + { + auto entity = entities[i]; + _scene->addEntity(entity); + } + } + + return true; + } + + void SceneManager::destroyAll() + { + std::lock_guard lock(_mutex); + + for (auto &asset : _assets) + { + auto numInstances = asset.second->getAssetInstanceCount(); + for(int i = 0; i < numInstances; i++) { + auto instance = asset.second->getAssetInstances()[i]; + for (int j = 0; j < instance->getEntityCount(); j++) + { + auto childEntity = instance->getEntities()[j]; + if (_collisionComponentManager->hasComponent(childEntity)) + { + _collisionComponentManager->removeComponent(childEntity); + } + if (_animationComponentManager->hasComponent(childEntity)) + { + _animationComponentManager->removeComponent(childEntity); + } + } + } + + _scene->removeEntities(asset.second->getEntities(), + asset.second->getEntityCount()); + _scene->removeEntities(asset.second->getLightEntities(), + asset.second->getLightEntityCount()); + _assetLoader->destroyAsset(asset.second); + } + _assets.clear(); + } + + FilamentInstance *SceneManager::getInstanceByEntityId(EntityId entityId) + { + const auto &pos = _instances.find(entityId); + if (pos == _instances.end()) + { + return nullptr; + } + return pos->second; + } + + FilamentAsset *SceneManager::getAssetByEntityId(EntityId entityId) + { + const auto &pos = _assets.find(entityId); + if (pos == _assets.end()) + { + return nullptr; + } + return pos->second; + } + + math::mat4f SceneManager::getLocalTransform(EntityId entityId) { + auto entity = Entity::import(entityId); + auto& tm = _engine->getTransformManager(); + auto transformInstance = tm.getInstance(entity); + return tm.getTransform(transformInstance); + } + + math::mat4f SceneManager::getWorldTransform(EntityId entityId) { + auto entity = Entity::import(entityId); + auto& tm = _engine->getTransformManager(); + auto transformInstance = tm.getInstance(entity); + return tm.getWorldTransform(transformInstance); + } + + EntityId SceneManager::getBone(EntityId entityId, int skinIndex, int boneIndex) { + auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto *asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + Log("Failed to find glTF instance under entityID %d, revealing as regular entity", entityId); + return false; + } + } + auto joints = instance->getJointsAt(skinIndex); + auto joint = joints[boneIndex]; + return Entity::smuggle(joint); + } + + math::mat4f SceneManager::getInverseBindMatrix(EntityId entityId, int skinIndex, int boneIndex) { + auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto *asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + Log("Failed to find glTF instance under entityID %d, revealing as regular entity", entityId); + return math::mat4f(); + } + } + auto inverseBindMatrix = instance->getInverseBindMatricesAt(skinIndex)[boneIndex]; + return inverseBindMatrix; + } + + + bool SceneManager::setBoneTransform(EntityId entityId, int32_t skinIndex, int boneIndex, math::mat4f transform) + { + std::lock_guard lock(_mutex); + + const auto &entity = Entity::import(entityId); + + RenderableManager &rm = _engine->getRenderableManager(); + + const auto &renderableInstance = rm.getInstance(entity); + + if (!renderableInstance.isValid()) + { + Log("Specified entity is not a renderable. You probably provided the ultimate parent entity of a glTF asset, which is non-renderable. "); + return false; + } + + rm.setBones( + renderableInstance, + &transform, + 1, + boneIndex); + return true; + } + + void SceneManager::remove(EntityId entityId) + { + std::lock_guard lock(_mutex); + + auto entity = Entity::import(entityId); + + if (_animationComponentManager->hasComponent(entity)) + { + _animationComponentManager->removeComponent(entity); + } + + if (_collisionComponentManager->hasComponent(entity)) + { + _collisionComponentManager->removeComponent(entity); + } + + _scene->remove(entity); + + const auto *instance = getInstanceByEntityId(entityId); + + if (instance) + { + _instances.erase(entityId); + _scene->removeEntities(instance->getEntities(), instance->getEntityCount()); + for (int i = 0; i < instance->getEntityCount(); i++) + { + auto childEntity = instance->getEntities()[i]; + if (_collisionComponentManager->hasComponent(childEntity)) + { + _collisionComponentManager->removeComponent(childEntity); + } + if (_animationComponentManager->hasComponent(childEntity)) + { + _animationComponentManager->removeComponent(childEntity); + } + } + } + else + { + auto *asset = getAssetByEntityId(entityId); + + if (!asset) + { + Log("ERROR: could not find FilamentInstance or FilamentAsset associated with the given entity id"); + return; + } + _assets.erase(entityId); + + _scene->removeEntities(asset->getEntities(), asset->getEntityCount()); + + _animationComponentManager->removeComponent(asset->getInstance()->getRoot()); + + for (int i = 0; i < asset->getEntityCount(); i++) + { + auto childEntity = asset->getEntities()[i]; + if (_collisionComponentManager->hasComponent(childEntity)) + { + _collisionComponentManager->removeComponent(childEntity); + } + if (_animationComponentManager->hasComponent(childEntity)) + { + _animationComponentManager->removeComponent(childEntity); + } + } + + auto lightCount = asset->getLightEntityCount(); + if (lightCount > 0) + { + _scene->removeEntities(asset->getLightEntities(), + asset->getLightEntityCount()); + } + _assetLoader->destroyAsset(asset); + } + } + + bool SceneManager::setMorphTargetWeights(EntityId entityId, const float *const weights, const int count) + { + std::lock_guard lock(_mutex); + + auto entity = Entity::import(entityId); + if (entity.isNull()) + { + Log("Warning: null entity %d", entityId); + return false; + } + + RenderableManager &rm = _engine->getRenderableManager(); + + auto renderableInstance = rm.getInstance(entity); + + if (!renderableInstance.isValid()) + { + Log("Warning: failed to find a valid renderable instance for child entity %d", entityId); + return false; + } + + rm.setMorphWeights( + renderableInstance, + weights, + count); + return true; + } + + utils::Entity SceneManager::findChildEntityByName(EntityId entityId, const char *entityName) + { + std::lock_guard lock(_mutex); + + auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto *asset = getAssetByEntityId(entityId); + if (!asset) + { + return utils::Entity(); + } + instance = asset->getInstance(); + } + + const auto entity = findEntityByName(instance, entityName); + + if (entity.isNull()) + { + Log("Failed to find entity %s.", entityName); + } + + return entity; + } + + utils::Entity SceneManager::findEntityByName(const FilamentInstance *instance, const char *entityName) + { + utils::Entity entity; + for (size_t i = 0, c = instance->getEntityCount(); i != c; ++i) + { + auto entity = instance->getEntities()[i]; + auto nameInstance = _ncm->getInstance(entity); + if (!nameInstance.isValid()) + { + continue; + } + auto name = _ncm->getName(nameInstance); + if (!name) + { + continue; + } + if (strcmp(entityName, name) == 0) + { + return entity; + } + } + return entity; + } + + bool SceneManager::setMorphAnimationBuffer( + EntityId entityId, + const float *const morphData, + const int *const morphIndices, + int numMorphTargets, + int numFrames, + float frameLengthInMs) + { + std::lock_guard lock(_mutex); + + auto entity = Entity::import(entityId); + + if (entity.isNull()) + { + Log("ERROR: invalid entity %d.", entityId); + return false; + } + + if (!_animationComponentManager->hasComponent(entity)) + { + _animationComponentManager->addAnimationComponent(entity); + } + + MorphAnimation morphAnimation; + + morphAnimation.meshTarget = entity; + morphAnimation.frameData.clear(); + morphAnimation.frameData.insert( + morphAnimation.frameData.begin(), + morphData, + morphData + (numFrames * numMorphTargets)); + morphAnimation.frameLengthInMs = frameLengthInMs; + morphAnimation.morphIndices.resize(numMorphTargets); + for (int i = 0; i < numMorphTargets; i++) + { + morphAnimation.morphIndices[i] = morphIndices[i]; + } + morphAnimation.durationInSecs = (frameLengthInMs * numFrames) / 1000.0f; + + morphAnimation.start = high_resolution_clock::now(); + morphAnimation.lengthInFrames = static_cast( + morphAnimation.durationInSecs * 1000.0f / + frameLengthInMs); + + auto animationComponentInstance = _animationComponentManager->getInstance(entity); + auto &animationComponent = _animationComponentManager->elementAt<0>(animationComponentInstance); + auto &morphAnimations = animationComponent.morphAnimations; + + morphAnimations.emplace_back(morphAnimation); + return true; + } + + bool SceneManager::setMaterialColor(EntityId entityId, const char *meshName, int materialIndex, const float r, const float g, const float b, const float a) + { + + auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto *asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return false; + } + } + + auto entity = findEntityByName(instance, meshName); + + RenderableManager &rm = _engine->getRenderableManager(); + + auto renderable = rm.getInstance(entity); + + if (!renderable.isValid()) + { + Log("Renderable not valid, was the entity id correct?"); + return false; + } + + MaterialInstance *mi = rm.getMaterialInstanceAt(renderable, materialIndex); + + if (!mi) + { + Log("ERROR: material index must be less than number of material instances"); + return false; + } + mi->setParameter("baseColorFactor", RgbaType::sRGB, math::float4(r, g, b, a)); + Log("Set baseColorFactor for entity %d to %f %f %f %f", entityId, r, g, b, a); + return true; + } + + void SceneManager::resetBones(EntityId entityId) + { + std::lock_guard lock(_mutex); + + auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto *asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return; + } + } + auto skinCount = instance->getSkinCount(); + + TransformManager &transformManager = _engine->getTransformManager(); + + // + // To reset the skeleton to its rest pose, we could just call animator->resetBoneMatrices(), + // which sets all bone matrices to the identity matrix. However, any subsequent calls to animator->updateBoneMatrices() + // may result in unexpected poses, because that method uses each bone's transform to calculate + // the bone matrices (and resetBoneMatrices does not affect this transform). + // To "fully" reset the bone, we need to set its local transform (i.e. relative to its parent) + // to its original orientation in rest pose. + // + // This can be calculated as: + // + // auto rest = inverse(parentTransformInModelSpace) * bindMatrix + // + // (where bindMatrix is the inverse of the inverseBindMatrix). + // + // The only requirement is that parent bone transforms are reset before child bone transforms. + // glTF/Filament does not guarantee that parent bones are listed before child bones under a FilamentInstance. + // We ensure that parents are reset before children by: + // - pushing all bones onto a stack + // - iterate over the stack + // - look at the bone at the top of the stack + // - if the bone already been reset, pop and continue iterating over the stack + // - otherwise + // - if the bone has a parent that has not been reset, push the parent to the top of the stack and continue iterating + // - otherwise + // - pop the bone, reset its transform and mark it as completed + for (int skinIndex = 0; skinIndex < skinCount; skinIndex++) + { + std::unordered_set joints; + std::unordered_set completed; + std::stack stack; + + auto transforms = getBoneRestTranforms(entityId, skinIndex); + + for (int i = 0; i < instance->getJointCountAt(skinIndex); i++) + { + auto restTransform = transforms->at(i); + const auto& joint = instance->getJointsAt(skinIndex)[i]; + auto transformInstance = transformManager.getInstance(joint); + transformManager.setTransform(transformInstance, restTransform); + } + } + instance->getAnimator()->updateBoneMatrices(); + } + + std::unique_ptr> SceneManager::getBoneRestTranforms(EntityId entityId, int skinIndex) { + + auto transforms = std::make_unique>(); + + auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto *asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return transforms; + } + } + + auto skinCount = instance->getSkinCount(); + + TransformManager &transformManager = _engine->getTransformManager(); + + transforms->resize(instance->getJointCountAt(skinIndex)); + + // + // To reset the skeleton to its rest pose, we could just call animator->resetBoneMatrices(), + // which sets all bone matrices to the identity matrix. However, any subsequent calls to animator->updateBoneMatrices() + // may result in unexpected poses, because that method uses each bone's transform to calculate + // the bone matrices (and resetBoneMatrices does not affect this transform). + // To "fully" reset the bone, we need to set its local transform (i.e. relative to its parent) + // to its original orientation in rest pose. + // + // This can be calculated as: + // + // auto rest = inverse(parentTransformInModelSpace) * bindMatrix + // + // (where bindMatrix is the inverse of the inverseBindMatrix). + // + // The only requirement is that parent bone transforms are reset before child bone transforms. + // glTF/Filament does not guarantee that parent bones are listed before child bones under a FilamentInstance. + // We ensure that parents are reset before children by: + // - pushing all bones onto a stack + // - iterate over the stack + // - look at the bone at the top of the stack + // - if the bone already been reset, pop and continue iterating over the stack + // - otherwise + // - if the bone has a parent that has not been reset, push the parent to the top of the stack and continue iterating + // - otherwise + // - pop the bone, reset its transform and mark it as completed + std::vector joints; + std::unordered_set completed; + std::stack stack; + + for (int i = 0; i < instance->getJointCountAt(skinIndex); i++) + { + const auto& joint = instance->getJointsAt(skinIndex)[i]; + joints.push_back(joint); + stack.push(joint); + } + + while(!stack.empty()) + { + const auto& joint = stack.top(); + + // if we've already handled this node previously (e.g. when we encountered it as a parent), then skip + if(completed.find(joint) != completed.end()) { + stack.pop(); + continue; + } + + const auto transformInstance = transformManager.getInstance(joint); + auto parent = transformManager.getParent(transformInstance); + + // we need to handle parent joints before handling their children + // therefore, if this joint has a parent that hasn't been handled yet, + // push the parent to the top of the stack and start the loop again + const auto& jointIter = std::find(joints.begin(), joints.end(), joint); + auto parentIter = std::find(joints.begin(), joints.end(), parent); + + if(parentIter != joints.end() && completed.find(parent) == completed.end()) { + stack.push(parent); + continue; + } + + // otherwise let's get the inverse bind matrix for the joint + math::mat4f inverseBindMatrix; + bool found = false; + for (int i = 0; i < instance->getJointCountAt(skinIndex); i++) + { + if(instance->getJointsAt(skinIndex)[i] == joint) { + inverseBindMatrix = instance->getInverseBindMatricesAt(skinIndex)[i]; + found = true; + break; + } + } + ASSERT_PRECONDITION(found, "Failed to find inverse bind matrix for joint %d", joint); + + // now we need to ascend back up the hierarchy to calculate the modelSpaceTransform + math::mat4f modelSpaceTransform; + while(parentIter != joints.end()) { + const auto transformInstance = transformManager.getInstance(parent); + const auto parentIndex = distance(joints.begin(), parentIter); + const auto transform = transforms->at(parentIndex); + modelSpaceTransform = transform * modelSpaceTransform; + parent = transformManager.getParent(transformInstance); + parentIter = std::find(joints.begin(), joints.end(), parent); + } + + const auto bindMatrix = inverse(inverseBindMatrix); + + const auto inverseModelSpaceTransform = inverse(modelSpaceTransform); + + const auto jointIndex = distance(joints.begin(), jointIter); + transforms->at(jointIndex) = inverseModelSpaceTransform * bindMatrix; + completed.insert(joint); + stack.pop(); + } + return transforms; + } + + bool SceneManager::updateBoneMatrices(EntityId entityId) { + auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto *asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return false; + } + } + instance->getAnimator()->updateBoneMatrices(); + return true; + } + + bool SceneManager::setTransform(EntityId entityId, math::mat4f transform) { + auto& tm = _engine->getTransformManager(); + const auto& entity = Entity::import(entityId); + auto transformInstance = tm.getInstance(entity); + if(!transformInstance) { + return false; + } + tm.setTransform(transformInstance, transform); + return true; + } + + bool SceneManager::addBoneAnimation(EntityId parentEntity, + int skinIndex, + int boneIndex, + const float *const frameData, + int numFrames, + float frameLengthInMs, + float fadeOutInSecs, + float fadeInInSecs, + float maxDelta) + { + std::lock_guard lock(_mutex); + + auto *instance = getInstanceByEntityId(parentEntity); + if (!instance) + { + auto *asset = getAssetByEntityId(parentEntity); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return false; + } + } + + BoneAnimation animation; + animation.boneIndex = boneIndex; + animation.frameData.clear(); + + const auto &inverseBindMatrix = instance->getInverseBindMatricesAt(skinIndex)[boneIndex]; + + for (int i = 0; i < numFrames; i++) + { + math::mat4f frame( + frameData[i * 16], + frameData[(i * 16) + 1], + frameData[(i * 16) + 2], + frameData[(i * 16) + 3], + frameData[(i * 16) + 4], + frameData[(i * 16) + 5], + frameData[(i * 16) + 6], + frameData[(i * 16) + 7], + frameData[(i * 16) + 8], + frameData[(i * 16) + 9], + frameData[(i * 16) + 10], + frameData[(i * 16) + 11], + frameData[(i * 16) + 12], + frameData[(i * 16) + 13], + frameData[(i * 16) + 14], + frameData[(i * 16) + 15]); + + animation.frameData.push_back(frame); + } + + animation.frameLengthInMs = frameLengthInMs; + animation.start = std::chrono::high_resolution_clock::now(); + animation.reverse = false; + animation.durationInSecs = (frameLengthInMs * numFrames) / 1000.0f; + animation.lengthInFrames = numFrames; + animation.frameLengthInMs = frameLengthInMs; + animation.fadeOutInSecs = fadeOutInSecs; + animation.fadeInInSecs = fadeInInSecs; + animation.maxDelta = maxDelta; + animation.skinIndex = skinIndex; + if(!_animationComponentManager->hasComponent(instance->getRoot())) { + Log("ERROR: specified entity is not animatable (has no animation component attached)."); + return false; + } + auto animationComponentInstance = _animationComponentManager->getInstance(instance->getRoot()); + + auto &animationComponent = _animationComponentManager->elementAt<0>(animationComponentInstance); + auto &boneAnimations = animationComponent.boneAnimations; + + boneAnimations.emplace_back(animation); + + return true; + } + + void SceneManager::playAnimation(EntityId entityId, int index, bool loop, bool reverse, bool replaceActive, float crossfade) + { + std::lock_guard lock(_mutex); + + if (index < 0) + { + Log("ERROR: glTF animation index must be greater than zero."); + return; + } + + auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto *asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return; + } + } + + if (!_animationComponentManager->hasComponent(instance->getRoot())) + { + Log("ERROR: specified entity is not animatable (has no animation component attached)."); + return; + } + + auto animationComponentInstance = _animationComponentManager->getInstance(instance->getRoot()); + + auto &animationComponent = _animationComponentManager->elementAt<0>(animationComponentInstance); + + if (replaceActive) + { + if (animationComponent.gltfAnimations.size() > 0) + { + auto &last = animationComponent.gltfAnimations.back(); + animationComponent.fadeGltfAnimationIndex = last.index; + animationComponent.fadeDuration = crossfade; + auto now = high_resolution_clock::now(); + auto elapsedInSecs = float(std::chrono::duration_cast(now - last.start).count()) / 1000.0f; + animationComponent.fadeOutAnimationStart = elapsedInSecs; + animationComponent.gltfAnimations.clear(); + } + else + { + animationComponent.fadeGltfAnimationIndex = -1; + animationComponent.fadeDuration = 0.0f; + } + } + else if (crossfade > 0) + { + Log("ERROR: crossfade only supported when replaceActive is true."); + return; + } + else + { + animationComponent.fadeGltfAnimationIndex = -1; + animationComponent.fadeDuration = 0.0f; + } + + GltfAnimation animation; + animation.index = index; + animation.start = std::chrono::high_resolution_clock::now(); + animation.loop = loop; + animation.reverse = reverse; + animation.durationInSecs = instance->getAnimator()->getAnimationDuration(index); + + bool found = false; + + // don't play the animation if it's already running + for(int i=0; i < animationComponent.gltfAnimations.size(); i++) { + if(animationComponent.gltfAnimations[i].index == index) { + found = true; + break; + } + } + if(!found) { + animationComponent.gltfAnimations.push_back(animation); + } + } + + void SceneManager::stopAnimation(EntityId entityId, int index) + { + std::lock_guard lock(_mutex); + + auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto *asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + Log("Failed to find instance for entity"); + return; + } + } + + auto animationComponentInstance = _animationComponentManager->getInstance(instance->getRoot()); + auto &animationComponent = _animationComponentManager->elementAt<0>(animationComponentInstance); + + auto erased = std::remove_if(animationComponent.gltfAnimations.begin(), + animationComponent.gltfAnimations.end(), + [=](GltfAnimation &anim) + { return anim.index == index; }); + animationComponent.gltfAnimations.erase(erased, + animationComponent.gltfAnimations.end()); + } + + void SceneManager::loadTexture(EntityId entity, const char *resourcePath, int renderableIndex) + { + + // const auto &pos = _instances.find(entity); + // if (pos == _instances.end()) + // { + // Log("ERROR: asset not found for entity."); + // return; + // } + // const auto *instance = pos->second; + + // Log("Loading texture at %s for renderableIndex %d", resourcePath, renderableIndex); + + // string rp(resourcePath); + + // if (asset.texture) + // { + // _engine->destroy(asset.texture); + // asset.texture = nullptr; + // } + + // ResourceBuffer imageResource = _resourceLoaderWrapper->load(rp.c_str()); + + // StreamBufferAdapter sb((char *)imageResource.data, (char *)imageResource.data + imageResource.size); + + // istream *inputStream = new std::istream(&sb); + + // LinearImage *image = new LinearImage(ImageDecoder::decode( + // *inputStream, rp.c_str(), ImageDecoder::ColorSpace::SRGB)); + + // if (!image->isValid()) + // { + // Log("Invalid image : %s", rp.c_str()); + // delete inputStream; + // _resourceLoaderWrapper->free(imageResource); + // return; + // } + + // uint32_t channels = image->getChannels(); + // uint32_t w = image->getWidth(); + // uint32_t h = image->getHeight(); + // asset.texture = Texture::Builder() + // .width(w) + // .height(h) + // .levels(0xff) + // .format(channels == 3 ? Texture::InternalFormat::RGB16F + // : Texture::InternalFormat::RGBA16F) + // .sampler(Texture::Sampler::SAMPLER_2D) + // .build(*_engine); + + // Texture::PixelBufferDescriptor::Callback freeCallback = [](void *buf, size_t, + // void *data) + // { + // delete reinterpret_cast(data); + // }; + + // Texture::PixelBufferDescriptor buffer( + // image->getPixelRef(), size_t(w * h * channels * sizeof(float)), + // channels == 3 ? Texture::Format::RGB : Texture::Format::RGBA, + // Texture::Type::FLOAT, freeCallback); + + // asset.texture->setImage(*_engine, 0, std::move(buffer)); + // MaterialInstance *const *inst = instance->getMaterialInstances(); + // size_t mic = instance->getMaterialInstanceCount(); + // Log("Material instance count : %d", mic); + + // auto sampler = TextureSampler(); + // inst[0]->setParameter("baseColorIndex", 0); + // inst[0]->setParameter("baseColorMap", asset.texture, sampler); + // delete inputStream; + + // _resourceLoaderWrapper->free(imageResource); + } + + void SceneManager::setAnimationFrame(EntityId entityId, int animationIndex, int animationFrame) + { + auto *instance = getInstanceByEntityId(entityId); + auto offset = 60 * animationFrame * 1000; // TODO - don't hardcore 60fps framerate + instance->getAnimator()->applyAnimation(animationIndex, offset); + instance->getAnimator()->updateBoneMatrices(); + } + + float SceneManager::getAnimationDuration(EntityId entity, int animationIndex) + { + auto *instance = getInstanceByEntityId(entity); + + if (!instance) + { + auto *asset = getAssetByEntityId(entity); + if (!asset) + { + return -1.0f; + } + instance = asset->getInstance(); + } + return instance->getAnimator()->getAnimationDuration(animationIndex); + } + + unique_ptr> SceneManager::getAnimationNames(EntityId entity) + { + + const auto &pos = _instances.find(entity); + + unique_ptr> names = std::make_unique>(); + + FilamentInstance *instance; + + if (pos != _instances.end()) + { + instance = pos->second; + } + else + { + const auto &assetPos = _assets.find(entity); + if (assetPos != _assets.end()) + { + instance = assetPos->second->getInstance(); + } + else + { + Log("Could not resolve entity ID %d to FilamentInstance or FilamentAsset"); + return names; + } + } + + size_t count = instance->getAnimator()->getAnimationCount(); + + for (size_t i = 0; i < count; i++) + { + names->push_back(instance->getAnimator()->getAnimationName(i)); + } + + return names; + } + + unique_ptr> SceneManager::getMorphTargetNames(EntityId assetEntityId, EntityId child) + { + unique_ptr> names = std::make_unique>(); + + const auto *instance = getInstanceByEntityId(assetEntityId); + + if (!instance) + { + auto asset = getAssetByEntityId(assetEntityId); + if (!asset) + { + Log("Warning - failed to find specified asset. This is unexpected and probably indicates you are passing the wrong entity"); + return names; + } + instance = asset->getInstance(); + if(!instance) { + Log("Warning - failed to find instance for specified asset. This is unexpected and probably indicates you are passing the wrong entity"); + return names; + } + } + + const auto *asset = instance->getAsset(); + + const utils::Entity *entities = asset->getEntities(); + + const utils::Entity target = Entity::import(child); + + for (int i = 0; i < asset->getEntityCount(); i++) + { + + utils::Entity e = entities[i]; + if (e == target) + { + size_t count = asset->getMorphTargetCountAt(e); + for (int j = 0; j < count; j++) + { + const char *morphName = asset->getMorphTargetNameAt(e, j); + names->push_back(morphName); + } + break; + } + } + return names; + } + + unique_ptr> SceneManager::getBoneNames(EntityId assetEntityId, int skinIndex) { + + unique_ptr> names = std::make_unique>(); + + auto *instance = getInstanceByEntityId(assetEntityId); + + if (!instance) + { + auto *asset = getAssetByEntityId(assetEntityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + Log("ERROR: failed to find instance for entity %d", assetEntityId); + return names; + } + } + + size_t skinCount = instance->getSkinCount(); + + if (skinCount > 1) + { + Log("WARNING - skin count > 1 not currently implemented. This will probably not work"); + } + + size_t numJoints = instance->getJointCountAt(skinIndex); + auto joints = instance->getJointsAt(skinIndex); + for (int i = 0; i < numJoints; i++) + { + const char *jointName = _ncm->getName(_ncm->getInstance(joints[i])); + names->push_back(jointName); + } + return names; + } + + + void SceneManager::transformToUnitCube(EntityId entityId) + { + const auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return; + } + } + auto &tm = _engine->getTransformManager(); + + auto aabb = instance->getBoundingBox(); + auto center = aabb.center(); + auto halfExtent = aabb.extent(); + auto maxExtent = max(halfExtent) * 2; + auto scaleFactor = 2.0f / maxExtent; + auto transform = + math::mat4f::scaling(scaleFactor) * math::mat4f::translation(-center); + tm.setTransform(tm.getInstance(instance->getRoot()), transform); + } + + EntityId SceneManager::getParent(EntityId childEntityId) { + auto &tm = _engine->getTransformManager(); + const auto child = Entity::import(childEntityId); + const auto &childInstance = tm.getInstance(child); + auto parent = tm.getParent(childInstance); + return Entity::smuggle(parent); + } + + void SceneManager::setParent(EntityId childEntityId, EntityId parentEntityId) + { + auto &tm = _engine->getTransformManager(); + const auto child = Entity::import(childEntityId); + const auto parent = Entity::import(parentEntityId); + + const auto &parentInstance = tm.getInstance(parent); + const auto &childInstance = tm.getInstance(child); + tm.setParent(childInstance, parentInstance); + } + + void SceneManager::addCollisionComponent(EntityId entityId, void (*onCollisionCallback)(const EntityId entityId1, const EntityId entityId2), bool affectsTransform) + { + std::lock_guard lock(_mutex); + const auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto asset = getAssetByEntityId(entityId); + if (!asset) + { + return; + } + else + { + instance = asset->getInstance(); + } + } + auto collisionInstance = _collisionComponentManager->addComponent(instance->getRoot()); + _collisionComponentManager->elementAt<0>(collisionInstance) = instance->getBoundingBox(); + _collisionComponentManager->elementAt<1>(collisionInstance) = onCollisionCallback; + _collisionComponentManager->elementAt<2>(collisionInstance) = affectsTransform; + } + + void SceneManager::removeCollisionComponent(EntityId entityId) + { + std::lock_guard lock(_mutex); + const auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto asset = getAssetByEntityId(entityId); + if (!asset) + { + return; + } + else + { + instance = asset->getInstance(); + } + } + _collisionComponentManager->removeComponent(instance->getRoot()); + } + + void SceneManager::testCollisions(EntityId entityId) + { + const auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return; + } + } + + const auto &tm = _engine->getTransformManager(); + + auto transformInstance = tm.getInstance(instance->getRoot()); + auto worldTransform = tm.getWorldTransform(transformInstance); + auto aabb = instance->getBoundingBox(); + aabb = aabb.transform(worldTransform); + _collisionComponentManager->collides(instance->getRoot(), aabb); + } + + void SceneManager::updateAnimations() + { + std::lock_guard lock(_mutex); + _animationComponentManager->update(); + } + + void SceneManager::updateTransforms() + { + std::lock_guard lock(_mutex); + + auto &tm = _engine->getTransformManager(); + + for (const auto &[entityId, transformUpdate] : _transformUpdates) + { + const auto &pos = _instances.find(entityId); + + bool isCollidable = true; + Entity entity; + filament::TransformManager::Instance transformInstance; + filament::math::mat4f transform; + Aabb boundingBox; + if (pos == _instances.end()) + { + isCollidable = false; + entity = Entity::import(entityId); + } + else + { + const auto *instance = pos->second; + entity = instance->getRoot(); + boundingBox = instance->getBoundingBox(); + } + + transformInstance = tm.getInstance(entity); + transform = tm.getTransform(transformInstance); + + math::float3 newTranslation = std::get<0>(transformUpdate); + bool newTranslationRelative = std::get<1>(transformUpdate); + math::quatf newRotation = std::get<2>(transformUpdate); + bool newRotationRelative = std::get<3>(transformUpdate); + float newScale = std::get<4>(transformUpdate); + + math::float3 translation; + math::quatf rotation; + math::float3 scale; + + decomposeMatrix(transform, &translation, &rotation, &scale); + + if (newRotationRelative) + { + rotation = normalize(rotation * newRotation); + } + else + { + rotation = newRotation; + } + + math::float3 relativeTranslation; + + if (newTranslationRelative) + { + math::mat3f rotationMatrix(rotation); + relativeTranslation = rotationMatrix * newTranslation; + translation += relativeTranslation; + } + else + { + relativeTranslation = newTranslation - translation; + translation = newTranslation; + } + + transform = composeMatrix(translation, rotation, scale); + + if (isCollidable) + { + auto transformedBB = boundingBox.transform(transform); + + auto collisionAxes = _collisionComponentManager->collides(entity, transformedBB); + + if (collisionAxes.size() == 1) + { + auto globalAxis = collisionAxes[0]; + globalAxis *= norm(relativeTranslation); + auto newRelativeTranslation = relativeTranslation + globalAxis; + translation -= relativeTranslation; + translation += newRelativeTranslation; + transform = composeMatrix(translation, rotation, scale); + } + else if (collisionAxes.size() > 1) + { + translation -= relativeTranslation; + transform = composeMatrix(translation, rotation, scale); + } + } + tm.setTransform(transformInstance, transform); + } + _transformUpdates.clear(); + } + + void SceneManager::setScale(EntityId entityId, float newScale) + { + std::lock_guard lock(_mutex); + + auto entity = Entity::import(entityId); + if (entity.isNull()) + { + Log("Failed to find entity under ID %d", entityId); + return; + } + auto &tm = _engine->getTransformManager(); + + auto transformInstance = tm.getInstance(entity); + auto transform = tm.getTransform(transformInstance); + math::float3 translation; + math::quatf rotation; + math::float3 scale; + + decomposeMatrix(transform, &translation, &rotation, &scale); + auto newTransform = composeMatrix(translation, rotation, newScale); + tm.setTransform(transformInstance, newTransform); + } + + void SceneManager::setPosition(EntityId entityId, float x, float y, float z) + { + std::lock_guard lock(_mutex); + + auto entity = Entity::import(entityId); + if (entity.isNull()) + { + Log("Failed to find entity under ID %d", entityId); + return; + } + auto &tm = _engine->getTransformManager(); + + auto transformInstance = tm.getInstance(entity); + auto transform = tm.getTransform(transformInstance); + math::float3 translation; + math::quatf rotation; + math::float3 scale; + + decomposeMatrix(transform, &translation, &rotation, &scale); + translation = math::float3(x, y, z); + auto newTransform = composeMatrix(translation, rotation, scale); + tm.setTransform(transformInstance, newTransform); + } + + void SceneManager::setRotation(EntityId entityId, float rads, float x, float y, float z, float w) + { + std::lock_guard lock(_mutex); + + auto entity = Entity::import(entityId); + if (entity.isNull()) + { + Log("Failed to find entity under ID %d", entityId); + return; + } + auto &tm = _engine->getTransformManager(); + + auto transformInstance = tm.getInstance(entity); + auto transform = tm.getTransform(transformInstance); + math::float3 translation; + math::quatf rotation; + math::float3 scale; + + decomposeMatrix(transform, &translation, &rotation, &scale); + rotation = math::quatf(w, x, y, z); + auto newTransform = composeMatrix(translation, rotation, scale); + tm.setTransform(transformInstance, newTransform); + } + + void SceneManager::queuePositionUpdate(EntityId entity, float x, float y, float z, bool relative) + { + std::lock_guard lock(_mutex); + + const auto &pos = _transformUpdates.find(entity); + if (pos == _transformUpdates.end()) + { + _transformUpdates.emplace(entity, std::make_tuple(math::float3(), true, math::quatf(1.0f), true, 1.0f)); + } + auto curr = _transformUpdates[entity]; + auto &trans = std::get<0>(curr); + trans.x = x; + trans.y = y; + trans.z = z; + + auto &isRelative = std::get<1>(curr); + isRelative = relative; + _transformUpdates[entity] = curr; + } + + void SceneManager::queueRotationUpdate(EntityId entity, float rads, float x, float y, float z, float w, bool relative) + { + std::lock_guard lock(_mutex); + const auto &pos = _transformUpdates.find(entity); + if (pos == _transformUpdates.end()) + { + _transformUpdates.emplace(entity, std::make_tuple(math::float3(), true, math::quatf(1.0f), true, 1.0f)); + } + auto curr = _transformUpdates[entity]; + auto &rot = std::get<2>(curr); + rot.w = w; + rot.x = x; + rot.y = y; + rot.z = z; + auto &isRelative = std::get<3>(curr); + isRelative = relative; + _transformUpdates[entity] = curr; + } + + const utils::Entity *SceneManager::getCameraEntities(EntityId entityId) + { + const auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return nullptr; + } + } + return instance->getAsset()->getCameraEntities(); + } + + size_t SceneManager::getCameraEntityCount(EntityId entityId) + { + const auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return -1; + } + } + return instance->getAsset()->getCameraEntityCount(); + } + + const utils::Entity *SceneManager::getLightEntities(EntityId entityId) noexcept + { + const auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return nullptr; + } + } + return instance->getAsset()->getLightEntities(); + } + + size_t SceneManager::getLightEntityCount(EntityId entityId) noexcept + { + const auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return -1; + } + } + return instance->getAsset()->getLightEntityCount(); + } + + const char *SceneManager::getNameForEntity(EntityId entityId) + { + const auto &entity = Entity::import(entityId); + auto nameInstance = _ncm->getInstance(entity); + if (!nameInstance.isValid()) + { + Log("Failed to find name instance for entity ID %d", entityId); + return nullptr; + } + return _ncm->getName(nameInstance); + } + + int SceneManager::getEntityCount(EntityId entityId, bool renderableOnly) + { + const auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return 0; + } + } + if (renderableOnly) + { + int count = 0; + const auto &rm = _engine->getRenderableManager(); + const Entity *entities = instance->getEntities(); + for (int i = 0; i < instance->getEntityCount(); i++) + { + if (rm.hasComponent(entities[i])) + { + count++; + } + } + return count; + } + return instance->getEntityCount(); + } + + void SceneManager::getEntities(EntityId entityId, bool renderableOnly, EntityId *out) + { + const auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return; + } + } + + if (renderableOnly) + { + int count = 0; + const auto &rm = _engine->getRenderableManager(); + const Entity *entities = instance->getEntities(); + int offset = 0; + for (int i = 0; i < instance->getEntityCount(); i++) + { + if (rm.hasComponent(entities[i])) + { + out[offset] = Entity::smuggle(entities[i]); + offset++; + } + } + } + else + { + for (int i = 0; i < instance->getEntityCount(); i++) + { + out[i] = Entity::smuggle(instance->getEntities()[i]); + } + } + } + + const char *SceneManager::getEntityNameAt(EntityId entityId, int index, bool renderableOnly) + { + const auto *instance = getInstanceByEntityId(entityId); + if (!instance) + { + auto asset = getAssetByEntityId(entityId); + if (asset) + { + instance = asset->getInstance(); + } + else + { + return nullptr; + } + } + int found = -1; + + if (renderableOnly) + { + int count = 0; + const auto &rm = _engine->getRenderableManager(); + const Entity *entities = instance->getEntities(); + for (int i = 0; i < instance->getEntityCount(); i++) + { + if (rm.hasComponent(entities[i])) + { + if (count == index) + { + found = i; + break; + } + count++; + } + } + } + else + { + found = index; + } + + if (found >= instance->getEntityCount()) + { + Log("ERROR: index %d greater than number of child entities.", found); + return nullptr; + } + + const utils::Entity entity = instance->getEntities()[found]; + auto inst = _ncm->getInstance(entity); + auto name = _ncm->getName(inst); + return name; + } + + void SceneManager::setPriority(EntityId entityId, int priority) + { + auto &rm = _engine->getRenderableManager(); + auto renderableInstance = rm.getInstance(Entity::import(entityId)); + if (!renderableInstance.isValid()) + { + Log("Error: invalid renderable, did you pass the correct entity?", priority); + return; + } + rm.setPriority(renderableInstance, priority); + Log("Set instance renderable priority to %d", priority); + } + + EntityId SceneManager::addGizmo() + { + _gizmoMaterial = + Material::Builder() + .package(GIZMO_GIZMO_DATA, GIZMO_GIZMO_SIZE) + .build(*_engine); + + auto vertexCount = 9; + + float *vertices = new float[vertexCount * 3]{ + -0.05, 0.0f, 0.05f, + 0.05f, 0.0f, 0.05f, + 0.05f, 0.0f, -0.05f, + -0.05f, 0.0f, -0.05f, + -0.05f, 1.0f, 0.05f, + 0.05f, 1.0f, 0.05f, + 0.05f, 1.0f, -0.05f, + -0.05f, 1.0f, -0.05f, + 0.00f, 1.1f, 0.0f}; + + VertexBuffer::BufferDescriptor::Callback vertexCallback = [](void *buf, size_t, + void *data) + { + free((void *)buf); + }; + + auto indexCount = 42; + uint16_t *indices = new uint16_t[indexCount]{ + // bottom quad + 0, 1, 2, + 0, 2, 3, + // top "cone" + 4, 5, 8, + 5, 6, 8, + 4, 7, 8, + 6, 7, 8, + // front + 0, 1, 4, + 1, 5, 4, + // right + 1, 2, 5, + 2, 6, 5, + // back + 2, 6, 7, + 7, 3, 2, + // left + 0, 4, 7, + 7, 3, 0 + + }; + + IndexBuffer::BufferDescriptor::Callback indexCallback = [](void *buf, size_t, + void *data) + { + free((void *)buf); + }; + + auto vb = VertexBuffer::Builder() + .vertexCount(vertexCount) + .bufferCount(1) + .attribute( + VertexAttribute::POSITION, 0, VertexBuffer::AttributeType::FLOAT3) + .build(*_engine); + + vb->setBufferAt( + *_engine, + 0, + VertexBuffer::BufferDescriptor(vertices, vb->getVertexCount() * sizeof(filament::math::float3), 0, vertexCallback)); + + auto ib = IndexBuffer::Builder().indexCount(indexCount).bufferType(IndexBuffer::IndexType::USHORT).build(*_engine); + ib->setBuffer(*_engine, IndexBuffer::BufferDescriptor(indices, ib->getIndexCount() * sizeof(uint16_t), 0, indexCallback)); + + auto &entityManager = EntityManager::get(); + + _gizmoY = entityManager.create(); + auto materialY = _gizmoMaterial->createInstance(); + materialY->setParameter("color", math::float3{1.0f, 0.0f, 0.0f}); + RenderableManager::Builder(1) + .boundingBox({{}, {1.0f, 1.0f, 1.0f}}) + .material(0, materialY) + .geometry(0, RenderableManager::PrimitiveType::TRIANGLES, vb, + ib, 0, indexCount) + .culling(false) + .build(*_engine, _gizmoY); + + _gizmoX = entityManager.create(); + auto materialX = _gizmoMaterial->createInstance(); + materialX->setParameter("color", math::float3{0.0f, 1.0f, 0.0f}); + auto xTransform = math::mat4f::translation(math::float3{0.0f, 0.05f, -0.05f}) * math::mat4f::rotation(-math::F_PI_2, math::float3{0, 0, 1}); + auto *instanceBufferX = InstanceBuffer::Builder(1).localTransforms(&xTransform).build(*_engine); + RenderableManager::Builder(1) + .boundingBox({{}, {1.0f, 1.0f, 1.0f}}) + .instances(1, instanceBufferX) + .material(0, materialX) + .geometry(0, RenderableManager::PrimitiveType::TRIANGLES, vb, + ib, 0, indexCount) + .culling(false) + .build(*_engine, _gizmoX); + + _gizmoZ = entityManager.create(); + auto materialZ = _gizmoMaterial->createInstance(); + materialZ->setParameter("color", math::float3{0.0f, 0.0f, 1.0f}); + auto zTransform = math::mat4f::translation(math::float3{0.0f, 0.05f, -0.05f}) * math::mat4f::rotation(3 * math::F_PI_2, math::float3{1, 0, 0}); + auto *instanceBufferZ = InstanceBuffer::Builder(1).localTransforms(&zTransform).build(*_engine); + RenderableManager::Builder(1) + .boundingBox({{}, {1.0f, 1.0f, 1.0f}}) + .instances(1, instanceBufferZ) + .material(0, materialZ) + .geometry(0, RenderableManager::PrimitiveType::TRIANGLES, vb, + ib, 0, indexCount) + .culling(false) + .build(*_engine, _gizmoZ); + + // auto localTransforms = math::mat4f[3] { + // math::mat4f(), + // math::mat4f::translation(math::float3 { 0.0f, 0.05f, -0.05f}) * math::mat4f::rotation(3 * math::F_PI_2, math::float3 { 1, 0, 0 }) , + // math::mat4f::translation(math::float3 { 0.0f, 0.05f, -0.05f}) * math::mat4f::rotation(math::F_PI_2, math::float3 { 0, 0, 1 }) + // }; + + // RenderableManager::Builder(1) + // .boundingBox({{}, {1.0f, 1.0f, 1.0f}}) + // .instances(3, instanceBuffer) + // .material(0, _gizmoMaterial->getDefaultInstance()) + // .geometry(0, RenderableManager::PrimitiveType::TRIANGLES, vb, + // ib, 0, indexCount) + // .culling(false) + // .build(*_engine, _gizmo); + + auto &rm = _engine->getRenderableManager(); + rm.setPriority(rm.getInstance(_gizmoX), 7); + rm.setPriority(rm.getInstance(_gizmoY), 7); + rm.setPriority(rm.getInstance(_gizmoZ), 7); + return Entity::smuggle(_gizmoX); + } + + void SceneManager::getGizmo(EntityId *out) + { + out[0] = Entity::smuggle(_gizmoX); + out[1] = Entity::smuggle(_gizmoY); + out[2] = Entity::smuggle(_gizmoZ); + } + +} // namespace thermion_filament diff --git a/ios/src/StreamBufferAdapter.cpp b/thermion_dart/native/src/StreamBufferAdapter.cpp similarity index 57% rename from ios/src/StreamBufferAdapter.cpp rename to thermion_dart/native/src/StreamBufferAdapter.cpp index 76bfeb71..8d51faaa 100644 --- a/ios/src/StreamBufferAdapter.cpp +++ b/thermion_dart/native/src/StreamBufferAdapter.cpp @@ -3,9 +3,7 @@ #include #include -using namespace std; - -namespace polyvox { +namespace thermion_filament { class StreamBufferAdapter : public std::streambuf { @@ -14,14 +12,14 @@ class StreamBufferAdapter : public std::streambuf ~StreamBufferAdapter() { } - streamsize size(); + std::streamsize size(); private: int_type uflow() override; int_type underflow() override; int_type pbackfail(int_type ch) override; - streampos seekoff(streamoff off, ios_base::seekdir way, ios_base::openmode which) override; - streampos seekpos(streampos sp, ios_base::openmode which) override; + std::streampos seekoff(std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which) override; + std::streampos seekpos(std::streampos sp, std::ios_base::openmode which) override; std::streamsize showmanyc() override; }; @@ -31,11 +29,11 @@ StreamBufferAdapter::StreamBufferAdapter(const char *begin, const char *end) setg((char*)begin, (char*)begin, (char*)end); } -streamsize StreamBufferAdapter::size() { +std::streamsize StreamBufferAdapter::size() { return egptr() - eback(); } -streambuf::int_type StreamBufferAdapter::underflow() +std::streambuf::int_type StreamBufferAdapter::underflow() { if (gptr() == egptr()) { return traits_type::eof(); @@ -43,7 +41,7 @@ streambuf::int_type StreamBufferAdapter::underflow() return *(gptr()); } -streambuf::int_type StreamBufferAdapter::uflow() +std::streambuf::int_type StreamBufferAdapter::uflow() { if (gptr() == egptr()) { return traits_type::eof(); @@ -53,7 +51,7 @@ streambuf::int_type StreamBufferAdapter::uflow() return *(gptr()); } -streambuf::int_type StreamBufferAdapter::pbackfail(int_type ch) +std::streambuf::int_type StreamBufferAdapter::pbackfail(int_type ch) { if (gptr() == eback() || (ch != traits_type::eof() && ch != gptr()[-1])) return traits_type::eof(); @@ -61,23 +59,23 @@ streambuf::int_type StreamBufferAdapter::pbackfail(int_type ch) return *(gptr()); } -streamsize StreamBufferAdapter::showmanyc() +std::streamsize StreamBufferAdapter::showmanyc() { return egptr() - gptr(); } -streampos StreamBufferAdapter::seekoff(streamoff off, ios_base::seekdir way, ios_base::openmode which = ios_base::in) { - if(way == ios_base::beg) { +std::streampos StreamBufferAdapter::seekoff(std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which = std::ios_base::in) { + if(way == std::ios_base::beg) { setg(eback(), eback()+off, egptr()); - } else if(way == ios_base::cur) { - gbump(off); + } else if(way == std::ios_base::cur) { + gbump((int)off); } else { setg(eback(), egptr()-off, egptr()); } return gptr() - eback(); } -streampos StreamBufferAdapter::seekpos(streampos sp, ios_base::openmode which = ios_base::in) { +std::streampos StreamBufferAdapter::seekpos(std::streampos sp, std::ios_base::openmode which = std::ios_base::in) { return seekoff(sp - pos_type(off_type(0)), std::ios_base::beg, which); } } \ No newline at end of file diff --git a/thermion_dart/native/src/ThermionDartApi.cpp b/thermion_dart/native/src/ThermionDartApi.cpp new file mode 100644 index 00000000..a11cde46 --- /dev/null +++ b/thermion_dart/native/src/ThermionDartApi.cpp @@ -0,0 +1,816 @@ +#ifdef _WIN32 +#pragma comment(lib, "Shlwapi.lib") +#pragma comment(lib, "opengl32.lib") +#endif + +#include "ResourceBuffer.hpp" + +#include "FilamentViewer.hpp" +#include "filament/LightManager.h" +#include "Log.hpp" +#include "ThreadPool.hpp" + +#include +#include + +using namespace thermion_filament; + +#ifdef __EMSCRIPTEN__ +#include +#endif + +extern "C" +{ + +#include "ThermionDartApi.h" + + + EMSCRIPTEN_KEEPALIVE const void *create_filament_viewer(const void *context, const void *const loader, void *const platform, const char *uberArchivePath) + { + auto viewer = (const void *)new FilamentViewer(context, (const ResourceLoaderWrapperImpl *const)loader, platform, uberArchivePath); + return viewer; + } + + EMSCRIPTEN_KEEPALIVE void create_render_target(const void *const viewer, intptr_t texture, uint32_t width, uint32_t height) + { + ((FilamentViewer *)viewer)->createRenderTarget(texture, width, height); + } + + EMSCRIPTEN_KEEPALIVE void destroy_filament_viewer(const void *const viewer) + { + delete ((FilamentViewer *)viewer); + } + + EMSCRIPTEN_KEEPALIVE void set_background_color(const void *const viewer, const float r, const float g, const float b, const float a) + { + ((FilamentViewer *)viewer)->setBackgroundColor(r, g, b, a); + } + + EMSCRIPTEN_KEEPALIVE void clear_background_image(const void *const viewer) + { + ((FilamentViewer *)viewer)->clearBackgroundImage(); + } + + EMSCRIPTEN_KEEPALIVE void set_background_image(const void *const viewer, const char *path, bool fillHeight) + { + ((FilamentViewer *)viewer)->setBackgroundImage(path, fillHeight); + } + + EMSCRIPTEN_KEEPALIVE void set_background_image_position(const void *const viewer, float x, float y, bool clamp) + { + ((FilamentViewer *)viewer)->setBackgroundImagePosition(x, y, clamp); + } + + EMSCRIPTEN_KEEPALIVE void set_tone_mapping(const void *const viewer, int toneMapping) + { + ((FilamentViewer *)viewer)->setToneMapping((ToneMapping)toneMapping); + } + + EMSCRIPTEN_KEEPALIVE void set_bloom(const void *const viewer, float strength) + { + Log("Setting bloom to %f", strength); + ((FilamentViewer *)viewer)->setBloom(strength); + } + + EMSCRIPTEN_KEEPALIVE void load_skybox(const void *const viewer, const char *skyboxPath) + { + ((FilamentViewer *)viewer)->loadSkybox(skyboxPath); + } + + EMSCRIPTEN_KEEPALIVE void load_ibl(const void *const viewer, const char *iblPath, float intensity) + { + ((FilamentViewer *)viewer)->loadIbl(iblPath, intensity); + } + + EMSCRIPTEN_KEEPALIVE void rotate_ibl(const void *const viewer, float *rotationMatrix) + { + math::mat3f matrix(rotationMatrix[0], rotationMatrix[1], + rotationMatrix[2], + rotationMatrix[3], + rotationMatrix[4], + rotationMatrix[5], + rotationMatrix[6], + rotationMatrix[7], + rotationMatrix[8]); + + ((FilamentViewer *)viewer)->rotateIbl(matrix); + } + + EMSCRIPTEN_KEEPALIVE void remove_skybox(const void *const viewer) + { + ((FilamentViewer *)viewer)->removeSkybox(); + } + + EMSCRIPTEN_KEEPALIVE void remove_ibl(const void *const viewer) + { + ((FilamentViewer *)viewer)->removeIbl(); + } + + EntityId add_light( + const void *const viewer, + uint8_t type, + float colour, + float intensity, + float posX, + float posY, + float posZ, + float dirX, + float dirY, + float dirZ, + float falloffRadius, + float spotLightConeInner, + float spotLightConeOuter, + float sunAngularRadius, + float sunHaloSize, + float sunHaloFallof, + bool shadows) + { + return ((FilamentViewer *)viewer)->addLight( + (LightManager::Type)type, + colour, + intensity, + posX, + posY, + posZ, + dirX, + dirY, + dirZ, + falloffRadius, + spotLightConeInner, + spotLightConeOuter, + sunAngularRadius, + sunHaloSize, + sunHaloFallof, + shadows); + } + + EMSCRIPTEN_KEEPALIVE void remove_light(const void *const viewer, int32_t entityId) + { + ((FilamentViewer *)viewer)->removeLight(entityId); + } + + EMSCRIPTEN_KEEPALIVE void clear_lights(const void *const viewer) + { + ((FilamentViewer *)viewer)->clearLights(); + } + + EMSCRIPTEN_KEEPALIVE EntityId load_glb(void *sceneManager, const char *assetPath, int numInstances) + { + return ((SceneManager *)sceneManager)->loadGlb(assetPath, numInstances); + } + + EMSCRIPTEN_KEEPALIVE EntityId load_glb_from_buffer(void *sceneManager, const void *const data, size_t length) + { + return ((SceneManager *)sceneManager)->loadGlbFromBuffer((const uint8_t *)data, length); + } + + EMSCRIPTEN_KEEPALIVE EntityId create_instance(void *sceneManager, EntityId entityId) + { + return ((SceneManager *)sceneManager)->createInstance(entityId); + } + + EMSCRIPTEN_KEEPALIVE int get_instance_count(void *sceneManager, EntityId entityId) + { + return ((SceneManager *)sceneManager)->getInstanceCount(entityId); + } + + EMSCRIPTEN_KEEPALIVE void get_instances(void *sceneManager, EntityId entityId, EntityId *out) + { + return ((SceneManager *)sceneManager)->getInstances(entityId, out); + } + + EMSCRIPTEN_KEEPALIVE EntityId load_gltf(void *sceneManager, const char *assetPath, const char *relativePath) + { + return ((SceneManager *)sceneManager)->loadGltf(assetPath, relativePath); + } + + EMSCRIPTEN_KEEPALIVE void set_main_camera(const void *const viewer) + { + return ((FilamentViewer *)viewer)->setMainCamera(); + } + + EMSCRIPTEN_KEEPALIVE EntityId get_main_camera(const void *const viewer) + { + return ((FilamentViewer *)viewer)->getMainCamera(); + } + + EMSCRIPTEN_KEEPALIVE bool set_camera(const void *const viewer, EntityId asset, const char *nodeName) + { + return ((FilamentViewer *)viewer)->setCamera(asset, nodeName); + } + + EMSCRIPTEN_KEEPALIVE void set_camera_fov(const void *const viewer, float fovInDegrees, float aspect) + { + return ((FilamentViewer *)viewer)->setCameraFov(double(fovInDegrees), double(aspect)); + } + + const double *const get_camera_model_matrix(const void *const viewer) + { + const auto &modelMatrix = ((FilamentViewer *)viewer)->getCameraModelMatrix(); + double *array = (double *)calloc(16, sizeof(double)); + memcpy(array, modelMatrix.asArray(), 16 * sizeof(double)); + return array; + } + + const double *const get_camera_view_matrix(const void *const viewer) + { + const auto &matrix = ((FilamentViewer *)viewer)->getCameraViewMatrix(); + double *array = (double *)calloc(16, sizeof(double)); + memcpy(array, matrix.asArray(), 16 * sizeof(double)); + return array; + } + + const double *const get_camera_projection_matrix(const void *const viewer) + { + const auto &matrix = ((FilamentViewer *)viewer)->getCameraProjectionMatrix(); + double *array = (double *)calloc(16, sizeof(double)); + memcpy(array, matrix.asArray(), 16 * sizeof(double)); + return array; + } + + const double *const get_camera_culling_projection_matrix(const void *const viewer) + { + const auto &matrix = ((FilamentViewer *)viewer)->getCameraCullingProjectionMatrix(); + double *array = (double *)calloc(16, sizeof(double)); + memcpy(array, matrix.asArray(), 16 * sizeof(double)); + return array; + } + + void set_camera_projection_matrix(const void *const viewer, const double *const matrix, double near, double far) + { + ((FilamentViewer *)viewer)->setCameraProjectionMatrix(matrix, near, far); + } + + void set_camera_culling(const void *const viewer, double near, double far) + { + ((FilamentViewer *)viewer)->setCameraCulling(near, far); + } + + double get_camera_culling_near(const void *const viewer) + { + return ((FilamentViewer *)viewer)->getCameraCullingNear(); + } + + double get_camera_culling_far(const void *const viewer) + { + return ((FilamentViewer *)viewer)->getCameraCullingFar(); + } + + const double *const get_camera_frustum(const void *const viewer) + { + const auto frustum = ((FilamentViewer *)viewer)->getCameraFrustum(); + const math::float4 *planes = frustum.getNormalizedPlanes(); + double *array = (double *)calloc(24, sizeof(double)); + for (int i = 0; i < 6; i++) + { + auto plane = planes[i]; + array[i * 4] = double(plane.x); + array[i * 4 + 1] = double(plane.y); + array[i * 4 + 2] = double(plane.z); + array[i * 4 + 3] = double(plane.w); + } + + return array; + } + + EMSCRIPTEN_KEEPALIVE void set_camera_manipulator_options(const void *const viewer, _ManipulatorMode mode, double orbitSpeedX, double orbitSpeedY, double zoomSpeed) + { + ((FilamentViewer *)viewer)->setCameraManipulatorOptions((filament::camutils::Mode)mode, orbitSpeedX, orbitSpeedY, zoomSpeed); + } + + EMSCRIPTEN_KEEPALIVE void set_view_frustum_culling(const void *const viewer, bool enabled) + { + ((FilamentViewer *)viewer)->setViewFrustumCulling(enabled); + } + + EMSCRIPTEN_KEEPALIVE void move_camera_to_asset(const void *const viewer, EntityId asset) + { + ((FilamentViewer *)viewer)->moveCameraToAsset(asset); + } + + EMSCRIPTEN_KEEPALIVE void set_camera_focus_distance(const void *const viewer, float distance) + { + ((FilamentViewer *)viewer)->setCameraFocusDistance(distance); + } + + EMSCRIPTEN_KEEPALIVE void set_camera_exposure(const void *const viewer, float aperture, float shutterSpeed, float sensitivity) + { + ((FilamentViewer *)viewer)->setCameraExposure(aperture, shutterSpeed, sensitivity); + } + + EMSCRIPTEN_KEEPALIVE void set_camera_position(const void *const viewer, float x, float y, float z) + { + ((FilamentViewer *)viewer)->setCameraPosition(x, y, z); + } + + EMSCRIPTEN_KEEPALIVE void set_camera_rotation(const void *const viewer, float w, float x, float y, float z) + { + ((FilamentViewer *)viewer)->setCameraRotation(w, x, y, z); + } + + EMSCRIPTEN_KEEPALIVE void set_camera_model_matrix(const void *const viewer, const float *const matrix) + { + ((FilamentViewer *)viewer)->setCameraModelMatrix(matrix); + } + + EMSCRIPTEN_KEEPALIVE void set_camera_focal_length(const void *const viewer, float focalLength) + { + ((FilamentViewer *)viewer)->setCameraFocalLength(focalLength); + } + + EMSCRIPTEN_KEEPALIVE void render( + const void *const viewer, + uint64_t frameTimeInNanos, + void *pixelBuffer, + void (*callback)(void *buf, size_t size, void *data), + void *data) + { + ((FilamentViewer *)viewer)->render(frameTimeInNanos, pixelBuffer, callback, data); + } + + EMSCRIPTEN_KEEPALIVE void set_frame_interval( + const void *const viewer, + float frameInterval) + { + ((FilamentViewer *)viewer)->setFrameInterval(frameInterval); + } + + EMSCRIPTEN_KEEPALIVE void destroy_swap_chain(const void *const viewer) + { + ((FilamentViewer *)viewer)->destroySwapChain(); + } + + EMSCRIPTEN_KEEPALIVE void create_swap_chain(const void *const viewer, const void *const window, uint32_t width, uint32_t height) + { + ((FilamentViewer *)viewer)->createSwapChain(window, width, height); + } + + EMSCRIPTEN_KEEPALIVE void update_viewport_and_camera_projection(const void *const viewer, uint32_t width, uint32_t height, float scaleFactor) + { + return ((FilamentViewer *)viewer)->updateViewportAndCameraProjection(width, height, scaleFactor); + } + + EMSCRIPTEN_KEEPALIVE void scroll_update(const void *const viewer, float x, float y, float delta) + { + ((FilamentViewer *)viewer)->scrollUpdate(x, y, delta); + } + + EMSCRIPTEN_KEEPALIVE void scroll_begin(const void *const viewer) + { + ((FilamentViewer *)viewer)->scrollBegin(); + } + + EMSCRIPTEN_KEEPALIVE void scroll_end(const void *const viewer) + { + ((FilamentViewer *)viewer)->scrollEnd(); + } + + EMSCRIPTEN_KEEPALIVE void grab_begin(const void *const viewer, float x, float y, bool pan) + { + ((FilamentViewer *)viewer)->grabBegin(x, y, pan); + } + + EMSCRIPTEN_KEEPALIVE void grab_update(const void *const viewer, float x, float y) + { + ((FilamentViewer *)viewer)->grabUpdate(x, y); + } + + EMSCRIPTEN_KEEPALIVE void grab_end(const void *const viewer) + { + ((FilamentViewer *)viewer)->grabEnd(); + } + + EMSCRIPTEN_KEEPALIVE void *get_scene_manager(const void *const viewer) + { + return (void *)((FilamentViewer *)viewer)->getSceneManager(); + } + + EMSCRIPTEN_KEEPALIVE void apply_weights( + void *sceneManager, + EntityId asset, + const char *const entityName, + float *const weights, + int count) + { + // ((SceneManager*)sceneManager)->setMorphTargetWeights(asset, entityName, weights, count); + } + + EMSCRIPTEN_KEEPALIVE bool set_morph_target_weights( + void *sceneManager, + EntityId asset, + const float *const weights, + const int numWeights) + { + return ((SceneManager *)sceneManager)->setMorphTargetWeights(asset, weights, numWeights); + } + + bool set_morph_animation( + void *sceneManager, + EntityId asset, + const float *const morphData, + const int *const morphIndices, + int numMorphTargets, + int numFrames, + float frameLengthInMs) + { + auto result = ((SceneManager *)sceneManager)->setMorphAnimationBuffer(asset, morphData, morphIndices, numMorphTargets, numFrames, frameLengthInMs); + return result; + } + + EMSCRIPTEN_KEEPALIVE void reset_to_rest_pose(void *sceneManager, EntityId entityId) + { + ((SceneManager *)sceneManager)->resetBones(entityId); + } + + EMSCRIPTEN_KEEPALIVE void add_bone_animation( + void *sceneManager, + EntityId asset, + int skinIndex, + int boneIndex, + const float *const frameData, + int numFrames, + float frameLengthInMs, + float fadeOutInSecs, + float fadeInInSecs, + float maxDelta) + { + ((SceneManager *)sceneManager)->addBoneAnimation(asset, skinIndex, boneIndex, frameData, numFrames, frameLengthInMs, fadeOutInSecs, fadeInInSecs, maxDelta); + } + + EMSCRIPTEN_KEEPALIVE void set_post_processing(void *const viewer, bool enabled) + { + ((FilamentViewer *)viewer)->setPostProcessing(enabled); + } + + EMSCRIPTEN_KEEPALIVE void set_antialiasing(void *const viewer, bool msaa, bool fxaa, bool taa) + { + ((FilamentViewer *)viewer)->setAntiAliasing(msaa, fxaa, taa); + } + + EMSCRIPTEN_KEEPALIVE EntityId get_bone(void *sceneManager, + EntityId entityId, + int skinIndex, + int boneIndex) { + return ((SceneManager*)sceneManager)->getBone(entityId, skinIndex, boneIndex); + } + EMSCRIPTEN_KEEPALIVE void get_world_transform(void *sceneManager, + EntityId entityId, float* const out) { + auto transform = ((SceneManager*)sceneManager)->getWorldTransform(entityId); + out[0] = transform[0][0]; + out[1] = transform[0][1]; + out[2] = transform[0][2]; + out[3] = transform[0][3]; + out[4] = transform[1][0]; + out[5] = transform[1][1]; + out[6] = transform[1][2]; + out[7] = transform[1][3]; + out[8] = transform[2][0]; + out[9] = transform[2][1]; + out[10] = transform[2][2]; + out[11] = transform[2][3]; + out[12] = transform[3][0]; + out[13] = transform[3][1]; + out[14] = transform[3][2]; + out[15] = transform[3][3]; + } + + EMSCRIPTEN_KEEPALIVE void get_local_transform(void *sceneManager, + EntityId entityId, float* const out) { + auto transform = ((SceneManager*)sceneManager)->getLocalTransform(entityId); + out[0] = transform[0][0]; + out[1] = transform[0][1]; + out[2] = transform[0][2]; + out[3] = transform[0][3]; + out[4] = transform[1][0]; + out[5] = transform[1][1]; + out[6] = transform[1][2]; + out[7] = transform[1][3]; + out[8] = transform[2][0]; + out[9] = transform[2][1]; + out[10] = transform[2][2]; + out[11] = transform[2][3]; + out[12] = transform[3][0]; + out[13] = transform[3][1]; + out[14] = transform[3][2]; + out[15] = transform[3][3]; + } + + EMSCRIPTEN_KEEPALIVE void get_rest_local_transforms(void *sceneManager, + EntityId entityId, int skinIndex, float* const out, int numBones) { + const auto transforms = ((SceneManager*)sceneManager)->getBoneRestTranforms(entityId, skinIndex); + auto numTransforms = transforms->size(); + if(numTransforms != numBones) { + Log("Error - %d bone transforms available but you only specified %d.", numTransforms, numBones); + return; + } + for(int boneIndex = 0; boneIndex < numTransforms; boneIndex++) { + const auto transform = transforms->at(boneIndex); + for(int colNum = 0; colNum < 4; colNum++) { + for(int rowNum = 0; rowNum < 4; rowNum++) { + out[(boneIndex * 16) + (colNum * 4) + rowNum] = transform[colNum][rowNum]; + } + } + } + } + + EMSCRIPTEN_KEEPALIVE void get_inverse_bind_matrix(void *sceneManager, + EntityId entityId, int skinIndex, int boneIndex, float* const out) { + auto transform = ((SceneManager*)sceneManager)->getInverseBindMatrix(entityId, skinIndex, boneIndex); + out[0] = transform[0][0]; + out[1] = transform[0][1]; + out[2] = transform[0][2]; + out[3] = transform[0][3]; + out[4] = transform[1][0]; + out[5] = transform[1][1]; + out[6] = transform[1][2]; + out[7] = transform[1][3]; + out[8] = transform[2][0]; + out[9] = transform[2][1]; + out[10] = transform[2][2]; + out[11] = transform[2][3]; + out[12] = transform[3][0]; + out[13] = transform[3][1]; + out[14] = transform[3][2]; + out[15] = transform[3][3]; + } + + EMSCRIPTEN_KEEPALIVE bool set_bone_transform( + void *sceneManager, + EntityId entityId, + int skinIndex, + int boneIndex, + const float *const transform) + { + auto matrix = math::mat4f( + transform[0], transform[1], transform[2], + transform[3], + transform[4], + transform[5], + transform[6], + transform[7], + transform[8], + transform[9], + transform[10], + transform[11], + transform[12], + transform[13], + transform[14], + transform[15]); + return ((SceneManager *)sceneManager)->setBoneTransform(entityId, skinIndex, boneIndex, matrix); + } + + EMSCRIPTEN_KEEPALIVE void play_animation( + void *sceneManager, + EntityId asset, + int index, + bool loop, + bool reverse, + bool replaceActive, + float crossfade) + { + ((SceneManager *)sceneManager)->playAnimation(asset, index, loop, reverse, replaceActive, crossfade); + } + + EMSCRIPTEN_KEEPALIVE void set_animation_frame( + void *sceneManager, + EntityId asset, + int animationIndex, + int animationFrame) + { + // ((SceneManager*)sceneManager)->setAnimationFrame(asset, animationIndex, animationFrame); + } + + float get_animation_duration(void *sceneManager, EntityId asset, int animationIndex) + { + return ((SceneManager *)sceneManager)->getAnimationDuration(asset, animationIndex); + } + + int get_animation_count( + void *sceneManager, + EntityId asset) + { + auto names = ((SceneManager *)sceneManager)->getAnimationNames(asset); + return (int)names->size(); + } + + EMSCRIPTEN_KEEPALIVE void get_animation_name( + void *sceneManager, + EntityId asset, + char *const outPtr, + int index) + { + auto names = ((SceneManager *)sceneManager)->getAnimationNames(asset); + std::string name = names->at(index); + strcpy(outPtr, name.c_str()); + } + + EMSCRIPTEN_KEEPALIVE int get_bone_count(void *sceneManager, EntityId assetEntity, int skinIndex) { + auto names = ((SceneManager *)sceneManager)->getBoneNames(assetEntity, skinIndex); + return names->size(); + } + + EMSCRIPTEN_KEEPALIVE void get_bone_names(void *sceneManager, EntityId assetEntity, const char** out, int skinIndex) { + auto names = ((SceneManager *)sceneManager)->getBoneNames(assetEntity, skinIndex); + for(int i = 0; i < names->size(); i++) { + auto name_c = names->at(i).c_str(); + memcpy((void*)out[i], name_c, strlen(name_c) + 1); + } + } + + EMSCRIPTEN_KEEPALIVE bool set_transform(void* sceneManager, EntityId entityId, const float* const transform) { + auto matrix = math::mat4f( + transform[0], transform[1], transform[2], + transform[3], + transform[4], + transform[5], + transform[6], + transform[7], + transform[8], + transform[9], + transform[10], + transform[11], + transform[12], + transform[13], + transform[14], + transform[15]); + return ((SceneManager*)sceneManager)->setTransform(entityId, matrix); + } + + EMSCRIPTEN_KEEPALIVE bool update_bone_matrices(void* sceneManager, EntityId entityId) { + return ((SceneManager*)sceneManager)->updateBoneMatrices(entityId); + } + + EMSCRIPTEN_KEEPALIVE int get_morph_target_name_count(void *sceneManager, EntityId assetEntity, EntityId childEntity) + { + auto names = ((SceneManager *)sceneManager)->getMorphTargetNames(assetEntity, childEntity); + return (int)names->size(); + } + + EMSCRIPTEN_KEEPALIVE void get_morph_target_name(void *sceneManager, EntityId assetEntity, EntityId childEntity, char *const outPtr, int index) + { + auto names = ((SceneManager *)sceneManager)->getMorphTargetNames(assetEntity, childEntity); + std::string name = names->at(index); + strcpy(outPtr, name.c_str()); + } + + EMSCRIPTEN_KEEPALIVE void remove_entity(const void *const viewer, EntityId asset) + { + ((FilamentViewer *)viewer)->removeEntity(asset); + } + + EMSCRIPTEN_KEEPALIVE void clear_entities(const void *const viewer) + { + ((FilamentViewer *)viewer)->clearEntities(); + } + + bool set_material_color(void *sceneManager, EntityId asset, const char *meshName, int materialIndex, const float r, const float g, const float b, const float a) + { + return ((SceneManager *)sceneManager)->setMaterialColor(asset, meshName, materialIndex, r, g, b, a); + } + + EMSCRIPTEN_KEEPALIVE void transform_to_unit_cube(void *sceneManager, EntityId asset) + { + ((SceneManager *)sceneManager)->transformToUnitCube(asset); + } + + EMSCRIPTEN_KEEPALIVE void set_position(void *sceneManager, EntityId asset, float x, float y, float z) + { + ((SceneManager *)sceneManager)->setPosition(asset, x, y, z); + } + + EMSCRIPTEN_KEEPALIVE void set_rotation(void *sceneManager, EntityId asset, float rads, float x, float y, float z, float w) + { + ((SceneManager *)sceneManager)->setRotation(asset, rads, x, y, z, w); + } + + EMSCRIPTEN_KEEPALIVE void set_scale(void *sceneManager, EntityId asset, float scale) + { + ((SceneManager *)sceneManager)->setScale(asset, scale); + } + + EMSCRIPTEN_KEEPALIVE void queue_position_update(void *sceneManager, EntityId asset, float x, float y, float z, bool relative) + { + ((SceneManager *)sceneManager)->queuePositionUpdate(asset, x, y, z, relative); + } + + EMSCRIPTEN_KEEPALIVE void queue_rotation_update(void *sceneManager, EntityId asset, float rads, float x, float y, float z, float w, bool relative) + { + ((SceneManager *)sceneManager)->queueRotationUpdate(asset, rads, x, y, z, w, relative); + } + + EMSCRIPTEN_KEEPALIVE void stop_animation(void *sceneManager, EntityId asset, int index) + { + ((SceneManager *)sceneManager)->stopAnimation(asset, index); + } + + EMSCRIPTEN_KEEPALIVE int hide_mesh(void *sceneManager, EntityId asset, const char *meshName) + { + return ((SceneManager *)sceneManager)->hide(asset, meshName); + } + + EMSCRIPTEN_KEEPALIVE int reveal_mesh(void *sceneManager, EntityId asset, const char *meshName) + { + return ((SceneManager *)sceneManager)->reveal(asset, meshName); + } + + EMSCRIPTEN_KEEPALIVE void filament_pick(void *const viewer, int x, int y, void (*callback)(EntityId entityId, int x, int y)) + { + ((FilamentViewer *)viewer)->pick(static_cast(x), static_cast(y), callback); + } + + EMSCRIPTEN_KEEPALIVE const char *get_name_for_entity(void *const sceneManager, const EntityId entityId) + { + return ((SceneManager *)sceneManager)->getNameForEntity(entityId); + } + + EMSCRIPTEN_KEEPALIVE int get_entity_count(void *const sceneManager, const EntityId target, bool renderableOnly) + { + return ((SceneManager *)sceneManager)->getEntityCount(target, renderableOnly); + } + + EMSCRIPTEN_KEEPALIVE void get_entities(void *const sceneManager, const EntityId target, bool renderableOnly, EntityId *out) + { + ((SceneManager *)sceneManager)->getEntities(target, renderableOnly, out); + } + + EMSCRIPTEN_KEEPALIVE const char *get_entity_name_at(void *const sceneManager, const EntityId target, int index, bool renderableOnly) + { + return ((SceneManager *)sceneManager)->getEntityNameAt(target, index, renderableOnly); + } + + EMSCRIPTEN_KEEPALIVE void set_recording(void *const viewer, bool recording) + { + ((FilamentViewer *)viewer)->setRecording(recording); + } + + EMSCRIPTEN_KEEPALIVE void set_recording_output_directory(void *const viewer, const char *outputDirectory) + { + ((FilamentViewer *)viewer)->setRecordingOutputDirectory(outputDirectory); + } + + EMSCRIPTEN_KEEPALIVE void ios_dummy() + { + Log("Dummy called"); + } + + EMSCRIPTEN_KEEPALIVE void thermion_filament_free(void *ptr) + { + free(ptr); + } + + EMSCRIPTEN_KEEPALIVE void add_collision_component(void *const sceneManager, EntityId entityId, void (*onCollisionCallback)(const EntityId entityId1, const EntityId entityId2), bool affectsCollidingTransform) + { + ((SceneManager *)sceneManager)->addCollisionComponent(entityId, onCollisionCallback, affectsCollidingTransform); + } + + EMSCRIPTEN_KEEPALIVE void remove_collision_component(void *const sceneManager, EntityId entityId) + { + ((SceneManager *)sceneManager)->removeCollisionComponent(entityId); + } + + EMSCRIPTEN_KEEPALIVE bool add_animation_component(void *const sceneManager, EntityId entityId) + { + return ((SceneManager *)sceneManager)->addAnimationComponent(entityId); + } + + EMSCRIPTEN_KEEPALIVE void remove_animation_component(void *const sceneManager, EntityId entityId) + { + ((SceneManager *)sceneManager)->removeAnimationComponent(entityId); + } + + EMSCRIPTEN_KEEPALIVE EntityId create_geometry(void *const viewer, float *vertices, int numVertices, uint16_t *indices, int numIndices, int primitiveType, const char *materialPath) + { + return ((FilamentViewer *)viewer)->createGeometry(vertices, (uint32_t)numVertices, indices, numIndices, (filament::RenderableManager::PrimitiveType)primitiveType, materialPath); + } + + EMSCRIPTEN_KEEPALIVE EntityId find_child_entity_by_name(void *const sceneManager, const EntityId parent, const char *name) + { + auto entity = ((SceneManager *)sceneManager)->findChildEntityByName(parent, name); + return utils::Entity::smuggle(entity); + } + + EMSCRIPTEN_KEEPALIVE EntityId get_parent(void *const sceneManager, EntityId child) + { + return ((SceneManager *)sceneManager)->getParent(child); + } + + EMSCRIPTEN_KEEPALIVE void set_parent(void *const sceneManager, EntityId child, EntityId parent) + { + ((SceneManager *)sceneManager)->setParent(child, parent); + } + + EMSCRIPTEN_KEEPALIVE void test_collisions(void *const sceneManager, EntityId entity) + { + ((SceneManager *)sceneManager)->testCollisions(entity); + } + + EMSCRIPTEN_KEEPALIVE void set_priority(void *const sceneManager, EntityId entity, int priority) + { + ((SceneManager *)sceneManager)->setPriority(entity, priority); + } + + EMSCRIPTEN_KEEPALIVE void get_gizmo(void *const sceneManager, EntityId *out) + { + return ((SceneManager *)sceneManager)->getGizmo(out); + } +} diff --git a/thermion_dart/native/src/ThermionDartFFIApi.cpp b/thermion_dart/native/src/ThermionDartFFIApi.cpp new file mode 100644 index 00000000..5791738a --- /dev/null +++ b/thermion_dart/native/src/ThermionDartFFIApi.cpp @@ -0,0 +1,875 @@ +#ifdef __EMSCRIPTEN__ +#define GL_GLEXT_PROTOTYPES +#include +#include + +#include +#include +#include +#include +#include + +extern "C" +{ + extern EMSCRIPTEN_KEEPALIVE EMSCRIPTEN_WEBGL_CONTEXT_HANDLE thermion_dart_web_create_gl_context(); +} +#include + + +#endif + +#include "ThermionDartFFIApi.h" +#include "FilamentViewer.hpp" +#include "Log.hpp" +#include "ThreadPool.hpp" +#include "filament/LightManager.h" + +#include +#include +#include +#include + +using namespace thermion_filament; +using namespace std::chrono_literals; +#include + +class RenderLoop +{ +public: + explicit RenderLoop() + { + srand(time(NULL)); + + pthread_attr_t attr; + pthread_attr_init(&attr); + #ifdef __EMSCRIPTEN__ + emscripten_pthread_attr_settransferredcanvases(&attr, "canvas"); + #endif + pthread_create(&t, &attr, &RenderLoop::startHelper, this); + } + + ~RenderLoop() + { + _stop = true; + pthread_join(t, NULL); + } + + static void mainLoop(void* arg) { + ((RenderLoop*)arg)->iter(); + } + + static void *startHelper(void * parm) { + #ifdef __EMSCRIPTEN__ + emscripten_set_main_loop_arg(&RenderLoop::mainLoop, parm, 0, true); + #else + ((RenderLoop*)parm)->start(); + #endif + return nullptr; + } + + void start() { + while (!_stop) { + iter(); + } + } + + void iter() { + + auto frameStart = std::chrono::high_resolution_clock::now(); + if (_rendering) { + doRender(); + } + + auto now = std::chrono::high_resolution_clock::now(); + + auto elapsed = std::chrono::duration_cast(now - frameStart).count(); + + std::function task; + + std::unique_lock lock(_access); + while(true) { + now = std::chrono::high_resolution_clock::now(); + elapsed = std::chrono::duration_cast(now - frameStart).count(); + if(elapsed >= _frameIntervalInMicroseconds) { + break; + } + if(!_tasks.empty()) { + task = std::move(_tasks.front()); + _tasks.pop_front(); + task(); + } else { + _cond.wait_for(lock, std::chrono::duration(1)); + } + } + } + + void createViewer(void *const context, void *const platform, + const char *uberArchivePath, + const ResourceLoaderWrapperImpl *const loader, + void (*renderCallback)(void *), + void *const owner, + void (*callback)(void *const)) + { + _renderCallback = renderCallback; + _renderCallbackOwner = owner; + std::packaged_task lambda([=]() mutable + { + FilamentViewer* viewer = nullptr; +#ifdef __EMSCRIPTEN__ + _context = thermion_dart_web_create_gl_context(); + + auto success = emscripten_webgl_make_context_current((EMSCRIPTEN_WEBGL_CONTEXT_HANDLE)_context); + if(success != EMSCRIPTEN_RESULT_SUCCESS) { + std::cout << "Failed to make context current." << std::endl; + return viewer; + } + glClearColor(0.0, 0.5, 0.5, 1.0); + glClear(GL_COLOR_BUFFER_BIT); + // emscripten_webgl_commit_frame(); + + viewer = (FilamentViewer*) create_filament_viewer((void* const) _context, loader, platform, uberArchivePath); + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0, $1); + }, callback, viewer); +#else + viewer = (FilamentViewer*)create_filament_viewer(context, loader, platform, uberArchivePath); + callback(viewer); +#endif + _viewer = viewer; + return viewer; }); + auto fut = add_task(lambda); + } + + void destroyViewer(FilamentViewer* viewer) + { + std::packaged_task lambda([=]() mutable + { + _rendering = false; + destroy_filament_viewer(viewer); + }); + auto fut = add_task(lambda); + } + + void setRendering(bool rendering, void(*callback)()) + { + std::packaged_task lambda( + [=]() mutable + { + this->_rendering = rendering; + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0); + }, callback); + #else + callback(); + #endif + }); + auto fut = add_task(lambda); + } + + void doRender() + { + #ifdef __EMSCRIPTEN__ + if(emscripten_is_webgl_context_lost(_context) == EM_TRUE) { + Log("Context lost"); + auto sleepFor = std::chrono::seconds(1); + std::this_thread::sleep_for(sleepFor); + return; + } + #endif + render(_viewer, 0, nullptr, nullptr, nullptr); + if (_renderCallback) + { + _renderCallback(_renderCallbackOwner); + } +#ifdef __EMSCRIPTEN__ + // emscripten_webgl_commit_frame(); +#endif + } + + void setFrameIntervalInMilliseconds(float frameIntervalInMilliseconds) + { + _frameIntervalInMicroseconds = static_cast(1000.0f * frameIntervalInMilliseconds); + } + + template + auto add_task(std::packaged_task &pt) -> std::future + { + std::unique_lock lock(_access); + auto ret = pt.get_future(); + _tasks.push_back([pt = std::make_shared>( + std::move(pt))] + { (*pt)(); }); + _cond.notify_one(); + return ret; + } + + bool _stop = false; + bool _rendering = false; + int _frameIntervalInMicroseconds = 1000000.0 / 60.0; + std::mutex _access; + void (*_renderCallback)(void *const) = nullptr; + void *_renderCallbackOwner = nullptr; + pthread_t t; + std::condition_variable _cond; + std::deque> _tasks; + FilamentViewer* _viewer = nullptr; + #ifdef __EMSCRIPTEN__ + EMSCRIPTEN_WEBGL_CONTEXT_HANDLE _context; + int _frameNum = 0; + #endif +}; + +extern "C" +{ + + static RenderLoop *_rl; + + EMSCRIPTEN_KEEPALIVE void create_filament_viewer_ffi( + void *const context, void *const platform, const char *uberArchivePath, + const void *const loader, + void (*renderCallback)(void *const renderCallbackOwner), + void *const renderCallbackOwner, + void (*callback)(void *const)) + { + + if (!_rl) + { + _rl = new RenderLoop(); + } + _rl->createViewer(context, platform, uberArchivePath, (const ResourceLoaderWrapperImpl *const)loader, + renderCallback, renderCallbackOwner, callback); + } + + EMSCRIPTEN_KEEPALIVE void destroy_filament_viewer_ffi(void *const viewer) + { + _rl->destroyViewer((FilamentViewer*)viewer); + } + + EMSCRIPTEN_KEEPALIVE void create_swap_chain_ffi(void *const viewer, + void *const surface, + uint32_t width, + uint32_t height, + void (*onComplete)()) + { + Log("Creating swapchain %dx%d with viewer %lu & surface %lu", width, height, viewer, surface); + std::packaged_task lambda( + [=]() mutable + { + create_swap_chain(viewer, surface, width, height); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0); + }, onComplete); + #else + onComplete(); + #endif + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void destroy_swap_chain_ffi(void *const viewer, void (*onComplete)()) + { + Log("Destroying swapchain"); + std::packaged_task lambda( + [=]() mutable + { + destroy_swap_chain(viewer); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0); + }, onComplete); + #else + onComplete(); + #endif + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void create_render_target_ffi(void *const viewer, + intptr_t nativeTextureId, + uint32_t width, + uint32_t height, + void (*onComplete)()) + { + std::packaged_task lambda([=]() mutable + { + create_render_target(viewer, nativeTextureId, width, height); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0); + }, onComplete); + #else + onComplete(); + #endif + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void update_viewport_and_camera_projection_ffi( + void *const viewer, const uint32_t width, const uint32_t height, + const float scaleFactor, + void (*onComplete)()) + { + Log("Update viewport %dx%d", width, height); + std::packaged_task lambda([=]() mutable + { + update_viewport_and_camera_projection(viewer, width, height, scaleFactor); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0); + }, onComplete); + #else + onComplete(); + #endif + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void set_rendering_ffi(void *const viewer, + bool rendering, void (*callback)()) + { + if (!_rl) + { + Log("No render loop!"); // PANIC? + } + else + { + _rl->setRendering(rendering, callback); + if (rendering) + { + Log("Set rendering to true"); + } + else + { + Log("Set rendering to false"); + } + } + } + + EMSCRIPTEN_KEEPALIVE void + set_frame_interval_ffi(void* const viewer, float frameIntervalInMilliseconds) + { + _rl->setFrameIntervalInMilliseconds(frameIntervalInMilliseconds); + std::packaged_task lambda([=]() mutable + { ((FilamentViewer*)viewer)->setFrameInterval(frameIntervalInMilliseconds); }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void render_ffi(void *const viewer) + { + std::packaged_task lambda([=]() mutable + { _rl->doRender(); }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void + set_background_color_ffi(void *const viewer, const float r, const float g, + const float b, const float a) + { + std::packaged_task lambda( + [=]() mutable + { set_background_color(viewer, r, g, b, a); }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void load_gltf_ffi(void *const sceneManager, + const char *path, + const char *relativeResourcePath, + void (*callback)(EntityId)) + { + std::packaged_task lambda([=]() mutable + { + auto entity = load_gltf(sceneManager, path, relativeResourcePath); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0, $1); + }, callback, entity); + #else + callback(entity); + #endif + return entity; }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void load_glb_ffi(void *const sceneManager, + const char *path, int numInstances, void (*callback)(EntityId)) + { + std::packaged_task lambda( + [=]() mutable + { + auto entity = load_glb(sceneManager, path, numInstances); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0, $1); + }, callback, entity); + #else + callback(entity); + #endif + return entity; + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void load_glb_from_buffer_ffi(void *const sceneManager, + const void *const data, size_t length, int numInstances, void (*callback)(EntityId)) + { + std::packaged_task lambda( + [=]() mutable + { + auto entity = load_glb_from_buffer(sceneManager, data, length); + callback(entity); + return entity; + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void clear_background_image_ffi(void *const viewer) + { + std::packaged_task lambda([=] + { clear_background_image(viewer); }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void set_background_image_ffi(void *const viewer, + const char *path, + bool fillHeight, void (*callback)()) + { + std::packaged_task lambda( + [=] + { + set_background_image(viewer, path, fillHeight); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0); + }, callback); + #else + callback(); + #endif + }); + auto fut = _rl->add_task(lambda); + } + EMSCRIPTEN_KEEPALIVE void set_background_image_position_ffi(void *const viewer, + float x, float y, + bool clamp) + { + std::packaged_task lambda( + [=] + { set_background_image_position(viewer, x, y, clamp); }); + auto fut = _rl->add_task(lambda); + } + EMSCRIPTEN_KEEPALIVE void set_tone_mapping_ffi(void *const viewer, + int toneMapping) + { + std::packaged_task lambda( + [=] + { set_tone_mapping(viewer, toneMapping); }); + auto fut = _rl->add_task(lambda); + } + EMSCRIPTEN_KEEPALIVE void set_bloom_ffi(void *const viewer, float strength) + { + std::packaged_task lambda([=] + { set_bloom(viewer, strength); }); + auto fut = _rl->add_task(lambda); + } + EMSCRIPTEN_KEEPALIVE void load_skybox_ffi(void *const viewer, + const char *skyboxPath, + void (*onComplete)()) + { + std::packaged_task lambda([=] + { + load_skybox(viewer, skyboxPath); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0); + }, onComplete); + #else + onComplete(); + #endif + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void load_ibl_ffi(void *const viewer, const char *iblPath, + float intensity) + { + std::packaged_task lambda( + [=] + { load_ibl(viewer, iblPath, intensity); }); + auto fut = _rl->add_task(lambda); + } + EMSCRIPTEN_KEEPALIVE void remove_skybox_ffi(void *const viewer) + { + std::packaged_task lambda([=] + { remove_skybox(viewer); }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void remove_ibl_ffi(void *const viewer) + { + std::packaged_task lambda([=] + { remove_ibl(viewer); }); + auto fut = _rl->add_task(lambda); + } + + void add_light_ffi( + void *const viewer, + uint8_t type, + float colour, + float intensity, + float posX, + float posY, + float posZ, + float dirX, + float dirY, + float dirZ, + float falloffRadius, + float spotLightConeInner, + float spotLightConeOuter, + float sunAngularRadius, + float sunHaloSize, + float sunHaloFallof, + bool shadows, + void (*callback)(EntityId)) + { + std::packaged_task lambda([=] + { + auto entity = add_light( + viewer, + type, + colour, + intensity, + posX, + posY, + posZ, + dirX, + dirY, + dirZ, + falloffRadius, + spotLightConeInner, + spotLightConeOuter, + sunAngularRadius, + sunHaloSize, + sunHaloFallof, + shadows); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0, $1); + }, callback, entity); + #else + callback(entity); + #endif + + return entity; }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void remove_light_ffi(void *const viewer, + EntityId entityId) + { + std::packaged_task lambda([=] + { remove_light(viewer, entityId); }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void clear_lights_ffi(void *const viewer) + { + std::packaged_task lambda([=] + { clear_lights(viewer); }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void remove_entity_ffi(void *const viewer, + EntityId asset, void (*callback)()) + { + std::packaged_task lambda([=] + { + remove_entity(viewer, asset); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0); + }, callback); + #else + callback(); + #endif + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void clear_entities_ffi(void *const viewer, void (*callback)()) + { + std::packaged_task lambda([=] + { + clear_entities(viewer); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0); + }, callback); + #else + callback(); + #endif + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void set_camera_ffi(void *const viewer, EntityId asset, + const char *nodeName, void (*callback)(bool)) + { + std::packaged_task lambda( + [=] + { + auto success = set_camera(viewer, asset, nodeName); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0,$1); + }, callback, success); + #else + callback(success); + #endif + return success; + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void + get_morph_target_name_ffi(void *sceneManager, EntityId assetEntity, + EntityId childEntity, char *const outPtr, int index, void (*callback)()) + { + std::packaged_task lambda([=] + { + get_morph_target_name(sceneManager, assetEntity, childEntity, outPtr, index); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0); + }, callback); + #else + callback(); + #endif + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void + get_morph_target_name_count_ffi(void *sceneManager, EntityId assetEntity, + EntityId childEntity, void (*callback)(int)) + { + std::packaged_task lambda([=] + { + auto count = get_morph_target_name_count(sceneManager, assetEntity, childEntity); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0,$1); + }, callback, count); + #else + callback(count); + #endif + return count; }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void play_animation_ffi(void *const sceneManager, + EntityId asset, int index, + bool loop, bool reverse, + bool replaceActive, + float crossfade) + { + std::packaged_task lambda([=] + { play_animation(sceneManager, asset, index, loop, reverse, replaceActive, + crossfade); }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void set_animation_frame_ffi(void *const sceneManager, + EntityId asset, + int animationIndex, + int animationFrame) + { + std::packaged_task lambda([=] + { set_animation_frame(sceneManager, asset, animationIndex, animationFrame); }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void stop_animation_ffi(void *const sceneManager, + EntityId asset, int index) + { + std::packaged_task lambda( + [=] + { stop_animation(sceneManager, asset, index); }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void get_animation_count_ffi(void *const sceneManager, + EntityId asset, + void (*callback)(int)) + { + std::packaged_task lambda( + [=] + { + auto count = get_animation_count(sceneManager, asset); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0,$1); + }, callback, count); + #else + callback(count); + #endif + return count; + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void get_animation_name_ffi(void *const sceneManager, + EntityId asset, + char *const outPtr, + int index, + void (*callback)()) + { + std::packaged_task lambda( + [=] + { + get_animation_name(sceneManager, asset, outPtr, index); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0); + }, callback); + #else + callback(); + #endif + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void set_post_processing_ffi(void *const viewer, + bool enabled) + { + std::packaged_task lambda( + [=] + { set_post_processing(viewer, enabled); }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void + get_name_for_entity_ffi(void *const sceneManager, const EntityId entityId, void (*callback)(const char *)) + { + std::packaged_task lambda( + [=] + { + auto name = get_name_for_entity(sceneManager, entityId); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0,$1); + }, callback, name); + #else + callback(name); + #endif + return name; + }); + auto fut = _rl->add_task(lambda); + } + + void set_morph_target_weights_ffi(void *const sceneManager, + EntityId asset, + const float *const morphData, + int numWeights, + void (*callback)(bool)) + { + std::packaged_task lambda( + [=] + { + auto result = set_morph_target_weights(sceneManager, asset, morphData, numWeights); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0,$1); + }, callback, result); + #else + callback(result); + #endif + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void set_bone_transform_ffi( + void *sceneManager, + EntityId asset, + int skinIndex, + int boneIndex, + const float *const transform, + void (*callback)(bool)) + { + std::packaged_task lambda( + [=] + { + auto success = set_bone_transform(sceneManager, asset, skinIndex, boneIndex, transform); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0,$1); + }, callback, success); + #else + callback(success); + #endif + return success; + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void update_bone_matrices_ffi(void *sceneManager, + EntityId entity, void(*callback)(bool)) { + std::packaged_task lambda( + [=] + { + auto success = update_bone_matrices(sceneManager, entity); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0); + }, callback, success); + #else + callback(success); + #endif + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void reset_to_rest_pose_ffi(void *const sceneManager, EntityId entityId, void(*callback)()) + { + std::packaged_task lambda( + [=] + { + reset_to_rest_pose(sceneManager, entityId); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0); + }, callback); + #else + callback(); + #endif + }); + auto fut = _rl->add_task(lambda); + } + + EMSCRIPTEN_KEEPALIVE void create_geometry_ffi( + void *const viewer, + float *vertices, + int numVertices, + uint16_t *indices, + int numIndices, + int primitiveType, + const char *materialPath, + void (*callback)(EntityId)) + { + std::packaged_task lambda( + [=] + { + auto entity = create_geometry(viewer, vertices, numVertices, indices, numIndices, primitiveType, materialPath); + #ifdef __EMSCRIPTEN__ + MAIN_THREAD_EM_ASM({ + moduleArg.dartFilamentResolveCallback($0,$1); + }, callback, entity); + #else + callback(entity); + #endif + return entity; + }); + auto fut = _rl->add_task(lambda); + } + +} diff --git a/ios/src/TimeIt.cpp b/thermion_dart/native/src/TimeIt.cpp similarity index 100% rename from ios/src/TimeIt.cpp rename to thermion_dart/native/src/TimeIt.cpp diff --git a/ios/src/camutils/Bookmark.cpp b/thermion_dart/native/src/camutils/Bookmark.cpp similarity index 100% rename from ios/src/camutils/Bookmark.cpp rename to thermion_dart/native/src/camutils/Bookmark.cpp diff --git a/ios/src/camutils/FreeFlightManipulator.h b/thermion_dart/native/src/camutils/FreeFlightManipulator.h similarity index 100% rename from ios/src/camutils/FreeFlightManipulator.h rename to thermion_dart/native/src/camutils/FreeFlightManipulator.h diff --git a/thermion_dart/native/src/camutils/Manipulator.cpp b/thermion_dart/native/src/camutils/Manipulator.cpp new file mode 100644 index 00000000..5b675a5f --- /dev/null +++ b/thermion_dart/native/src/camutils/Manipulator.cpp @@ -0,0 +1,370 @@ +/* + * Copyright (C) 2020 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. + */ + +#include + +#include + +#include "FreeFlightManipulator.h" +#include "MapManipulator.h" +#include "OrbitManipulator.h" + +using namespace filament::math; + +namespace filament +{ + namespace camutils + { + + template + typename Manipulator::Builder &Manipulator::Builder::viewport(int width, int height) + { + details.viewport[0] = width; + details.viewport[1] = height; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::targetPosition(FLOAT x, FLOAT y, FLOAT z) + { + details.targetPosition = {x, y, z}; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::upVector(FLOAT x, FLOAT y, FLOAT z) + { + details.upVector = {x, y, z}; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::zoomSpeed(FLOAT val) + { + details.zoomSpeed = val; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::orbitHomePosition(FLOAT x, FLOAT y, FLOAT z) + { + details.orbitHomePosition = {x, y, z}; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::orbitSpeed(FLOAT x, FLOAT y) + { + details.orbitSpeed = {x, y}; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::fovDirection(Fov fov) + { + details.fovDirection = fov; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::fovDegrees(FLOAT degrees) + { + details.fovDegrees = degrees; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::farPlane(FLOAT distance) + { + details.farPlane = distance; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::mapExtent(FLOAT worldWidth, FLOAT worldHeight) + { + details.mapExtent = {worldWidth, worldHeight}; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::mapMinDistance(FLOAT mindist) + { + details.mapMinDistance = mindist; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::flightStartPosition(FLOAT x, FLOAT y, FLOAT z) + { + details.flightStartPosition = {x, y, z}; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::flightStartOrientation(FLOAT pitch, FLOAT yaw) + { + details.flightStartPitch = pitch; + details.flightStartYaw = yaw; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::flightMaxMoveSpeed(FLOAT maxSpeed) + { + details.flightMaxSpeed = maxSpeed; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::flightSpeedSteps(int steps) + { + details.flightSpeedSteps = steps; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::flightPanSpeed(FLOAT x, FLOAT y) + { + details.flightPanSpeed = {x, y}; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::flightMoveDamping(FLOAT damping) + { + details.flightMoveDamping = damping; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::groundPlane(FLOAT a, FLOAT b, FLOAT c, FLOAT d) + { + details.groundPlane = {a, b, c, d}; + return *this; + } + + template + typename Manipulator::Builder &Manipulator::Builder::raycastCallback(RayCallback cb, void *userdata) + { + details.raycastCallback = cb; + details.raycastUserdata = userdata; + return *this; + } + + template + Manipulator *Manipulator::Builder::build(Mode mode) + { + switch (mode) + { + case Mode::FREE_FLIGHT: + return new FreeFlightManipulator(mode, details); + case Mode::MAP: + return new MapManipulator(mode, details); + case Mode::ORBIT: + return new OrbitManipulator(mode, details); + } + } + + template + Manipulator::Manipulator(Mode mode, const Config &props) : mMode(mode) + { + setProperties(props); + } + + template + void Manipulator::setProperties(const Config &props) + { + mProps = props; + + if (mProps.zoomSpeed == FLOAT(0)) + { + mProps.zoomSpeed = 0.01; + } + + if (mProps.upVector == vec3(0)) + { + mProps.upVector = vec3(0, 1, 0); + } + + if (mProps.fovDegrees == FLOAT(0)) + { + mProps.fovDegrees = 33; + } + + if (mProps.farPlane == FLOAT(0)) + { + mProps.farPlane = 5000; + } + + if (mProps.mapExtent == vec2(0)) + { + mProps.mapExtent = vec2(512); + } + } + + template + void Manipulator::setViewport(int width, int height) + { + Config props = mProps; + props.viewport[0] = width; + props.viewport[1] = height; + setProperties(props); + } + + template + void Manipulator::getLookAt(vec3 *eyePosition, vec3 *targetPosition, vec3 *upward) const + { + *targetPosition = mTarget; + *eyePosition = mEye; + const vec3 gaze = normalize(mTarget - mEye); + const vec3 right = cross(gaze, mProps.upVector); + *upward = cross(right, gaze); + } + + template + static bool raycastPlane(const filament::math::vec3 &origin, + const filament::math::vec3 &dir, FLOAT *t, void *userdata) + { + using vec3 = filament::math::vec3; + using vec4 = filament::math::vec4; + auto props = (const typename Manipulator::Config *)userdata; + const vec4 plane = props->groundPlane; + const vec3 n = vec3(plane[0], plane[1], plane[2]); + const vec3 p0 = n * plane[3]; + const FLOAT denom = -dot(n, dir); + if (denom > 1e-6) + { + const vec3 p0l0 = p0 - origin; + *t = dot(p0l0, n) / -denom; + return *t >= 0; + } + return false; + } + + template + void Manipulator::getRay(int x, int y, vec3 *porigin, vec3 *pdir) const + { + const vec3 gaze = normalize(mTarget - mEye); + const vec3 right = normalize(cross(gaze, mProps.upVector)); + const vec3 upward = cross(right, gaze); + const FLOAT width = mProps.viewport[0]; + const FLOAT height = mProps.viewport[1]; + const FLOAT fov = mProps.fovDegrees * F_PI / 180.0; + + // Remap the grid coordinate into [-1, +1] and shift it to the pixel center. + const FLOAT u = 2.0 * (0.5 + x) / width - 1.0; + const FLOAT v = 2.0 * (0.5 + y) / height - 1.0; + + // Compute the tangent of the field-of-view angle as well as the aspect ratio. + const FLOAT tangent = tan(fov / 2.0); + const FLOAT aspect = width / height; + + // Adjust the gaze so it goes through the pixel of interest rather than the grid center. + vec3 dir = gaze; + if (mProps.fovDirection == Fov::VERTICAL) + { + dir += right * tangent * u * aspect; + dir += upward * tangent * v; + } + else + { + dir += right * tangent * u; + dir += upward * tangent * v / aspect; + } + dir = normalize(dir); + + *porigin = mEye; + *pdir = dir; + } + + template + bool Manipulator::raycast(int x, int y, vec3 *result) const + { + vec3 origin, dir; + getRay(x, y, &origin, &dir); + + // Choose either the user's callback function or the plane intersector. + auto callback = mProps.raycastCallback; + auto fallback = raycastPlane; + void *userdata = mProps.raycastUserdata; + if (!callback) + { + callback = fallback; + userdata = (void *)&mProps; + } + + // If the ray misses, then try the fallback function. + FLOAT t; + if (!callback(mEye, dir, &t, userdata)) + { + if (callback == fallback || !fallback(mEye, dir, &t, (void *)&mProps)) + { + return false; + } + } + + *result = mEye + dir * t; + return true; + } + + template + filament::math::vec3 Manipulator::raycastFarPlane(int x, int y) const + { + const filament::math::vec3 gaze = normalize(mTarget - mEye); + const vec3 right = cross(gaze, mProps.upVector); + const vec3 upward = cross(right, gaze); + const FLOAT width = mProps.viewport[0]; + const FLOAT height = mProps.viewport[1]; + const FLOAT fov = mProps.fovDegrees * math::F_PI / 180.0; + + // Remap the grid coordinate into [-1, +1] and shift it to the pixel center. + const FLOAT u = 2.0 * (0.5 + x) / width - 1.0; + const FLOAT v = 2.0 * (0.5 + y) / height - 1.0; + + // Compute the tangent of the field-of-view angle as well as the aspect ratio. + const FLOAT tangent = tan(fov / 2.0); + const FLOAT aspect = width / height; + + // Adjust the gaze so it goes through the pixel of interest rather than the grid center. + vec3 dir = gaze; + if (mProps.fovDirection == Fov::VERTICAL) + { + dir += right * tangent * u * aspect; + dir += upward * tangent * v; + } + else + { + dir += right * tangent * u; + dir += upward * tangent * v / aspect; + } + return mEye + dir * mProps.farPlane; + } + + template + void Manipulator::keyDown(Manipulator::Key key) {} + + template + void Manipulator::keyUp(Manipulator::Key key) {} + + template + void Manipulator::update(FLOAT deltaTime) {} + + template class Manipulator; + template class Manipulator; + + } // namespace camutils +} // namespace filament diff --git a/thermion_dart/native/src/camutils/MapManipulator.h b/thermion_dart/native/src/camutils/MapManipulator.h new file mode 100644 index 00000000..f3d40848 --- /dev/null +++ b/thermion_dart/native/src/camutils/MapManipulator.h @@ -0,0 +1,218 @@ +/* + * Copyright (C) 2020 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. + */ + +#ifndef CAMUTILS_MAP_MANIPULATOR_H +#define CAMUTILS_MAP_MANIPULATOR_H + +#include + +#include + +#include + +namespace filament +{ + namespace camutils + { + + template + class MapManipulator : public Manipulator + { + public: + using vec2 = math::vec2; + using vec3 = math::vec3; + using vec4 = math::vec4; + using Bookmark = filament::camutils::Bookmark; + using Base = Manipulator; + using Config = typename Manipulator::Config; + + MapManipulator(Mode mode, const Config &props) : Manipulator(mode, props) + { + const FLOAT width = Base::mProps.mapExtent.x; + const FLOAT height = Base::mProps.mapExtent.y; + const bool horiz = Base::mProps.fovDirection == Fov::HORIZONTAL; + const vec3 targetToEye = Base::mProps.groundPlane.xyz; + const FLOAT halfExtent = (horiz ? width : height) / 2.0; + const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0; + const FLOAT distance = halfExtent / tan(fov / 2.0); + Base::mTarget = Base::mProps.targetPosition; + Base::mEye = Base::mTarget + distance * targetToEye; + } + + void grabBegin(int x, int y, bool strafe) override + { + if (strafe || !Base::raycast(x, y, &mGrabScene)) + { + return; + } + mGrabFar = Base::raycastFarPlane(x, y); + mGrabEye = Base::mEye; + mGrabTarget = Base::mTarget; + mGrabbing = true; + } + + void grabUpdate(int x, int y) override + { + if (mGrabbing) + { + const FLOAT ulen = distance(mGrabScene, mGrabEye); + const FLOAT vlen = distance(mGrabFar, mGrabScene); + const vec3 translation = (mGrabFar - Base::raycastFarPlane(x, y)) * ulen / vlen; + const vec3 eyePosition = mGrabEye + translation; + const vec3 targetPosition = mGrabTarget + translation; + moveWithConstraints(eyePosition, targetPosition); + } + } + + void grabEnd() override + { + mGrabbing = false; + } + + void scroll(int x, int y, FLOAT scrolldelta) override + { + vec3 grabScene; + if (!Base::raycast(x, y, &grabScene)) + { + return; + } + + // Find the direction of travel for the dolly. We do not normalize since it + // is desirable to move faster when further away from the targetPosition. + vec3 u = grabScene - Base::mEye; + + // Prevent getting stuck when zooming in. + if (scrolldelta < 0) + { + const FLOAT distanceToSurface = length(u); + if (distanceToSurface < Base::mProps.zoomSpeed) + { + return; + } + } + + u *= -scrolldelta * Base::mProps.zoomSpeed; + + const vec3 eyePosition = Base::mEye + u; + const vec3 targetPosition = Base::mTarget + u; + moveWithConstraints(eyePosition, targetPosition); + } + + Bookmark getCurrentBookmark() const override + { + const vec3 dir = normalize(Base::mTarget - Base::mEye); + + FLOAT distance; + raycastPlane(Base::mEye, dir, &distance); + + const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0; + const FLOAT halfExtent = distance * tan(fov / 2.0); + + vec3 targetPosition = Base::mEye + dir * distance; + + const vec3 targetToEye = Base::mProps.groundPlane.xyz; + const vec3 uvec = cross(Base::mProps.upVector, targetToEye); + const vec3 vvec = cross(targetToEye, uvec); + const vec3 centerToTarget = targetPosition - Base::mProps.targetPosition; + + Bookmark bookmark; + bookmark.mode = Mode::MAP; + bookmark.map.extent = halfExtent * 2.0; + bookmark.map.center.x = dot(uvec, centerToTarget); + bookmark.map.center.y = dot(vvec, centerToTarget); + + bookmark.orbit.theta = 0; + bookmark.orbit.phi = 0; + bookmark.orbit.pivot = Base::mProps.targetPosition + + uvec * bookmark.map.center.x + + vvec * bookmark.map.center.y; + bookmark.orbit.distance = halfExtent / tan(fov / 2.0); + + return bookmark; + } + + Bookmark getHomeBookmark() const override + { + const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0; + const FLOAT width = Base::mProps.mapExtent.x; + const FLOAT height = Base::mProps.mapExtent.y; + const bool horiz = Base::mProps.fovDirection == Fov::HORIZONTAL; + + Bookmark bookmark; + bookmark.mode = Mode::MAP; + bookmark.map.extent = horiz ? width : height; + bookmark.map.center.x = 0; + bookmark.map.center.y = 0; + + bookmark.orbit.theta = 0; + bookmark.orbit.phi = 0; + bookmark.orbit.pivot = Base::mTarget; + bookmark.orbit.distance = 0.5 * bookmark.map.extent / tan(fov / 2.0); + + // TODO: Add optional boundary constraints here. + + return bookmark; + } + + void jumpToBookmark(const Bookmark &bookmark) override + { + const vec3 targetToEye = Base::mProps.groundPlane.xyz; + const FLOAT halfExtent = bookmark.map.extent / 2.0; + const FLOAT fov = Base::mProps.fovDegrees * math::F_PI / 180.0; + const FLOAT distance = halfExtent / tan(fov / 2.0); + vec3 uvec = cross(Base::mProps.upVector, targetToEye); + vec3 vvec = cross(targetToEye, uvec); + uvec = normalize(uvec) * bookmark.map.center.x; + vvec = normalize(vvec) * bookmark.map.center.y; + Base::mTarget = Base::mProps.targetPosition + uvec + vvec; + Base::mEye = Base::mTarget + distance * targetToEye; + } + + private: + bool raycastPlane(const vec3 &origin, const vec3 &dir, FLOAT *t) const + { + const vec4 plane = Base::mProps.groundPlane; + const vec3 n = vec3(plane[0], plane[1], plane[2]); + const vec3 p0 = n * plane[3]; + const FLOAT denom = -dot(n, dir); + if (denom > 1e-6) + { + const vec3 p0l0 = p0 - origin; + *t = dot(p0l0, n) / -denom; + return *t >= 0; + } + return false; + } + + void moveWithConstraints(vec3 eye, vec3 targetPosition) + { + Base::mEye = eye; + Base::mTarget = targetPosition; + // TODO: Add optional boundary constraints here. + } + + private: + bool mGrabbing = false; + vec3 mGrabScene; + vec3 mGrabFar; + vec3 mGrabEye; + vec3 mGrabTarget; + }; + + } // namespace camutils +} // namespace filament + +#endif /* CAMUTILS_MAP_MANIPULATOR_H */ diff --git a/ios/src/camutils/OrbitManipulator.h b/thermion_dart/native/src/camutils/OrbitManipulator.h similarity index 100% rename from ios/src/camutils/OrbitManipulator.h rename to thermion_dart/native/src/camutils/OrbitManipulator.h diff --git a/thermion_dart/native/web/.gitattributes b/thermion_dart/native/web/.gitattributes new file mode 100644 index 00000000..caa699bb --- /dev/null +++ b/thermion_dart/native/web/.gitattributes @@ -0,0 +1,45 @@ +lib filter=lfs diff=lfs merge=lfs -text +lib/debug filter=lfs diff=lfs merge=lfs -text +lib/debug/libtinyexr.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libuberarchive.a filter=lfs diff=lfs merge=lfs -text +lib/release filter=lfs diff=lfs merge=lfs -text +lib/release/libfilaflat.a filter=lfs diff=lfs merge=lfs -text +lib/release/libgeometry.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libbackend.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libbasis_encoder.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libbasis_transcoder.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libdracodec.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libmeshoptimizer.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libzstd.a filter=lfs diff=lfs merge=lfs -text +lib/release/libbackend.a filter=lfs diff=lfs merge=lfs -text +lib/release/libfilabridge.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libgltfio_core.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libimageio.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libktxreader.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libutils.a filter=lfs diff=lfs merge=lfs -text +lib/release/libbasis_transcoder.a filter=lfs diff=lfs merge=lfs -text +lib/release/libktxreader.a filter=lfs diff=lfs merge=lfs -text +lib/release/libmath.a filter=lfs diff=lfs merge=lfs -text +lib/release/libutils.a filter=lfs diff=lfs merge=lfs -text +lib/release/libzstd.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libimage.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libuberzlib.a filter=lfs diff=lfs merge=lfs -text +lib/release/libuberarchive.a filter=lfs diff=lfs merge=lfs -text +lib/release/libuberzlib.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libfilaflat.a filter=lfs diff=lfs merge=lfs -text +lib/release/libdracodec.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libgeometry.a filter=lfs diff=lfs merge=lfs -text +lib/release/libbasis_encoder.a filter=lfs diff=lfs merge=lfs -text +lib/release/libgltfio_core.a filter=lfs diff=lfs merge=lfs -text +lib/release/libstb.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libfilament.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libpng.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libstb.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libz.a filter=lfs diff=lfs merge=lfs -text +lib/release/libfilament.a filter=lfs diff=lfs merge=lfs -text +lib/release/libibl-lite.a filter=lfs diff=lfs merge=lfs -text +lib/release/libmeshoptimizer.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libfilabridge.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libibl-lite.a filter=lfs diff=lfs merge=lfs -text +lib/debug/libmath.a filter=lfs diff=lfs merge=lfs -text +lib/release/libimage.a filter=lfs diff=lfs merge=lfs -text diff --git a/thermion_dart/native/web/CMakeLists.txt b/thermion_dart/native/web/CMakeLists.txt new file mode 100644 index 00000000..f9587ffe --- /dev/null +++ b/thermion_dart/native/web/CMakeLists.txt @@ -0,0 +1,230 @@ +cmake_minimum_required(VERSION 3.27) + +set(PROJECT_NAME "thermion_dart") +project(${PROJECT_NAME}) + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") +endif(NOT CMAKE_BUILD_TYPE) + +set(MODULE_NAME "thermion_dart") + +set(EMCC_CFLAGS --bind) +# set(EMCC_CFLAGS ${EMCC_CFLAGS} -sALLOW_TABLE_GROWTH=1) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sALLOW_MEMORY_GROWTH=1) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sEXPORT_NAME=${MODULE_NAME}) +# set(EMCC_CFLAGS ${EMCC_CFLAGS} -sEXPORT_ALL=1) +# set(EMCC_CFLAGS ${EMCC_CFLAGS} -sLINKABLE=1) +# set(EMCC_CFLAGS ${EMCC_CFLAGS} -sSIDE_MODULE) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sINITIAL_MEMORY=512mb) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sMODULARIZE) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sERROR_ON_UNDEFINED_SYMBOLS=0 ) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sEXPORTED_RUNTIME_METHODS=wasmExports,wasmTable,addFunction,ccall,cwrap,allocate,intArrayFromString,intArrayToString,getValue,setValue,UTF8ToString,stringToUTF8,writeArrayToMemory,_free) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sEXPORTED_FUNCTIONS=_malloc,stackAlloc,_free) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sFULL_ES3) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sASSERTIONS) +# set(EMCC_CFLAGS ${EMCC_CFLAGS} -sPTHREAD_POOL_SIZE=1) +# set(EMCC_CFLAGS ${EMCC_CFLAGS} -sALLOW_BLOCKING_ON_MAIN_THREAD=0) +# set(EMCC_CFLAGS ${EMCC_CFLAGS} -sOFFSCREEN_FRAMEBUFFER=1) +# set(EMCC_CFLAGS ${EMCC_CFLAGS} -sOFFSCREENCANVAS_SUPPORT=1) +# set(EMCC_CFLAGS ${EMCC_CFLAGS} -sNO_DISABLE_EXCEPTION_CATCHING) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sASYNCIFY=1) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sMIN_WEBGL_VERSION=2) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sMAX_WEBGL_VERSION=2) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sFETCH=1) +# set(EMCC_CFLAGS ${EMCC_CFLAGS} -sUSE_PTHREADS) +# set(EMCC_CFLAGS ${EMCC_CFLAGS} -sPROXY_TO_WORKER=1) +set(EMCC_CFLAGS ${EMCC_CFLAGS} -sSHARED_MEMORY=0) +# set(EMCC_CFLAGS ${EMCC_CFLAGS} -pie) + + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers -Wno-deprecated-literal-operator -stdlib=libc++ -std=c++17 -fPIC -O3 --no-entry") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -pie") + +add_link_options(${EMCC_CFLAGS}) + +link_directories("${CMAKE_CURRENT_SOURCE_DIR}/lib") + +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build/out) + +add_executable(${MODULE_NAME} + "${CMAKE_CURRENT_SOURCE_DIR}/../src/SceneManager.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/../src/ThermionViewerFFI.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/../src/ThermionDartApi.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/../src/ThermionDartFFIApi.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/../src/StreamBufferAdapter.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/../src/TimeIt.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/../src/camutils/Manipulator.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/../src/camutils/Bookmark.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/../include/material/image.c" + "${CMAKE_CURRENT_SOURCE_DIR}/../include/material/gizmo.c" + "${CMAKE_CURRENT_SOURCE_DIR}/src/cpp/ThermionDartWebApi.cpp" +) +set_target_properties(${MODULE_NAME} PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_compile_definitions(${MODULE_NAME} PRIVATE FLUTTER_PLUGIN_IMPL) + +target_compile_features(${MODULE_NAME} PRIVATE cxx_std_17) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include/filament) + +add_library(backend STATIC IMPORTED) +set_property(TARGET backend PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libbackend.a") +set_property(TARGET backend PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libbackend.a") +set_property(TARGET backend PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libbackend.a") + +add_library(geometry STATIC IMPORTED) +set_property(TARGET geometry PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libgeometry.a") +set_property(TARGET geometry PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libgeometry.a") +set_property(TARGET geometry PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libgeometry.a") + +add_library(filament STATIC IMPORTED) +set_property(TARGET filament PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libfilament.a") +set_property(TARGET filament PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libfilament.a") +set_property(TARGET filament PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/libfilament.a") + +add_library(filameshio STATIC IMPORTED) +set_property(TARGET filameshio PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libfilameshio.a") +set_property(TARGET filameshio PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/libfilameshio.a") +set_property(TARGET filameshio PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/libfilameshio.a") + +add_library(filamat STATIC IMPORTED) +set_property(TARGET filamat PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libfilamat.a") +set_property(TARGET filamat PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libfilamat.a") +set_property(TARGET filamat PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libfilamat.a") + +add_library(utils STATIC IMPORTED) +set_property(TARGET utils PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libutils.a") +set_property(TARGET utils PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libutils.a") +set_property(TARGET utils PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libutils.a") + +add_library(filabridge STATIC IMPORTED) +set_property(TARGET filabridge PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libfilabridge.a") +set_property(TARGET filabridge PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libfilabridge.a") +set_property(TARGET filabridge PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libfilabridge.a") + + +add_library(gltfio_core STATIC IMPORTED) +set_property(TARGET gltfio_core PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libgltfio_core.a") +set_property(TARGET gltfio_core PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libgltfio_core.a") + +add_library(image STATIC IMPORTED) +set_property(TARGET image PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libimage.a") +set_property(TARGET image PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libimage.a") +set_property(TARGET image PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libimage.a") + +add_library(imageio STATIC IMPORTED) +set_property(TARGET imageio PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libimageio.a") +set_property(TARGET imageio PROPERTY IMPORTED_LOCATION_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libimageio.a") +set_property(TARGET imageio PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libimageio.a") + +add_library(tinyexr STATIC IMPORTED) +set_property(TARGET tinyexr PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libtinyexr.a") +set_property(TARGET tinyexr PROPERTY IMPORTED_LOCATION_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libtinyexr.a") +set_property(TARGET tinyexr PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libtinyexr.a") + +add_library(camutils STATIC IMPORTED) +set_property(TARGET camutils PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libcamutils.a") +set_property(TARGET camutils PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libcamutils.a") +set_property(TARGET camutils PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libcamutils.a") + +add_library(filaflat STATIC IMPORTED) +set_property(TARGET filaflat PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libfilaflat.a") +set_property(TARGET filaflat PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libfilaflat.a") +set_property(TARGET filaflat PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libfilaflat.a") + +add_library(dracodec STATIC IMPORTED) +set_property(TARGET dracodec PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libdracodec.a") +set_property(TARGET dracodec PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libdracodec.a") +set_property(TARGET dracodec PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libdracodec.a") + +add_library(ibl-lite STATIC IMPORTED) +set_property(TARGET ibl-lite PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libibl-lite.a") +set_property(TARGET ibl-lite PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libibl-lite.a") +set_property(TARGET ibl-lite PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libibl-lite.a") + +add_library(ktxreader STATIC IMPORTED) +set_property(TARGET ktxreader PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libktxreader.a") +set_property(TARGET ktxreader PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libktxreader.a") +set_property(TARGET ktxreader PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libktxreader.a") + +add_library(stb STATIC IMPORTED) +set_property(TARGET stb PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libstb.a") +set_property(TARGET stb PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libstb.a") +set_property(TARGET stb PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libstb.a") + +add_library(uberzlib STATIC IMPORTED) +set_property(TARGET uberzlib PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libuberzlib.a") +set_property(TARGET uberzlib PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libuberzlib.a") +set_property(TARGET uberzlib PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libuberzlib.a") + +add_library(uberarchive STATIC IMPORTED) +set_property(TARGET uberarchive PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libuberarchive.a") +set_property(TARGET uberarchive PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libuberarchive.a") +set_property(TARGET uberarchive PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libuberarchive.a") + +add_library(meshoptimizer STATIC IMPORTED) +set_property(TARGET meshoptimizer PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libmeshoptimizer.a") +set_property(TARGET meshoptimizer PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libmeshoptimizer.a") +set_property(TARGET meshoptimizer PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libmeshoptimizer.a") + +add_library(basis_transcoder STATIC IMPORTED) +set_property(TARGET basis_transcoder PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libbasis_transcoder.a") +set_property(TARGET basis_transcoder PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libbasis_transcoder.a") +set_property(TARGET basis_transcoder PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libbasis_transcoder.a") + +add_library(basis_encoder STATIC IMPORTED) +set_property(TARGET basis_encoder PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libbasis_encoder.a") +set_property(TARGET basis_encoder PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libbasis_encoder.a") +set_property(TARGET basis_encoder PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libbasis_encoder.a") + +add_library(z STATIC IMPORTED) +set_property(TARGET z PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libz.a") +set_property(TARGET z PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libz.a") +set_property(TARGET z PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libz.a") + +add_library(zstd STATIC IMPORTED) +set_property(TARGET zstd PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libzstd.a") +set_property(TARGET zstd PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libzstd.a") +set_property(TARGET zstd PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libzstd.a") + +add_library(png STATIC IMPORTED) +set_property(TARGET png PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/libpng.a") +set_property(TARGET png PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libpng.a") +set_property(TARGET png PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/libpng.a") + +target_link_libraries(${MODULE_NAME} + gltfio_core + filament + backend + geometry + dracodec + ibl-lite + ktxreader + filaflat + filabridge + image + imageio + utils + stb + uberzlib + uberarchive + meshoptimizer + basis_transcoder + basis_encoder + z + zstd + png + tinyexr +) + +add_custom_command(TARGET ${MODULE_NAME} POST_BUILD + COMMAND dart --enable-experiment=native-assets run ffigen --config ffigen/web.yaml WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../ + COMMAND ${CMAKE_COMMAND} -DINPUTFILE=${CMAKE_CURRENT_SOURCE_DIR}/../../lib/thermion_dart/compatibility/web/thermion_dart.g.dart -DOUTPUTFILE=${CMAKE_CURRENT_SOURCE_DIR}/../../lib/thermion_dart/compatibility/web/thermion_dart.g.dart "-DTO_REPLACE=symbol: '" "-DREPLACEMENT=symbol: '_" -P ${CMAKE_CURRENT_SOURCE_DIR}/replace_in_file.cmake + # COMMAND ${CMAKE_COMMAND} -DINPUTFILE=${CMAKE_CURRENT_SOURCE_DIR}/build/build/out/thermion_dart.js -DOUTPUTFILE=${CMAKE_CURRENT_SOURCE_DIR}/build/build/out/thermion_dart.js "-DTO_REPLACE=var moduleRtn" "-DREPLACEMENT=var moduleRtn\;GLctx=moduleArg.ctx" -P ${CMAKE_CURRENT_SOURCE_DIR}/replace_in_file.cmake + VERBATIM +) + diff --git a/thermion_dart/native/web/include/ThermionFlutterWebApi.h b/thermion_dart/native/web/include/ThermionFlutterWebApi.h new file mode 100644 index 00000000..2971d2de --- /dev/null +++ b/thermion_dart/native/web/include/ThermionFlutterWebApi.h @@ -0,0 +1,41 @@ +#ifndef _FLUTTER_FILAMENT_WEB_RESOURCE_LOADER_H +#define _FLUTTER_FILAMENT_WEB_RESOURCE_LOADER_H + +#include +#include +#include + +#include +#include + +#define FLUTTER_PLUGIN_EXPORT __attribute__((visibility("default"))) + +#ifdef __cplusplus +extern "C" { +#endif + + +FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_load_resource_callback(void* data, int32_t length, void* context); +FLUTTER_PLUGIN_EXPORT char thermion_flutter_web_get(char* ptr, int32_t offset); +FLUTTER_PLUGIN_EXPORT float thermion_flutter_web_get_float(float* ptr, int32_t offset); +FLUTTER_PLUGIN_EXPORT double thermion_flutter_web_get_double(double* ptr, int32_t offset); +FLUTTER_PLUGIN_EXPORT void* thermion_flutter_web_get_pointer(void** ptr, int32_t offset); + +FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_set(char* ptr, int32_t offset, int32_t val); +FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_set_float(float* ptr, int32_t offset, float val); +FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_set_double(double* ptr, int32_t offset, double val); +FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_set_pointer(void** ptr, int32_t offset, void* val); + +FLUTTER_PLUGIN_EXPORT int32_t thermion_flutter_web_get_int32(int32_t* ptr, int32_t offset); +FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_set_int32(int32_t* ptr, int32_t offset, int32_t value); +FLUTTER_PLUGIN_EXPORT long thermion_flutter_web_get_address(void** out); +FLUTTER_PLUGIN_EXPORT void* thermion_flutter_web_allocate(int32_t size); +FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_free(void* ptr); +EMSCRIPTEN_WEBGL_CONTEXT_HANDLE thermion_dart_web_create_gl_context(); +FLUTTER_PLUGIN_EXPORT void* thermion_dart_web_get_resource_loader_wrapper(); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/thermion_dart/native/web/replace_in_file.cmake b/thermion_dart/native/web/replace_in_file.cmake new file mode 100644 index 00000000..c6114028 --- /dev/null +++ b/thermion_dart/native/web/replace_in_file.cmake @@ -0,0 +1,3 @@ +file(READ ${INPUTFILE} INPUT_TEXT) +string(REPLACE ${TO_REPLACE} ${REPLACEMENT} INPUT_TEXT "${INPUT_TEXT}") +file(WRITE ${OUTPUTFILE} "${INPUT_TEXT}") \ No newline at end of file diff --git a/thermion_dart/native/web/src/cpp/ThermionDartWebApi.cpp b/thermion_dart/native/web/src/cpp/ThermionDartWebApi.cpp new file mode 100644 index 00000000..a55270ca --- /dev/null +++ b/thermion_dart/native/web/src/cpp/ThermionDartWebApi.cpp @@ -0,0 +1,233 @@ +#include "ThermionFlutterWebApi.h" +#include "ResourceBuffer.hpp" + +#include +#include +#include +#include + +#define GL_GLEXT_PROTOTYPES +#include +#include +#include +#include +#include +#include +#include + +class PendingCall +{ +public: + PendingCall() + { + } + ~PendingCall() {} + + void Wait() + { + std::future accumulate_future = prom.get_future(); + std::cout << "Loaded asset from Flutter of length " << accumulate_future.get() << std::endl; + } + + void HandleResponse(void* data, int32_t length) + { + this->data = data; + this->length = length; + prom.set_value(length); + } +void* data = nullptr; +int32_t length = 0; + +private: + std::mutex mutex_; + std::condition_variable cv_; + bool notified_ = false; + std::promise prom; + +}; + +using emscripten::val; + +extern "C" +{ + + // + // Since are using -sMAIN_MODULE with -sPTHREAD_POOL_SIZE=1, main will be called when the first worker is spawned + // + + // EMSCRIPTEN_KEEPALIVE int main() { + // std::cout << "WEBAPI MAIN " << std::endl; + // return 0; + // } + + EMSCRIPTEN_KEEPALIVE void thermion_filament_web_load_resource_callback(void* data, int32_t length, void* context) { + ((PendingCall*)context)->HandleResponse(data, length); + } + + EMSCRIPTEN_KEEPALIVE void thermion_filament_web_set(char* ptr, int32_t offset, int32_t val) { + memset(ptr+offset, val, 1); + } + + EMSCRIPTEN_KEEPALIVE void thermion_filament_web_set_float(float* ptr, int32_t offset, float val) { + ptr[offset] = val; + } + + EMSCRIPTEN_KEEPALIVE float thermion_filament_web_get_float(float* ptr, int32_t offset) { + return ptr[offset]; + } + + EMSCRIPTEN_KEEPALIVE double thermion_filament_web_get_double(double* ptr, int32_t offset) { + return ptr[offset]; + } + + EMSCRIPTEN_KEEPALIVE void thermion_filament_web_set_double(double* ptr, int32_t offset, double value) { + ptr[offset] = value; + } + + EMSCRIPTEN_KEEPALIVE int32_t thermion_filament_web_get_int32(int32_t* ptr, int32_t offset) { + return ptr[offset]; + } + + EMSCRIPTEN_KEEPALIVE void thermion_filament_web_set_int32(int32_t* ptr, int32_t offset, int32_t value) { + ptr[offset] = value; + } + + EMSCRIPTEN_KEEPALIVE void thermion_filament_web_set_pointer(void** ptr, int32_t offset, void* val) { + ptr[offset] = val; + } + + EMSCRIPTEN_KEEPALIVE void* thermion_filament_web_get_pointer(void** ptr, int32_t offset) { + return ptr[offset]; + } + + EMSCRIPTEN_KEEPALIVE char thermion_filament_web_get(char* ptr, int32_t offset) { + return ptr[offset]; + } + + EMSCRIPTEN_KEEPALIVE void* thermion_filament_web_allocate(int32_t size) { + void* allocated = (void*)calloc(size, 1); + return allocated; + } + + EMSCRIPTEN_KEEPALIVE long thermion_filament_web_get_address(void** out) { + return (long)*out; + } + + EMSCRIPTEN_KEEPALIVE EMSCRIPTEN_WEBGL_CONTEXT_HANDLE thermion_dart_web_create_gl_context() { + + std::cout << "Creating WebGL context." << std::endl; + + EmscriptenWebGLContextAttributes attr; + + emscripten_webgl_init_context_attributes(&attr); + attr.alpha = EM_TRUE; + attr.depth = EM_TRUE; + attr.stencil = EM_FALSE; + attr.antialias = EM_FALSE; + attr.explicitSwapControl = EM_FALSE; + attr.preserveDrawingBuffer = EM_FALSE; + attr.proxyContextToMainThread = EMSCRIPTEN_WEBGL_CONTEXT_PROXY_DISALLOW; + attr.enableExtensionsByDefault = EM_TRUE; + attr.renderViaOffscreenBackBuffer = EM_FALSE; + attr.majorVersion = 2; + + auto context = emscripten_webgl_create_context("#canvas", &attr); + + std::cout << "Created WebGL context " << attr.majorVersion << "." << attr.minorVersion << std::endl; + + auto success = emscripten_webgl_make_context_current((EMSCRIPTEN_WEBGL_CONTEXT_HANDLE)context); + if(success != EMSCRIPTEN_RESULT_SUCCESS) { + std::cout << "Failed to make WebGL context current"<< std::endl; + } else { + std::cout << "Made WebGL context current"<< std::endl; + // glClearColor(0.0, 0.0, 1.0, 1.0); + // glClear(GL_COLOR_BUFFER_BIT); + // emscripten_webgl_commit_frame(); + } + return context; + } + + int _lastResourceId = 0; + + ResourceBuffer thermion_filament_web_load_resource(const char* path) + { + // ideally we should bounce the call to Flutter then wait for callback + // this isn't working for large assets though - seems like it's deadlocked + // will leave this here commented out so we can revisit later if needed + // auto pendingCall = new PendingCall(); + // loadFlutterAsset(path, (void*)pendingCall); + // pendingCall->Wait(); + // auto rb = ResourceBuffer { pendingCall->data, (int32_t) pendingCall->length, _lastResourceId } ; + _lastResourceId++; + // delete pendingCall; + // std::cout << "Deleted pending call" << std::endl; + + // emscripten_fetch_attr_t attr; + // emscripten_fetch_attr_init(&attr); + // attr.onsuccess = [](emscripten_fetch_t* fetch) { + + // }; + // attr.onerror = [](emscripten_fetch_t* fetch) { + // std::cout << "Error" << std::endl; + // }; + // attr.onprogress = [](emscripten_fetch_t* fetch) { + + // }; + // attr.onreadystatechange = [](emscripten_fetch_t* fetch) { + + // }; + // attr.attributes = EMSCRIPTEN_FETCH_LOAD_TO_MEMORY; + + // const char* headers[] = {"Accept-Encoding", "gzip, deflate", NULL}; + // attr.requestHeaders = headers; + + auto pathString = std::string(path); + // if(pathString.rfind("/",0) != 0) { + // pathString = std::string("/") + pathString; + // } + + // std::cout << "Fetching from path " << pathString.c_str() << std::endl; + + // auto request = emscripten_fetch(&attr, pathString.c_str()); + // if(!request) { + // std::cout << "Request failed?" << std::endl; + // return ResourceBuffer { nullptr, 0, -1 } ; + // } + // auto data = malloc(request->numBytes); + // memcpy(data, request->data, request->numBytes); + // emscripten_fetch_close(request); + // return ResourceBuffer { data, (int32_t) request->numBytes, _lastResourceId } ; + void* data = nullptr; + int32_t numBytes = 0; + + void** pBuffer = (void**)malloc(sizeof(void*)); + int* pNum = (int*) malloc(sizeof(int*)); + int* pError = (int*)malloc(sizeof(int*)); + emscripten_wget_data(pathString.c_str(), pBuffer, pNum, pError); + data = *pBuffer; + numBytes = *pNum; + free(pBuffer); + free(pNum); + free(pError); + return ResourceBuffer { data, numBytes, _lastResourceId } ; + } + + void thermion_filament_web_free_resource(ResourceBuffer rb) { + free((void*)rb.data); + } + + EMSCRIPTEN_KEEPALIVE void thermion_filament_web_free(void* ptr) { + free(ptr); + } + + EMSCRIPTEN_KEEPALIVE void* thermion_dart_web_get_resource_loader_wrapper() { + ResourceLoaderWrapper *rlw = (ResourceLoaderWrapper *)malloc(sizeof(ResourceLoaderWrapper)); + rlw->loadResource = thermion_filament_web_load_resource; + rlw->loadFromOwner = nullptr; + rlw->freeResource = thermion_filament_web_free_resource; + rlw->freeFromOwner = nullptr; + rlw->loadToOut = nullptr; + rlw->owner = nullptr; + return rlw; + } +} \ No newline at end of file diff --git a/thermion_dart/pubspec.yaml b/thermion_dart/pubspec.yaml new file mode 100644 index 00000000..cde4cec3 --- /dev/null +++ b/thermion_dart/pubspec.yaml @@ -0,0 +1,21 @@ +name: thermion_dart +description: 3D rendering toolkit for Dart. +version: 0.0.4 +homepage: https://docs.page/nmfisher/thermion +repository: https://github.com/nmfisher/thermion + +environment: + sdk: ">=3.3.0 <4.0.0" + +dependencies: + vector_math: ^2.1.2 + plugin_platform_interface: ^2.0.0 + ffi: ^2.1.2 + animation_tools_dart: ^0.0.4 + native_toolchain_c: ^0.4.2 + archive: ^3.6.1 + web: ^0.5.1 + +dev_dependencies: + ffigen: ^11.0.0 + test: diff --git a/thermion_dart/test/integration_test.dart b/thermion_dart/test/integration_test.dart new file mode 100644 index 00000000..db155186 --- /dev/null +++ b/thermion_dart/test/integration_test.dart @@ -0,0 +1,130 @@ +import 'dart:ffi'; +import 'dart:io'; +import 'package:thermion_dart/thermion_dart/swift/swift_bindings.g.dart'; +import 'package:thermion_dart/thermion_dart/utils/dart_resources.dart'; +import 'package:ffi/ffi.dart'; +import 'package:thermion_dart/thermion_dart.dart'; +import 'package:thermion_dart/thermion_dart/compatibility/compatibility.dart'; +import 'package:test/test.dart'; +import 'package:animation_tools_dart/animation_tools_dart.dart'; + +/// Test files are run in a variety of ways, find this package root in all. +/// +/// Test files can be run from source from any working directory. The Dart SDK +/// `tools/test.py` runs them from the root of the SDK for example. +/// +/// Test files can be run from dill from the root of package. `package:test` +/// does this. +Uri findPackageRoot(String packageName) { + final script = Platform.script; + final fileName = script.name; + if (fileName.endsWith('_test.dart')) { + // We're likely running from source. + var directory = script.resolve('.'); + while (true) { + final dirName = directory.name; + if (dirName == packageName) { + return directory; + } + final parent = directory.resolve('..'); + if (parent == directory) break; + directory = parent; + } + } else if (fileName.endsWith('.dill')) { + final cwd = Directory.current.uri; + final dirName = cwd.name; + if (dirName == packageName) { + return cwd; + } + } + throw StateError("Could not find package root for package '$packageName'. " + 'Tried finding the package root via Platform.script ' + "'${Platform.script.toFilePath()}' and Directory.current " + "'${Directory.current.uri.toFilePath()}'."); +} + +extension on Uri { + String get name => pathSegments.where((e) => e != '').last; +} + +late String testDir; +void main() async { + final packageUri = findPackageRoot('thermion_dart'); + testDir = Directory("${packageUri.toFilePath()}/test").path; + final lib = ThermionDartTexture1(DynamicLibrary.open( + '${packageUri.toFilePath()}/native/lib/macos/swift/libdartfilamenttexture.dylib')); + final object = ThermionDartTexture.new1(lib); + object.initWithWidth_height_(500, 500); + + final resourceLoader = calloc(1); + var loadToOut = NativeCallable< + Void Function(Pointer, + Pointer)>.listener(DartResourceLoader.loadResource); + + resourceLoader.ref.loadToOut = loadToOut.nativeFunction; + var freeResource = NativeCallable.listener( + DartResourceLoader.freeResource); + resourceLoader.ref.freeResource = freeResource.nativeFunction; + + var viewer = ThermionViewerFFI(resourceLoader: resourceLoader.cast()); + + await viewer.initialized; + await viewer.createSwapChain(500, 500); + await viewer.createRenderTarget(500, 500, object.metalTextureAddress); + await viewer.updateViewportAndCameraProjection(500, 500); + + group('background', () { + test('set background color', () async { + var outDir = Directory("$testDir/bgcolor"); + outDir.createSync(); + await viewer.setRecordingOutputDirectory(outDir.path); + await viewer.setBackgroundColor(0.0, 1.0, 0.0, 1.0); + await viewer.setRecording(true); + await viewer.render(); + await viewer.render(); + await viewer.render(); + }); + + test('load skybox', () async { + var outDir = Directory("$testDir/skybox"); + outDir.createSync(); + await viewer.setRecordingOutputDirectory(outDir.path); + await viewer.setRecording(true); + await viewer.loadSkybox( + "file:///$testDir/../../examples/assets/default_env/default_env_skybox.ktx"); + await viewer.render(); + await viewer.render(); + await viewer.setRecording(false); + }); + }); + + group('Skinning & animations', () { + test('get bone names', () async { + var model = await viewer.loadGlb("$testDir/assets/shapes.glb"); + var names = await viewer.getBoneNames(model); + expect(names.first, "Bone"); + }); + + test('reset bones', () async { + var model = await viewer.loadGlb("$testDir/assets/shapes.glb"); + await viewer.resetBones(model); + }); + test('set from BVH', () async { + var model = await viewer.loadGlb("$testDir/assets/shapes.glb"); + var animation = BVHParser.parse( + File("$testDir/assets/animation.bvh").readAsStringSync(), + boneRegex: RegExp(r"Bone$")); + await viewer.addBoneAnimation(model, animation); + }); + + test('fade in/out', () async { + var model = await viewer.loadGlb("$testDir/assets/shapes.glb"); + var animation = BVHParser.parse( + File("$testDir/assets/animation.bvh").readAsStringSync(), + boneRegex: RegExp(r"Bone$")); + await viewer.addBoneAnimation(model, animation, + fadeInInSecs: 0.5, fadeOutInSecs: 0.5); + await Future.delayed(Duration(seconds: 1)); + }); + }); +} diff --git a/thermion_flutter/thermion_dart b/thermion_flutter/thermion_dart new file mode 120000 index 00000000..da4db14f --- /dev/null +++ b/thermion_flutter/thermion_dart @@ -0,0 +1 @@ +../thermion_dart \ No newline at end of file diff --git a/thermion_flutter/thermion_flutter/.gitattributes b/thermion_flutter/thermion_flutter/.gitattributes new file mode 100644 index 00000000..cb63127d --- /dev/null +++ b/thermion_flutter/thermion_flutter/.gitattributes @@ -0,0 +1,12 @@ +*.a filter=lfs diff=lfs merge=lfs -text +*.lib filter=lfs diff=lfs merge=lfs -text +*.dll filter=lfs diff=lfs merge=lfs -text +*.pdb filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.uberz filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.ktx filter=lfs diff=lfs merge=lfs -text +*.blend filter=lfs diff=lfs merge=lfs -text +*.gltf filter=lfs diff=lfs merge=lfs -text +*.glb filter=lfs diff=lfs merge=lfs -text diff --git a/thermion_flutter/thermion_flutter/.gitignore b/thermion_flutter/thermion_flutter/.gitignore new file mode 100644 index 00000000..aa2897f6 --- /dev/null +++ b/thermion_flutter/thermion_flutter/.gitignore @@ -0,0 +1,3 @@ +.vscode +.DS_Store +test/output/* diff --git a/thermion_flutter/thermion_flutter/CHANGELOG.md b/thermion_flutter/thermion_flutter/CHANGELOG.md new file mode 100644 index 00000000..e69de29b diff --git a/thermion_flutter/thermion_flutter/LICENSE b/thermion_flutter/thermion_flutter/LICENSE new file mode 100644 index 00000000..e6853914 --- /dev/null +++ b/thermion_flutter/thermion_flutter/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024 Nick Fisher + + 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. diff --git a/thermion_flutter/thermion_flutter/README.md b/thermion_flutter/thermion_flutter/README.md new file mode 100644 index 00000000..1c9b88a3 --- /dev/null +++ b/thermion_flutter/thermion_flutter/README.md @@ -0,0 +1,16 @@ +![Thermion Logo](https://raw.githubusercontent.com/nmfisher/flutter_filament/f19ea9b/docs/logo.png) + + + +## Cross-platform 3D engine for Dart and Flutter. + +pub +github +discord +contributors + diff --git a/analysis_options.yaml b/thermion_flutter/thermion_flutter/analysis_options.yaml similarity index 100% rename from analysis_options.yaml rename to thermion_flutter/thermion_flutter/analysis_options.yaml diff --git a/android/.gitignore b/thermion_flutter/thermion_flutter/android/.gitignore similarity index 100% rename from android/.gitignore rename to thermion_flutter/thermion_flutter/android/.gitignore diff --git a/thermion_flutter/thermion_flutter/android/CMakeLists.txt b/thermion_flutter/thermion_flutter/android/CMakeLists.txt new file mode 100644 index 00000000..e97c7290 --- /dev/null +++ b/thermion_flutter/thermion_flutter/android/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.10) + +include_directories(src/main/include) +include_directories(src/main/cpp) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") +set(ANDROID_STL c++_shared) + +add_library(thermion_flutter_android SHARED + "${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/ThermionFlutterAndroid.cpp" +) + +target_link_libraries( + thermion_flutter_android + -landroid + -llog +) \ No newline at end of file diff --git a/android/build.gradle b/thermion_flutter/thermion_flutter/android/build.gradle similarity index 89% rename from android/build.gradle rename to thermion_flutter/thermion_flutter/android/build.gradle index 9dd73e3c..c456547c 100644 --- a/android/build.gradle +++ b/thermion_flutter/thermion_flutter/android/build.gradle @@ -2,14 +2,14 @@ group 'app.polyvox.filament' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.6.20' + ext.kotlin_version = '1.7.10' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -57,7 +57,7 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation 'net.java.dev.jna:jna:5.10.0@aar' + api "net.java.dev.jna:jna:5.10.0@aar" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2" } diff --git a/android/gradle.properties b/thermion_flutter/thermion_flutter/android/gradle.properties similarity index 100% rename from android/gradle.properties rename to thermion_flutter/thermion_flutter/android/gradle.properties diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/thermion_flutter/thermion_flutter/android/gradle/wrapper/gradle-wrapper.properties similarity index 92% rename from android/gradle/wrapper/gradle-wrapper.properties rename to thermion_flutter/thermion_flutter/android/gradle/wrapper/gradle-wrapper.properties index 3c9d0852..8048ce64 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/thermion_flutter/thermion_flutter/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip \ No newline at end of file diff --git a/thermion_flutter/thermion_flutter/android/settings.gradle b/thermion_flutter/thermion_flutter/android/settings.gradle new file mode 100644 index 00000000..8faa7734 --- /dev/null +++ b/thermion_flutter/thermion_flutter/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'thermion_flutter' diff --git a/android/src/main/AndroidManifest.xml b/thermion_flutter/thermion_flutter/android/src/main/AndroidManifest.xml similarity index 100% rename from android/src/main/AndroidManifest.xml rename to thermion_flutter/thermion_flutter/android/src/main/AndroidManifest.xml diff --git a/thermion_flutter/thermion_flutter/android/src/main/cpp/ThermionFlutterAndroid.cpp b/thermion_flutter/thermion_flutter/android/src/main/cpp/ThermionFlutterAndroid.cpp new file mode 100644 index 00000000..91e84f4d --- /dev/null +++ b/thermion_flutter/thermion_flutter/android/src/main/cpp/ThermionFlutterAndroid.cpp @@ -0,0 +1,34 @@ +#include +#include + +#include "ResourceBuffer.h" + +extern "C" { + + typedef void (*FilamentRenderCallback)(void *const owner); + + void* get_native_window_from_surface( + jobject surface, + JNIEnv* env + ) { + void* window = ANativeWindow_fromSurface(env, surface); + return window; + } + + ResourceLoaderWrapper* make_resource_loader_wrapper_android(LoadFilamentResourceFromOwner loadFn, FreeFilamentResourceFromOwner freeFn, void* owner) { + ResourceLoaderWrapper *rlw = (ResourceLoaderWrapper *)malloc(sizeof(ResourceLoaderWrapper)); + rlw->loadToOut = nullptr; + rlw->freeResource = nullptr; + rlw->loadResource = nullptr; + rlw->loadFromOwner = loadFn; + rlw->freeFromOwner = freeFn; + rlw->owner = owner; + return rlw; + } + + // this does nothing, but we need it for JNA to return the correct pointer + FilamentRenderCallback make_render_callback_fn_pointer(FilamentRenderCallback callback) { + return callback; + } + +} diff --git a/thermion_flutter/thermion_flutter/android/src/main/include/ResourceBuffer.h b/thermion_flutter/thermion_flutter/android/src/main/include/ResourceBuffer.h new file mode 100644 index 00000000..eab0ee0d --- /dev/null +++ b/thermion_flutter/thermion_flutter/android/src/main/include/ResourceBuffer.h @@ -0,0 +1,44 @@ +#ifndef RESOURCE_BUFFER_H +#define RESOURCE_BUFFER_H + +#include +#include + +// +// A ResourceBuffer is a unified interface for working with +// binary assets across various platforms. +// This is simply: +// 1) a pointer to some data +// 2) the length of the data +// 3) an ID that can be passed back to the native platform to release the underlying asset when needed. +// +typedef struct ResourceBuffer +{ + const void *const data; + const int32_t size; + const int32_t id; + +#if defined(__cplusplus) + ResourceBuffer(void *const data, int32_t size, int32_t id) : data(data), size(size), id(id) {} +#endif +} ResourceBuffer; + +typedef void (*LoadFilamentResourceIntoOutPointer)(const char *uri, ResourceBuffer *out); +typedef ResourceBuffer (*LoadFilamentResource)(const char *uri); +typedef ResourceBuffer (*LoadFilamentResourceFromOwner)(const char *const, void *const owner); +typedef void (*FreeFilamentResource)(ResourceBuffer); +typedef void (*FreeFilamentResourceFromOwner)(ResourceBuffer, void *const owner); + +typedef struct ResourceLoaderWrapper +{ + LoadFilamentResource loadResource; + FreeFilamentResource freeResource; + LoadFilamentResourceFromOwner loadFromOwner; + FreeFilamentResourceFromOwner freeFromOwner; + void *owner; + LoadFilamentResourceIntoOutPointer loadToOut; +} ResourceLoaderWrapper; + +void *make_resource_loader(LoadFilamentResourceFromOwner loadFn, FreeFilamentResourceFromOwner freeFn, void *const owner); + +#endif diff --git a/android/src/main/kotlin/app/polyvox/filament/FilamentInterop.kt b/thermion_flutter/thermion_flutter/android/src/main/kotlin/app/polyvox/filament/FilamentInterop.kt similarity index 50% rename from android/src/main/kotlin/app/polyvox/filament/FilamentInterop.kt rename to thermion_flutter/thermion_flutter/android/src/main/kotlin/app/polyvox/filament/FilamentInterop.kt index 5d5e9693..8430b593 100644 --- a/android/src/main/kotlin/app/polyvox/filament/FilamentInterop.kt +++ b/thermion_flutter/thermion_flutter/android/src/main/kotlin/app/polyvox/filament/FilamentInterop.kt @@ -33,16 +33,7 @@ interface FilamentInterop : Library { fun get_native_window_from_surface(surface:Object, env:JNIEnv) : Pointer?; fun make_render_callback_fn_pointer(renderCallback:RenderCallback) : Pointer -fun make_resource_loader(loadResourceFromOwner: LoadFilamentResourceFromOwner, freeResource: FreeFilamentResourceFromOwner, owner:Pointer?) : Pointer; -fun create_filament_viewer_ffi(context:Pointer, platform:Pointer, loader:Pointer, rc:Pointer, rco:Pointer) : Pointer; -fun create_swap_chain_ffi(vieer:Pointer?, surface:Pointer?, width:Int, height:Int) -fun set_background_color_ffi(viewer: Pointer?, r: Float, g: Float, b: Float, a: Float) -fun update_viewport_and_camera_projection_ffi(viewer: Pointer?, width: Int, height: Int, scale_factor: Float) -fun render_ffi(viewer: Pointer?) -fun create_filament_viewer(context:Pointer?, platform:Pointer?, loader:Pointer?) : Pointer; -fun create_swap_chain(vieer:Pointer?, surface:Pointer?, width:Int, height:Int) -fun set_background_color(viewer: Pointer?, r: Float, g: Float, b: Float, a: Float) -fun update_viewport_and_camera_projection(viewer: Pointer?, width: Int, height: Int, scale_factor: Float) -fun render(viewer: Pointer?, u:Long, a:Pointer?, b:Pointer?, c:Pointer?) +fun make_resource_loader_wrapper_android(loadResourceFromOwner: LoadFilamentResourceFromOwner, freeResource: FreeFilamentResourceFromOwner, owner:Pointer?) : Pointer; + } diff --git a/android/src/main/kotlin/app/polyvox/filament/HotReloadPathHelper.kt b/thermion_flutter/thermion_flutter/android/src/main/kotlin/app/polyvox/filament/HotReloadPathHelper.kt similarity index 80% rename from android/src/main/kotlin/app/polyvox/filament/HotReloadPathHelper.kt rename to thermion_flutter/thermion_flutter/android/src/main/kotlin/app/polyvox/filament/HotReloadPathHelper.kt index f347d2c2..1716d4d3 100644 --- a/android/src/main/kotlin/app/polyvox/filament/HotReloadPathHelper.kt +++ b/thermion_flutter/thermion_flutter/android/src/main/kotlin/app/polyvox/filament/HotReloadPathHelper.kt @@ -11,17 +11,17 @@ class HotReloadPathHelper { companion object { fun getAssetPath(path: String, packageName: String): String? { val packagePath = "/data/user/0/${packageName}/code_cache/" - Log.v("flutter_filament", "Looking for hot reloaded asset ${path} under package path ${packagePath}") + Log.v("thermion_flutter", "Looking for hot reloaded asset ${path} under package path ${packagePath}") val files = File(packagePath).walkBottomUp().filter { it.path.endsWith(path) }.sortedBy { it.lastModified() }.toList() if(files.size > 0) { - Log.v("flutter_filament", "Using hot reloaded asset at ${files.last().path}") + Log.v("thermion_flutter", "Using hot reloaded asset at ${files.last().path}") return files.last().path; } - Log.v("flutter_filament", "No hot reloaded asset found.") + Log.v("thermion_flutter", "No hot reloaded asset found.") return null; } } diff --git a/android/src/main/kotlin/app/polyvox/filament/FlutterFilamentPlugin.kt b/thermion_flutter/thermion_flutter/android/src/main/kotlin/app/polyvox/filament/ThermionFlutterPlugin.kt similarity index 79% rename from android/src/main/kotlin/app/polyvox/filament/FlutterFilamentPlugin.kt rename to thermion_flutter/thermion_flutter/android/src/main/kotlin/app/polyvox/filament/ThermionFlutterPlugin.kt index 2807f757..52a5c7cb 100644 --- a/android/src/main/kotlin/app/polyvox/filament/FlutterFilamentPlugin.kt +++ b/thermion_flutter/thermion_flutter/android/src/main/kotlin/app/polyvox/filament/ThermionFlutterPlugin.kt @@ -26,33 +26,33 @@ import io.flutter.view.TextureRegistry.SurfaceTextureEntry import java.io.File import java.util.* -class LoadFilamentResourceFromOwnerImpl(plugin:FlutterFilamentPlugin) : LoadFilamentResourceFromOwner { +class LoadFilamentResourceFromOwnerImpl(plugin:ThermionFlutterPlugin) : LoadFilamentResourceFromOwner { var plugin = plugin override fun loadResourceFromOwner(path: String?, owner: Pointer?): ResourceBuffer { return plugin.loadResourceFromOwner(path, owner) } } -class FreeFilamentResourceFromOwnerImpl(plugin:FlutterFilamentPlugin) : FreeFilamentResourceFromOwner { +class FreeFilamentResourceFromOwnerImpl(plugin:ThermionFlutterPlugin) : FreeFilamentResourceFromOwner { var plugin = plugin override fun freeResourceFromOwner(rb: ResourceBuffer, owner: Pointer?) { plugin.freeResourceFromOwner(rb, owner) } } -class RenderCallbackImpl(plugin:FlutterFilamentPlugin) : RenderCallback { +class RenderCallbackImpl(plugin:ThermionFlutterPlugin) : RenderCallback { var plugin = plugin override fun renderCallback(owner:Pointer?) { plugin.renderCallback(); if(!plugin._surface!!.isValid) { - Log.e("ERR", "ERR", null) + Log.e("thermion_flutter", "Error: surface is no longer valid") } } } -/** FlutterFilamentPlugin */ -class FlutterFilamentPlugin: FlutterPlugin, MethodCallHandler, ActivityAware, LoadFilamentResourceFromOwner, FreeFilamentResourceFromOwner { +/** ThermionFlutterPlugin */ +class ThermionFlutterPlugin: FlutterPlugin, MethodCallHandler, ActivityAware, LoadFilamentResourceFromOwner, FreeFilamentResourceFromOwner { companion object { const val CHANNEL_NAME = "app.polyvox.filament/event" @@ -80,7 +80,7 @@ class FlutterFilamentPlugin: FlutterPlugin, MethodCallHandler, ActivityAware, Lo this.flutterPluginBinding = flutterPluginBinding channel = MethodChannel(flutterPluginBinding.binaryMessenger, CHANNEL_NAME) channel.setMethodCallHandler(this) - _lib = Native.loadLibrary("flutter_filament_android", FilamentInterop::class.java, Collections.singletonMap(Library.OPTION_ALLOW_OBJECTS, true)) + _lib = Native.loadLibrary("thermion_flutter_android", FilamentInterop::class.java, Collections.singletonMap(Library.OPTION_ALLOW_OBJECTS, true)) } override fun onAttachedToActivity(binding: ActivityPluginBinding) { @@ -91,9 +91,9 @@ class FlutterFilamentPlugin: FlutterPlugin, MethodCallHandler, ActivityAware, Lo val _resources:MutableMap = mutableMapOf(); var _lastId = 1 - + override fun loadResourceFromOwner(path: String?, owner: Pointer?): ResourceBuffer { - Log.i("flutter_filament", "Loading resource from path $path") + Log.i("thermion_flutter", "Loading resource from path $path") var data:ByteArray? = null if(path!!.startsWith("file://")) { data = File(path!!.substring(6)).readBytes() @@ -108,14 +108,14 @@ class FlutterFilamentPlugin: FlutterPlugin, MethodCallHandler, ActivityAware, Lo if (hotReloadPath != null) { data = File(hotReloadPath).readBytes() } else { - Log.i("flutter_filament", "Loading resource from main asset bundle at ${assetPath}") + Log.i("thermion_flutter", "Loading resource from main asset bundle at ${assetPath}") val assetManager: AssetManager = activity.assets try { data = assetManager.open(key).readBytes() - Log.i("flutter_filament", "Loaded ${data.size} bytes") + Log.i("thermion_flutter", "Loaded ${data.size} bytes") } catch (e:Exception) { - Log.e("flutter_filament", "Failed to open asset at ${assetPath}", null) + Log.e("thermion_flutter", "Failed to open asset at ${assetPath}", null) } } } @@ -135,7 +135,7 @@ class FlutterFilamentPlugin: FlutterPlugin, MethodCallHandler, ActivityAware, Lo rb.data = Pointer(0) } } catch(e:Exception) { - Log.e("flutter_filament", "Error setting resource buffer : $e", null); + Log.e("thermion_flutter", "Error setting resource buffer : $e", null); } rb.write(); return rb; @@ -153,7 +153,7 @@ class FlutterFilamentPlugin: FlutterPlugin, MethodCallHandler, ActivityAware, Lo @RequiresApi(Build.VERSION_CODES.M) override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) { - Log.e("flutter_filament", call.method, null) + Log.e("thermion_flutter", call.method, null) when (call.method) { "createTexture" -> { if(_surfaceTextureEntry != null) { @@ -161,34 +161,37 @@ class FlutterFilamentPlugin: FlutterPlugin, MethodCallHandler, ActivityAware, Lo return } val args = call.arguments as List<*> - val width = args[0] as Double - val height = args[1] as Double + val width = args[0] as Int + val height = args[1] as Int if(width <1 || height < 1) { result.error("DIMENSION_MISMATCH","Both dimensions must be greater than zero (you provided $width x $height)", null); return; } - Log.i("flutter_filament", "Creating Surface Texture of size ${width}x${height}"); + Log.i("thermion_flutter", "Creating SurfaceTexture ${width}x${height}"); _surfaceTextureEntry = flutterPluginBinding.textureRegistry.createSurfaceTexture() _surfaceTexture = _surfaceTextureEntry!!.surfaceTexture(); - _surfaceTexture!!.setDefaultBufferSize(width.toInt(), height.toInt()) + _surfaceTexture!!.setDefaultBufferSize(width, height) _surface = Surface(_surfaceTexture) if(!_surface!!.isValid) { - Log.e("ERR", "ERR", null) + result.error("SURFACE_INVALID", "Failed to create valid surface", null) + } else { + val nativeWindow = _lib.get_native_window_from_surface(_surface!! as Object, JNIEnv.CURRENT) + result.success(listOf(_surfaceTextureEntry!!.id(), null, Pointer.nativeValue(nativeWindow))) } - - val nativeWindow = _lib.get_native_window_from_surface(_surface!! as Object, JNIEnv.CURRENT) - - val resultList = listOf(_surfaceTextureEntry!!.id(), Pointer.nativeValue(nativeWindow), null, null ) - - result.success(resultList) } "getResourceLoaderWrapper" -> { - val resourceLoader = _lib.make_resource_loader(loadResourceWrapper, freeResourceWrapper, Pointer(0)) + val resourceLoader = _lib.make_resource_loader_wrapper_android(loadResourceWrapper, freeResourceWrapper, Pointer(0)) result.success(Pointer.nativeValue(resourceLoader)) } + "getDriverPlatform" -> { + result.success(null) + } + "getSharedContext" -> { + result.success(null) + } "getRenderCallback" -> { val renderCallbackFnPointer = _lib.make_render_callback_fn_pointer(RenderCallbackImpl(this)) result.success(listOf(Pointer.nativeValue(renderCallbackFnPointer), 0)) @@ -197,7 +200,7 @@ class FlutterFilamentPlugin: FlutterPlugin, MethodCallHandler, ActivityAware, Lo _surface!!.release(); _surfaceTextureEntry!!.release(); _surface = null - _surfaceTextureEntry = null + _surfaceTextureEntry = null result.success(true) } else -> { diff --git a/ios/.gitignore b/thermion_flutter/thermion_flutter/ios/.gitignore similarity index 100% rename from ios/.gitignore rename to thermion_flutter/thermion_flutter/ios/.gitignore diff --git a/thermion_flutter/thermion_flutter/ios/Assets/.gitkeep b/thermion_flutter/thermion_flutter/ios/Assets/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/thermion_flutter/thermion_flutter/ios/Classes/ResourceBuffer.c b/thermion_flutter/thermion_flutter/ios/Classes/ResourceBuffer.c new file mode 100644 index 00000000..caf1ca6f --- /dev/null +++ b/thermion_flutter/thermion_flutter/ios/Classes/ResourceBuffer.c @@ -0,0 +1,10 @@ +#include "ResourceBuffer.hpp" + +ResourceLoaderWrapper *make_resource_loader(LoadFilamentResourceFromOwner loadFn, FreeFilamentResourceFromOwner freeFn, void *const owner) +{ + ResourceLoaderWrapper *rlw = (ResourceLoaderWrapper *)malloc(sizeof(ResourceLoaderWrapper)); + rlw->loadFromOwner = loadFn; + rlw->freeFromOwner = freeFn; + rlw->owner = owner; + return rlw; +} diff --git a/ios/Classes/SwiftPolyvoxFilamentPlugin.swift b/thermion_flutter/thermion_flutter/ios/Classes/SwiftThermionFlutterPlugin.swift similarity index 73% rename from ios/Classes/SwiftPolyvoxFilamentPlugin.swift rename to thermion_flutter/thermion_flutter/ios/Classes/SwiftThermionFlutterPlugin.swift index a93bec3b..d950a950 100644 --- a/ios/Classes/SwiftPolyvoxFilamentPlugin.swift +++ b/thermion_flutter/thermion_flutter/ios/Classes/SwiftThermionFlutterPlugin.swift @@ -2,30 +2,21 @@ import Flutter import UIKit import GLKit -public class SwiftFlutterFilamentPlugin: NSObject, FlutterPlugin, FlutterTexture { +public class SwiftThermionFlutterPlugin: NSObject, FlutterPlugin { var registrar : FlutterPluginRegistrar - var flutterTextureId: Int64? var registry: FlutterTextureRegistry - - var pixelBuffer: CVPixelBuffer?; - + var texture: ThermionFlutterTexture? + var createdAt = Date() - - var pixelBufferAttrs = [ - kCVPixelBufferPixelFormatTypeKey: NSNumber(value: kCVPixelFormatType_32BGRA), - kCVPixelBufferOpenGLCompatibilityKey: kCFBooleanTrue, - kCVPixelBufferOpenGLESCompatibilityKey: kCFBooleanTrue, - kCVPixelBufferIOSurfacePropertiesKey: [:] - ] as CFDictionary - + var resources:NSMutableDictionary = [:] static var messenger : FlutterBinaryMessenger? = nil; var loadResource : @convention(c) (UnsafePointer?, UnsafeMutableRawPointer?) -> ResourceBuffer = { uri, resourcesPtr in - let instance:SwiftFlutterFilamentPlugin = Unmanaged.fromOpaque(resourcesPtr!).takeUnretainedValue() + let instance:SwiftThermionFlutterPlugin = Unmanaged.fromOpaque(resourcesPtr!).takeUnretainedValue() let uriString = String(cString:uri!) @@ -121,31 +112,23 @@ public class SwiftFlutterFilamentPlugin: NSObject, FlutterPlugin, FlutterTexture } var freeResource : @convention(c) (ResourceBuffer,UnsafeMutableRawPointer?) -> () = { rbuf, resourcesPtr in - let instance:SwiftFlutterFilamentPlugin = Unmanaged.fromOpaque(resourcesPtr!).takeUnretainedValue() + let instance:SwiftThermionFlutterPlugin = Unmanaged.fromOpaque(resourcesPtr!).takeUnretainedValue() instance.resources.removeObject(forKey:rbuf.id) } var markTextureFrameAvailable : @convention(c) (UnsafeMutableRawPointer?) -> () = { instancePtr in - let instance:SwiftFlutterFilamentPlugin = Unmanaged.fromOpaque(instancePtr!).takeUnretainedValue() - instance.registry.textureFrameAvailable(instance.flutterTextureId!) - } - - public func copyPixelBuffer() -> Unmanaged? { - if(pixelBuffer == nil) { - return nil; + let instance:SwiftThermionFlutterPlugin = Unmanaged.fromOpaque(instancePtr!).takeUnretainedValue() + if(instance.texture != nil) { + instance.registry.textureFrameAvailable(instance.texture!.flutterTextureId) } - return Unmanaged.passRetained(pixelBuffer!); - } - - public func onTextureUnregistered(_ texture:FlutterTexture) { - print("Texture unregistered") } + public static func register(with registrar: FlutterPluginRegistrar) { let _messenger = registrar.messenger(); messenger = _messenger; let channel = FlutterMethodChannel(name: "app.polyvox.filament/event", binaryMessenger: _messenger) - let instance = SwiftFlutterFilamentPlugin(textureRegistry: registrar.textures(), registrar:registrar) + let instance = SwiftThermionFlutterPlugin(textureRegistry: registrar.textures(), registrar:registrar) registrar.addMethodCallDelegate(instance, channel: channel) } @@ -153,15 +136,6 @@ public class SwiftFlutterFilamentPlugin: NSObject, FlutterPlugin, FlutterTexture self.registry = textureRegistry; self.registrar = registrar } - - private func createPixelBuffer(width:Int, height:Int) { - if(CVPixelBufferCreate(kCFAllocatorDefault, Int(width), Int(height), - kCVPixelFormatType_32BGRA, pixelBufferAttrs, &pixelBuffer) != kCVReturnSuccess) { - print("Error allocating pixel buffer") - } - self.flutterTextureId = self.registry.register(self) - } - public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { let methodName = call.method; @@ -173,22 +147,26 @@ public class SwiftFlutterFilamentPlugin: NSObject, FlutterPlugin, FlutterTexture let renderCallback = markTextureFrameAvailable result([ unsafeBitCast(renderCallback, to:Int64.self), unsafeBitCast(Unmanaged.passUnretained(self), to:UInt64.self)]) + case "getDriverPlatform": + result(nil) + case "getSharedContext": + result(nil) case "createTexture": - let args = call.arguments as! Array - createPixelBuffer(width:Int(args[0]), height:Int(args[1])) - let pixelBufferPtr = unsafeBitCast(pixelBuffer!, to:UnsafeRawPointer.self) + let args = call.arguments as! [Any] + let width = args[0] as! Int64 + let height = args[1] as! Int64 + + self.texture = ThermionFlutterTexture(width: width, height: height, registry: registry) + let pixelBufferPtr = unsafeBitCast(self.texture!.pixelBuffer, to:UnsafeRawPointer.self) let pixelBufferAddress = Int(bitPattern:pixelBufferPtr); - result([self.flutterTextureId, pixelBufferAddress, nil, nil]) + + result([self.texture!.flutterTextureId as Any, nil, pixelBufferAddress]) case "destroyTexture": - if(self.flutterTextureId != nil) { - self.registry.unregisterTexture(self.flutterTextureId!) - } - self.flutterTextureId = nil - self.pixelBuffer = nil + let texture = self.texture + self.texture = nil + texture?.destroy() + result(true) - case "dummy": - ios_dummy() - ios_dummy_ffi() default: result(FlutterMethodNotImplemented) } diff --git a/thermion_flutter/thermion_flutter/ios/Classes/ThermionFlutterTexture.swift b/thermion_flutter/thermion_flutter/ios/Classes/ThermionFlutterTexture.swift new file mode 100644 index 00000000..a9af79fc --- /dev/null +++ b/thermion_flutter/thermion_flutter/ios/Classes/ThermionFlutterTexture.swift @@ -0,0 +1,48 @@ +import Foundation +import GLKit +import Flutter + +public class ThermionFlutterTexture : NSObject, FlutterTexture { + + public var pixelBuffer: CVPixelBuffer? + + var pixelBufferAttrs = [ + kCVPixelBufferPixelFormatTypeKey: NSNumber(value: kCVPixelFormatType_32BGRA), + kCVPixelBufferOpenGLCompatibilityKey: kCFBooleanTrue, + kCVPixelBufferOpenGLESCompatibilityKey: kCFBooleanTrue, + kCVPixelBufferIOSurfacePropertiesKey: [:] + ] as CFDictionary + + var flutterTextureId: Int64 = -1 + var registry: FlutterTextureRegistry? + + init(width:Int64, height:Int64, registry:FlutterTextureRegistry) { + self.registry = registry + + super.init() + + if(CVPixelBufferCreate(kCFAllocatorDefault, Int(width), Int(height), + kCVPixelFormatType_32BGRA, pixelBufferAttrs, &pixelBuffer) != kCVReturnSuccess) { + print("Error allocating pixel buffer") + } else { + self.flutterTextureId = registry.register(self) + } + } + + public func copyPixelBuffer() -> Unmanaged? { + return Unmanaged.passRetained(pixelBuffer!); + } + + public func onTextureUnregistered(_ texture:FlutterTexture) { + print("Texture unregistered") + } + + public func destroy() { + if(self.flutterTextureId != -1) { + self.registry!.unregisterTexture(self.flutterTextureId) + } + + self.pixelBuffer = nil + } + +} diff --git a/thermion_flutter/thermion_flutter/ios/include/ResourceBuffer.hpp b/thermion_flutter/thermion_flutter/ios/include/ResourceBuffer.hpp new file mode 100644 index 00000000..97822546 --- /dev/null +++ b/thermion_flutter/thermion_flutter/ios/include/ResourceBuffer.hpp @@ -0,0 +1,91 @@ +#ifndef RESOURCE_BUFFER_H +#define RESOURCE_BUFFER_H + +#include +#include + +// +// A ResourceBuffer is a unified interface for working with +// binary assets across various platforms. +// This is simply: +// 1) a pointer to some data +// 2) the length of the data +// 3) an ID that can be passed back to the native platform to release the underlying asset when needed. +// +struct ResourceBuffer +{ + const void *const data; + const int32_t size; + const int32_t id; +}; + +typedef struct ResourceBuffer ResourceBuffer; +typedef ResourceBuffer (*LoadFilamentResource)(const char *uri); +typedef ResourceBuffer (*LoadFilamentResourceFromOwner)(const char *const, void *const owner); +typedef void (*FreeFilamentResource)(ResourceBuffer); +typedef void (*FreeFilamentResourceFromOwner)(ResourceBuffer, void *const owner); + +struct ResourceLoaderWrapper +{ + LoadFilamentResource loadResource; + FreeFilamentResource freeResource; + LoadFilamentResourceFromOwner loadFromOwner; + FreeFilamentResourceFromOwner freeFromOwner; + void *owner; +}; +typedef struct ResourceLoaderWrapper ResourceLoaderWrapper; + + +#if defined(__cplusplus) + +namespace thermion_filament { + +struct ResourceLoaderWrapperImpl : public ResourceLoaderWrapper +{ + + ResourceLoaderWrapperImpl(LoadFilamentResource loader, FreeFilamentResource freeResource) + { + loadFromOwner = nullptr; + freeFromOwner = nullptr; + loadResource = loader; + freeResource = freeResource; + owner = nullptr; + } + + ResourceLoaderWrapperImpl(LoadFilamentResourceFromOwner loader, FreeFilamentResourceFromOwner freeResource, void * owner) + { + loadResource = nullptr; + freeResource = nullptr; + loadFromOwner = loader; + freeFromOwner = freeResource; + owner = owner; + } + + ResourceBuffer load(const char *uri) const + { + if (loadFromOwner) + { + auto rb = loadFromOwner(uri, owner); + return rb; + } + auto rb = loadResource(uri); + return rb; + } + + void free(ResourceBuffer rb) const + { + if (freeFromOwner) + { + freeFromOwner(rb, owner); + } + else + { + freeResource(rb); + } + } +}; + +} +#endif + +#endif diff --git a/thermion_flutter/thermion_flutter/ios/include/SwiftThermionFlutterPlugin-Bridging-Header.h b/thermion_flutter/thermion_flutter/ios/include/SwiftThermionFlutterPlugin-Bridging-Header.h new file mode 100644 index 00000000..96ec1fc8 --- /dev/null +++ b/thermion_flutter/thermion_flutter/ios/include/SwiftThermionFlutterPlugin-Bridging-Header.h @@ -0,0 +1,19 @@ +#ifndef SwiftThermionFlutterPlugin_Bridging_Header_h +#define SwiftThermionFlutterPlugin_Bridging_Header_h + +#include + +#include "ResourceBuffer.hpp" + +ResourceLoaderWrapper *make_resource_loader(LoadFilamentResourceFromOwner loadFn, FreeFilamentResourceFromOwner freeFn, void *const owner); + +// ResourceLoaderWrapper *make_resource_loader(LoadFilamentResourceFromOwner loadFn, FreeFilamentResourceFromOwner freeFn, void *const owner) +// { +// ResourceLoaderWrapper *rlw = (ResourceLoaderWrapper *)malloc(sizeof(ResourceLoaderWrapper)); +// rlw->loadFromOwner = loadFn; +// rlw->freeFromOwner = freeFn; +// rlw->owner = owner; +// return rlw; +// } + +#endif \ No newline at end of file diff --git a/thermion_flutter/thermion_flutter/ios/thermion_flutter.podspec b/thermion_flutter/thermion_flutter/ios/thermion_flutter.podspec new file mode 100644 index 00000000..549abac6 --- /dev/null +++ b/thermion_flutter/thermion_flutter/ios/thermion_flutter.podspec @@ -0,0 +1,34 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint thermion_flutter.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'thermion_flutter' + s.version = '0.0.1' + s.summary = 'A new flutter plugin project.' + s.description = <<-DESC +A new flutter plugin project. + DESC + s.homepage = 'http://example.com' + s.license = { :file => '../LICENSE' } + s.author = { 'Your Company' => 'email@example.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/*', 'include/SwiftThermionFlutterPlugin-Bridging-Header.h','include/ResourceBuffer.hpp', 'src/ResourceBuffer.c' + s.public_header_files = 'include/SwiftThermionFlutterPlugin-Bridging-Header.h', 'include/ResourceBuffer.hpp' + s.dependency 'Flutter' + s.platform = :ios, '13.0' + s.static_framework = true + s.user_target_xcconfig = { + 'DEFINES_MODULE' => 'YES', + 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386', + "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", + 'OTHER_CFLAGS' => '"-fvisibility=default" "$(inherited)"', + } + + s.pod_target_xcconfig = { + 'DEFINES_MODULE' => 'YES', + 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386', + } + + s.swift_version = '5.0' +end diff --git a/thermion_flutter/thermion_flutter/lib/thermion/thermion_flutter_plugin.dart b/thermion_flutter/thermion_flutter/lib/thermion/thermion_flutter_plugin.dart new file mode 100644 index 00000000..9ff1e327 --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/thermion_flutter_plugin.dart @@ -0,0 +1,103 @@ +import 'dart:async'; +import 'dart:ui'; +import 'package:thermion_dart/thermion_dart.dart'; +import 'package:flutter/widgets.dart'; +import 'package:thermion_flutter_platform_interface/thermion_flutter_platform_interface.dart'; +import 'package:thermion_flutter_platform_interface/thermion_flutter_texture.dart'; + +/// +/// Handles all platform-specific initialization work necessary to create a +/// backing rendering surface in a Flutter application. +/// Instantiates/wraps a [ThermionViewer], +/// +class ThermionFlutterPlugin { + ThermionViewer get _viewer => ThermionFlutterPlatform.instance.viewer; + + bool _wasRenderingOnInactive = false; + + void _handleStateChange(AppLifecycleState state) async { + await initialized; + switch (state) { + case AppLifecycleState.detached: + print("Detached"); + if (!_wasRenderingOnInactive) { + _wasRenderingOnInactive = _viewer.rendering; + } + await _viewer.setRendering(false); + break; + case AppLifecycleState.hidden: + print("Hidden"); + if (!_wasRenderingOnInactive) { + _wasRenderingOnInactive = _viewer.rendering; + } + await _viewer.setRendering(false); + break; + case AppLifecycleState.inactive: + print("Inactive"); + if (!_wasRenderingOnInactive) { + _wasRenderingOnInactive = _viewer.rendering; + } + // on Windows in particular, restoring a window after minimizing stalls the renderer (and the whole application) for a considerable length of time. + // disabling rendering on minimize seems to fix the issue (so I wonder if there's some kind of command buffer that's filling up while the window is minimized). + await _viewer.setRendering(false); + break; + case AppLifecycleState.paused: + print("Paused"); + if (!_wasRenderingOnInactive) { + _wasRenderingOnInactive = _viewer.rendering; + } + await _viewer.setRendering(false); + break; + case AppLifecycleState.resumed: + print("Resumed"); + await _viewer.setRendering(_wasRenderingOnInactive); + break; + } + } + + AppLifecycleListener? _appLifecycleListener; + + final _initialized = Completer(); + Future get initialized => _initialized.future; + + bool _initializing = false; + + Future initialize({String? uberArchivePath}) async { + _initializing = true; + if (_initialized.isCompleted) { + return ThermionFlutterPlatform.instance.viewer; + } + await ThermionFlutterPlatform.instance + .initialize(uberArchivePath: uberArchivePath); + + _appLifecycleListener = AppLifecycleListener( + onStateChange: _handleStateChange, + ); + _viewer.initialized; + _initialized.complete(true); + _initializing = false; + return ThermionFlutterPlatform.instance.viewer; + } + + Future createTexture( + int width, int height, int offsetLeft, int offsetRight) async { + return ThermionFlutterPlatform.instance + .createTexture(width, height, offsetLeft, offsetRight); + } + + Future destroyTexture(ThermionFlutterTexture texture) async { + return ThermionFlutterPlatform.instance.destroyTexture(texture); + } + + @override + Future resizeTexture(ThermionFlutterTexture texture, + int width, int height, int offsetLeft, int offsetRight) async { + return ThermionFlutterPlatform.instance + .resizeTexture(texture, width, height, offsetLeft, offsetRight); + } + + void dispose() { + ThermionFlutterPlatform.instance.dispose(); + _appLifecycleListener?.dispose(); + } +} diff --git a/thermion_flutter/thermion_flutter/lib/thermion/utils/camera_orientation.dart b/thermion_flutter/thermion_flutter/lib/thermion/utils/camera_orientation.dart new file mode 100644 index 00000000..3e800836 --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/utils/camera_orientation.dart @@ -0,0 +1,15 @@ +import 'package:vector_math/vector_math_64.dart' as v; + +class CameraOrientation { + v.Vector3 position = v.Vector3(0, 0, 0); + + var rotationX = 0.0; + var rotationY = 0.0; + var rotationZ = 0.0; + + v.Quaternion compose() { + return v.Quaternion.axisAngle(v.Vector3(0, 0, 1), rotationZ) * + v.Quaternion.axisAngle(v.Vector3(0, 1, 0), rotationY) * + v.Quaternion.axisAngle(v.Vector3(1, 0, 0), rotationX); + } +} diff --git a/thermion_flutter/thermion_flutter/lib/thermion/utils/hardware_keyboard_listener.dart b/thermion_flutter/thermion_flutter/lib/thermion/utils/hardware_keyboard_listener.dart new file mode 100644 index 00000000..25cade87 --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/utils/hardware_keyboard_listener.dart @@ -0,0 +1,60 @@ +import 'package:thermion_dart/thermion_dart/entities/entity_transform_controller.dart'; +import 'package:flutter/services.dart'; + +class HardwareKeyboardListener { + final EntityTransformController _controller; + var _listening = true; + HardwareKeyboardListener(this._controller) { + // Get the global handler. + final KeyMessageHandler? existing = + ServicesBinding.instance.keyEventManager.keyMessageHandler; + // The handler is guaranteed non-null since + // `FallbackKeyEventRegistrar.instance` is only called during + // `Focus.onFocusChange`, at which time `ServicesBinding.instance` must + // have been called somewhere. + assert(existing != null); + // Assign the global handler with a patched handler. + ServicesBinding.instance.keyEventManager.keyMessageHandler = (keyMessage) { + if (keyMessage.rawEvent == null) { + return false; + } + if (!_listening) { + return false; + } + var event = keyMessage.rawEvent!; + switch (event.logicalKey) { + case LogicalKeyboardKey.escape: + _listening = false; + break; + case LogicalKeyboardKey.keyW: + (event is RawKeyDownEvent) + ? _controller.forwardPressed() + : _controller.forwardReleased(); + break; + case LogicalKeyboardKey.keyA: + event is RawKeyDownEvent + ? _controller.strafeLeftPressed() + : _controller.strafeLeftReleased(); + break; + case LogicalKeyboardKey.keyS: + event is RawKeyDownEvent + ? _controller.backPressed() + : _controller.backReleased(); + break; + case LogicalKeyboardKey.keyD: + event is RawKeyDownEvent + ? _controller.strafeRightPressed() + : _controller.strafeRightReleased(); + break; + default: + break; + } + return true; + }; + } + + void dispose() { + ServicesBinding.instance.keyEventManager.keyMessageHandler = null; + _controller.dispose(); + } +} diff --git a/thermion_flutter/thermion_flutter/lib/thermion/utils/hardware_keyboard_poll.dart b/thermion_flutter/thermion_flutter/lib/thermion/utils/hardware_keyboard_poll.dart new file mode 100644 index 00000000..f73afe43 --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/utils/hardware_keyboard_poll.dart @@ -0,0 +1,39 @@ +import 'dart:async'; +import 'package:thermion_dart/thermion_dart/entities/entity_transform_controller.dart'; +import 'package:flutter/services.dart'; + +class HardwareKeyboardPoll { + final EntityTransformController _controller; + late Timer _timer; + HardwareKeyboardPoll(this._controller) { + _timer = Timer.periodic(const Duration(milliseconds: 16), (_) { + if (RawKeyboard.instance.keysPressed.contains(LogicalKeyboardKey.keyW)) { + _controller.forwardPressed(); + } else { + _controller.forwardReleased(); + } + + if (RawKeyboard.instance.keysPressed.contains(LogicalKeyboardKey.keyS)) { + _controller.backPressed(); + } else { + _controller.backReleased(); + } + + if (RawKeyboard.instance.keysPressed.contains(LogicalKeyboardKey.keyA)) { + _controller.strafeLeftPressed(); + } else { + _controller.strafeLeftReleased(); + } + + if (RawKeyboard.instance.keysPressed.contains(LogicalKeyboardKey.keyD)) { + _controller.strafeRightPressed(); + } else { + _controller.strafeRightReleased(); + } + }); + } + + void dispose() { + _timer.cancel(); + } +} diff --git a/thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/camera_options_widget.dart b/thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/camera_options_widget.dart new file mode 100644 index 00000000..b962c674 --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/camera_options_widget.dart @@ -0,0 +1,233 @@ + +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart';import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import '../../utils/camera_orientation.dart'; + +import 'dart:math'; +import 'package:vector_math/vector_math_64.dart' as v64; + +class CameraOptionsWidget extends StatefulWidget { + final ThermionViewer controller; + final CameraOrientation cameraOrientation; + final List<({ThermionEntity entity, String name})> cameras; + + CameraOptionsWidget( + {super.key, + required this.controller, + required this.cameras, + required this.cameraOrientation}) {} + + @override + State createState() => _CameraOptionsWidgetState(); +} + +class _CameraOptionsWidgetState extends State { + final _apertureController = TextEditingController(); + final _speedController = TextEditingController(); + final _sensitivityController = TextEditingController(); + + @override + void initState() { + _apertureController.text = "0"; + _speedController.text = "0"; + _sensitivityController.text = "0"; + + _apertureController.addListener(() { + _set(); + setState(() {}); + }); + _speedController.addListener(() { + _set(); + setState(() {}); + }); + _sensitivityController.addListener(() { + _set(); + setState(() {}); + }); + + super.initState(); + } + + @override + void didUpdateWidget(CameraOptionsWidget oldWidget) { + super.didUpdateWidget(oldWidget); + if (oldWidget.cameras.length != widget.cameras.length) { + setState(() {}); + } + } + + Future _set() async { + await widget.controller.setCameraExposure( + double.parse(_apertureController.text), + double.parse(_speedController.text), + double.parse(_sensitivityController.text)); + await widget.controller.setCameraPosition( + widget.cameraOrientation.position.x, + widget.cameraOrientation.position.y, + widget.cameraOrientation.position.z); + var rotation = widget.cameraOrientation.compose(); + await widget.controller.setCameraRotation(rotation); + print( + "Camera : ${widget.cameraOrientation.position} ${widget.cameraOrientation.rotationX} ${widget.cameraOrientation.rotationY} ${widget.cameraOrientation.rotationZ}"); + setState(() {}); + } + + double _bloom = 0.0; + + double _focalLength = 26.0; + @override + Widget build(BuildContext context) { + return Theme( + data: ThemeData(platform: TargetPlatform.android), + child: Container( + decoration: BoxDecoration(color: Colors.white.withOpacity(0.5)), + child: SliderTheme( + data: SliderThemeData( + showValueIndicator: ShowValueIndicator.always, + valueIndicatorTextStyle: TextStyle(color: Colors.black)), + child: Column(mainAxisSize: MainAxisSize.min, children: [ + Row(children: [ + Text("Aperture"), + Expanded( + child: TextField( + controller: _apertureController, + )), + Text("Speed"), + Expanded(child: TextField(controller: _speedController)), + Text("Sensitivity"), + Expanded( + child: TextField(controller: _sensitivityController)), + ]), + Row(children: [ + Text("Bloom: ${_bloom.toStringAsFixed(2)}"), + Slider( + value: _bloom, + min: 0.0, + max: 1.0, + onChanged: (v) async { + setState(() { + _bloom = v; + }); + await widget.controller.setBloom(_bloom); + }) + ]), + Row(children: [ + Text("Focal length"), + Slider( + label: _focalLength.toString(), + value: _focalLength, + min: 1.0, + max: 100.0, + onChanged: (v) async { + setState(() { + _focalLength = v; + }); + await widget.controller + .setCameraFocalLength(_focalLength); + }) + ]), + Row(children: [ + Text("X"), + Slider( + label: widget.cameraOrientation.position.x.toString(), + value: widget.cameraOrientation.position.x, + min: -100.0, + max: 100.0, + onChanged: (v) async { + setState(() { + widget.cameraOrientation.position.x = v; + }); + _set(); + }) + ]), + Row(children: [ + Text("Y"), + Slider( + label: widget.cameraOrientation.position.y.toString(), + value: widget.cameraOrientation.position.y, + min: -100.0, + max: 100.0, + onChanged: (v) async { + setState(() { + widget.cameraOrientation.position.y = v; + }); + _set(); + }) + ]), + Row(children: [ + Text("Z"), + Slider( + label: widget.cameraOrientation.position.z.toString(), + value: widget.cameraOrientation.position.z, + min: -100.0, + max: 100.0, + onChanged: (v) async { + setState(() { + widget.cameraOrientation.position.z = v; + }); + _set(); + }) + ]), + Row(children: [ + Text("ROTX"), + Slider( + label: widget.cameraOrientation.rotationX.toString(), + value: widget.cameraOrientation.rotationX, + min: -pi, + max: pi, + onChanged: (value) async { + setState(() { + widget.cameraOrientation.rotationX = value; + }); + _set(); + }) + ]), + Row(children: [ + Text("ROTY"), + Slider( + label: widget.cameraOrientation.rotationY.toString(), + value: widget.cameraOrientation.rotationY, + min: -pi, + max: pi, + onChanged: (v) async { + setState(() { + widget.cameraOrientation.rotationY = v; + }); + _set(); + }), + ]), + Row(children: [ + Text("ROTZ"), + Slider( + label: widget.cameraOrientation.rotationZ.toString(), + value: widget.cameraOrientation.rotationZ, + min: -pi, + max: pi, + onChanged: (v) async { + setState(() { + widget.cameraOrientation.rotationZ = v; + }); + _set(); + }) + ]), + Wrap( + children: [ + GestureDetector( + child: Text("Main "), + onTap: () { + widget.controller.setMainCamera(); + }, + ), + ...widget.cameras + .map((camera) => GestureDetector( + onTap: () { + widget.controller + .setCamera(camera.entity, camera.name); + }, + child: Text(camera.name))) + .toList() + ], + ) + ])))); + } +} diff --git a/thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/entity_controller_mouse_widget.dart b/thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/entity_controller_mouse_widget.dart new file mode 100644 index 00000000..edb3726a --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/entity_controller_mouse_widget.dart @@ -0,0 +1,52 @@ +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; + +import 'dart:async'; + +import 'package:thermion_dart/thermion_dart/entities/entity_transform_controller.dart'; + +/// +/// A widget that translates mouse gestures to zoom/pan/rotate actions. +/// +class EntityTransformMouseControllerWidget extends StatelessWidget { + final EntityTransformController? transformController; + final Widget? child; + + EntityTransformMouseControllerWidget( + {Key? key, required this.transformController, this.child}) + : super(key: key); + + Timer? _timer; + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (BuildContext context, BoxConstraints constraints) { + return Listener( + onPointerDown: (event) { + if (kPrimaryMouseButton & event.buttons != 0) { + transformController?.mouse1Down(); + } + }, + onPointerUp: (event) { + if (kPrimaryMouseButton & event.buttons != 0) { + transformController?.mouse1Up(); + } + }, + onPointerHover: (event) { + _timer?.cancel(); + if (event.position.dx < 10) { + _timer = Timer.periodic(const Duration(milliseconds: 17), (_) { + transformController?.look(-30); + }); + } else if (event.position.dx > constraints.maxWidth - 10) { + _timer = Timer.periodic(const Duration(milliseconds: 17), (_) { + transformController?.look(30); + }); + } else { + transformController?.look(event.delta.dx); + } + }, + child: child); + }); + } +} diff --git a/thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/gestures/filament_gesture_detector.dart b/thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/gestures/filament_gesture_detector.dart new file mode 100644 index 00000000..a02b19b3 --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/gestures/filament_gesture_detector.dart @@ -0,0 +1,91 @@ +import 'dart:io'; + +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'filament_gesture_detector_desktop.dart'; +import 'filament_gesture_detector_mobile.dart'; + +enum GestureType { rotateCamera, panCamera, panBackground } + +/// +/// A widget that translates finger/mouse gestures to zoom/pan/rotate actions. +/// +class FilamentGestureDetector extends StatelessWidget { + /// + /// The content to display below the gesture detector/listener widget. + /// This will usually be a ThermionWidget (so you can navigate by directly interacting with the viewport), but this is not necessary. + /// It is equally possible to render the viewport/gesture controls elsewhere in the widget hierarchy. The only requirement is that they share the same [FilamentController]. + /// + final Widget? child; + + /// + /// The [controller] attached to the [ThermionWidget] you wish to control. + /// + final ThermionViewer controller; + + /// + /// If true, an overlay will be shown with buttons to toggle whether pointer movements are interpreted as: + /// 1) rotate or a pan (mobile only), + /// 2) moving the camera or the background image (TODO). + /// + final bool showControlOverlay; + + /// + /// If false, gestures will not manipulate the active camera. + /// + final bool enableCamera; + + /// + /// If false, pointer down events will not trigger hit-testing (picking). + /// + final bool enablePicking; + + final void Function(ScaleStartDetails)? onScaleStart; + final void Function(ScaleUpdateDetails)? onScaleUpdate; + final void Function(ScaleEndDetails)? onScaleEnd; + + const FilamentGestureDetector( + {Key? key, + required this.controller, + this.child, + this.showControlOverlay = false, + this.enableCamera = true, + this.enablePicking = true, + this.onScaleStart, + this.onScaleUpdate, + this.onScaleEnd}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return FutureBuilder( + future: controller.initialized, + builder: (_, initialized) { + if (initialized.data != true) { + return child ?? Container(); + } + if (kIsWeb || Platform.isLinux || + Platform.isWindows || + Platform.isMacOS) { + return FilamentGestureDetectorDesktop( + controller: controller, + child: child, + showControlOverlay: showControlOverlay, + enableCamera: enableCamera, + enablePicking: enablePicking, + ); + } else { + return FilamentGestureDetectorMobile( + controller: controller, + child: child, + showControlOverlay: showControlOverlay, + enableCamera: enableCamera, + enablePicking: enablePicking, + onScaleStart: onScaleStart, + onScaleUpdate: onScaleUpdate, + onScaleEnd: onScaleEnd); + } + }); + } +} diff --git a/lib/widgets/filament_gesture_detector_desktop.dart b/thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/gestures/filament_gesture_detector_desktop.dart similarity index 65% rename from lib/widgets/filament_gesture_detector_desktop.dart rename to thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/gestures/filament_gesture_detector_desktop.dart index 40157e32..dd511c3a 100644 --- a/lib/widgets/filament_gesture_detector_desktop.dart +++ b/thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/gestures/filament_gesture_detector_desktop.dart @@ -1,8 +1,8 @@ import 'dart:async'; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import '../filament_controller.dart'; /// /// A widget that translates finger/mouse gestures to zoom/pan/rotate actions. @@ -10,15 +10,15 @@ import '../filament_controller.dart'; class FilamentGestureDetectorDesktop extends StatefulWidget { /// /// The content to display below the gesture detector/listener widget. - /// This will usually be a FilamentWidget (so you can navigate by directly interacting with the viewport), but this is not necessary. + /// This will usually be a ThermionWidget (so you can navigate by directly interacting with the viewport), but this is not necessary. /// It is equally possible to render the viewport/gesture controls elsewhere in the widget hierarchy. The only requirement is that they share the same [FilamentController]. /// final Widget? child; /// - /// The [controller] attached to the [FilamentWidget] you wish to control. + /// The [controller] attached to the [ThermionWidget] you wish to control. /// - final FilamentController controller; + final ThermionViewer controller; /// /// If true, an overlay will be shown with buttons to toggle whether pointer movements are interpreted as: @@ -28,16 +28,22 @@ class FilamentGestureDetectorDesktop extends StatefulWidget { final bool showControlOverlay; /// - /// If false, all gestures will be ignored. + /// If false, gestures will not manipulate the active camera. /// - final bool listenerEnabled; + final bool enableCamera; + + /// + /// If false, pointer down events will not trigger hit-testing (picking). + /// + final bool enablePicking; const FilamentGestureDetectorDesktop( {Key? key, required this.controller, this.child, this.showControlOverlay = false, - this.listenerEnabled = true}) + this.enableCamera = true, + this.enablePicking = true}) : super(key: key); @override @@ -54,10 +60,19 @@ class _FilamentGestureDetectorDesktopState bool _pointerMoving = false; + AbstractGizmo? _gizmo; + + @override + void initState() { + super.initState(); + _gizmo = widget.controller.gizmo; + } + @override void didUpdateWidget(FilamentGestureDetectorDesktop oldWidget) { if (widget.showControlOverlay != oldWidget.showControlOverlay || - widget.listenerEnabled != oldWidget.listenerEnabled) { + widget.enableCamera != oldWidget.enableCamera || + widget.enablePicking != oldWidget.enablePicking) { setState(() {}); } @@ -84,15 +99,26 @@ class _FilamentGestureDetectorDesktopState }); } + Timer? _pickTimer; + @override Widget build(BuildContext context) { - if (!widget.listenerEnabled) { - return widget.child ?? Container(); - } return Listener( + // onPointerHover: (event) async { + // if (_gizmo.isActive) { + // return; + // } + // _pickTimer?.cancel(); + // _pickTimer = Timer(const Duration(milliseconds: 100), () async { + // widget.controller + // .pick(event.position.dx.toInt(), event.position.dy.toInt()); + // }); + // }, onPointerSignal: (PointerSignalEvent pointerSignal) async { if (pointerSignal is PointerScrollEvent) { - _zoom(pointerSignal); + if (widget.enableCamera) { + _zoom(pointerSignal); + } } else { throw Exception("TODO"); } @@ -100,28 +126,38 @@ class _FilamentGestureDetectorDesktopState onPointerPanZoomStart: (pzs) { throw Exception("TODO - is this a pinch zoom on laptop trackpad?"); }, - // ignore all pointer down events - // so we can wait to see if the pointer will be held/moved (interpreted as rotate/pan), - // or if this is a single mousedown event (interpreted as viewport pick) - onPointerDown: (d) async {}, + onPointerDown: (d) async { + if (_gizmo?.isActive == true) { + return; + } + if (d.buttons != kTertiaryButton && widget.enablePicking) { + widget.controller + .pick(d.localPosition.dx.toInt(), d.localPosition.dy.toInt()); + } + _pointerMoving = false; + }, // holding/moving the left mouse button is interpreted as a pan, middle mouse button as a rotate onPointerMove: (PointerMoveEvent d) async { + if (_gizmo?.isActive == true) { + _gizmo!.translate(d.delta.dx, d.delta.dy); + return; + } // if this is the first move event, we need to call rotateStart/panStart to set the first coordinates if (!_pointerMoving) { - if (d.buttons == kTertiaryButton) { + if (d.buttons == kTertiaryButton && widget.enableCamera) { widget.controller .rotateStart(d.localPosition.dx, d.localPosition.dy); - } else { + } else if (widget.enableCamera) { widget.controller .panStart(d.localPosition.dx, d.localPosition.dy); } } // set the _pointerMoving flag so we don't call rotateStart/panStart on future move events _pointerMoving = true; - if (d.buttons == kTertiaryButton) { + if (d.buttons == kTertiaryButton && widget.enableCamera) { widget.controller .rotateUpdate(d.localPosition.dx, d.localPosition.dy); - } else { + } else if (widget.enableCamera) { widget.controller.panUpdate(d.localPosition.dx, d.localPosition.dy); } }, @@ -130,14 +166,16 @@ class _FilamentGestureDetectorDesktopState // 2) if _pointerMoving is false, this is interpreted as a pick // same applies to middle mouse button, but this is ignored as a pick onPointerUp: (PointerUpEvent d) async { - if (d.buttons == kTertiaryButton) { + if (_gizmo?.isActive == true) { + _gizmo!.reset(); + return; + } + + if (d.buttons == kTertiaryButton && widget.enableCamera) { widget.controller.rotateEnd(); } else { - if (_pointerMoving) { + if (_pointerMoving && widget.enableCamera) { widget.controller.panEnd(); - } else { - widget.controller - .pick(d.localPosition.dx.toInt(), d.localPosition.dy.toInt()); } } _pointerMoving = false; diff --git a/lib/widgets/filament_gesture_detector_mobile.dart b/thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/gestures/filament_gesture_detector_mobile.dart similarity index 74% rename from lib/widgets/filament_gesture_detector_mobile.dart rename to thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/gestures/filament_gesture_detector_mobile.dart index 117bdc9f..9d15643a 100644 --- a/lib/widgets/filament_gesture_detector_mobile.dart +++ b/thermion_flutter/thermion_flutter/lib/thermion/widgets/camera/gestures/filament_gesture_detector_mobile.dart @@ -1,6 +1,6 @@ import 'dart:async'; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; import 'package:flutter/material.dart'; -import '../filament_controller.dart'; enum GestureType { rotateCamera, panCamera, panBackground } @@ -10,15 +10,15 @@ enum GestureType { rotateCamera, panCamera, panBackground } class FilamentGestureDetectorMobile extends StatefulWidget { /// /// The content to display below the gesture detector/listener widget. - /// This will usually be a FilamentWidget (so you can navigate by directly interacting with the viewport), but this is not necessary. + /// This will usually be a ThermionWidget (so you can navigate by directly interacting with the viewport), but this is not necessary. /// It is equally possible to render the viewport/gesture controls elsewhere in the widget hierarchy. The only requirement is that they share the same [FilamentController]. /// final Widget? child; /// - /// The [controller] attached to the [FilamentWidget] you wish to control. + /// The [controller] attached to the [ThermionWidget] you wish to control. /// - final FilamentController controller; + final ThermionViewer controller; /// /// If true, an overlay will be shown with buttons to toggle whether pointer movements are interpreted as: @@ -28,18 +28,31 @@ class FilamentGestureDetectorMobile extends StatefulWidget { final bool showControlOverlay; /// - /// If false, all gestures will be ignored. + /// If false, gestures will not manipulate the active camera. /// - final bool listenerEnabled; + final bool enableCamera; + + /// + /// If false, pointer down events will not trigger hit-testing (picking). + /// + final bool enablePicking; final double zoomDelta; + final void Function(ScaleStartDetails)? onScaleStart; + final void Function(ScaleUpdateDetails)? onScaleUpdate; + final void Function(ScaleEndDetails)? onScaleEnd; + const FilamentGestureDetectorMobile( {Key? key, required this.controller, this.child, this.showControlOverlay = false, - this.listenerEnabled = true, + this.enableCamera = true, + this.enablePicking = true, + this.onScaleStart, + this.onScaleUpdate, + this.onScaleEnd, this.zoomDelta = 1}) : super(key: key); @@ -105,7 +118,8 @@ class _FilamentGestureDetectorMobileState @override void didUpdateWidget(FilamentGestureDetectorMobile oldWidget) { if (widget.showControlOverlay != oldWidget.showControlOverlay || - widget.listenerEnabled != oldWidget.listenerEnabled) { + widget.enableCamera != oldWidget.enableCamera || + widget.enablePicking != oldWidget.enablePicking) { setState(() {}); } @@ -117,29 +131,35 @@ class _FilamentGestureDetectorMobileState double _lastScale = 0; // pinch zoom on mobile - // couldn't find any equivalent for pointerCount in Listener so we use two widgets: - // - outer is a GestureDetector only for pinch zoom - // - inner is a Listener for all other gestures (including scroll zoom on desktop) + // couldn't find any equivalent for pointerCount in Listener (?) so we use a GestureDetector @override Widget build(BuildContext context) { - if (!widget.listenerEnabled) { - return widget.child ?? Container(); - } - return Stack(children: [ Positioned.fill( child: GestureDetector( - behavior: HitTestBehavior.opaque, + behavior: HitTestBehavior.translucent, + onTapDown: (d) { + if (!widget.enablePicking) { + return; + } + + widget.controller.pick( + d.globalPosition.dx.toInt(), d.globalPosition.dy.toInt()); + }, onDoubleTap: () { setState(() { _rotateOnPointerMove = !_rotateOnPointerMove; }); }, onScaleStart: (d) async { - if (d.pointerCount == 2) { + if (widget.onScaleStart != null) { + widget.onScaleStart!.call(d); + return; + } + if (d.pointerCount == 2 && widget.enableCamera) { _scaling = true; await widget.controller.zoomBegin(); - } else if (!_scaling) { + } else if (!_scaling && widget.enableCamera) { if (_rotateOnPointerMove) { widget.controller.rotateStart( d.localFocalPoint.dx, d.localFocalPoint.dy); @@ -150,7 +170,11 @@ class _FilamentGestureDetectorMobileState } }, onScaleUpdate: (ScaleUpdateDetails d) async { - if (d.pointerCount == 2) { + if (widget.onScaleUpdate != null) { + widget.onScaleUpdate!.call(d); + return; + } + if (d.pointerCount == 2 && widget.enableCamera) { if (d.horizontalScale != _lastScale) { widget.controller.zoomUpdate( d.localFocalPoint.dx, @@ -158,7 +182,7 @@ class _FilamentGestureDetectorMobileState d.horizontalScale > _lastScale ? 0.1 : -0.1); _lastScale = d.horizontalScale; } - } else if (!_scaling) { + } else if (!_scaling && widget.enableCamera) { if (_rotateOnPointerMove) { widget.controller .rotateUpdate(d.focalPoint.dx, d.focalPoint.dy); @@ -169,9 +193,14 @@ class _FilamentGestureDetectorMobileState } }, onScaleEnd: (d) async { - if (d.pointerCount == 2) { + if (widget.onScaleEnd != null) { + widget.onScaleEnd!.call(d); + return; + } + + if (d.pointerCount == 2 && widget.enableCamera) { widget.controller.zoomEnd(); - } else if (!_scaling) { + } else if (!_scaling && widget.enableCamera) { if (_rotateOnPointerMove) { widget.controller.rotateEnd(); } else { diff --git a/thermion_flutter/thermion_flutter/lib/thermion/widgets/debug/child_renderable_widget.dart b/thermion_flutter/thermion_flutter/lib/thermion/widgets/debug/child_renderable_widget.dart new file mode 100644 index 00000000..8cf047ab --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/widgets/debug/child_renderable_widget.dart @@ -0,0 +1,110 @@ +import 'package:animation_tools_dart/animation_tools_dart.dart'; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; + +import 'package:flutter/material.dart'; +import 'dart:math'; + +class ChildRenderableWidget extends StatelessWidget { + final ThermionViewer controller; + final ThermionEntity entity; + + const ChildRenderableWidget( + {super.key, required this.controller, required this.entity}); + + Widget _childRenderable(ThermionEntity childEntity) { + var name = controller.getNameForEntity(childEntity) ?? ""; + var names = controller.getMorphTargetNames(entity, childEntity); + + return FutureBuilder( + future: names, + builder: (_, morphTargetsSnapshot) { + if (!morphTargetsSnapshot.hasData) { + return Container(); + } + var morphTargets = morphTargetsSnapshot.data!; + + final menuChildren = []; + if (morphTargets.isEmpty) { + menuChildren.add(Text("None")); + } else { + for (int i = 0; i < 2; i++) { + var newWeights = List.filled(morphTargets.length, i.toDouble()); + menuChildren.add(MenuItemButton( + child: Text("Set to $i"), + onPressed: () async { + try { + await controller! + .setMorphTargetWeights(childEntity, newWeights); + } catch (err, st) { + print("Error setting morph target weights"); + print(err); + print(st); + } + })); + } + menuChildren.add(MenuItemButton( + child: Text("Animate all morph target from 0 to 1"), + onPressed: () async { + var morphData = MorphAnimationData( + List>.generate( + 120, + (i) => List.filled( + morphTargets.length, i / 120)), + morphTargets); + await controller!.setMorphAnimationData(entity, morphData, + targetMeshNames: [name]); + })); + menuChildren.addAll(morphTargets.map((t) => Text(t))); + } + return SubmenuButton(child: Text(name), menuChildren: menuChildren); + }); + } + + @override + Widget build(BuildContext context) { + return FutureBuilder( + future: controller!.getChildEntities(entity, true), + builder: (ctx, snapshot) { + if (!snapshot.hasData) { + return Container(); + } + + var children = snapshot.data!; + return SubmenuButton( + child: Text("Renderable entities"), + menuChildren: [ + MenuItemButton( + child: Text("Set children transforms to identity"), + onPressed: () async { + var childEntities = + await controller.getChildEntities(entity, true); + for (final child in childEntities) { + await controller.setTransform( + child, Matrix4.identity()); + } + }), + MenuItemButton( + child: Text("Set children transforms to 90/X"), + onPressed: () async { + var childEntities = + await controller.getChildEntities(entity, true); + for (final child in childEntities) { + await controller.setTransform( + child, Matrix4.rotationX(pi / 2)); + } + }), + MenuItemButton( + child: Text("Set children transforms to 90/Y"), + onPressed: () async { + var childEntities = + await controller.getChildEntities(entity, true); + for (final child in childEntities) { + await controller.setTransform( + child, Matrix4.rotationY(pi / 2)); + } + }), + ] + + children.map(_childRenderable).toList()); + }); + } +} diff --git a/thermion_flutter/thermion_flutter/lib/thermion/widgets/debug/entity_list_widget.dart b/thermion_flutter/thermion_flutter/lib/thermion/widgets/debug/entity_list_widget.dart new file mode 100644 index 00000000..9a660f47 --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/widgets/debug/entity_list_widget.dart @@ -0,0 +1,177 @@ +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; +import 'package:flutter/material.dart'; +import 'package:thermion_flutter/thermion/widgets/debug/child_renderable_widget.dart'; +import 'package:thermion_flutter/thermion/widgets/debug/skeleton_menu_item_widget.dart'; + +class EntityListWidget extends StatefulWidget { + final ThermionViewer? controller; + + const EntityListWidget({super.key, required this.controller}); + + @override + State createState() => _EntityListWidget(); +} + +class _EntityListWidget extends State { + @override + void didUpdateWidget(EntityListWidget oldWidget) { + super.didUpdateWidget(oldWidget); + } + + Widget _entity(ThermionEntity entity) { + return FutureBuilder( + future: widget.controller!.getAnimationNames(entity), + builder: (_, animations) { + if (animations.data == null) { + return Container(); + } + final menuController = MenuController(); + return Row(children: [ + Expanded( + child: GestureDetector( + onTap: () { + widget.controller!.scene.select(entity); + }, + child: Text(entity.toString(), + style: TextStyle( + fontWeight: + entity == widget.controller!.scene.selected + ? FontWeight.bold + : FontWeight.normal)))), + MenuAnchor( + controller: menuController, + child: Container( + color: Colors.transparent, + child: IconButton( + icon: const Icon( + Icons.arrow_drop_down, + color: Colors.black, + ), + onPressed: () { + menuController.open(); + }, + )), + menuChildren: [ + MenuItemButton( + child: const Text("Remove"), + onPressed: () async { + await widget.controller!.removeEntity(entity); + }), + MenuItemButton( + child: const Text("Transform to unit cube"), + onPressed: () async { + await widget.controller!.transformToUnitCube(entity); + }), + SubmenuButton( + child: const Text("Animations"), + menuChildren: animations.data! + .map((a) => SubmenuButton( + child: Text(a), + menuChildren: [ + MenuItemButton( + child: Text("Play"), + onPressed: () async { + await widget.controller! + .addAnimationComponent(entity); + widget.controller!.playAnimation(entity, + animations.data!.indexOf(a)); + }, + ), + MenuItemButton( + child: Text("Loop"), + onPressed: () async { + await widget.controller! + .addAnimationComponent(entity); + widget.controller!.playAnimation( + entity, animations.data!.indexOf(a), + loop: true); + }, + ), + MenuItemButton( + child: Text("Stop"), + onPressed: () async { + await widget.controller! + .addAnimationComponent(entity); + widget.controller!.stopAnimation( + entity, animations.data!.indexOf(a)); + }, + ) + ])) + .toList()), + ChildRenderableWidget( + controller: widget.controller!, entity: entity), + SkeletonMenuItemWidget( + controller: widget.controller!, entity: entity) + ]) + ]); + }); + } + + Widget _light(ThermionEntity entity) { + final controller = MenuController(); + return Row(children: [ + GestureDetector( + onTap: () { + widget.controller!.scene.select(entity); + }, + child: Container( + color: Colors.transparent, + child: Text("Light $entity", + style: TextStyle( + fontWeight: entity == widget.controller!.scene.selected + ? FontWeight.bold + : FontWeight.normal)))), + MenuAnchor( + controller: controller, + child: Container( + color: Colors.transparent, + child: IconButton( + icon: const Icon( + Icons.arrow_drop_down, + color: Colors.black, + ), + onPressed: () { + controller.open(); + }, + )), + menuChildren: [ + MenuItemButton( + child: const Text("Remove"), + onPressed: () async { + await widget.controller!.removeLight(entity); + }) + ]) + ]); + } + + @override + Widget build(BuildContext context) { + if (widget.controller == null) { + return Container(color: Colors.red); + } + return FutureBuilder( + future: widget.controller!.initialized, + builder: (_, snapshot) => snapshot.data != true + ? Container() + : StreamBuilder( + stream: widget.controller!.scene.onUpdated, + builder: (_, __) => Container( + padding: const EdgeInsets.symmetric( + horizontal: 30, vertical: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(30), + color: Colors.white.withOpacity(0.25), + ), + child: SingleChildScrollView( + child: Column( + // reverse: true, + children: widget.controller!.scene + .listLights() + .map(_light) + .followedBy(widget.controller!.scene + .listEntities() + .map(_entity)) + .cast() + .toList()))))); + } +} diff --git a/thermion_flutter/thermion_flutter/lib/thermion/widgets/debug/skeleton_menu_item_widget.dart b/thermion_flutter/thermion_flutter/lib/thermion/widgets/debug/skeleton_menu_item_widget.dart new file mode 100644 index 00000000..1c676310 --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/widgets/debug/skeleton_menu_item_widget.dart @@ -0,0 +1,422 @@ +import 'dart:math'; + +import 'package:thermion_dart/thermion_dart.dart'; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; +import 'package:animation_tools_dart/animation_tools_dart.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import 'package:vector_math/vector_math_64.dart'; + +class SkeletonMenuItemWidget extends StatelessWidget { + final ThermionViewer controller; + final ThermionEntity entity; + + const SkeletonMenuItemWidget( + {super.key, required this.controller, required this.entity}); + + void _addBoneAnimation(String bone) async { + await controller.addAnimationComponent(entity); + var numFrames = 120; + var animationData = List>.generate( + numFrames, + (frameNum) => [ + ( + rotation: Quaternion.axisAngle( + Vector3(1, 0, 0), (frameNum / 90) * 2 * pi), + translation: Vector3.zero() + ) + ]); + var animation = + BoneAnimationData([bone], animationData, space: Space.ParentWorldRotation); + await controller.addAnimationComponent(entity); + await controller.addBoneAnimation(entity, animation); + } + + @override + Widget build(BuildContext context) { + var boneNames = controller.getBoneNames(entity); + + return FutureBuilder( + future: boneNames, + builder: (_, boneNamesSnapshot) { + if (!boneNamesSnapshot.hasData) { + return Container(); + } + var boneNames = boneNamesSnapshot.data!; + if (boneNames.isEmpty) { + return Text("No bones"); + } + + return SubmenuButton( + menuChildren: [ + MenuItemButton( + onPressed: () async { + await controller.resetBones(entity); + }, + child: Text("Reset")), + MenuItemButton( + onPressed: () async { + await controller.resetBones(entity); + + var bone = await controller.getBone(entity, 1); + var frames = >[]; + for (int i = 0; i < 60; i++) { + var frame = []; + frame.add(( + rotation: + Quaternion.axisAngle( + Vector3(1, 0, 0), i/60 * pi/4) * + (Quaternion.axisAngle( + Vector3(0, 0, 1), i/60*-pi/4) + * + Quaternion.axisAngle( + Vector3(0, 1, 0), i/60 * pi/4) ), + translation: Vector3.zero() + )); + frames.add(frame); + } + + var animation = BoneAnimationData(["Bone.002"], frames, + space: Space.ParentWorldRotation); + await controller.addAnimationComponent(entity); + await controller.addBoneAnimation(entity, animation); + }, + child: Text("Test animation (parent space)")), + MenuItemButton( + onPressed: () async { + await controller.resetBones(entity); + + var bone = await controller.getBone(entity, 1); + + var frames = >[]; + for (int i = 0; i < 60; i++) { + var frame = []; + frame.add(( + rotation: Quaternion.axisAngle( + Vector3(0, 0, 1), (i / 60) * pi / 2), + translation: Vector3.zero() + )); + frames.add(frame); + } + var animation = BoneAnimationData( + ["Bone.001"], frames, + space: Space.Bone); + await controller.addAnimationComponent(entity); + await controller.addBoneAnimation(entity, animation); + }, + child: Text("Test animation (bone space)")), + MenuItemButton( + onPressed: () async { + var frames = >[]; + for (int i = 0; i < 60; i++) { + var frame = []; + frame.add(( + rotation: Quaternion.axisAngle( + Vector3(0, 0, 1), (i / 60) * pi / 2), + translation: Vector3.zero() + )); + frames.add(frame); + } + var animation = BoneAnimationData( + ["Bone.001"], frames, + space: Space.ParentWorldRotation); + await controller.addAnimationComponent(entity); + await controller.addBoneAnimation(entity, animation); + }, + child: Text("Test animation 2")), + MenuItemButton( + onPressed: () async { + var frames = >[]; + for (int i = 0; i < 60; i++) { + var frame = []; + frame.add(( + rotation: Quaternion.axisAngle( + Vector3(0, 0, 1), (i / 60) * pi / 2), + translation: Vector3.zero() + )); + frames.add(frame); + } + var animation = BoneAnimationData( + ["Bone.002"], frames, + space: Space.ParentWorldRotation); + await controller.addAnimationComponent(entity); + await controller.addBoneAnimation(entity, animation); + }, + child: Text("Test animation 3")) + ] + + boneNames + .map((name) { + var boneIndex = boneNames.indexOf(name); + return SubmenuButton(child: Text(name), menuChildren: [ + MenuItemButton( + child: Text("Print bone transforms "), + onPressed: () async { + var boneEntity = + await controller.getBone(entity, boneIndex); + var localTransform = await controller + .getLocalTransform(boneEntity); + var worldTransform = await controller + .getWorldTransform(boneEntity); + var inverseWorldTransform = Matrix4.identity() + ..copyInverse(worldTransform); + print("Local $localTransform"); + print("World $worldTransform"); + print("World inverse $inverseWorldTransform"); + }), + MenuItemButton( + child: Text("Set bone transform to identity"), + onPressed: () async { + var boneEntity = + await controller.getBone(entity, boneIndex); + var localTransform = Matrix4.identity(); + await controller.setTransform( + boneEntity, localTransform); + await controller.updateBoneMatrices(entity); + }), + MenuItemButton( + child: Text( + "Set bone transform to 90/X (parent space)"), + onPressed: () async { + var boneEntity = + await controller.getBone(entity, boneIndex); + var localTransform = Matrix4.rotationX(pi / 2); + await controller.setTransform( + boneEntity, localTransform); + await controller.updateBoneMatrices(entity); + }), + MenuItemButton( + child: Text( + "Set bone transform to 90/X (pose space)"), + onPressed: () async { + var boneEntity = + await controller.getBone(entity, boneIndex); + var localTransform = await controller + .getLocalTransform(boneEntity); + localTransform = + localTransform * Matrix4.rotationX(pi / 2); + await controller.setTransform( + boneEntity, localTransform); + await controller.updateBoneMatrices(entity); + }), + MenuItemButton( + child: Text("Set bone transform to 90/X"), + onPressed: () async { + var boneEntity = + await controller.getBone(entity, boneIndex); + var localTransform = Matrix4.rotationX(pi / 2); + await controller.setTransform( + boneEntity, localTransform); + await controller.updateBoneMatrices(entity); + }), + MenuItemButton( + child: Text("Set bone transform to 0,-1,0"), + onPressed: () async { + var boneEntity = + await controller.getBone(entity, boneIndex); + var localTransform = + Matrix4.translation(Vector3(0, -1, 0)); + await controller.setTransform( + boneEntity, localTransform); + await controller.updateBoneMatrices(entity); + }), + MenuItemButton( + child: Text( + "Set bone matrices/transform to identity"), + onPressed: () async { + var boneEntity = await controller.getBone( + entity, boneNames.indexOf(name)); + await controller.setTransform( + boneEntity, Matrix4.identity()); + var childEntities = await controller + .getChildEntities(entity, true); + for (final child in childEntities) { + await controller.setBoneTransform( + child, + boneNames.indexOf(name), + Matrix4.identity()); + } + }), + SubmenuButton( + child: Text("Set bone matrices to"), + menuChildren: [ + MenuItemButton( + child: Text("Identity"), + onPressed: () async { + await controller + .removeAnimationComponent(entity); + for (var child in await controller + .getChildEntities(entity, true)) { + print( + "Setting transform for ${await controller.getNameForEntity(child)}"); + await controller.setBoneTransform( + child, + boneNames.indexOf(name), + Matrix4.identity()); + } + }), + SubmenuButton( + child: Text("Global"), + menuChildren: ["90/X", "90/Y"] + .map((rot) => MenuItemButton( + onPressed: () async { + var transform = rot == "90/X" + ? Matrix4.rotationX(pi / 2) + : Matrix4.rotationY(pi / 2); + await controller + .removeAnimationComponent( + entity); + + var index = + boneNames.indexOf(name); + var childEntities = + await controller + .getChildEntities( + entity, true); + + for (var child in childEntities) { + print( + "Setting transform for ${await controller.getNameForEntity(child)} / bone $name (index $index)"); + await controller + .setBoneTransform(child, + index, transform); + } + }, + child: Text(rot))) + .toList()), + SubmenuButton( + child: Text("Bone"), + menuChildren: ["90/X", "90/Y", "90/Z"] + .map((rot) => MenuItemButton( + onPressed: () async { + await controller + .removeAnimationComponent( + entity); + var index = + boneNames.indexOf(name); + var boneEntity = await controller + .getBone(entity, index); + var rotation = rot == "90/X" + ? Matrix4.rotationX(pi / 2) + : rot == "90/Y" + ? Matrix4.rotationY( + pi / 2) + : Matrix4.rotationZ( + pi / 2); + + var inverseBindMatrix = + await controller + .getInverseBindMatrix( + entity, index); + var bindMatrix = + Matrix4.identity(); + bindMatrix.copyInverse( + inverseBindMatrix); + var childEntities = + await controller + .getChildEntities( + entity, true); + + for (var child in childEntities) { + var childGlobalTransform = + await controller + .getWorldTransform( + child); + var inverseGlobalTransform = + Matrix4.identity(); + inverseGlobalTransform + .copyInverse( + childGlobalTransform); + var globalBoneTransform = + childGlobalTransform * + bindMatrix; + + var transform = + (inverseGlobalTransform * + (globalBoneTransform * + rotation)) * + inverseBindMatrix; + await controller + .setBoneTransform(child, + index, transform); + } + }, + child: Text(rot))) + .toList()), + ]), + MenuItemButton( + onPressed: () => _addBoneAnimation(name), + child: Text( + "Test animation (90 degreees around pose Y)")), + ]); + }) + .cast() + .toList(), + child: Text("Skeleton")); + }); + } +} + + // MenuItemButton( + // onPressed: () async { + // var frames = >[]; + // for (int i = 0; i < 60; i++) { + // var frame = []; + // frame.add(( + // rotation: Quaternion.axisAngle( + // Vector3(0, 0, 1), (i / 60) * pi / 2), + // translation: Vector3.zero() + // )); + // frame.add(( + // rotation: Quaternion.identity(), + // translation: Vector3.zero() + // )); + // frame.add(( + // rotation: Quaternion.identity(), + // translation: Vector3.zero() + // )); + // frames.add(frame); + // } + // for (int i = 0; i < 60; i++) { + // var frame = []; + // frame.add(( + // rotation: Quaternion.axisAngle( + // Vector3(0, 0, 1), pi / 2), + // translation: Vector3.zero() + // )); + // frame.add(( + // rotation: Quaternion.axisAngle( + // Vector3(1, 0, 0), i / 60 * (-pi / 2)), + // translation: Vector3.zero() + // )); + // frame.add(( + // rotation: Quaternion.identity(), + // translation: Vector3.zero() + // )); + // frames.add(frame); + // } + // for (int i = 0; i < 60; i++) { + // var frame = []; + // frame.add(( + // rotation: Quaternion.axisAngle( + // Vector3(0, 0, 1), pi / 2), + // translation: Vector3.zero() + // )); + // frame.add(( + // rotation: Quaternion.axisAngle( + // Vector3(1, 0, 0), (-pi / 2)), + // translation: Vector3.zero() + // )); + // frame.add(( + // rotation: Quaternion.axisAngle( + // Vector3(1, 0, 0), i / 60 * (pi / 2)), + // translation: Vector3.zero() + // )); + // frames.add(frame); + // } + + // var animation = BoneAnimationData( + // ["Bone", "Bone.001", "Bone.002"], frames); + // await controller.addAnimationComponent(entity); + // await controller.addBoneAnimation(entity, animation); + // }, + // child: Text("Test animation (pose space)")), \ No newline at end of file diff --git a/thermion_flutter/thermion_flutter/lib/thermion/widgets/lights/ibl_rotation_slider.dart b/thermion_flutter/thermion_flutter/lib/thermion/widgets/lights/ibl_rotation_slider.dart new file mode 100644 index 00000000..51d320a8 --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/widgets/lights/ibl_rotation_slider.dart @@ -0,0 +1,29 @@ +import 'dart:math'; +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; +import 'package:flutter/material.dart'; +import 'package:vector_math/vector_math_64.dart' as v; + +class IblRotationSliderWidget extends StatefulWidget { + final ThermionViewer controller; + + const IblRotationSliderWidget({super.key, required this.controller}); + @override + State createState() => _IblRotationSliderWidgetState(); +} + +class _IblRotationSliderWidgetState extends State { + double _iblRotation = 0; + @override + Widget build(BuildContext context) { + return Slider( + value: _iblRotation, + onChanged: (value) { + _iblRotation = value; + setState(() {}); + print(value); + var rotation = v.Matrix3.identity(); + Matrix4.rotationY(value * 2 * pi).copyRotation(rotation); + widget.controller.rotateIbl(rotation); + }); + } +} diff --git a/thermion_flutter/thermion_flutter/lib/thermion/widgets/lights/light_slider.dart b/thermion_flutter/thermion_flutter/lib/thermion/widgets/lights/light_slider.dart new file mode 100644 index 00000000..a355b29f --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/widgets/lights/light_slider.dart @@ -0,0 +1,194 @@ + +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; +import 'package:thermion_dart/thermion_dart/utils/light_options.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; + +import 'package:vector_math/vector_math_64.dart' as v; + +class LightSliderWidget extends StatefulWidget { + final ThermionViewer controller; + + final LightOptions options; + final bool showControls; + + LightSliderWidget( + {super.key, + required this.controller, + this.showControls = false, + required this.options}); + @override + State createState() => _LightSliderWidgetState(); +} + +class _LightSliderWidgetState extends State { + ThermionEntity? _light; + + @override + void initState() { + _set(); + super.initState(); + } + + Future _set() async { + await widget.controller.clearLights(); + + if (widget.options.iblPath != null) { + _light = await widget.controller.loadIbl(widget.options.iblPath!, + intensity: widget.options.iblIntensity); + } + + _light = await widget.controller.addLight( + LightType.values[ + widget.options.directionalType], + widget.options.directionalColor, + widget.options.directionalIntensity, + widget.options.directionalPosition.x, + widget.options.directionalPosition.y, + widget.options.directionalPosition.z, + widget.options.directionalDirection.x, + widget.options.directionalDirection.y, + widget.options.directionalDirection.z, + castShadows:widget.options.directionalCastShadows); + + setState(() {}); + } + + @override + Widget build(BuildContext context) { + if (_light == null || !widget.showControls) { + return Container(); + } + return Theme( + data: ThemeData(platform: TargetPlatform.android), + child: Container( + decoration: BoxDecoration(color: Colors.white.withOpacity(0.5)), + child: SliderTheme( + data: const SliderThemeData( + showValueIndicator: ShowValueIndicator.always, + valueIndicatorTextStyle: TextStyle(color: Colors.black)), + child: Column(mainAxisSize: MainAxisSize.min, children: [ + Text("Directional"), + Row(children: [ + Expanded( + child: Slider( + label: + "POSX ${widget.options.directionalPosition.x}", + value: widget.options.directionalPosition.x, + min: -10.0, + max: 10.0, + onChanged: (value) { + widget.options.directionalPosition.x = value; + _set(); + })), + Expanded( + child: Slider( + label: + "POSY ${widget.options.directionalPosition.y}", + value: widget.options.directionalPosition.y, + min: -100.0, + max: 100.0, + onChanged: (value) { + widget.options.directionalPosition.y = value; + _set(); + })), + Expanded( + child: Slider( + label: + "POSZ ${widget.options.directionalPosition.z}", + value: widget.options.directionalPosition.z, + min: -100.0, + max: 100.0, + onChanged: (value) { + widget.options.directionalPosition.z = value; + _set(); + })) + ]), + Row(children: [ + Expanded( + child: Slider( + label: "DIRX", + value: widget.options.directionalDirection.x, + min: -1.0, + max: 1.0, + onChanged: (value) { + widget.options.directionalDirection.x = value; + _set(); + })), + Expanded( + child: Slider( + label: "DIRY", + value: widget.options.directionalDirection.y, + min: -1.0, + max: 1.0, + onChanged: (value) { + widget.options.directionalDirection.y = value; + _set(); + })), + Expanded( + child: Slider( + label: "DIRZ", + value: widget.options.directionalDirection.z, + min: -1.0, + max: 1.0, + onChanged: (value) { + widget.options.directionalDirection.z = value; + _set(); + })) + ]), + Slider( + label: "Color", + value: widget.options.directionalColor, + min: 0, + max: 16000, + onChanged: (value) { + widget.options.directionalColor = value; + _set(); + }), + Slider( + label: "Intensity ${widget.options.directionalIntensity}", + value: widget.options.directionalIntensity, + min: 0, + max: 1000000, + onChanged: (value) { + widget.options.directionalIntensity = value; + _set(); + }), + DropdownButton( + onChanged: (v) { + this.widget.options.directionalType = v; + _set(); + }, + value: this.widget.options.directionalType, + items: List.generate( + 5, + (idx) => DropdownMenuItem( + value: idx, + child: Text("$idx"), + ))), + Row(children: [ + Text( + "Shadows: ${this.widget.options.directionalCastShadows}"), + Checkbox( + value: widget.options.directionalCastShadows, + onChanged: (v) { + this.widget.options.directionalCastShadows = v!; + _set(); + }) + ]), + Text("Indirect"), + Row(children: [ + Expanded( + child: Slider( + label: "Intensity ${widget.options.iblIntensity}", + value: widget.options.iblIntensity, + min: 0.0, + max: 200000, + onChanged: (value) { + widget.options.iblIntensity = value; + _set(); + })), + ]) + ])))); + } +} diff --git a/thermion_flutter/thermion_flutter/lib/thermion/widgets/resize_observer.dart b/thermion_flutter/thermion_flutter/lib/thermion/widgets/resize_observer.dart new file mode 100644 index 00000000..218f84f1 --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/widgets/resize_observer.dart @@ -0,0 +1,41 @@ +import 'package:flutter/rendering.dart'; +import 'package:flutter/widgets.dart'; + +typedef ResizeCallback = void Function(Size newSize); + +class ResizeObserver extends SingleChildRenderObjectWidget { + final ResizeCallback onResized; + + const ResizeObserver({ + Key? key, + required this.onResized, + Widget? child, + }) : super( + key: key, + child: child, + ); + + @override + RenderObject createRenderObject(BuildContext context) => + _RenderResizeObserver(onLayoutChangedCallback: onResized); +} + +class _RenderResizeObserver extends RenderProxyBox { + final ResizeCallback onLayoutChangedCallback; + + _RenderResizeObserver({ + RenderBox? child, + required this.onLayoutChangedCallback, + }) : super(child); + + Size _oldSize = Size.zero; + + @override + void performLayout() async { + super.performLayout(); + if (size.width != _oldSize.width || size.height != _oldSize.height) { + onLayoutChangedCallback(size); + _oldSize = Size(size.width, size.height); + } + } +} diff --git a/thermion_flutter/thermion_flutter/lib/thermion/widgets/thermion_widget.dart b/thermion_flutter/thermion_flutter/lib/thermion/widgets/thermion_widget.dart new file mode 100644 index 00000000..ed8fc6cf --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/widgets/thermion_widget.dart @@ -0,0 +1,119 @@ +import 'dart:io'; +import 'dart:math'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'dart:async'; + +import 'package:thermion_flutter_platform_interface/thermion_flutter_texture.dart'; +import 'package:thermion_flutter/thermion_flutter.dart'; +import 'resize_observer.dart'; + +class ThermionWidget extends StatefulWidget { + final ThermionFlutterPlugin plugin; + + /// + /// The content to render before the texture widget is available. + /// The default is a solid red Container, intentionally chosen to make it clear that there will be at least one frame where the Texture widget is not being rendered. + /// + final Widget? initial; + + const ThermionWidget({Key? key, this.initial, required this.plugin}) + : super(key: key); + + @override + _ThermionWidgetState createState() => _ThermionWidgetState(); +} + +class _ThermionWidgetState extends State { + ThermionFlutterTexture? _texture; + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((timeStamp) async { + await widget.plugin.initialized; + var dpr = MediaQuery.of(context).devicePixelRatio; + var size = ((context.findRenderObject()) as RenderBox).size; + var width = (dpr * size.width).ceil(); + var height = (dpr * size.height).ceil(); + _texture = await widget.plugin.createTexture(width, height, 0, 0); + + if (mounted) { + setState(() {}); + } + }); + super.initState(); + } + + bool _resizing = false; + Timer? _resizeTimer; + + Future _resizeTexture(Size newSize) async { + _resizeTimer?.cancel(); + _resizeTimer = Timer(Duration(milliseconds: 500), () async { + if (_resizing) { + return; + } + _resizeTimer!.cancel(); + _resizing = true; + var oldTexture = _texture; + _texture = null; + setState(() {}); + + var dpr = MediaQuery.of(context).devicePixelRatio; + + _texture = await widget.plugin.resizeTexture(oldTexture!, + (dpr * newSize.width).ceil(), (dpr * newSize.height).ceil(), 0, 0); + setState(() {}); + _resizing = false; + }); + } + + @override + Widget build(BuildContext context) { + if (_texture?.usesBackingWindow == true) { + return Stack(children: [ + Positioned.fill(child: CustomPaint(painter: TransparencyPainter())) + ]); + } + + if (_texture == null || _resizing) { + return widget.initial ?? + Container(color: kIsWeb ? Colors.transparent : Colors.red); + } + + var textureWidget = Texture( + key: ObjectKey("texture_${_texture!.flutterTextureId}"), + textureId: _texture!.flutterTextureId!, + filterQuality: FilterQuality.none, + freeze: false, + ); + + return ResizeObserver( + onResized: _resizeTexture, + child: Stack(children: [ + Positioned.fill( + child: Platform.isLinux || Platform.isWindows + ? Transform( + alignment: Alignment.center, + transform: Matrix4.rotationX( + pi), // TODO - this rotation is due to OpenGL texture coordinate working in a different space from Flutter, can we move this to the C++ side somewhere? + child: textureWidget) + : textureWidget) + ])); + } +} + +class TransparencyPainter extends CustomPainter { + @override + void paint(Canvas canvas, Size size) { + canvas.drawRect( + Rect.fromLTWH(0, 0, size.width, size.height), + Paint() + ..blendMode = BlendMode.clear + ..color = const Color(0x00000000), + ); + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) => false; +} diff --git a/thermion_flutter/thermion_flutter/lib/thermion/widgets/transparent_filament_widget.dart b/thermion_flutter/thermion_flutter/lib/thermion/widgets/transparent_filament_widget.dart new file mode 100644 index 00000000..c4037a17 --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion/widgets/transparent_filament_widget.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; + +class TransparencyPainter extends CustomPainter { + @override + void paint(Canvas canvas, Size size) { + canvas.drawRect( + Rect.fromLTWH(0, 0, size.width, size.height), + Paint() + ..blendMode = BlendMode.clear + ..color = const Color(0x00000000), + ); + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) => false; +} diff --git a/thermion_flutter/thermion_flutter/lib/thermion_flutter.dart b/thermion_flutter/thermion_flutter/lib/thermion_flutter.dart new file mode 100644 index 00000000..5d428389 --- /dev/null +++ b/thermion_flutter/thermion_flutter/lib/thermion_flutter.dart @@ -0,0 +1,5 @@ +library thermion_flutter; + +export 'thermion/thermion_flutter_plugin.dart'; +export 'thermion/widgets/thermion_widget.dart'; +export 'package:thermion_dart/thermion_dart.dart'; diff --git a/linux/CMakeLists.txt b/thermion_flutter/thermion_flutter/linux/CMakeLists.txt similarity index 95% rename from linux/CMakeLists.txt rename to thermion_flutter/thermion_flutter/linux/CMakeLists.txt index 25ab9dbf..fa82db75 100644 --- a/linux/CMakeLists.txt +++ b/thermion_flutter/thermion_flutter/linux/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.10) # Project-level configuration. -set(PROJECT_NAME "flutter_filament") +set(PROJECT_NAME "thermion_flutter") project(${PROJECT_NAME}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -fPIC -Wno-unused-variable -Wno-unused-function") @@ -12,7 +12,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wno-unused-variable -Wno-unused-funct # This value is used when generating builds using this plugin, so it must # not be changed. -set(PLUGIN_NAME "flutter_filament_plugin") +set(PLUGIN_NAME "thermion_flutter_plugin") link_directories("${CMAKE_CURRENT_SOURCE_DIR}/lib") @@ -26,12 +26,12 @@ add_library(FILAMENT_SHADERS SHARED # # Any new source files that you add to the plugin should be added here. add_library(${PLUGIN_NAME} SHARED - "flutter_filament_plugin.cc" + "thermion_flutter_plugin.cc" "filament_texture.cc" "filament_pb_texture.cc" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/AssetManager.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/FilamentViewer.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/FlutterFilamentApi.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/SceneManager.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/ThermionViewerFFI.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/ThermionFlutterApi.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/StreamBufferAdapter.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/TimeIt.cpp" ) @@ -161,7 +161,7 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE # List of absolute paths to libraries that should be bundled with the plugin. # This list could contain prebuilt libraries, or libraries created by an # external build triggered from this build file. -set(flutter_filament_bundled_libraries +set(thermion_flutter_bundled_libraries "" PARENT_SCOPE lib/libgeometry.a diff --git a/linux/filament_pb_texture.cc b/thermion_flutter/thermion_flutter/linux/filament_pb_texture.cc similarity index 97% rename from linux/filament_pb_texture.cc rename to thermion_flutter/thermion_flutter/linux/filament_pb_texture.cc index 8a931ba8..5d223a14 100644 --- a/linux/filament_pb_texture.cc +++ b/thermion_flutter/thermion_flutter/linux/filament_pb_texture.cc @@ -7,7 +7,7 @@ #include #include -#include "include/flutter_filament/filament_pb_texture.h" +#include "include/thermion_flutter/filament_pb_texture.h" #include #include diff --git a/linux/filament_texture.cc b/thermion_flutter/thermion_flutter/linux/filament_texture.cc similarity index 97% rename from linux/filament_texture.cc rename to thermion_flutter/thermion_flutter/linux/filament_texture.cc index 8184b7e1..77a2ca55 100644 --- a/linux/filament_texture.cc +++ b/thermion_flutter/thermion_flutter/linux/filament_texture.cc @@ -6,7 +6,7 @@ #include #include -#include "include/flutter_filament/filament_texture.h" +#include "include/thermion_flutter/filament_texture.h" #include #include diff --git a/linux/include/flutter_filament/filament_pb_texture.h b/thermion_flutter/thermion_flutter/linux/include/thermion_flutter/filament_pb_texture.h similarity index 100% rename from linux/include/flutter_filament/filament_pb_texture.h rename to thermion_flutter/thermion_flutter/linux/include/thermion_flutter/filament_pb_texture.h diff --git a/linux/include/flutter_filament/filament_texture.h b/thermion_flutter/thermion_flutter/linux/include/thermion_flutter/filament_texture.h similarity index 100% rename from linux/include/flutter_filament/filament_texture.h rename to thermion_flutter/thermion_flutter/linux/include/thermion_flutter/filament_texture.h diff --git a/linux/include/flutter_filament/resource_loader.hpp b/thermion_flutter/thermion_flutter/linux/include/thermion_flutter/resource_loader.hpp similarity index 94% rename from linux/include/flutter_filament/resource_loader.hpp rename to thermion_flutter/thermion_flutter/linux/include/thermion_flutter/resource_loader.hpp index 9bac451c..2ba1af5e 100644 --- a/linux/include/flutter_filament/resource_loader.hpp +++ b/thermion_flutter/thermion_flutter/linux/include/thermion_flutter/resource_loader.hpp @@ -12,14 +12,13 @@ #include "ResourceBuffer.hpp" -using namespace std; -static map _file_assets; +static std::map _file_assets; static uint32_t _i = 0; ResourceBuffer loadResource(const char* name) { - std::cout << "LOADING RESOURCE" << std::endl; + std::cout << "LOADING RESOURCE" << std::endl; char cwd[PATH_MAX]; if (getcwd(cwd, sizeof(cwd)) != NULL) { diff --git a/linux/include/flutter_filament/flutter_filament_plugin.h b/thermion_flutter/thermion_flutter/linux/include/thermion_flutter/thermion_flutter_plugin.h similarity index 68% rename from linux/include/flutter_filament/flutter_filament_plugin.h rename to thermion_flutter/thermion_flutter/linux/include/thermion_flutter/thermion_flutter_plugin.h index 514ee05a..48981be7 100644 --- a/linux/include/flutter_filament/flutter_filament_plugin.h +++ b/thermion_flutter/thermion_flutter/linux/include/thermion_flutter/thermion_flutter_plugin.h @@ -12,14 +12,14 @@ G_BEGIN_DECLS #define FLUTTER_PLUGIN_EXPORT #endif -typedef struct _FlutterFilamentPlugin FlutterFilamentPlugin; +typedef struct _ThermionFlutterPlugin ThermionFlutterPlugin; typedef struct { GObjectClass parent_class; -} FlutterFilamentPluginClass; +} ThermionFlutterPluginClass; -FLUTTER_PLUGIN_EXPORT GType flutter_filament_plugin_get_type(); +FLUTTER_PLUGIN_EXPORT GType thermion_flutter_plugin_get_type(); -FLUTTER_PLUGIN_EXPORT void flutter_filament_plugin_register_with_registrar( +FLUTTER_PLUGIN_EXPORT void thermion_flutter_plugin_register_with_registrar( FlPluginRegistrar* registrar); G_END_DECLS diff --git a/linux/flutter_filament_plugin.cc b/thermion_flutter/thermion_flutter/linux/thermion_flutter_plugin.cc similarity index 88% rename from linux/flutter_filament_plugin.cc rename to thermion_flutter/thermion_flutter/linux/thermion_flutter_plugin.cc index 33f3ed9a..aa786fee 100644 --- a/linux/flutter_filament_plugin.cc +++ b/thermion_flutter/thermion_flutter/linux/thermion_flutter_plugin.cc @@ -1,4 +1,4 @@ -#include "include/flutter_filament/flutter_filament_plugin.h" +#include "include/thermion_flutter/thermion_flutter_plugin.h" #include #include @@ -16,26 +16,26 @@ #include #include -#include "include/flutter_filament/filament_texture.h" -#include "include/flutter_filament/filament_pb_texture.h" -#include "include/flutter_filament/resource_loader.hpp" +#include "include/thermion_flutter/filament_texture.h" +#include "include/thermion_flutter/filament_pb_texture.h" +#include "include/thermion_flutter/resource_loader.hpp" -#include "FilamentViewer.hpp" +#include "ThermionDartApi.h" #include "Log.hpp" extern "C" { -#include "FlutterFilamentApi.h" +#include "ThermionFlutterApi.h" } #include #include #define FLUTTER_FILAMENT_PLUGIN(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), flutter_filament_plugin_get_type(), \ - FlutterFilamentPlugin)) + (G_TYPE_CHECK_INSTANCE_CAST((obj), thermion_flutter_plugin_get_type(), \ + ThermionFlutterPlugin)) -struct _FlutterFilamentPlugin { +struct _ThermionFlutterPlugin { GObject parent_instance; FlTextureRegistrar* texture_registrar; FlView* fl_view; @@ -43,13 +43,13 @@ struct _FlutterFilamentPlugin { double width = 0; double height = 0; bool rendering = false; - polyvox::FilamentViewer* viewer; + thermion_flutter::ThermionViewerFFI* viewer; }; -G_DEFINE_TYPE(FlutterFilamentPlugin, flutter_filament_plugin, g_object_get_type()) +G_DEFINE_TYPE(ThermionFlutterPlugin, thermion_flutter_plugin, g_object_get_type()) static gboolean on_frame_tick(GtkWidget* widget, GdkFrameClock* frame_clock, gpointer self) { - FlutterFilamentPlugin* plugin = (FlutterFilamentPlugin*)self; + ThermionFlutterPlugin* plugin = (ThermionFlutterPlugin*)self; if(plugin->rendering) { render(plugin->viewer, 0); @@ -59,7 +59,7 @@ static gboolean on_frame_tick(GtkWidget* widget, GdkFrameClock* frame_clock, gpo return TRUE; } -static FlMethodResponse* _create_filament_viewer(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _create_filament_viewer(ThermionFlutterPlugin* self, FlMethodCall* method_call) { auto callback = new ResourceLoaderWrapper(loadResource, freeResource); FlValue* args = fl_method_call_get_args(method_call); @@ -71,7 +71,7 @@ static FlMethodResponse* _create_filament_viewer(FlutterFilamentPlugin* self, Fl self->height = height; auto context = glXGetCurrentContext(); - self->viewer = (polyvox::FilamentViewer*)create_filament_viewer( + self->viewer = (thermion_flutter::ThermionViewerFFI*)create_filament_viewer( (void*)context, callback ); @@ -89,7 +89,7 @@ static FlMethodResponse* _create_filament_viewer(FlutterFilamentPlugin* self, Fl return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _create_texture(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _create_texture(ThermionFlutterPlugin* self, FlMethodCall* method_call) { if(self->texture) { Log("Error - create_texture called when texture exists."); } @@ -115,7 +115,7 @@ static FlMethodResponse* _create_texture(FlutterFilamentPlugin* self, FlMethodCa } -static FlMethodResponse* _update_viewport_and_camera_projection(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _update_viewport_and_camera_projection(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto width = fl_value_get_int(fl_value_get_list_value(args, 0)); @@ -128,12 +128,12 @@ static FlMethodResponse* _update_viewport_and_camera_projection(FlutterFilamentP } -static FlMethodResponse* _get_asset_manager(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _get_asset_manager(ThermionFlutterPlugin* self, FlMethodCall* method_call) { auto assetManager = get_asset_manager(self->viewer); return FL_METHOD_RESPONSE(fl_method_success_response_new(fl_value_new_int(reinterpret_cast(assetManager)))); } -static FlMethodResponse* _resize(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _resize(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); const double width = fl_value_get_float(fl_value_get_list_value(args, 0)); @@ -154,7 +154,7 @@ static FlMethodResponse* _resize(FlutterFilamentPlugin* self, FlMethodCall* meth return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _loadSkybox(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _loadSkybox(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); const gchar* path = fl_value_get_string(args); @@ -165,13 +165,13 @@ static FlMethodResponse* _loadSkybox(FlutterFilamentPlugin* self, FlMethodCall* return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _remove_ibl(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _remove_ibl(ThermionFlutterPlugin* self, FlMethodCall* method_call) { remove_ibl(self->viewer); g_autoptr(FlValue) result = fl_value_new_string("OK"); return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _loadIbl(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _loadIbl(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto path = fl_value_get_string(fl_value_get_list_value(args, 0)); @@ -183,14 +183,14 @@ static FlMethodResponse* _loadIbl(FlutterFilamentPlugin* self, FlMethodCall* met return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _removeSkybox(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _removeSkybox(ThermionFlutterPlugin* self, FlMethodCall* method_call) { std::cout << "Removing skybox" << std::endl; remove_skybox(self->viewer); g_autoptr(FlValue) result = fl_value_new_string("OK"); return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _set_background_image(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_background_image(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); @@ -202,7 +202,7 @@ static FlMethodResponse* _set_background_image(FlutterFilamentPlugin* self, FlMe return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _set_background_color(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_background_color(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); const float r = fl_value_get_float(fl_value_get_list_value(args, 0)); const float g = fl_value_get_float(fl_value_get_list_value(args, 1)); @@ -214,7 +214,7 @@ static FlMethodResponse* _set_background_color(FlutterFilamentPlugin* self, FlMe return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _add_light(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _add_light(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); @@ -235,7 +235,7 @@ static FlMethodResponse* _add_light(FlutterFilamentPlugin* self, FlMethodCall* m } -static FlMethodResponse* _load_glb(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _load_glb(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto assetManager = (void*)fl_value_get_int(fl_value_get_list_value(args, 0)); auto path = fl_value_get_string(fl_value_get_list_value(args, 1)); @@ -245,7 +245,7 @@ static FlMethodResponse* _load_glb(FlutterFilamentPlugin* self, FlMethodCall* me return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _get_animation_names(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _get_animation_names(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto assetManager = (void*)fl_value_get_int(fl_value_get_list_value(args, 0)); @@ -263,7 +263,7 @@ static FlMethodResponse* _get_animation_names(FlutterFilamentPlugin* self, FlMet return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _remove_asset(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _remove_asset(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto asset = (EntityId)fl_value_get_int(fl_value_get_list_value(args, 1)); remove_asset(self->viewer, asset); @@ -271,7 +271,7 @@ static FlMethodResponse* _remove_asset(FlutterFilamentPlugin* self, FlMethodCall return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _transform_to_unit_cube(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _transform_to_unit_cube(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto assetManager = (void*)fl_value_get_int(fl_value_get_list_value(args, 0)); auto asset = (EntityId)fl_value_get_int(fl_value_get_list_value(args, 1)); @@ -280,7 +280,7 @@ static FlMethodResponse* _transform_to_unit_cube(FlutterFilamentPlugin* self, Fl return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _rotate_start(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _rotate_start(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto x = (float)fl_value_get_float(fl_value_get_list_value(args, 0)); @@ -292,13 +292,13 @@ static FlMethodResponse* _rotate_start(FlutterFilamentPlugin* self, FlMethodCall return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _rotate_end(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _rotate_end(ThermionFlutterPlugin* self, FlMethodCall* method_call) { grab_end(self->viewer); g_autoptr(FlValue) result = fl_value_new_string("OK"); return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _rotate_update(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _rotate_update(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto x = (float)fl_value_get_float(fl_value_get_list_value(args, 0)); auto y = (float)fl_value_get_float(fl_value_get_list_value(args, 1)); @@ -309,7 +309,7 @@ static FlMethodResponse* _rotate_update(FlutterFilamentPlugin* self, FlMethodCal return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _pan_start(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _pan_start(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); @@ -321,7 +321,7 @@ static FlMethodResponse* _pan_start(FlutterFilamentPlugin* self, FlMethodCall* m return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _pan_update(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _pan_update(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto x = (float)fl_value_get_float(fl_value_get_list_value(args, 0)); auto y = (float)fl_value_get_float(fl_value_get_list_value(args, 1)); @@ -331,13 +331,13 @@ static FlMethodResponse* _pan_update(FlutterFilamentPlugin* self, FlMethodCall* return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _pan_end(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _pan_end(ThermionFlutterPlugin* self, FlMethodCall* method_call) { grab_end(self->viewer); g_autoptr(FlValue) result = fl_value_new_string("OK"); return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _set_position(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_position(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto assetManager = (void*)fl_value_get_int(fl_value_get_list_value(args, 0)); auto asset = (EntityId)fl_value_get_int(fl_value_get_list_value(args, 1)); @@ -353,7 +353,7 @@ static FlMethodResponse* _set_position(FlutterFilamentPlugin* self, FlMethodCall return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _set_rotation(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_rotation(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto assetManager = (void*)fl_value_get_int(fl_value_get_list_value(args, 0)); @@ -373,7 +373,7 @@ static FlMethodResponse* _set_rotation(FlutterFilamentPlugin* self, FlMethodCall -static FlMethodResponse* _set_bone_transform(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_bone_transform(ThermionFlutterPlugin* self, FlMethodCall* method_call) { throw std::invalid_argument( "received negative value" ); // FlValue* args = fl_method_call_get_args(method_call); // auto assetPtr = (void*)fl_value_get_int(fl_value_get_list_value(args, 0)); @@ -396,7 +396,7 @@ static FlMethodResponse* _set_bone_transform(FlutterFilamentPlugin* self, FlMeth // return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _set_camera(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_camera(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto asset = (EntityId)fl_value_get_int(fl_value_get_list_value(args, 0)); auto cameraName = fl_value_get_string(fl_value_get_list_value(args, 1)) ; @@ -406,14 +406,14 @@ static FlMethodResponse* _set_camera(FlutterFilamentPlugin* self, FlMethodCall* return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _set_camera_model_matrix(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_camera_model_matrix(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); set_camera_model_matrix(self->viewer, fl_value_get_float32_list(args)); g_autoptr(FlValue) result = fl_value_new_string("OK"); return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _set_camera_exposure(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_camera_exposure(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto aperture = (float)fl_value_get_float(fl_value_get_list_value(args, 0)); auto shutter_speed = (float)fl_value_get_float(fl_value_get_list_value(args, 1)); @@ -423,7 +423,7 @@ static FlMethodResponse* _set_camera_exposure(FlutterFilamentPlugin* self, FlMet return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _set_camera_position(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_camera_position(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto x = (float)fl_value_get_float(fl_value_get_list_value(args, 0)); auto y = (float)fl_value_get_float(fl_value_get_list_value(args, 1)); @@ -433,7 +433,7 @@ static FlMethodResponse* _set_camera_position(FlutterFilamentPlugin* self, FlMet return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _set_camera_rotation(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_camera_rotation(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto rads = (float)fl_value_get_float(fl_value_get_list_value(args,0 )); auto x = (float)fl_value_get_float(fl_value_get_list_value(args, 1)); @@ -445,14 +445,14 @@ static FlMethodResponse* _set_camera_rotation(FlutterFilamentPlugin* self, FlMet return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _set_rendering(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_rendering(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); self->rendering = (bool)fl_value_get_bool(args); g_autoptr(FlValue) result = fl_value_new_string("OK"); return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _set_frame_interval(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_frame_interval(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto val = (float) fl_value_get_float(args); set_frame_interval(self->viewer, val); @@ -460,7 +460,7 @@ static FlMethodResponse* _set_frame_interval(FlutterFilamentPlugin* self, FlMeth return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _grab_begin(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _grab_begin(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto x = (float)fl_value_get_float(fl_value_get_list_value(args, 0)); auto y = (float)fl_value_get_float(fl_value_get_list_value(args, 1)); @@ -470,13 +470,13 @@ static FlMethodResponse* _grab_begin(FlutterFilamentPlugin* self, FlMethodCall* return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _grab_end(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _grab_end(ThermionFlutterPlugin* self, FlMethodCall* method_call) { grab_end(self->viewer); g_autoptr(FlValue) result = fl_value_new_string("OK"); return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _grab_update(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _grab_update(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto x = (float)fl_value_get_float(fl_value_get_list_value(args, 0)); auto y = (float)fl_value_get_float(fl_value_get_list_value(args, 1)); @@ -486,19 +486,19 @@ static FlMethodResponse* _grab_update(FlutterFilamentPlugin* self, FlMethodCall* return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _scroll_begin(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _scroll_begin(ThermionFlutterPlugin* self, FlMethodCall* method_call) { scroll_begin(self->viewer); g_autoptr(FlValue) result = fl_value_new_string("OK"); return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _scroll_end(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _scroll_end(ThermionFlutterPlugin* self, FlMethodCall* method_call) { scroll_end(self->viewer); g_autoptr(FlValue) result = fl_value_new_string("OK"); return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _scroll_update(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _scroll_update(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto x = (float)fl_value_get_float(fl_value_get_list_value(args, 0)); auto y = (float)fl_value_get_float(fl_value_get_list_value(args, 1)); @@ -509,7 +509,7 @@ static FlMethodResponse* _scroll_update(FlutterFilamentPlugin* self, FlMethodCal return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _play_animation(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _play_animation(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto assetManager = (void*)fl_value_get_int(fl_value_get_list_value(args, 0)); auto asset = (EntityId)fl_value_get_int(fl_value_get_list_value(args, 1)); @@ -524,7 +524,7 @@ static FlMethodResponse* _play_animation(FlutterFilamentPlugin* self, FlMethodCa } -static FlMethodResponse* _stop_animation(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _stop_animation(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto assetManager = (void*)fl_value_get_int(fl_value_get_list_value(args, 0)); auto asset = (EntityId)fl_value_get_int(fl_value_get_list_value(args, 1)); @@ -535,7 +535,7 @@ static FlMethodResponse* _stop_animation(FlutterFilamentPlugin* self, FlMethodCa } -static FlMethodResponse* _set_morph_target_weights(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_morph_target_weights(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto assetManager = (void*)fl_value_get_int(fl_value_get_list_value(args, 0)); auto asset = (EntityId)fl_value_get_int(fl_value_get_list_value(args, 1)); @@ -557,7 +557,7 @@ static FlMethodResponse* _set_morph_target_weights(FlutterFilamentPlugin* self, template class std::vector; -static FlMethodResponse* _set_morph_animation(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_morph_animation(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto assetManager = (void*)fl_value_get_int(fl_value_get_list_value(args, 0)); auto asset = (EntityId)fl_value_get_int(fl_value_get_list_value(args, 1)); @@ -599,7 +599,7 @@ static FlMethodResponse* _set_morph_animation(FlutterFilamentPlugin* self, FlMet return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _set_animation(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_animation(ThermionFlutterPlugin* self, FlMethodCall* method_call) { throw std::invalid_argument( "received negative value" ); // FlValue* args = fl_method_call_get_args(method_call); // auto assetPtr = (void*)fl_value_get_int(fl_value_get_list_value(args, 0)); @@ -677,7 +677,7 @@ static FlMethodResponse* _set_animation(FlutterFilamentPlugin* self, FlMethodCal // return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _get_morph_target_names(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _get_morph_target_names(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); auto assetManager = (void*)fl_value_get_int(fl_value_get_list_value(args, 0)); auto asset = (EntityId)fl_value_get_int(fl_value_get_list_value(args, 1)); @@ -696,29 +696,29 @@ static FlMethodResponse* _get_morph_target_names(FlutterFilamentPlugin* self, Fl return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); } -static FlMethodResponse* _set_tone_mapping(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_tone_mapping(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); - polyvox::ToneMapping toneMapping = static_cast(fl_value_get_int(args)); + thermion_flutter::ToneMapping toneMapping = static_cast(fl_value_get_int(args)); set_tone_mapping(self->viewer, toneMapping); return FL_METHOD_RESPONSE(fl_method_success_response_new(fl_value_new_bool(true))); } -static FlMethodResponse* _set_bloom(FlutterFilamentPlugin* self, FlMethodCall* method_call) { +static FlMethodResponse* _set_bloom(ThermionFlutterPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); set_bloom(self->viewer, fl_value_get_float(args)); return FL_METHOD_RESPONSE(fl_method_success_response_new(fl_value_new_bool(true))); } // Called when a method call is received from Flutter. -static void flutter_filament_plugin_handle_method_call( - FlutterFilamentPlugin* self, +static void thermion_flutter_plugin_handle_method_call( + ThermionFlutterPlugin* self, FlMethodCall* method_call) { g_autoptr(FlMethodResponse) response = nullptr; const gchar* method = fl_method_call_get_name(method_call); - if(strcmp(method, "createFilamentViewer") == 0) { + if(strcmp(method, "createThermionViewerFFI") == 0) { response = _create_filament_viewer(self, method_call); } else if(strcmp(method, "createTexture") == 0) { response = _create_texture(self, method_call); @@ -842,25 +842,25 @@ static void flutter_filament_plugin_handle_method_call( } -static void flutter_filament_plugin_dispose(GObject* object) { - G_OBJECT_CLASS(flutter_filament_plugin_parent_class)->dispose(object); +static void thermion_flutter_plugin_dispose(GObject* object) { + G_OBJECT_CLASS(thermion_flutter_plugin_parent_class)->dispose(object); } -static void flutter_filament_plugin_class_init(FlutterFilamentPluginClass* klass) { - G_OBJECT_CLASS(klass)->dispose = flutter_filament_plugin_dispose; +static void thermion_flutter_plugin_class_init(ThermionFlutterPluginClass* klass) { + G_OBJECT_CLASS(klass)->dispose = thermion_flutter_plugin_dispose; } -static void flutter_filament_plugin_init(FlutterFilamentPlugin* self) {} +static void thermion_flutter_plugin_init(ThermionFlutterPlugin* self) {} static void method_call_cb(FlMethodChannel* channel, FlMethodCall* method_call, gpointer user_data) { - FlutterFilamentPlugin* plugin = FLUTTER_FILAMENT_PLUGIN(user_data); - flutter_filament_plugin_handle_method_call(plugin, method_call); + ThermionFlutterPlugin* plugin = FLUTTER_FILAMENT_PLUGIN(user_data); + thermion_flutter_plugin_handle_method_call(plugin, method_call); } -void flutter_filament_plugin_register_with_registrar(FlPluginRegistrar* registrar) { - FlutterFilamentPlugin* plugin = FLUTTER_FILAMENT_PLUGIN( - g_object_new(flutter_filament_plugin_get_type(), nullptr)); +void thermion_flutter_plugin_register_with_registrar(FlPluginRegistrar* registrar) { + ThermionFlutterPlugin* plugin = FLUTTER_FILAMENT_PLUGIN( + g_object_new(thermion_flutter_plugin_get_type(), nullptr)); FlView* fl_view = fl_plugin_registrar_get_view(registrar); plugin->fl_view = fl_view; diff --git a/linux/flutter_filament_plugin_private.h b/thermion_flutter/thermion_flutter/linux/thermion_flutter_plugin_private.h similarity index 82% rename from linux/flutter_filament_plugin_private.h rename to thermion_flutter/thermion_flutter/linux/thermion_flutter_plugin_private.h index 3b008af0..2f97602a 100644 --- a/linux/flutter_filament_plugin_private.h +++ b/thermion_flutter/thermion_flutter/linux/thermion_flutter_plugin_private.h @@ -1,6 +1,6 @@ #include -#include "include/flutter_filament/flutter_filament_plugin.h" +#include "include/thermion_flutter/thermion_flutter_plugin.h" // This file exposes some plugin internals for unit testing. See // https://github.com/flutter/flutter/issues/88724 for current limitations diff --git a/thermion_flutter/thermion_flutter/macos/Classes/SwiftThermionFlutterPlugin.swift b/thermion_flutter/thermion_flutter/macos/Classes/SwiftThermionFlutterPlugin.swift new file mode 100644 index 00000000..55918f12 --- /dev/null +++ b/thermion_flutter/thermion_flutter/macos/Classes/SwiftThermionFlutterPlugin.swift @@ -0,0 +1,115 @@ +import FlutterMacOS +import GLKit + +public class SwiftThermionFlutterPlugin: NSObject, FlutterPlugin { + + var registrar : FlutterPluginRegistrar + var registry: FlutterTextureRegistry + var texture: ThermionFlutterTexture? + + var createdAt = Date() + + var resources:[UInt32:NSData] = [:] + + static var messenger : FlutterBinaryMessenger? = nil; + + var loadResource : @convention(c) (UnsafePointer?, UnsafeMutableRawPointer?) -> ResourceBuffer = { uri, resourcesPtr in + + let instance:SwiftThermionFlutterPlugin = Unmanaged.fromOpaque(resourcesPtr!).takeUnretainedValue() + + var uriString = String(cString:uri!) + + var path:String? = nil + + print("Received request to load \(uriString)") + + if(uriString.hasPrefix("file://")) { + path = String(uriString.dropFirst(7)) + } else { + if(uriString.hasPrefix("asset://")) { + uriString = String(uriString.dropFirst(8)) + } + let bundle = Bundle.init(identifier: "io.flutter.flutter.app")! + path = bundle.path(forResource:uriString, ofType: nil, inDirectory: "flutter_assets") + } + + if(path != nil) { + do { + let data = try Data(contentsOf: URL(fileURLWithPath:path!)) + let nsData = data as NSData + let resId = UInt32(instance.resources.count) + instance.resources[resId] = nsData + let length = nsData.length + print("Resolved asset to file of length \(Int32(length)) at path \(path!)") + return ResourceBuffer(data:nsData.bytes, size:Int32(UInt32(nsData.length)), id:Int32(UInt32(resId))) + } catch { + print("ERROR LOADING RESOURCE") + } + } + return ResourceBuffer() + } + + var freeResource : @convention(c) (ResourceBuffer,UnsafeMutableRawPointer?) -> () = { rbuf, resourcesPtr in + let instance:SwiftThermionFlutterPlugin = Unmanaged.fromOpaque(resourcesPtr!).takeUnretainedValue() + instance.resources.removeValue(forKey:UInt32(rbuf.id)) + } + + var markTextureFrameAvailable : @convention(c) (UnsafeMutableRawPointer?) -> () = { instancePtr in + let instance:SwiftThermionFlutterPlugin = Unmanaged.fromOpaque(instancePtr!).takeUnretainedValue() + if(instance.texture != nil) { + instance.registry.textureFrameAvailable(instance.texture!.flutterTextureId) + } + } + + + public static func register(with registrar: FlutterPluginRegistrar) { + let _messenger = registrar.messenger; + messenger = _messenger; + let channel = FlutterMethodChannel(name: "app.polyvox.filament/event", binaryMessenger: _messenger) + let instance = SwiftThermionFlutterPlugin(textureRegistry: registrar.textures, registrar:registrar) + registrar.addMethodCallDelegate(instance, channel: channel) + } + + init(textureRegistry: FlutterTextureRegistry, registrar:FlutterPluginRegistrar) { + self.registry = textureRegistry; + self.registrar = registrar + } + + + public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { + let methodName = call.method; + switch methodName { + case "getResourceLoaderWrapper": + var resourceLoaderWrapper = make_resource_loader(loadResource, freeResource, Unmanaged.passUnretained(self).toOpaque()) + result(unsafeBitCast(resourceLoaderWrapper, to:Int64.self)) + case "getRenderCallback": + let renderCallback = markTextureFrameAvailable + let resultArray:[Any] = [ + unsafeBitCast(renderCallback, to:Int64.self), unsafeBitCast(Unmanaged.passUnretained(self), to:UInt64.self)] + result(resultArray) + case "getDriverPlatform": + result(nil) + case "getSharedContext": + result(nil) + case "createTexture": + let args = call.arguments as! [Any] + let width = args[0] as! Int64 + let height = args[1] as! Int64 + + self.texture = ThermionFlutterTexture(registry: registry, width: width, height: height) + + if(self.texture?.metalTextureAddress == -1) { + result(nil) + } else { + result([self.texture!.flutterTextureId as Any, self.texture?.metalTextureAddress, nil]) + } + case "destroyTexture": + self.texture?.destroy() + self.texture = nil + result(true) + default: + result(FlutterMethodNotImplemented) + } + } +} + diff --git a/thermion_flutter/thermion_flutter/macos/Classes/ThermionDartTexture.swift b/thermion_flutter/thermion_flutter/macos/Classes/ThermionDartTexture.swift new file mode 100644 index 00000000..c17a7aab --- /dev/null +++ b/thermion_flutter/thermion_flutter/macos/Classes/ThermionDartTexture.swift @@ -0,0 +1,102 @@ +import Foundation +import GLKit + +@objc public class ThermionDartTexture : NSObject { + + public var pixelBuffer: CVPixelBuffer? + + var pixelBufferAttrs = [ + kCVPixelBufferPixelFormatTypeKey: NSNumber(value: kCVPixelFormatType_32ABGR ), + kCVPixelBufferIOSurfacePropertiesKey: [:] as CFDictionary + ] as [CFString : Any] as CFDictionary + + @objc public var cvMetalTextureCache:CVMetalTextureCache? + @objc public var cvMetalTexture:CVMetalTexture? + @objc public var metalTexture:MTLTexture? + @objc public var metalDevice:MTLDevice? + @objc public var metalTextureAddress:Int = -1 + + @objc override public init() { + + } + + @objc public init(width:Int64, height:Int64) { + + self.metalDevice = MTLCreateSystemDefaultDevice()! + + // create pixel buffer + if(CVPixelBufferCreate(kCFAllocatorDefault, Int(width), Int(height), + kCVPixelFormatType_32BGRA, pixelBufferAttrs, &pixelBuffer) != kCVReturnSuccess) { + print("Error allocating pixel buffer") + metalTextureAddress = -1; + return + } + + var cvret = CVMetalTextureCacheCreate( + kCFAllocatorDefault, + nil, + metalDevice!, + nil, + &cvMetalTextureCache); + if(cvret != 0) { + print("Error creating Metal texture cache") + metalTextureAddress = -1 + return + } + cvret = CVMetalTextureCacheCreateTextureFromImage( + kCFAllocatorDefault, + cvMetalTextureCache!, + pixelBuffer!, nil, + MTLPixelFormat.bgra8Unorm, + Int(width), Int(height), + 0, + &cvMetalTexture) + if(cvret != 0) { + print("Error creating texture from image") + metalTextureAddress = -1 + return + } + metalTexture = CVMetalTextureGetTexture(cvMetalTexture!) + let metalTexturePtr = Unmanaged.passUnretained(metalTexture!).toOpaque() + metalTextureAddress = Int(bitPattern:metalTexturePtr) + + print("Created metal texture @ \(metalTextureAddress)") + + // CVPixelBufferLockBaseAddress(pixelBuffer!, CVPixelBufferLockFlags(rawValue: 0)) + // let bufferWidth = Int(CVPixelBufferGetWidth(pixelBuffer!)) + // let bufferHeight = Int(CVPixelBufferGetHeight(pixelBuffer!)) + // let bytesPerRow = CVPixelBufferGetBytesPerRow(pixelBuffer!) + + // guard let baseAddress = CVPixelBufferGetBaseAddress(pixelBuffer!) else { + // return + // } + + // for row in 0.. Unmanaged? { + return Unmanaged.passRetained(pixelBuffer!); + } + + public func onTextureUnregistered(_ texture:FlutterTexture) { + print("Texture unregistered") + } + + public func destroy() { + self.registry.unregisterTexture(self.flutterTextureId) + self.destroyTexture() + } + +} \ No newline at end of file diff --git a/thermion_flutter/thermion_flutter/macos/include/ResourceBuffer.hpp b/thermion_flutter/thermion_flutter/macos/include/ResourceBuffer.hpp new file mode 100644 index 00000000..97822546 --- /dev/null +++ b/thermion_flutter/thermion_flutter/macos/include/ResourceBuffer.hpp @@ -0,0 +1,91 @@ +#ifndef RESOURCE_BUFFER_H +#define RESOURCE_BUFFER_H + +#include +#include + +// +// A ResourceBuffer is a unified interface for working with +// binary assets across various platforms. +// This is simply: +// 1) a pointer to some data +// 2) the length of the data +// 3) an ID that can be passed back to the native platform to release the underlying asset when needed. +// +struct ResourceBuffer +{ + const void *const data; + const int32_t size; + const int32_t id; +}; + +typedef struct ResourceBuffer ResourceBuffer; +typedef ResourceBuffer (*LoadFilamentResource)(const char *uri); +typedef ResourceBuffer (*LoadFilamentResourceFromOwner)(const char *const, void *const owner); +typedef void (*FreeFilamentResource)(ResourceBuffer); +typedef void (*FreeFilamentResourceFromOwner)(ResourceBuffer, void *const owner); + +struct ResourceLoaderWrapper +{ + LoadFilamentResource loadResource; + FreeFilamentResource freeResource; + LoadFilamentResourceFromOwner loadFromOwner; + FreeFilamentResourceFromOwner freeFromOwner; + void *owner; +}; +typedef struct ResourceLoaderWrapper ResourceLoaderWrapper; + + +#if defined(__cplusplus) + +namespace thermion_filament { + +struct ResourceLoaderWrapperImpl : public ResourceLoaderWrapper +{ + + ResourceLoaderWrapperImpl(LoadFilamentResource loader, FreeFilamentResource freeResource) + { + loadFromOwner = nullptr; + freeFromOwner = nullptr; + loadResource = loader; + freeResource = freeResource; + owner = nullptr; + } + + ResourceLoaderWrapperImpl(LoadFilamentResourceFromOwner loader, FreeFilamentResourceFromOwner freeResource, void * owner) + { + loadResource = nullptr; + freeResource = nullptr; + loadFromOwner = loader; + freeFromOwner = freeResource; + owner = owner; + } + + ResourceBuffer load(const char *uri) const + { + if (loadFromOwner) + { + auto rb = loadFromOwner(uri, owner); + return rb; + } + auto rb = loadResource(uri); + return rb; + } + + void free(ResourceBuffer rb) const + { + if (freeFromOwner) + { + freeFromOwner(rb, owner); + } + else + { + freeResource(rb); + } + } +}; + +} +#endif + +#endif diff --git a/thermion_flutter/thermion_flutter/macos/include/SwiftThermionFlutterPlugin-Bridging-Header.h b/thermion_flutter/thermion_flutter/macos/include/SwiftThermionFlutterPlugin-Bridging-Header.h new file mode 100644 index 00000000..0a005191 --- /dev/null +++ b/thermion_flutter/thermion_flutter/macos/include/SwiftThermionFlutterPlugin-Bridging-Header.h @@ -0,0 +1,17 @@ +#ifndef SwiftThermionFlutterPlugin_Bridging_Header_h +#define SwiftThermionFlutterPlugin_Bridging_Header_h + +#include + +#include "ResourceBuffer.hpp" + +ResourceLoaderWrapper *make_resource_loader(LoadFilamentResourceFromOwner loadFn, FreeFilamentResourceFromOwner freeFn, void *const owner) +{ + ResourceLoaderWrapper *rlw = (ResourceLoaderWrapper *)malloc(sizeof(ResourceLoaderWrapper)); + rlw->loadFromOwner = loadFn; + rlw->freeFromOwner = freeFn; + rlw->owner = owner; + return rlw; +} + +#endif diff --git a/thermion_flutter/thermion_flutter/macos/thermion_flutter.podspec b/thermion_flutter/thermion_flutter/macos/thermion_flutter.podspec new file mode 100644 index 00000000..632360f6 --- /dev/null +++ b/thermion_flutter/thermion_flutter/macos/thermion_flutter.podspec @@ -0,0 +1,28 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint thermion_flutter.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'thermion_flutter' + s.version = '0.0.1' + s.summary = 'A new Flutter plugin project.' + s.description = <<-DESC +A new Flutter plugin project. + DESC + s.homepage = 'http://example.com' + s.license = { :file => '../LICENSE' } + s.author = { 'Your Company' => 'email@example.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/*', 'include/ResourceBuffer.hpp','include/SwiftThermionFlutterPlugin-Bridging-Header.h' + s.public_header_files = 'include/SwiftThermionFlutterPlugin-Bridging-Header.h', 'include/ResourceBuffer.hpp' + s.dependency 'FlutterMacOS' + + s.platform = :osx, '13' + + s.pod_target_xcconfig = { + 'DEFINES_MODULE' => 'YES', + 'OTHER_CFLAGS' => '"-fvisibility=default" "$(inherited)"', + } + s.swift_version = '5.0' + +end diff --git a/thermion_flutter/thermion_flutter/pubspec.yaml b/thermion_flutter/thermion_flutter/pubspec.yaml new file mode 100644 index 00000000..cf1b22f2 --- /dev/null +++ b/thermion_flutter/thermion_flutter/pubspec.yaml @@ -0,0 +1,43 @@ +name: thermion_flutter +description: Flutter plugin for 3D rendering with the Thermion toolkit. +version: 0.0.3 +homepage: https://docs.page/nmfisher/thermion +repository: https://github.com/nmfisher/thermion + +environment: + sdk: ">=3.1.0 <4.0.0" + flutter: ">=3.23.0-0.1.pre" + +dependencies: + flutter: + sdk: flutter + flutter_web_plugins: + sdk: flutter + vector_math: ^2.1.2 + plugin_platform_interface: ^2.0.0 + ffi: ^2.1.2 + animation_tools_dart: ^0.0.4 + thermion_dart: ^0.0.4 + thermion_flutter_platform_interface: ^0.0.1 + thermion_flutter_ffi: ^0.0.1 + thermion_flutter_web: ^0.0.1 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^1.0.0 + +flutter: + plugin: + platforms: + android: + pluginClass: ThermionFlutterPlugin + package: app.polyvox.filament + ios: + pluginClass: SwiftThermionFlutterPlugin + macos: + pluginClass: SwiftThermionFlutterPlugin + windows: + pluginClass: ThermionFlutterPluginCApi + linux: + pluginClass: ThermionFlutterPlugin diff --git a/thermion_flutter/thermion_flutter/test/Makefile b/thermion_flutter/thermion_flutter/test/Makefile new file mode 100644 index 00000000..232b7489 --- /dev/null +++ b/thermion_flutter/thermion_flutter/test/Makefile @@ -0,0 +1,10 @@ +LDFLAGS:=-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -limageio -ltinyexr -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -lpng -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd -lvkshaders -lbluegl -lbluevk -lbasis_transcoder -lmeshoptimizer -L../macos/lib -framework CoreFoundation -framework Foundation -framework CoreVideo -framework Metal -framework QuartzCore -framework Cocoa + +clean: + rm ./out/test +run: build + ./out/test +build: cpp/test.cpp + mkdir -p out + clang++ -I../ios/include/filament -I../ios/include/ cpp/test.cpp ../macos/src/SceneManager.cpp --std=c++17 $(LDFLAGS) -o out/test + diff --git a/thermion_flutter/thermion_flutter/test/cpp/test.cpp b/thermion_flutter/thermion_flutter/test/cpp/test.cpp new file mode 100644 index 00000000..b046dff0 --- /dev/null +++ b/thermion_flutter/thermion_flutter/test/cpp/test.cpp @@ -0,0 +1,94 @@ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "SceneManager.hpp" + +#include "ResourceBuffer.hpp" + +using namespace filament; +using namespace thermion_filament; +using namespace std; + +int _i = 0; + +ResourceBuffer loadResource(const char* name) { + + std::cout << "LOADING RESOURCE" << std::endl; + + char cwd[PATH_MAX]; + if (getcwd(cwd, sizeof(cwd)) != NULL) { + std::cout << "Current working dir: " << cwd << std::endl; + } + + string name_str(name); + auto id = _i++; + + name_str = string(cwd) + string("/") + name_str; + + std::cout << "Loading resource at " << name_str.c_str() << std::endl; + + streampos length; + ifstream is(name_str, ios::binary); + ResourceBuffer rb { nullptr, -1, 0 }; + if(!is) { + std::cout << "Failed to find resource at file path " << name_str.c_str() << std::endl; + return rb; + } + is.seekg (0, ios::end); + length = is.tellg(); + char * buffer; + buffer = new char [length]; + is.seekg (0, ios::beg); + is.read (buffer, length); + is.close(); + return ResourceBuffer { buffer, static_cast(length), id }; +} + +void freeResource(ResourceBuffer rb) { + +} + +int main(int argc, char** argv) { + auto engine = Engine::create(); + auto scene = engine->createScene(); + auto loader = ResourceLoaderWrapper(loadResource, freeResource); + + auto sceneManager = SceneManager(&loader, engine, scene, nullptr); + + auto shapes = sceneManager.loadGlb("../example/assets/shapes/shapes.glb", 2); + + sceneManager.remove(shapes); + + shapes = sceneManager.loadGlb("../example/assets/shapes/shapes.glb", 2); + + auto instanceCount = sceneManager.getInstanceCount(shapes); + assert(instanceCount == 2); + + EntityId instances[instanceCount]; + + sceneManager.getInstances(shapes, instances); + + sceneManager.transformToUnitCube(shapes); + + auto morphTargetNames = sceneManager.getMorphTargetNames(shapes, "Cylinder"); + assert(morphTargetNames->size() == 4); + + morphTargetNames = sceneManager.getMorphTargetNames(shapes, "Cube"); + assert(morphTargetNames->size() == 2); + + morphTargetNames = sceneManager.getMorphTargetNames(shapes, "Cone"); + assert(morphTargetNames->size() == 8); + math::mat4f boneTransform; + sceneManager.setBoneTransform(shapes, "Cylinder", 0, "Bone", boneTransform); + + + sceneManager.destroyAll(); +} \ No newline at end of file diff --git a/thermion_flutter/thermion_flutter/test/frustum_unit_test.dart b/thermion_flutter/thermion_flutter/test/frustum_unit_test.dart new file mode 100644 index 00000000..880fc702 --- /dev/null +++ b/thermion_flutter/thermion_flutter/test/frustum_unit_test.dart @@ -0,0 +1,66 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:vector_math/vector_math_64.dart'; + +void main() { + test('Plane', () { + var plane = Plane()..setFromComponents(1, 0, 0, 2); + print(plane.distanceToVector3(Vector3(-1, 0, 0))); + }); + + test('Check if point is inside frustum', () { + var frustum = Frustum(); + frustum.plane0.setFromComponents(-0.868, 0, 0.49, 0); + frustum.plane1.setFromComponents(0.868, 0, 0.49, 0); + frustum.plane2.setFromComponents(0, -0.919, 0.39, 0); + frustum.plane3.setFromComponents(0, 0.919, 0.39, 0); + frustum.plane4.setFromComponents(0, 0, -1, -999.88); + frustum.plane5.setFromComponents(0, 0, 1, 0.05); + + var point = Vector3(0, 0, -1); + + print(frustum.plane0.distanceToVector3(point)); + print(frustum.plane1.distanceToVector3(point)); + + print(frustum.plane2.distanceToVector3(point)); + + print(frustum.plane3.distanceToVector3(point)); + + print(frustum.plane4.distanceToVector3(point)); + + print(frustum.plane5.distanceToVector3(point)); + + print(frustum.containsVector3(point)); + }); + + test("Lukas test", () { + final frustum = Frustum(); + //left + frustum.plane0.setFromComponents(-1.0, 0, 0, 1); + //right + frustum.plane1.setFromComponents(1.0, 0, 0, 2.0); + //bottom + frustum.plane2.setFromComponents(0, -1, 0, 1); + //top + frustum.plane3.setFromComponents(0, 1, 0, 1); + //far + frustum.plane4.setFromComponents(0, 0, -1, 1); + //near + frustum.plane5.setFromComponents(0, 0, 1, 1); + + // vector3 + final point = Vector3(-0.5, 0, 0); + + print(frustum.plane0.distanceToVector3(point)); + print(frustum.plane1.distanceToVector3(point)); + + print(frustum.plane2.distanceToVector3(point)); + + print(frustum.plane3.distanceToVector3(point)); + + print(frustum.plane4.distanceToVector3(point)); + + print(frustum.plane5.distanceToVector3(point)); + + print(frustum.containsVector3(point)); + }); +} diff --git a/windows/.gitignore b/thermion_flutter/thermion_flutter/windows/.gitignore similarity index 100% rename from windows/.gitignore rename to thermion_flutter/thermion_flutter/windows/.gitignore diff --git a/thermion_flutter/thermion_flutter/windows/CMakeLists.txt b/thermion_flutter/thermion_flutter/windows/CMakeLists.txt new file mode 100644 index 00000000..b4ed1cbb --- /dev/null +++ b/thermion_flutter/thermion_flutter/windows/CMakeLists.txt @@ -0,0 +1,107 @@ +cmake_minimum_required(VERSION 3.14) +set(PROJECT_NAME "thermion_flutter") +project(${PROJECT_NAME} LANGUAGES C CXX) + +cmake_policy(VERSION 3.14...3.25) + +# This value is used when generating builds using this plugin, so it must +# not be changed +set(PLUGIN_NAME "thermion_flutter_plugin") + +# Any new source files that you add to the plugin should be added here. +list(APPEND PLUGIN_SOURCES + "thermion_flutter_plugin.cpp" + "thermion_flutter_plugin.h" +) + +set(USE_ANGLE FALSE) +set(WGL_USE_BACKING_WINDOW TRUE) + +if(USE_ANGLE) + add_compile_definitions(USE_ANGLE) + list(APPEND PLUGIN_SOURCES "flutter_angle_texture.cpp" "egl_context.cpp" ) +else() + if(WGL_USE_BACKING_WINDOW) + add_compile_definitions(WGL_USE_BACKING_WINDOW) + endif() + list(APPEND PLUGIN_SOURCES "wgl_context.cpp" "opengl_texture_buffer.cpp" "backing_window.cpp") +endif() + +# Define the plugin library target. Its name must not be changed (see comment +# on PLUGIN_NAME above). +add_library(${PLUGIN_NAME} SHARED + "include/thermion_flutter/thermion_flutter_plugin_c_api.h" + "thermion_flutter_plugin_c_api.cpp" + ${PLUGIN_SOURCES} + "include/material/image.c" +) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + +apply_standard_settings(${PLUGIN_NAME}) + +set_target_properties(${PLUGIN_NAME} PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_compile_features(${PLUGIN_NAME} PUBLIC cxx_std_20) +target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL) +target_include_directories(${PLUGIN_NAME} INTERFACE + "${CMAKE_CURRENT_SOURCE_DIR}/include" +) + +include_directories( + "${CMAKE_SOURCE_DIR}/../../../../thermion_dart/native/include/filament" + "${CMAKE_SOURCE_DIR}/../../../../thermion_dart/native/include" +) + +if(USE_ANGLE) + list(APPEND GL_LIBS + EGL + GLESv2 + ) + set(ANGLE_OR_OPENGL_DIR angle) + add_library(EGL SHARED IMPORTED) + set_property(TARGET EGL PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_SOURCE_DIR}/../../../../thermion_dart/native/lib/windows/x86_64/mdd/libEGL.dll.lib") + set_property(TARGET EGL PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_SOURCE_DIR}/../../../../thermion_dart/native/lib/windows/x86_64/mt/angle/libEGL.dll.lib") + set_property(TARGET EGL PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_SOURCE_DIR}/../../../../thermion_dart/native/lib/windows/x86_64/mt/angle/libEGL.dll.lib") + add_library(GLESv2 SHARED IMPORTED) + set_property(TARGET GLESv2 PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_SOURCE_DIR}/../../../../thermion_dart/native/lib/windows/x86_64/mdd/libGLESv2.dll.lib") + set_property(TARGET GLESv2 PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_SOURCE_DIR}/../../../../thermion_dart/native/lib/windows/x86_64/mt/angle/libGLESv2.dll.lib") + set_property(TARGET GLESv2 PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_SOURCE_DIR}/../../../../thermion_dart/native/lib/windows/x86_64/mt/angle/libGLESv2.dll.lib") +else() + list(APPEND GL_LIBS + opengl32 + dwmapi + comctl32 + ) + set(ANGLE_OR_OPENGL_DIR opengl) +endif() + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/include +) + +target_link_libraries(${PLUGIN_NAME} PRIVATE + flutter + flutter_wrapper_plugin + Shlwapi + ${GL_LIBS} +) + +# List of absolute paths to libraries that should be bundled with the plugin +if(USE_ANGLE) +set(thermion_flutter_bundled_libraries + ${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/angle/libEGL.dll + ${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/angle/libGLESv2.dll + ${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/libc++.dll + ${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/third_party_abseil-cpp_absl.dll + ${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/third_party_zlib.dll + ${CMAKE_CURRENT_SOURCE_DIR}/thermion_dart.dll + PARENT_SCOPE +) +else() +set(thermion_flutter_bundled_libraries + ${runner_BINARY_DIR}/../../../native_assets/windows/thermion_dart.dll + PARENT_SCOPE +) +endif() + diff --git a/windows/backing_window.cpp b/thermion_flutter/thermion_flutter/windows/backing_window.cpp similarity index 98% rename from windows/backing_window.cpp rename to thermion_flutter/thermion_flutter/windows/backing_window.cpp index bc314c26..b7b2f989 100644 --- a/windows/backing_window.cpp +++ b/thermion_flutter/thermion_flutter/windows/backing_window.cpp @@ -5,7 +5,6 @@ #include #include -#include #include #include #include @@ -13,10 +12,10 @@ #pragma comment(lib, "dwmapi.lib") #pragma comment(lib, "comctl32.lib") -namespace flutter_filament { +namespace thermion_filament { static constexpr auto kClassName = L"FLUTTER_FILAMENT_WINDOW"; -static constexpr auto kWindowName = L"flutter_filament_window"; +static constexpr auto kWindowName = L"thermion_flutter_window"; static bool was_window_hidden_due_to_minimize_ = false; static WPARAM last_wm_size_wparam_ = SIZE_RESTORED; uint64_t last_thread_time_ = 0; @@ -355,4 +354,4 @@ void BackingWindow::Resize(int width, int height, int left, int top) { } HWND BackingWindow::GetHandle() { return _windowHandle; } -} // namespace flutter_filament +} // namespace thermion_filament diff --git a/windows/backing_window.h b/thermion_flutter/thermion_flutter/windows/backing_window.h similarity index 95% rename from windows/backing_window.h rename to thermion_flutter/thermion_flutter/windows/backing_window.h index 72488145..e58a9d07 100644 --- a/windows/backing_window.h +++ b/thermion_flutter/thermion_flutter/windows/backing_window.h @@ -5,7 +5,7 @@ #include #include -namespace flutter_filament { +namespace thermion_filament { class BackingWindow { public: diff --git a/windows/egl_context.cpp b/thermion_flutter/thermion_flutter/windows/egl_context.cpp similarity index 79% rename from windows/egl_context.cpp rename to thermion_flutter/thermion_flutter/windows/egl_context.cpp index 1e7a87e6..3933f543 100644 --- a/windows/egl_context.cpp +++ b/thermion_flutter/thermion_flutter/windows/egl_context.cpp @@ -1,8 +1,17 @@ + #include "egl_context.h" -namespace flutter_filament { +#define FILAMENT_USE_EXTERNAL_GLES3 +#include -EGLContext::EGLContext(flutter::PluginRegistrarWindows* pluginRegistrar, flutter::TextureRegistrar* textureRegistrar); { +#pragma comment(lib, "dwmapi.lib") +#pragma comment(lib, "comctl32.lib") + +namespace thermion_filament { + +FlutterEGLContext::FlutterEGLContext( + flutter::PluginRegistrarWindows* pluginRegistrar, + flutter::TextureRegistrar* textureRegistrar) : FlutterRenderContext(pluginRegistrar, textureRegistrar) { _platform = new filament::backend::PlatformEGL(); @@ -34,7 +43,7 @@ EGLContext::EGLContext(flutter::PluginRegistrarWindows* pluginRegistrar, flutter dxgi->Release(); if (!adapter_) { std::cout << "Failed to locate default D3D adapter" << std::endl; - return false; + return; } DXGI_ADAPTER_DESC adapter_desc_; @@ -49,7 +58,7 @@ EGLContext::EGLContext(flutter::PluginRegistrarWindows* pluginRegistrar, flutter if (FAILED(hr)) { std::cout << "Failed to create D3D device" << std::endl; - return false; + return; } Microsoft::WRL::ComPtr dxgi_device = nullptr; @@ -74,7 +83,7 @@ EGLContext::EGLContext(flutter::PluginRegistrarWindows* pluginRegistrar, flutter EGLBoolean bindAPI = eglBindAPI(EGL_OPENGL_ES_API); if (UTILS_UNLIKELY(!bindAPI)) { std::cout << "eglBindAPI EGL_OPENGL_ES_API failed" << std::endl; - return false; + return; } _eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); @@ -106,10 +115,10 @@ EGLContext::EGLContext(flutter::PluginRegistrarWindows* pluginRegistrar, flutter if (UTILS_UNLIKELY(!initialized)) { std::cout << "eglInitialize failed" << std::endl; - return false; + return; } - importGLESExtensionsEntryPoints(); + glext::importGLESExtensionsEntryPoints(); EGLint configsCount; @@ -126,53 +135,66 @@ EGLContext::EGLContext(flutter::PluginRegistrarWindows* pluginRegistrar, flutter // find an opaque config if (!eglChooseConfig(_eglDisplay, configAttribs, &_eglConfig, 1, &configsCount)) { - return false; + std::cout << "Failed to find EGL config" << std::endl; + return; } - _context = (void *)eglCreateContext(_eglDisplay, _eglConfig, EGL_NO_CONTEXT, - contextAttribs); + auto ctx = eglCreateContext(_eglDisplay, _eglConfig, EGL_NO_CONTEXT,contextAttribs); + _context = (void*)ctx; if (UTILS_UNLIKELY(_context == EGL_NO_CONTEXT)) { - return false; + return; } } -EGLContext::CreateRenderingSurface( +void FlutterEGLContext::CreateRenderingSurface( uint32_t width, uint32_t height, std::unique_ptr> result, uint32_t left, uint32_t top ) { - importGLESExtensionsEntryPoints(); + + glext::importGLESExtensionsEntryPoints(); if(left != 0 || top != 0) { result->Error("ERROR", "Rendering with EGL uses a Texture render target/Flutter widget and does not need a window offset."); - return false; + return; } if (_active.get()) { result->Error("ERROR", "Texture already exists. You must call destroyTexture before " "attempting to create a new one."); - return false; + return; } - _active = std::make_unique( + std::unique_ptr active = std::make_unique( _pluginRegistrar, _textureRegistrar, std::move(result), width, height, _D3D11Device, _D3D11DeviceContext, _eglConfig, _eglDisplay, _context, [=](size_t width, size_t height) { + std::cout << "RESIZE" << std::endl; std::vector list; list.push_back((int64_t)width); list.push_back((int64_t)height); - auto val = std::make_unique(list); - this->_channel->InvokeMethod("resize", std::move(val), nullptr); + // auto val = std::make_unique(list); + // this->_channel->InvokeMethod("resize", std::move(val), nullptr); }); + _active = std::move(active); - return _active->flutterTextureId != -1; } -EGLContext::GetSharedContext() { - return (void*)_eglContext; +void FlutterEGLContext::RenderCallback() { + if(_active.get()) { + ((FlutterAngleTexture*)_active.get())->RenderCallback(); + } +} + +void* FlutterEGLContext::GetSharedContext() { + return (void*)_context; +} + +void* FlutterEGLContext::GetPlatform() { + return (void*)_platform; } } \ No newline at end of file diff --git a/thermion_flutter/thermion_flutter/windows/egl_context.h b/thermion_flutter/thermion_flutter/windows/egl_context.h new file mode 100644 index 00000000..59cf0a24 --- /dev/null +++ b/thermion_flutter/thermion_flutter/windows/egl_context.h @@ -0,0 +1,36 @@ +#ifndef _EGL_CONTEXT_H +#define _EGL_CONTEXT_H + +#include + +#include +#include +#include +#include + +#include "flutter_angle_texture.h" +#include "backend/platforms/PlatformEGL.h" +#include "flutter_render_context.h" + +namespace thermion_filament { + +class FlutterEGLContext : public FlutterRenderContext { +public: + FlutterEGLContext(flutter::PluginRegistrarWindows* pluginRegistrar, flutter::TextureRegistrar* textureRegistrar); + void* GetSharedContext(); + void RenderCallback(); + void* GetPlatform(); + void CreateRenderingSurface(uint32_t width, uint32_t height, std::unique_ptr> result, uint32_t left, uint32_t top ); + +private: + void* _context = nullptr; + EGLConfig _eglConfig = NULL; + EGLDisplay _eglDisplay = NULL; + ID3D11Device* _D3D11Device = nullptr; + ID3D11DeviceContext* _D3D11DeviceContext = nullptr; + filament::backend::Platform* _platform = nullptr; +}; + +} + +#endif \ No newline at end of file diff --git a/windows/flutter_angle_texture.cpp b/thermion_flutter/thermion_flutter/windows/flutter_angle_texture.cpp similarity index 98% rename from windows/flutter_angle_texture.cpp rename to thermion_flutter/thermion_flutter/windows/flutter_angle_texture.cpp index 96e8d413..e443c1b2 100644 --- a/windows/flutter_angle_texture.cpp +++ b/thermion_flutter/thermion_flutter/windows/flutter_angle_texture.cpp @@ -7,7 +7,7 @@ #include -namespace flutter_filament { +namespace thermion_filament { static void logEglError(const char *name) noexcept { const char *err; @@ -236,7 +236,8 @@ FlutterAngleTexture::FlutterAngleTexture( resultList.push_back(flutter::EncodableValue(flutterTextureId)); resultList.push_back(flutter::EncodableValue((int64_t) nullptr)); resultList.push_back(flutter::EncodableValue(glTextureId)); + resultList.push_back(flutter::EncodableValue((int64_t) eglContext)); result->Success(resultList); } -} // namespace flutter_filament \ No newline at end of file +} // namespace thermion_filament \ No newline at end of file diff --git a/windows/flutter_angle_texture.h b/thermion_flutter/thermion_flutter/windows/flutter_angle_texture.h similarity index 96% rename from windows/flutter_angle_texture.h rename to thermion_flutter/thermion_flutter/windows/flutter_angle_texture.h index 479d0e1b..ea449f69 100644 --- a/windows/flutter_angle_texture.h +++ b/thermion_flutter/thermion_flutter/windows/flutter_angle_texture.h @@ -26,9 +26,9 @@ typedef uint32_t GLuint; -namespace flutter_filament { +namespace thermion_filament { -class FlutterAngleTexture : FlutterTextureBuffer { +class FlutterAngleTexture : public FlutterTextureBuffer { public: FlutterAngleTexture( flutter::PluginRegistrarWindows* pluginRegistrar, diff --git a/windows/flutter_render_context.h b/thermion_flutter/thermion_flutter/windows/flutter_render_context.h similarity index 84% rename from windows/flutter_render_context.h rename to thermion_flutter/thermion_flutter/windows/flutter_render_context.h index f1ebd238..88157ae1 100644 --- a/windows/flutter_render_context.h +++ b/thermion_flutter/thermion_flutter/windows/flutter_render_context.h @@ -8,10 +8,11 @@ #include "flutter_texture_buffer.h" -namespace flutter_filament { +namespace thermion_filament { class FlutterRenderContext { public: + void CreateRenderingSurface(uint32_t width, uint32_t height, std::unique_ptr> result, uint32_t left, uint32_t top ); void DestroyTexture(std::unique_ptr> result) { @@ -33,11 +34,15 @@ namespace flutter_filament { }); } int64_t GetFlutterTextureId() { + if(!_active) { + return -1; + } return _active->flutterTextureId; } - void* sharedContext = nullptr; - + protected: + FlutterRenderContext( flutter::PluginRegistrarWindows* pluginRegistrar, flutter::TextureRegistrar* textureRegistrar) : _pluginRegistrar(pluginRegistrar), _textureRegistrar(textureRegistrar) {}; + flutter::PluginRegistrarWindows* _pluginRegistrar; flutter::TextureRegistrar* _textureRegistrar; std::unique_ptr _active = nullptr; diff --git a/windows/flutter_texture_buffer.h b/thermion_flutter/thermion_flutter/windows/flutter_texture_buffer.h similarity index 81% rename from windows/flutter_texture_buffer.h rename to thermion_flutter/thermion_flutter/windows/flutter_texture_buffer.h index cde6a228..f12c8541 100644 --- a/windows/flutter_texture_buffer.h +++ b/thermion_flutter/thermion_flutter/windows/flutter_texture_buffer.h @@ -7,11 +7,11 @@ #include -namespace flutter_filament { +namespace thermion_filament { class FlutterTextureBuffer { public: - int64_t flutterTextureId = 0; + int64_t flutterTextureId = -1; }; } diff --git a/windows/include/EGL/egl.h b/thermion_flutter/thermion_flutter/windows/include/EGL/egl.h similarity index 100% rename from windows/include/EGL/egl.h rename to thermion_flutter/thermion_flutter/windows/include/EGL/egl.h diff --git a/windows/include/EGL/eglext.h b/thermion_flutter/thermion_flutter/windows/include/EGL/eglext.h similarity index 100% rename from windows/include/EGL/eglext.h rename to thermion_flutter/thermion_flutter/windows/include/EGL/eglext.h diff --git a/windows/include/EGL/eglext_angle.h b/thermion_flutter/thermion_flutter/windows/include/EGL/eglext_angle.h similarity index 100% rename from windows/include/EGL/eglext_angle.h rename to thermion_flutter/thermion_flutter/windows/include/EGL/eglext_angle.h diff --git a/windows/include/EGL/eglplatform.h b/thermion_flutter/thermion_flutter/windows/include/EGL/eglplatform.h similarity index 100% rename from windows/include/EGL/eglplatform.h rename to thermion_flutter/thermion_flutter/windows/include/EGL/eglplatform.h diff --git a/windows/include/GL/glcorearb.h b/thermion_flutter/thermion_flutter/windows/include/GL/glcorearb.h similarity index 100% rename from windows/include/GL/glcorearb.h rename to thermion_flutter/thermion_flutter/windows/include/GL/glcorearb.h diff --git a/windows/include/GL/glext.h b/thermion_flutter/thermion_flutter/windows/include/GL/glext.h similarity index 100% rename from windows/include/GL/glext.h rename to thermion_flutter/thermion_flutter/windows/include/GL/glext.h diff --git a/windows/include/GL/wglext.h b/thermion_flutter/thermion_flutter/windows/include/GL/wglext.h similarity index 100% rename from windows/include/GL/wglext.h rename to thermion_flutter/thermion_flutter/windows/include/GL/wglext.h diff --git a/windows/include/GLES2/gl2.h b/thermion_flutter/thermion_flutter/windows/include/GLES2/gl2.h similarity index 100% rename from windows/include/GLES2/gl2.h rename to thermion_flutter/thermion_flutter/windows/include/GLES2/gl2.h diff --git a/windows/include/GLES2/gl2ext.h b/thermion_flutter/thermion_flutter/windows/include/GLES2/gl2ext.h similarity index 100% rename from windows/include/GLES2/gl2ext.h rename to thermion_flutter/thermion_flutter/windows/include/GLES2/gl2ext.h diff --git a/windows/include/GLES2/gl2ext_angle.h b/thermion_flutter/thermion_flutter/windows/include/GLES2/gl2ext_angle.h similarity index 100% rename from windows/include/GLES2/gl2ext_angle.h rename to thermion_flutter/thermion_flutter/windows/include/GLES2/gl2ext_angle.h diff --git a/windows/include/GLES2/gl2platform.h b/thermion_flutter/thermion_flutter/windows/include/GLES2/gl2platform.h similarity index 100% rename from windows/include/GLES2/gl2platform.h rename to thermion_flutter/thermion_flutter/windows/include/GLES2/gl2platform.h diff --git a/windows/include/GLES3/.clang-format b/thermion_flutter/thermion_flutter/windows/include/GLES3/.clang-format similarity index 100% rename from windows/include/GLES3/.clang-format rename to thermion_flutter/thermion_flutter/windows/include/GLES3/.clang-format diff --git a/windows/include/GLES3/gl3.h b/thermion_flutter/thermion_flutter/windows/include/GLES3/gl3.h similarity index 100% rename from windows/include/GLES3/gl3.h rename to thermion_flutter/thermion_flutter/windows/include/GLES3/gl3.h diff --git a/windows/include/GLES3/gl31.h b/thermion_flutter/thermion_flutter/windows/include/GLES3/gl31.h similarity index 100% rename from windows/include/GLES3/gl31.h rename to thermion_flutter/thermion_flutter/windows/include/GLES3/gl31.h diff --git a/windows/include/GLES3/gl32.h b/thermion_flutter/thermion_flutter/windows/include/GLES3/gl32.h similarity index 100% rename from windows/include/GLES3/gl32.h rename to thermion_flutter/thermion_flutter/windows/include/GLES3/gl32.h diff --git a/windows/include/GLES3/gl3platform.h b/thermion_flutter/thermion_flutter/windows/include/GLES3/gl3platform.h similarity index 100% rename from windows/include/GLES3/gl3platform.h rename to thermion_flutter/thermion_flutter/windows/include/GLES3/gl3platform.h diff --git a/windows/include/KHR/.clang-format b/thermion_flutter/thermion_flutter/windows/include/KHR/.clang-format similarity index 100% rename from windows/include/KHR/.clang-format rename to thermion_flutter/thermion_flutter/windows/include/KHR/.clang-format diff --git a/windows/include/KHR/khrplatform.h b/thermion_flutter/thermion_flutter/windows/include/KHR/khrplatform.h similarity index 100% rename from windows/include/KHR/khrplatform.h rename to thermion_flutter/thermion_flutter/windows/include/KHR/khrplatform.h diff --git a/windows/include/NullGLES.h b/thermion_flutter/thermion_flutter/windows/include/NullGLES.h similarity index 100% rename from windows/include/NullGLES.h rename to thermion_flutter/thermion_flutter/windows/include/NullGLES.h diff --git a/windows/include/gl_headers.h b/thermion_flutter/thermion_flutter/windows/include/gl_headers.h similarity index 100% rename from windows/include/gl_headers.h rename to thermion_flutter/thermion_flutter/windows/include/gl_headers.h diff --git a/windows/include/material/image.S b/thermion_flutter/thermion_flutter/windows/include/material/image.S similarity index 92% rename from windows/include/material/image.S rename to thermion_flutter/thermion_flutter/windows/include/material/image.S index 9149283c..ec1355e8 100644 --- a/windows/include/material/image.S +++ b/thermion_flutter/thermion_flutter/windows/include/material/image.S @@ -8,5 +8,5 @@ IMAGE_PACKAGE: IMAGE_IMAGE_OFFSET: .int 0 IMAGE_IMAGE_SIZE: - .int 13681 + .int 13622 diff --git a/ios/include/material/image.apple.S b/thermion_flutter/thermion_flutter/windows/include/material/image.apple.S similarity index 93% rename from ios/include/material/image.apple.S rename to thermion_flutter/thermion_flutter/windows/include/material/image.apple.S index d2010a57..f504b397 100644 --- a/ios/include/material/image.apple.S +++ b/thermion_flutter/thermion_flutter/windows/include/material/image.apple.S @@ -8,5 +8,5 @@ _IMAGE_PACKAGE: _IMAGE_IMAGE_OFFSET: .int 0 _IMAGE_IMAGE_SIZE: - .int 36070 + .int 13622 diff --git a/thermion_flutter/thermion_flutter/windows/include/material/image.bin b/thermion_flutter/thermion_flutter/windows/include/material/image.bin new file mode 100644 index 00000000..eed368f6 --- /dev/null +++ b/thermion_flutter/thermion_flutter/windows/include/material/image.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ad7dec6e1c92a6ee102556217cf7d13363fc4cf9f4b8a9e0f16dbb7208b5ee8 +size 13622 diff --git a/thermion_flutter/thermion_flutter/windows/include/material/image.c b/thermion_flutter/thermion_flutter/windows/include/material/image.c new file mode 100644 index 00000000..3e36bd36 --- /dev/null +++ b/thermion_flutter/thermion_flutter/windows/include/material/image.c @@ -0,0 +1,691 @@ +#include + +const uint8_t IMAGE_PACKAGE[] = { +// IMAGE +0x53, 0x52, 0x45, 0x56, 0x5f, 0x54, 0x41, 0x4d, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x54, 0x41, 0x45, 0x46, +0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x45, 0x4d, 0x41, 0x4e, 0x5f, 0x54, 0x41, 0x4d, 0x06, 0x00, 0x00, +0x00, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x00, 0x4c, 0x44, 0x4d, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x04, 0x00, 0x00, 0x00, 0x06, +0x00, 0x00, 0x00, 0x4e, 0x4d, 0x4f, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x46, 0x49, 0x4e, 0x55, +0x5f, 0x54, 0x41, 0x4d, 0x87, 0x00, 0x00, 0x00, 0x08, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, +0x6d, 0x73, 0x00, 0x00, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x01, +0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x04, 0x53, 0x68, 0x61, 0x64, +0x6f, 0x77, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x05, 0x46, 0x72, 0x6f, 0x78, 0x65, 0x6c, 0x52, 0x65, +0x63, 0x6f, 0x72, 0x64, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x06, 0x42, 0x6f, 0x6e, 0x65, 0x73, 0x55, +0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x02, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x69, 0x6e, 0x67, 0x55, 0x6e, 0x69, +0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x03, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, +0x73, 0x00, 0x07, 0x50, 0x4d, 0x41, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0xc3, 0x00, 0x00, 0x00, 0x03, 0x00, 0x02, 0x07, 0x07, +0x01, 0x02, 0x09, 0x07, 0x01, 0x0a, 0x00, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x4d, +0x61, 0x70, 0x00, 0x01, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x66, 0x72, 0x6f, 0x78, 0x65, 0x6c, 0x73, 0x00, 0x02, 0x6c, +0x69, 0x67, 0x68, 0x74, 0x5f, 0x69, 0x62, 0x6c, 0x44, 0x46, 0x47, 0x00, 0x03, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x69, +0x62, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x00, 0x04, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x73, +0x61, 0x6f, 0x00, 0x05, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x73, 0x72, 0x00, 0x06, 0x6c, 0x69, 0x67, 0x68, 0x74, +0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x00, 0x07, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x54, 0x61, 0x72, +0x67, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x00, +0x08, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x74, +0x61, 0x6e, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x00, 0x09, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, +0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x00, 0x20, 0x42, 0x49, 0x55, 0x5f, 0x54, 0x41, 0x4d, 0x59, 0x00, +0x00, 0x00, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x03, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x11, 0x02, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x73, 0x68, 0x6f, 0x77, 0x49, 0x6d, 0x61, 0x67, 0x65, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03, 0x20, 0x42, 0x49, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x21, +0x00, 0x00, 0x00, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x00, 0x00, 0x02, 0x03, 0x00, 0x53, 0x4e, 0x4f, 0x43, +0x5f, 0x54, 0x41, 0x4d, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x42, 0x55, 0x53, +0x5f, 0x54, 0x41, 0x4d, 0x17, 0x00, 0x00, 0x00, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, +0x6d, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x53, 0x4f, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, +0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x4f, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x45, 0x4c, +0x42, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x44, 0x4d, 0x52, 0x54, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, +0x00, 0x00, 0x00, 0x4c, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x49, 0x52, 0x57, 0x43, +0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x53, 0x57, 0x45, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, +0x00, 0x01, 0x49, 0x52, 0x57, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x53, 0x45, 0x54, 0x44, 0x5f, +0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x54, 0x53, 0x4e, 0x49, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, +0x00, 0x53, 0x43, 0x32, 0x41, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x43, 0x32, 0x41, 0x5f, 0x54, +0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x4d, 0x55, 0x43, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, +0x50, 0x4f, 0x52, 0x50, 0x5f, 0x54, 0x41, 0x4d, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x44, 0x41, 0x48, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x4d, 0x48, 0x53, 0x5f, 0x54, 0x41, +0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x54, +0x46, 0x45, 0x52, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x52, 0x4f, 0x49, 0x43, 0x5f, 0x54, 0x41, 0x4d, +0x01, 0x00, 0x00, 0x00, 0x01, 0x41, 0x51, 0x45, 0x52, 0x5f, 0x54, 0x41, 0x4d, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, +0x00, 0x41, 0x41, 0x50, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x52, 0x41, 0x56, 0x53, 0x5f, 0x54, +0x41, 0x4d, 0x04, 0x00, 0x00, 0x00, 0x9a, 0x99, 0x19, 0x3e, 0x52, 0x48, 0x54, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x04, 0x00, +0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x4f, 0x44, 0x45, 0x56, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x03, 0x52, +0x54, 0x4e, 0x49, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x50, 0x44, 0x53, 0x43, 0x5f, 0x54, 0x41, 0x4d, +0x01, 0x00, 0x00, 0x00, 0x01, 0x54, 0x58, 0x45, 0x54, 0x5f, 0x43, 0x49, 0x44, 0x69, 0x28, 0x00, 0x00, 0xae, 0x01, 0x00, +0x00, 0x23, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x30, 0x30, 0x20, 0x65, 0x73, 0x00, 0x6c, 0x61, 0x79, +0x6f, 0x75, 0x74, 0x28, 0x73, 0x74, 0x64, 0x31, 0x34, 0x30, 0x29, 0x20, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, +0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x7b, 0x00, 0x6d, 0x61, 0x74, 0x34, +0x20, 0x61, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x62, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x63, 0x3b, 0x00, +0x6d, 0x61, 0x74, 0x34, 0x20, 0x64, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x65, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, +0x20, 0x66, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x67, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x68, 0x3b, 0x00, +0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x69, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, +0x74, 0x20, 0x6a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6b, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6c, +0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6d, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6e, 0x3b, 0x00, 0x76, 0x65, +0x63, 0x32, 0x20, 0x6f, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, +0x70, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x71, 0x3b, 0x00, +0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x3b, 0x00, 0x6d, 0x65, +0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, +0x20, 0x75, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x3b, +0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x77, 0x3b, 0x00, 0x6d, 0x65, +0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x78, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, +0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x79, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, +0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, +0x61, 0x74, 0x20, 0x61, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, +0x62, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x75, 0x76, 0x65, 0x63, 0x33, 0x20, 0x63, 0x7a, +0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x64, 0x7a, 0x3b, 0x00, 0x6d, +0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x65, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, +0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, +0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x67, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, +0x76, 0x65, 0x63, 0x33, 0x20, 0x68, 0x7a, 0x5b, 0x39, 0x5d, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, +0x76, 0x65, 0x63, 0x33, 0x20, 0x69, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, +0x61, 0x74, 0x20, 0x6a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, +0x6b, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6c, 0x7a, 0x3b, +0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6d, 0x7a, 0x3b, 0x00, 0x6d, 0x65, +0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x6e, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, +0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6f, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x70, 0x7a, +0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x71, 0x7a, 0x3b, 0x00, 0x6d, +0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, +0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, +0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, +0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, +0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, +0x61, 0x74, 0x20, 0x77, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, +0x78, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x79, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x7a, +0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x61, 0x7a, 0x7a, +0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x62, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x63, +0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, +0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x65, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, +0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x67, 0x7a, +0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x68, 0x7a, 0x7a, +0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x69, 0x7a, 0x7a, 0x3b, +0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6a, 0x7a, 0x7a, 0x3b, 0x00, +0x6d, 0x61, 0x74, 0x34, 0x20, 0x6b, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x6c, 0x7a, 0x7a, 0x3b, 0x00, +0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6d, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, +0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6e, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, +0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6f, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, +0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x70, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, +0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x71, 0x7a, 0x7a, 0x5b, 0x36, 0x30, 0x5d, 0x3b, 0x00, 0x7d, 0x20, +0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x3b, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x20, +0x6f, 0x75, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, +0x65, 0x78, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, +0x3d, 0x20, 0x30, 0x29, 0x20, 0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, +0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x61, 0x72, +0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x6f, 0x75, 0x74, 0x20, 0x76, +0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, +0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, +0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, +0x6e, 0x28, 0x29, 0x00, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, +0x20, 0x67, 0x6c, 0x5f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, +0x20, 0x5f, 0x32, 0x39, 0x31, 0x20, 0x3d, 0x20, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, +0x6e, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x33, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x31, 0x3b, +0x00, 0x5f, 0x33, 0x33, 0x33, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x31, 0x2e, 0x7a, 0x20, 0x2a, 0x20, 0x28, +0x2d, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x30, 0x2e, 0x35, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x32, +0x36, 0x37, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, +0x20, 0x2a, 0x20, 0x5f, 0x33, 0x33, 0x33, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x36, 0x39, 0x20, +0x3d, 0x20, 0x5f, 0x32, 0x36, 0x37, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x34, 0x33, 0x3b, +0x00, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x32, 0x36, 0x39, 0x29, 0x20, 0x3c, 0x20, 0x31, 0x2e, 0x30, +0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x33, +0x37, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x36, 0x37, 0x3b, 0x00, 0x5f, 0x33, 0x33, 0x37, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, +0x5f, 0x32, 0x36, 0x39, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x20, 0x3f, 0x20, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x38, +0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x20, 0x3a, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, +0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x37, 0x3b, +0x00, 0x7d, 0x00, 0x65, 0x6c, 0x73, 0x65, 0x00, 0x5f, 0x33, 0x34, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x36, 0x37, 0x3b, +0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x32, 0x38, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x34, 0x33, 0x20, 0x2a, 0x20, +0x28, 0x31, 0x2e, 0x30, 0x20, 0x2f, 0x20, 0x5f, 0x33, 0x34, 0x33, 0x2e, 0x77, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, +0x20, 0x5f, 0x32, 0x39, 0x38, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x32, 0x39, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x2a, 0x20, 0x30, +0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, +0x34, 0x20, 0x5f, 0x33, 0x34, 0x30, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x3b, 0x00, +0x5f, 0x33, 0x34, 0x30, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x38, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x33, 0x34, +0x30, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x38, 0x2e, 0x79, 0x3b, 0x00, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, +0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x34, 0x30, 0x3b, 0x00, 0x76, +0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, +0x78, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x33, 0x2e, 0x78, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, +0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, +0x33, 0x2e, 0x79, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, +0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x33, 0x2e, 0x7a, 0x3b, 0x00, 0x67, 0x6c, +0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x31, 0x3b, 0x00, 0x67, 0x6c, +0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, +0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x2d, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x30, +0x2e, 0x35, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, +0x3d, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, +0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x64, 0x6f, 0x74, 0x28, 0x67, 0x6c, 0x5f, 0x50, 0x6f, +0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x77, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, +0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x29, 0x3b, 0x00, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6d, +0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3b, 0x00, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, +0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x69, 0x6e, 0x74, 0x3b, 0x00, 0x76, 0x65, 0x63, +0x34, 0x20, 0x5f, 0x35, 0x35, 0x33, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x61, +0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x62, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, +0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x63, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, +0x20, 0x64, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x65, 0x3b, 0x00, 0x68, 0x69, +0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x66, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, +0x74, 0x34, 0x20, 0x67, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x68, 0x3b, 0x00, +0x76, 0x65, 0x63, 0x32, 0x20, 0x69, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, +0x6a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6b, 0x3b, 0x00, 0x68, 0x69, +0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6c, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, +0x63, 0x34, 0x20, 0x6d, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6e, 0x3b, 0x00, +0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6f, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, +0x70, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x71, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, +0x6f, 0x61, 0x74, 0x20, 0x72, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, +0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, +0x61, 0x74, 0x20, 0x75, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, +0x20, 0x77, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x78, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x79, +0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x61, 0x7a, 0x3b, +0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x62, 0x7a, 0x3b, 0x00, 0x75, 0x76, 0x65, 0x63, 0x33, 0x20, 0x63, 0x7a, 0x3b, 0x00, +0x75, 0x69, 0x6e, 0x74, 0x20, 0x64, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x65, 0x7a, 0x3b, 0x00, 0x66, 0x6c, +0x6f, 0x61, 0x74, 0x20, 0x66, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x67, 0x7a, 0x3b, 0x00, 0x76, 0x65, +0x63, 0x33, 0x20, 0x68, 0x7a, 0x5b, 0x39, 0x5d, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x69, 0x7a, 0x3b, 0x00, 0x66, +0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6a, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6b, 0x7a, 0x3b, 0x00, 0x76, 0x65, +0x63, 0x34, 0x20, 0x6c, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6d, 0x7a, 0x3b, 0x00, 0x75, 0x69, 0x6e, 0x74, +0x20, 0x6e, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6f, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, +0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x70, 0x7a, 0x3b, 0x00, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x71, 0x7a, 0x3b, 0x00, 0x66, +0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x7a, 0x3b, 0x00, 0x66, +0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x7a, 0x3b, 0x00, 0x66, +0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x77, 0x7a, 0x3b, 0x00, 0x75, +0x69, 0x6e, 0x74, 0x20, 0x78, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x79, +0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x7a, 0x7a, 0x3b, 0x00, 0x66, +0x6c, 0x6f, 0x61, 0x74, 0x20, 0x61, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, +0x74, 0x20, 0x62, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x63, +0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x7a, 0x7a, 0x3b, +0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x65, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x7a, 0x7a, +0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x67, 0x7a, 0x7a, 0x3b, 0x00, 0x66, +0x6c, 0x6f, 0x61, 0x74, 0x20, 0x68, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x69, 0x7a, 0x7a, 0x3b, +0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6a, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, +0x74, 0x34, 0x20, 0x6b, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x6c, +0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6d, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, +0x20, 0x6e, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6f, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, +0x61, 0x74, 0x20, 0x70, 0x7a, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x71, 0x7a, 0x7a, 0x5b, 0x36, 0x30, 0x5d, +0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x73, 0x74, 0x64, 0x31, 0x34, 0x30, 0x29, 0x20, 0x75, 0x6e, 0x69, +0x66, 0x6f, 0x72, 0x6d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, +0x76, 0x65, 0x63, 0x34, 0x20, 0x62, 0x3b, 0x00, 0x69, 0x6e, 0x74, 0x20, 0x63, 0x3b, 0x00, 0x7d, 0x20, 0x6d, 0x61, 0x74, +0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, +0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x6d, +0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x3b, +0x00, 0x69, 0x6e, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, +0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, +0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, +0x63, 0x34, 0x20, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, +0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x34, 0x30, 0x37, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, +0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x61, 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x63, 0x6c, 0x61, 0x6d, +0x70, 0x28, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x2e, 0x78, +0x79, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x31, +0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x68, 0x69, 0x67, +0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x34, 0x30, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x37, 0x2e, +0x78, 0x79, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x31, 0x31, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, +0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x63, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x3b, 0x00, 0x62, +0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x31, 0x38, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x31, 0x31, 0x29, +0x00, 0x5f, 0x34, 0x31, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x37, 0x2e, 0x78, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, +0x3b, 0x00, 0x5f, 0x34, 0x31, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x31, 0x31, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, +0x5f, 0x34, 0x32, 0x35, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x31, 0x38, 0x29, 0x00, 0x5f, 0x34, 0x32, +0x35, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x37, 0x2e, 0x78, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x34, +0x32, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x31, 0x38, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x33, 0x32, +0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x32, 0x35, 0x29, 0x00, 0x5f, 0x34, 0x33, 0x32, 0x20, 0x3d, 0x20, +0x5f, 0x34, 0x30, 0x37, 0x2e, 0x79, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x34, 0x33, 0x32, 0x20, 0x3d, +0x20, 0x5f, 0x34, 0x32, 0x35, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x33, 0x39, 0x3b, 0x00, 0x69, 0x66, +0x20, 0x28, 0x21, 0x5f, 0x34, 0x33, 0x32, 0x29, 0x00, 0x5f, 0x34, 0x33, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x37, +0x2e, 0x79, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x34, 0x33, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x33, +0x32, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x35, 0x34, 0x39, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x34, +0x33, 0x39, 0x29, 0x00, 0x5f, 0x35, 0x34, 0x39, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, +0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, 0x3b, 0x00, 0x5f, 0x34, 0x30, 0x38, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x31, 0x2e, +0x30, 0x20, 0x2d, 0x20, 0x5f, 0x34, 0x30, 0x37, 0x2e, 0x79, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x34, 0x35, +0x34, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x6d, 0x61, 0x74, 0x65, +0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x5f, 0x34, +0x30, 0x38, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x70, 0x29, +0x2c, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, +0x5f, 0x34, 0x35, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x35, 0x34, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, +0x5f, 0x34, 0x35, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x35, 0x34, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x34, +0x35, 0x36, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x35, 0x32, 0x37, 0x3b, 0x00, 0x5f, 0x35, 0x32, 0x37, 0x2e, +0x78, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x35, 0x39, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x35, 0x32, 0x37, 0x2e, 0x79, 0x20, 0x3d, +0x20, 0x5f, 0x34, 0x35, 0x39, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x35, 0x32, 0x37, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x34, +0x35, 0x39, 0x2e, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x34, 0x37, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x35, +0x32, 0x37, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2b, 0x20, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, +0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, +0x5f, 0x34, 0x35, 0x36, 0x29, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x35, 0x33, 0x34, 0x20, 0x3d, 0x20, +0x76, 0x65, 0x63, 0x34, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x5f, 0x35, 0x33, 0x34, 0x2e, 0x78, 0x20, 0x3d, 0x20, +0x5f, 0x34, 0x37, 0x35, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x35, 0x33, 0x34, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x37, +0x35, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x35, 0x33, 0x34, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x37, 0x35, 0x2e, 0x7a, +0x3b, 0x00, 0x5f, 0x35, 0x34, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x33, 0x34, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x43, +0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x34, 0x39, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x39, +0x32, 0x39, 0x3b, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, +0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x69, 0x62, +0x6c, 0x53, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x3b, 0x00, 0x69, 0x6e, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, +0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, +0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x39, +0x30, 0x30, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, +0x73, 0x2e, 0x63, 0x5b, 0x32, 0x5d, 0x2e, 0x77, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x00, 0x5f, 0x39, 0x30, +0x30, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x62, 0x5b, +0x33, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2d, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, +0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x5f, 0x39, 0x30, 0x30, 0x20, +0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x62, 0x5b, 0x32, 0x5d, +0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x35, 0x36, +0x39, 0x20, 0x3d, 0x20, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x28, 0x5f, 0x39, 0x30, 0x30, 0x29, 0x3b, +0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x35, 0x36, 0x39, 0x20, 0x3d, 0x20, +0x5f, 0x35, 0x36, 0x39, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x36, 0x30, +0x31, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x61, +0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, +0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, +0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x31, 0x2e, +0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, +0x5f, 0x36, 0x30, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x30, 0x31, 0x2e, 0x78, 0x79, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, +0x20, 0x5f, 0x36, 0x30, 0x35, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, +0x6d, 0x73, 0x2e, 0x63, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x31, 0x32, +0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x36, 0x30, 0x35, 0x29, 0x00, 0x5f, 0x36, 0x31, 0x32, 0x20, 0x3d, 0x20, +0x5f, 0x36, 0x30, 0x31, 0x2e, 0x78, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x31, 0x32, 0x20, 0x3d, +0x20, 0x5f, 0x36, 0x30, 0x35, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x31, 0x39, 0x3b, 0x00, 0x69, 0x66, +0x20, 0x28, 0x21, 0x5f, 0x36, 0x31, 0x32, 0x29, 0x00, 0x5f, 0x36, 0x31, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x30, 0x31, +0x2e, 0x78, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x31, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x31, +0x32, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x32, 0x36, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, +0x36, 0x31, 0x39, 0x29, 0x00, 0x5f, 0x36, 0x32, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x30, 0x31, 0x2e, 0x79, 0x20, 0x3c, +0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x32, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x31, 0x39, 0x3b, 0x00, 0x62, +0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x33, 0x33, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x36, 0x32, 0x36, 0x29, +0x00, 0x5f, 0x36, 0x33, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x30, 0x31, 0x2e, 0x79, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, +0x3b, 0x00, 0x5f, 0x36, 0x33, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x32, 0x36, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, +0x5f, 0x39, 0x31, 0x35, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x36, 0x33, 0x33, 0x29, 0x00, 0x5f, 0x39, 0x31, 0x35, +0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, 0x3b, +0x00, 0x5f, 0x36, 0x30, 0x32, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x36, 0x30, 0x31, +0x2e, 0x79, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x36, 0x34, 0x38, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x78, 0x28, +0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, +0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x5f, 0x36, 0x30, 0x32, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, +0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x70, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, +0x2e, 0x30, 0x29, 0x29, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x36, 0x35, 0x30, 0x20, 0x3d, 0x20, 0x5f, +0x36, 0x34, 0x38, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x36, 0x35, 0x33, 0x20, 0x3d, 0x20, 0x5f, +0x36, 0x34, 0x38, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x36, 0x35, 0x30, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, +0x20, 0x5f, 0x38, 0x37, 0x37, 0x3b, 0x00, 0x5f, 0x38, 0x37, 0x37, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x35, 0x33, +0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x38, 0x37, 0x37, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x35, 0x33, 0x2e, 0x79, 0x3b, +0x00, 0x5f, 0x38, 0x37, 0x37, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x35, 0x33, 0x2e, 0x7a, 0x3b, 0x00, 0x76, 0x65, +0x63, 0x33, 0x20, 0x5f, 0x36, 0x36, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x37, 0x37, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2b, +0x20, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, 0x2e, 0x78, +0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x36, 0x35, 0x30, 0x29, 0x29, 0x3b, 0x00, +0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x38, 0x38, 0x34, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x31, 0x2e, 0x30, +0x29, 0x3b, 0x00, 0x5f, 0x38, 0x38, 0x34, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x36, 0x39, 0x2e, 0x78, 0x3b, 0x00, +0x5f, 0x38, 0x38, 0x34, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x36, 0x39, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x38, 0x38, +0x34, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x36, 0x39, 0x2e, 0x7a, 0x3b, 0x00, 0x5f, 0x39, 0x31, 0x35, 0x20, 0x3d, +0x20, 0x5f, 0x38, 0x38, 0x34, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, +0x39, 0x31, 0x35, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x34, 0x37, 0x37, +0x20, 0x3d, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, +0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, +0x72, 0x6d, 0x73, 0x2e, 0x62, 0x5b, 0x33, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, +0x34, 0x37, 0x39, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, +0x34, 0x20, 0x5f, 0x39, 0x32, 0x33, 0x3b, 0x00, 0x64, 0x6f, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, +0x61, 0x74, 0x20, 0x5f, 0x37, 0x31, 0x37, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x28, 0x5f, 0x34, 0x37, +0x37, 0x29, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x37, 0x31, 0x37, 0x20, 0x3e, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, +0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x64, 0x7a, 0x7a, 0x29, 0x00, 0x5f, 0x39, 0x32, 0x33, 0x20, 0x3d, +0x20, 0x5f, 0x34, 0x37, 0x39, 0x3b, 0x00, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, +0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, 0x33, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x37, 0x37, 0x2e, 0x79, 0x3b, +0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, 0x33, 0x34, 0x20, 0x3d, 0x20, +0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x63, 0x7a, 0x7a, 0x20, 0x2a, 0x20, +0x5f, 0x37, 0x33, 0x33, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x39, +0x31, 0x36, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x37, 0x33, 0x34, 0x29, 0x20, 0x3e, 0x20, +0x30, 0x2e, 0x30, 0x30, 0x31, 0x32, 0x35, 0x29, 0x00, 0x5f, 0x39, 0x31, 0x36, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x2d, 0x66, +0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x78, 0x29, 0x20, 0x2a, +0x20, 0x65, 0x78, 0x70, 0x28, 0x28, 0x2d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, +0x2e, 0x63, 0x7a, 0x7a, 0x29, 0x20, 0x2a, 0x20, 0x5f, 0x37, 0x33, 0x33, 0x20, 0x2b, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, +0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x79, 0x29, 0x20, 0x2b, 0x20, 0x66, 0x72, 0x61, +0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x7a, 0x29, 0x20, 0x2f, 0x20, 0x5f, +0x37, 0x33, 0x34, 0x3b, 0x00, 0x5f, 0x39, 0x31, 0x36, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, +0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, +0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, 0x36, 0x32, 0x20, 0x3d, 0x20, 0x65, 0x78, 0x70, 0x28, 0x2d, 0x28, 0x5f, 0x39, 0x31, +0x36, 0x20, 0x2a, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x5f, 0x37, 0x31, 0x37, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, +0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x7a, 0x7a, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x3b, +0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x37, 0x36, 0x32, 0x20, 0x3d, +0x20, 0x5f, 0x37, 0x36, 0x32, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, 0x36, 0x37, 0x20, 0x3d, 0x20, +0x6d, 0x69, 0x6e, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x37, 0x36, +0x32, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x61, 0x7a, 0x7a, +0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x39, 0x31, 0x37, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x66, 0x72, +0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x7a, 0x7a, 0x20, 0x3e, 0x20, 0x30, 0x2e, +0x30, 0x29, 0x00, 0x5f, 0x39, 0x31, 0x37, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, +0x72, 0x6d, 0x73, 0x2e, 0x65, 0x7a, 0x7a, 0x20, 0x2a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x6f, 0x64, +0x28, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x69, 0x62, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x2c, 0x20, +0x5f, 0x34, 0x37, 0x37, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, +0x67, 0x7a, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x5f, 0x39, 0x31, 0x37, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, +0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x65, 0x7a, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, +0x5f, 0x37, 0x38, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x39, 0x31, 0x37, 0x20, 0x2a, 0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, +0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x37, 0x36, 0x37, 0x29, 0x3b, +0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x39, 0x32, 0x32, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, +0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x68, 0x7a, 0x7a, 0x20, 0x3e, 0x20, 0x30, 0x2e, 0x30, 0x29, +0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x38, 0x30, 0x33, 0x20, 0x3d, 0x20, +0x65, 0x78, 0x70, 0x28, 0x2d, 0x28, 0x5f, 0x39, 0x31, 0x36, 0x20, 0x2a, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x5f, 0x37, 0x31, +0x37, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x67, 0x7a, +0x7a, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6d, 0x70, 0x5f, +0x63, 0x6f, 0x70, 0x79, 0x5f, 0x38, 0x30, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x30, 0x33, 0x3b, 0x00, 0x5f, 0x39, 0x32, +0x32, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x38, 0x39, 0x20, 0x2b, 0x20, 0x28, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, +0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6b, 0x7a, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, +0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6b, 0x7a, 0x2e, 0x77, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x70, +0x6f, 0x77, 0x28, 0x6d, 0x61, 0x78, 0x28, 0x64, 0x6f, 0x74, 0x28, 0x2d, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, +0x35, 0x36, 0x39, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, +0x7a, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, +0x72, 0x6d, 0x73, 0x2e, 0x68, 0x7a, 0x7a, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x6d, 0x70, +0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x38, 0x30, 0x33, 0x29, 0x29, 0x29, 0x3b, 0x00, 0x5f, 0x39, 0x32, 0x32, 0x20, 0x3d, +0x20, 0x5f, 0x37, 0x38, 0x39, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x38, 0x33, 0x35, 0x20, 0x3d, 0x20, 0x28, +0x5f, 0x34, 0x37, 0x39, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x37, +0x36, 0x37, 0x29, 0x29, 0x20, 0x2b, 0x20, 0x5f, 0x39, 0x32, 0x32, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x38, +0x39, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x37, 0x39, 0x3b, 0x00, 0x5f, 0x38, 0x39, 0x35, 0x2e, 0x78, 0x20, 0x3d, 0x20, +0x5f, 0x38, 0x33, 0x35, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x38, 0x39, 0x35, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x33, +0x35, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x38, 0x39, 0x35, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x33, 0x35, 0x2e, 0x7a, +0x3b, 0x00, 0x5f, 0x39, 0x32, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x39, 0x35, 0x3b, 0x00, 0x7d, 0x20, 0x77, 0x68, 0x69, +0x6c, 0x65, 0x28, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, +0x20, 0x3d, 0x20, 0x5f, 0x39, 0x32, 0x33, 0x3b, 0x00, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x50, 0x65, 0x72, 0x52, +0x65, 0x6e, 0x64, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, +0x6d, 0x61, 0x74, 0x34, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, +0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x33, 0x20, 0x77, 0x6f, +0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x4d, 0x61, +0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x6d, 0x6f, 0x72, +0x70, 0x68, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, +0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x3b, +0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, +0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, 0x72, 0x44, 0x61, +0x74, 0x61, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, +0x76, 0x65, 0x64, 0x5b, 0x38, 0x5d, 0x3b, 0x00, 0x7d, 0x3b, 0x00, 0x23, 0x69, 0x66, 0x6e, 0x64, 0x65, 0x66, 0x20, 0x53, +0x50, 0x49, 0x52, 0x56, 0x5f, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, +0x49, 0x44, 0x5f, 0x31, 0x00, 0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x53, 0x50, 0x49, 0x52, 0x56, 0x5f, 0x43, +0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x31, 0x20, 0x36, +0x34, 0x00, 0x23, 0x65, 0x6e, 0x64, 0x69, 0x66, 0x00, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x43, +0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x53, 0x20, +0x3d, 0x20, 0x53, 0x50, 0x49, 0x52, 0x56, 0x5f, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x41, +0x4e, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x31, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x73, 0x74, 0x64, 0x31, +0x34, 0x30, 0x29, 0x20, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, +0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x50, 0x65, 0x72, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, +0x44, 0x61, 0x74, 0x61, 0x20, 0x61, 0x5b, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x49, 0x4e, +0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x53, 0x5d, 0x3b, 0x00, 0x7d, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, +0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x3b, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x68, 0x69, 0x67, 0x68, +0x70, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, +0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, +0x30, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x75, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6f, +0x75, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3b, 0x00, 0x69, 0x6e, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, +0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, +0x3b, 0x00, 0x6f, 0x75, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x6f, 0x62, 0x6a, +0x65, 0x63, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x61, 0x5b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, +0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5d, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x3b, 0x00, +0x6f, 0x75, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, +0x42, 0x69, 0x74, 0x73, 0x54, 0x6f, 0x55, 0x69, 0x6e, 0x74, 0x28, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, +0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x2f, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, +0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x77, 0x29, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, +0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x23, 0x76, 0x65, 0x72, 0x73, 0x69, +0x6f, 0x6e, 0x20, 0x34, 0x31, 0x30, 0x00, 0x23, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x47, 0x4c, +0x5f, 0x41, 0x52, 0x42, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, +0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x3a, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x00, 0x6c, +0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x38, 0x29, 0x20, +0x66, 0x6c, 0x61, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, +0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, +0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, +0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x6c, 0x61, 0x79, +0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x34, 0x29, 0x20, 0x6f, 0x75, +0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, +0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, +0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x37, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, +0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, +0x20, 0x5f, 0x32, 0x39, 0x32, 0x20, 0x3d, 0x20, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, +0x6e, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x33, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x32, 0x3b, +0x00, 0x5f, 0x33, 0x33, 0x34, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x66, 0x6d, 0x61, 0x28, 0x5f, 0x32, 0x39, 0x32, 0x2e, 0x7a, +0x2c, 0x20, 0x2d, 0x30, 0x2e, 0x35, 0x2c, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, +0x32, 0x36, 0x38, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, +0x66, 0x20, 0x2a, 0x20, 0x5f, 0x33, 0x33, 0x34, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x37, 0x30, +0x20, 0x3d, 0x20, 0x5f, 0x32, 0x36, 0x38, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x34, 0x34, +0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x32, 0x37, 0x30, 0x29, 0x20, 0x3c, 0x20, 0x31, 0x2e, +0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, +0x33, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x36, 0x38, 0x3b, 0x00, 0x5f, 0x33, 0x33, 0x38, 0x2e, 0x77, 0x20, 0x3d, 0x20, +0x28, 0x5f, 0x32, 0x37, 0x30, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x20, 0x3f, 0x20, 0x28, 0x2d, 0x31, 0x2e, 0x30, +0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x20, 0x3a, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, +0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x38, +0x3b, 0x00, 0x5f, 0x33, 0x34, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x36, 0x38, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, +0x5f, 0x32, 0x38, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x34, 0x34, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2f, +0x20, 0x5f, 0x33, 0x34, 0x34, 0x2e, 0x77, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x32, 0x39, 0x39, 0x20, +0x3d, 0x20, 0x28, 0x5f, 0x32, 0x39, 0x32, 0x2e, 0x78, 0x79, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, +0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x34, 0x31, +0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x31, 0x2e, 0x78, +0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x39, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x31, 0x2e, 0x79, 0x20, 0x3d, 0x20, +0x5f, 0x32, 0x39, 0x39, 0x2e, 0x79, 0x3b, 0x00, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, +0x67, 0x65, 0x55, 0x56, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x34, 0x31, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, +0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x32, +0x38, 0x34, 0x2e, 0x78, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, +0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x34, 0x2e, 0x79, 0x3b, 0x00, 0x76, +0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, +0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x34, 0x2e, 0x7a, 0x3b, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, +0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x32, 0x3b, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, +0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x66, 0x6d, 0x61, 0x28, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, +0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x2c, 0x20, 0x2d, 0x30, 0x2e, 0x35, 0x2c, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x75, +0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x6d, 0x61, 0x74, +0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x3b, 0x00, 0x6c, +0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x30, 0x29, 0x20, +0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, +0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x34, 0x30, 0x37, 0x20, 0x3d, 0x20, 0x6d, 0x61, +0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x61, 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, +0x34, 0x28, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, +0x67, 0x65, 0x55, 0x56, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, +0x76, 0x65, 0x63, 0x32, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, +0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x34, 0x30, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x37, 0x2e, +0x78, 0x79, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x37, 0x36, 0x32, 0x3b, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, +0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, +0x5f, 0x69, 0x62, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, +0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x34, 0x29, 0x20, 0x69, 0x6e, 0x20, 0x76, 0x65, +0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, +0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x73, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x69, +0x65, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x66, 0x6f, 0x67, 0x28, 0x69, 0x6e, 0x6f, 0x75, 0x74, 0x20, 0x76, +0x65, 0x63, 0x34, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x69, 0x65, 0x77, +0x29, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x31, 0x37, 0x37, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, +0x68, 0x28, 0x76, 0x69, 0x65, 0x77, 0x29, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x31, 0x37, 0x37, 0x20, 0x3e, 0x20, +0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x64, 0x7a, 0x7a, 0x29, 0x00, 0x72, +0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, +0x32, 0x30, 0x35, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, +0x63, 0x7a, 0x7a, 0x20, 0x2a, 0x20, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x79, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, +0x5f, 0x37, 0x35, 0x33, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x32, 0x30, 0x35, 0x29, 0x20, +0x3e, 0x20, 0x30, 0x2e, 0x30, 0x30, 0x31, 0x32, 0x35, 0x29, 0x00, 0x5f, 0x37, 0x35, 0x33, 0x20, 0x3d, 0x20, 0x66, 0x6d, +0x61, 0x28, 0x2d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, +0x78, 0x2c, 0x20, 0x65, 0x78, 0x70, 0x28, 0x66, 0x6d, 0x61, 0x28, 0x2d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, +0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x63, 0x7a, 0x7a, 0x2c, 0x20, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x79, 0x2c, 0x20, 0x66, +0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x79, 0x29, 0x29, 0x2c, +0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x7a, 0x29, +0x20, 0x2f, 0x20, 0x5f, 0x32, 0x30, 0x35, 0x3b, 0x00, 0x5f, 0x37, 0x35, 0x33, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, +0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, +0x74, 0x20, 0x5f, 0x32, 0x34, 0x35, 0x20, 0x3d, 0x20, 0x6d, 0x69, 0x6e, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x65, +0x78, 0x70, 0x28, 0x2d, 0x28, 0x5f, 0x37, 0x35, 0x33, 0x20, 0x2a, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x5f, 0x31, 0x37, 0x37, +0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x7a, 0x7a, 0x2c, +0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, +0x6d, 0x73, 0x2e, 0x61, 0x7a, 0x7a, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x37, 0x35, 0x34, 0x3b, 0x00, +0x5f, 0x37, 0x35, 0x34, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, +0x2e, 0x65, 0x7a, 0x7a, 0x20, 0x2a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x6f, 0x64, 0x28, 0x6c, 0x69, +0x67, 0x68, 0x74, 0x5f, 0x69, 0x62, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x2c, 0x20, 0x76, 0x69, 0x65, +0x77, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x67, 0x7a, 0x29, +0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x5f, 0x37, 0x35, 0x34, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, +0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x65, 0x7a, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x32, 0x37, +0x37, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x35, 0x34, 0x20, 0x2a, 0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, +0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x32, 0x34, 0x35, 0x29, 0x3b, 0x00, 0x76, 0x65, +0x63, 0x33, 0x20, 0x5f, 0x37, 0x35, 0x36, 0x3b, 0x00, 0x5f, 0x37, 0x35, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x37, +0x20, 0x2b, 0x20, 0x28, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6b, +0x7a, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, +0x73, 0x2e, 0x6b, 0x7a, 0x2e, 0x77, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x28, 0x6d, 0x61, 0x78, 0x28, 0x64, +0x6f, 0x74, 0x28, 0x2d, 0x73, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x2c, 0x20, 0x66, 0x72, +0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x7a, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, +0x29, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x68, 0x7a, 0x7a, +0x29, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x65, 0x78, 0x70, 0x28, 0x2d, 0x28, 0x5f, 0x37, 0x35, +0x33, 0x20, 0x2a, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x5f, 0x31, 0x37, 0x37, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, +0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x67, 0x7a, 0x7a, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, +0x29, 0x29, 0x29, 0x3b, 0x00, 0x5f, 0x37, 0x35, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x37, 0x3b, 0x00, 0x76, 0x65, +0x63, 0x34, 0x20, 0x5f, 0x33, 0x32, 0x36, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, +0x33, 0x20, 0x5f, 0x33, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x33, 0x32, 0x36, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, +0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x32, 0x34, 0x35, 0x29, 0x29, 0x20, 0x2b, 0x20, 0x5f, 0x37, 0x35, +0x36, 0x3b, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x32, 0x2e, 0x78, 0x3b, +0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x32, 0x2e, 0x79, 0x3b, 0x00, 0x63, +0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x32, 0x2e, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, +0x33, 0x20, 0x5f, 0x37, 0x33, 0x37, 0x3b, 0x00, 0x5f, 0x37, 0x33, 0x37, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, +0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x62, 0x5b, 0x33, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2d, 0x20, +0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, +0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x5f, 0x37, 0x33, 0x37, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, +0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x62, 0x5b, 0x32, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x73, 0x68, 0x61, +0x64, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x20, 0x3d, 0x20, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, +0x65, 0x28, 0x5f, 0x37, 0x33, 0x37, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x35, 0x39, 0x34, 0x20, 0x3d, +0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x61, 0x20, 0x2a, 0x20, +0x76, 0x65, 0x63, 0x34, 0x28, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, +0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, +0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, +0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x35, 0x39, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x35, +0x39, 0x34, 0x2e, 0x78, 0x79, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x35, 0x39, 0x38, 0x20, 0x3d, 0x20, 0x6d, +0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x63, 0x20, 0x3d, 0x3d, 0x20, 0x30, +0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x30, 0x35, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x35, +0x39, 0x38, 0x29, 0x00, 0x5f, 0x36, 0x30, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x39, 0x34, 0x2e, 0x78, 0x20, 0x3e, 0x20, +0x31, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x30, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x39, 0x38, 0x3b, 0x00, 0x5f, 0x36, +0x31, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x39, 0x34, 0x2e, 0x78, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, +0x36, 0x31, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x39, 0x34, 0x2e, 0x79, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, +0x5f, 0x36, 0x32, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x39, 0x34, 0x2e, 0x79, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, 0x3b, +0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x37, 0x35, 0x32, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x36, 0x32, 0x36, +0x29, 0x00, 0x5f, 0x37, 0x35, 0x32, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, +0x61, 0x6d, 0x73, 0x2e, 0x62, 0x3b, 0x00, 0x5f, 0x35, 0x39, 0x35, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x20, +0x2d, 0x20, 0x5f, 0x35, 0x39, 0x34, 0x2e, 0x79, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x36, 0x34, 0x31, 0x20, +0x3d, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, +0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x5f, 0x35, 0x39, 0x35, +0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x70, 0x29, 0x2c, 0x20, +0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x36, +0x34, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x34, 0x31, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x36, +0x34, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x34, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x36, 0x34, 0x33, +0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x37, 0x32, 0x31, 0x3b, 0x00, 0x5f, 0x37, 0x32, 0x31, 0x2e, 0x78, 0x20, +0x3d, 0x20, 0x5f, 0x36, 0x34, 0x36, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x37, 0x32, 0x31, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, +0x36, 0x34, 0x36, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x37, 0x32, 0x31, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x34, 0x36, +0x2e, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x36, 0x36, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x32, 0x31, +0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2b, 0x20, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, +0x6d, 0x73, 0x2e, 0x62, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x36, +0x34, 0x33, 0x29, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x37, 0x32, 0x38, 0x20, 0x3d, 0x20, 0x76, 0x65, +0x63, 0x34, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x5f, 0x37, 0x32, 0x38, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x36, +0x36, 0x32, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x37, 0x32, 0x38, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x36, 0x32, 0x2e, +0x79, 0x3b, 0x00, 0x5f, 0x37, 0x32, 0x38, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x36, 0x32, 0x2e, 0x7a, 0x3b, 0x00, +0x5f, 0x37, 0x35, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x32, 0x38, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, +0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x35, 0x32, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x70, 0x61, 0x72, 0x61, +0x6d, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, +0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, +0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, +0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x62, 0x5b, 0x33, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x3b, +0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x34, 0x38, 0x32, 0x20, 0x3d, 0x20, 0x66, 0x6f, 0x67, 0x28, 0x70, 0x61, 0x72, +0x61, 0x6d, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x31, 0x29, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, +0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x38, 0x32, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x77, 0x6f, 0x72, +0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, 0x6d, +0x61, 0x74, 0x33, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x6f, +0x72, 0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x6d, 0x6f, 0x72, +0x70, 0x68, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x00, 0x75, 0x69, 0x6e, 0x74, 0x20, +0x66, 0x6c, 0x61, 0x67, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x3b, 0x00, 0x75, 0x69, 0x6e, 0x74, 0x20, +0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, 0x72, +0x44, 0x61, 0x74, 0x61, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5b, +0x38, 0x5d, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, +0x3d, 0x20, 0x38, 0x29, 0x20, 0x66, 0x6c, 0x61, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x73, +0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, +0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x75, 0x76, +0x65, 0x63, 0x32, 0x20, 0x6f, 0x75, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, +0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x37, 0x29, 0x20, 0x69, 0x6e, 0x20, +0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, +0x3b, 0x00, 0x4c, 0x53, 0x4c, 0x47, 0x5f, 0x54, 0x41, 0x4d, 0xdc, 0x08, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x50, 0x01, 0x00, 0x00, 0x01, 0x10, 0x00, 0x6a, +0x00, 0x00, 0x00, 0x01, 0x10, 0x01, 0x84, 0x02, 0x00, 0x00, 0x01, 0x20, 0x01, 0x98, 0x02, 0x00, 0x00, 0x01, 0x30, 0x01, +0x54, 0x04, 0x00, 0x00, 0x01, 0x44, 0x01, 0x96, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0xae, 0x04, 0x00, 0x00, 0x02, 0x00, +0x01, 0x96, 0x05, 0x00, 0x00, 0x02, 0x10, 0x00, 0xae, 0x04, 0x00, 0x00, 0x02, 0x10, 0x01, 0xc8, 0x06, 0x00, 0x00, 0x02, +0x20, 0x01, 0xda, 0x06, 0x00, 0x00, 0x02, 0x30, 0x01, 0x86, 0x08, 0x00, 0x00, 0x02, 0x44, 0x01, 0xc6, 0x08, 0x00, 0x00, +0xbb, 0x07, 0x00, 0x00, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, +0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, +0x10, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, 0x14, 0x00, 0x15, 0x00, 0x16, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, +0x1a, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, +0x24, 0x00, 0x25, 0x00, 0x26, 0x00, 0x27, 0x00, 0x28, 0x00, 0x29, 0x00, 0x2a, 0x00, 0x2b, 0x00, 0x2c, 0x00, 0x2d, 0x00, +0x2e, 0x00, 0x2f, 0x00, 0x30, 0x00, 0x31, 0x00, 0x32, 0x00, 0x33, 0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, +0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x40, 0x00, 0x41, 0x00, +0x42, 0x00, 0x43, 0x00, 0x44, 0x00, 0x45, 0x00, 0x46, 0x00, 0x47, 0x00, 0x48, 0x00, 0x49, 0x00, 0x4a, 0x00, 0x4b, 0x00, +0x4c, 0x00, 0x4d, 0x00, 0x4e, 0x00, 0x02, 0x00, 0x4f, 0x00, 0x50, 0x00, 0x51, 0x00, 0x52, 0x00, 0x53, 0x00, 0x54, 0x00, +0x55, 0x00, 0x56, 0x00, 0x02, 0x00, 0x57, 0x00, 0x58, 0x00, 0x59, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x5c, 0x00, +0x5a, 0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5f, 0x00, 0x60, 0x00, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00, 0x64, 0x00, 0x65, 0x00, +0x66, 0x00, 0x67, 0x00, 0x68, 0x00, 0x69, 0x00, 0x5a, 0x00, 0x06, 0x08, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, +0x6a, 0x00, 0x6b, 0x00, 0x6c, 0x00, 0x01, 0x00, 0x02, 0x00, 0x6d, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x70, 0x00, 0x71, 0x00, +0x72, 0x00, 0x73, 0x00, 0x74, 0x00, 0x75, 0x00, 0x76, 0x00, 0x77, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00, 0x7b, 0x00, +0x7c, 0x00, 0x7d, 0x00, 0x7e, 0x00, 0x7f, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, 0x00, 0x84, 0x00, 0x85, 0x00, +0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, 0x00, +0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, +0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1, 0x00, 0xa2, 0x00, 0xa3, 0x00, +0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, 0x00, +0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0x48, 0x00, 0xb2, 0x00, 0x02, 0x00, 0x6d, 0x00, 0xb3, 0x00, 0xb4, 0x00, +0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0x4e, 0x00, 0x02, 0x00, 0xb9, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, +0xbd, 0x00, 0x02, 0x00, 0xbe, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xbf, 0x00, 0x5a, 0x00, 0xc0, 0x00, 0xc1, 0x00, +0x02, 0x00, 0xc2, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xc3, 0x00, 0x5a, 0x00, 0xc4, 0x00, 0xc5, 0x00, 0x02, 0x00, +0xc6, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xc7, 0x00, 0x5a, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0x02, 0x00, 0xca, 0x00, +0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xcb, 0x00, 0x5a, 0x00, 0xcc, 0x00, 0xcd, 0x00, 0x02, 0x00, 0xce, 0x00, 0x5a, 0x00, +0x5b, 0x00, 0x02, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, +0xd7, 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0x5a, 0x00, 0xdd, 0x00, 0x5a, 0x00, 0x51, 0x00, +0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x6b, 0x00, 0x4e, 0x00, 0x02, 0x00, 0x5a, 0x00, 0x51, 0x0e, +0x00, 0x00, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x6b, 0x00, 0xde, 0x00, 0x01, 0x00, 0x02, 0x00, 0x6d, 0x00, +0x6e, 0x00, 0x6f, 0x00, 0x70, 0x00, 0x71, 0x00, 0x72, 0x00, 0x73, 0x00, 0x74, 0x00, 0x75, 0x00, 0x76, 0x00, 0x77, 0x00, +0x78, 0x00, 0x79, 0x00, 0x7a, 0x00, 0x7b, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7e, 0x00, 0x7f, 0x00, 0x80, 0x00, 0x81, 0x00, +0x82, 0x00, 0x83, 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, 0x00, 0x8a, 0x00, 0x8b, 0x00, +0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, 0x00, +0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, +0xa0, 0x00, 0xa1, 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, 0x00, 0xa8, 0x00, 0xa9, 0x00, +0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0x48, 0x00, 0xb2, 0x00, +0x02, 0x00, 0x6d, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xdf, 0x00, 0xb6, 0x00, 0xe0, 0x00, 0xb7, 0x00, 0xb8, 0x00, +0x4e, 0x00, 0x02, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0x02, 0x00, 0xe3, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xe4, 0x00, +0x5a, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9, 0x00, 0xea, 0x00, 0xeb, 0x00, 0x02, 0x00, 0xec, 0x00, +0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xed, 0x00, 0x5a, 0x00, 0xee, 0x00, 0xef, 0x00, 0x02, 0x00, 0xf0, 0x00, 0x5a, 0x00, +0x5b, 0x00, 0x02, 0x00, 0xf1, 0x00, 0x5a, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0x02, 0x00, 0xf4, 0x00, 0x5a, 0x00, 0x5b, 0x00, +0x02, 0x00, 0xf5, 0x00, 0x5a, 0x00, 0xf6, 0x00, 0xf7, 0x00, 0x02, 0x00, 0xf8, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, +0xf9, 0x00, 0x5a, 0x00, 0xfa, 0x00, 0xfb, 0x00, 0x02, 0x00, 0xfc, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xfd, 0x00, +0xfe, 0x00, 0xff, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x01, 0x05, 0x01, 0x06, 0x01, 0x07, 0x01, +0x08, 0x01, 0x09, 0x01, 0x0a, 0x01, 0x5a, 0x00, 0x0b, 0x01, 0x0c, 0x01, 0x0d, 0x01, 0x0e, 0x01, 0x0f, 0x01, 0x02, 0x00, +0x10, 0x01, 0x11, 0x01, 0x02, 0x00, 0x12, 0x01, 0x13, 0x01, 0x5a, 0x00, 0x14, 0x01, 0x15, 0x01, 0x16, 0x01, 0x17, 0x01, +0x02, 0x00, 0x18, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x19, 0x01, 0x5a, 0x00, 0x1a, 0x01, 0x1b, 0x01, 0x1c, 0x01, +0x1d, 0x01, 0x1e, 0x01, 0x02, 0x00, 0x1f, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x20, 0x01, 0x5a, 0x00, 0x21, 0x01, +0x22, 0x01, 0x23, 0x01, 0x02, 0x00, 0x24, 0x01, 0x25, 0x01, 0x26, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x27, 0x01, +0x5a, 0x00, 0x28, 0x01, 0x29, 0x01, 0x2a, 0x01, 0x2b, 0x01, 0x2c, 0x01, 0x2d, 0x01, 0x13, 0x01, 0x2e, 0x01, 0x2f, 0x01, +0x5a, 0x00, 0x13, 0x03, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x6b, 0x00, 0x30, 0x01, 0x02, 0x00, +0x31, 0x01, 0x32, 0x01, 0x33, 0x01, 0x34, 0x01, 0x35, 0x01, 0x36, 0x01, 0x37, 0x01, 0x38, 0x01, 0x39, 0x01, 0x3a, 0x01, +0x3b, 0x01, 0x3c, 0x01, 0x3d, 0x01, 0x02, 0x00, 0x3e, 0x01, 0x3f, 0x01, 0x40, 0x01, 0x41, 0x01, 0x42, 0x01, 0x4e, 0x00, +0x02, 0x00, 0x43, 0x01, 0x44, 0x01, 0x5a, 0x00, 0x91, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, +0x6b, 0x00, 0xb8, 0x00, 0x4e, 0x00, 0x02, 0x00, 0x45, 0x01, 0x5a, 0x00, 0xea, 0x06, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, +0x46, 0x01, 0x47, 0x01, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, +0x09, 0x00, 0x0a, 0x00, 0x75, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, 0x00, 0x11, 0x00, 0x7c, 0x00, +0x7d, 0x00, 0x14, 0x00, 0x15, 0x00, 0x80, 0x00, 0x17, 0x00, 0x82, 0x00, 0x83, 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, +0x87, 0x00, 0x88, 0x00, 0x89, 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, 0x00, 0x90, 0x00, +0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, 0x00, 0x2c, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, +0x9b, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x35, 0x00, 0x36, 0x00, 0xa1, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, +0xa5, 0x00, 0xa6, 0x00, 0x3d, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0x41, 0x00, 0x42, 0x00, 0xad, 0x00, 0xae, 0x00, +0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0x48, 0x00, 0x48, 0x01, 0x4a, 0x00, 0x49, 0x01, 0x4a, 0x01, 0x4b, 0x01, 0x4e, 0x00, +0x02, 0x00, 0x4f, 0x00, 0x4c, 0x01, 0x4d, 0x01, 0x4e, 0x01, 0x4f, 0x01, 0x50, 0x01, 0x51, 0x01, 0x52, 0x01, 0x02, 0x00, +0x53, 0x01, 0x54, 0x01, 0x55, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x56, 0x01, 0x5a, 0x00, 0x57, 0x01, 0x58, 0x01, +0x59, 0x01, 0x5a, 0x01, 0x5b, 0x01, 0x5c, 0x01, 0x5d, 0x01, 0x5e, 0x01, 0x5f, 0x01, 0x60, 0x01, 0x61, 0x01, 0x68, 0x00, +0x69, 0x00, 0x5a, 0x00, 0x60, 0x07, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x46, 0x01, 0x47, 0x01, 0x6c, 0x00, 0x01, 0x00, +0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x75, 0x00, +0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, 0x00, 0x11, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x14, 0x00, 0x15, 0x00, +0x80, 0x00, 0x17, 0x00, 0x82, 0x00, 0x83, 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, 0x00, +0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, +0x94, 0x00, 0x95, 0x00, 0x2c, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9d, 0x00, +0x9e, 0x00, 0x35, 0x00, 0x36, 0x00, 0xa1, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0x3d, 0x00, +0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0x41, 0x00, 0x42, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, +0x48, 0x00, 0xb2, 0x00, 0x02, 0x00, 0x03, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0xb5, 0x00, 0x62, 0x01, 0x63, 0x01, 0xb8, 0x00, +0x4e, 0x00, 0x02, 0x00, 0x64, 0x01, 0x65, 0x01, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0x02, 0x00, 0xbe, 0x00, 0x5a, 0x00, +0x5b, 0x00, 0x02, 0x00, 0xbf, 0x00, 0x5a, 0x00, 0xc0, 0x00, 0xc1, 0x00, 0x02, 0x00, 0xc2, 0x00, 0x5a, 0x00, 0x5b, 0x00, +0x02, 0x00, 0xc3, 0x00, 0x5a, 0x00, 0xc4, 0x00, 0xc5, 0x00, 0x02, 0x00, 0xc6, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, +0xc7, 0x00, 0x5a, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0x02, 0x00, 0xca, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xcb, 0x00, +0x5a, 0x00, 0xcc, 0x00, 0xcd, 0x00, 0x02, 0x00, 0xce, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xcf, 0x00, 0xd0, 0x00, +0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, +0xdb, 0x00, 0xdc, 0x00, 0x5a, 0x00, 0xdd, 0x00, 0x5a, 0x00, 0x52, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x01, +0x47, 0x01, 0x4e, 0x00, 0x02, 0x00, 0x5a, 0x00, 0x28, 0x0d, 0x00, 0x00, 0xd2, 0x00, 0x00, 0x00, 0x46, 0x01, 0x47, 0x01, +0x66, 0x01, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, +0x0a, 0x00, 0x75, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, 0x00, 0x11, 0x00, 0x7c, 0x00, 0x7d, 0x00, +0x14, 0x00, 0x15, 0x00, 0x80, 0x00, 0x17, 0x00, 0x82, 0x00, 0x83, 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, +0x88, 0x00, 0x89, 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, 0x00, 0x90, 0x00, 0x91, 0x00, +0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, 0x00, 0x2c, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, +0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x35, 0x00, 0x36, 0x00, 0xa1, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0xa5, 0x00, +0xa6, 0x00, 0x3d, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0x41, 0x00, 0x42, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, +0xb0, 0x00, 0xb1, 0x00, 0x48, 0x00, 0xb2, 0x00, 0x02, 0x00, 0x03, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0xb5, 0x00, 0x67, 0x01, +0x62, 0x01, 0x68, 0x01, 0x63, 0x01, 0xb8, 0x00, 0x69, 0x01, 0x6a, 0x01, 0x02, 0x00, 0x6b, 0x01, 0x6c, 0x01, 0x02, 0x00, +0x6d, 0x01, 0x5a, 0x00, 0x6e, 0x01, 0x6f, 0x01, 0x70, 0x01, 0x02, 0x00, 0x71, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, +0x72, 0x01, 0x5a, 0x00, 0x73, 0x01, 0x74, 0x01, 0x1e, 0x01, 0x02, 0x00, 0x75, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, +0x76, 0x01, 0x5a, 0x00, 0x77, 0x01, 0x78, 0x01, 0x23, 0x01, 0x02, 0x00, 0x79, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, +0x7a, 0x01, 0x5a, 0x00, 0x7b, 0x01, 0x7c, 0x01, 0x7d, 0x01, 0x7e, 0x01, 0x7f, 0x01, 0x6d, 0x01, 0x5a, 0x00, 0x4e, 0x00, +0x02, 0x00, 0x80, 0x01, 0xe2, 0x00, 0x02, 0x00, 0x81, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x82, 0x01, 0x5a, 0x00, +0x83, 0x01, 0x84, 0x01, 0x85, 0x01, 0x86, 0x01, 0x87, 0x01, 0x88, 0x01, 0x02, 0x00, 0x89, 0x01, 0x5a, 0x00, 0x5b, 0x00, +0x02, 0x00, 0x8a, 0x01, 0x5a, 0x00, 0xea, 0x00, 0xeb, 0x00, 0x02, 0x00, 0x8b, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, +0xed, 0x00, 0x5a, 0x00, 0xee, 0x00, 0xef, 0x00, 0x02, 0x00, 0x8c, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xf1, 0x00, +0x5a, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0x02, 0x00, 0x8d, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xf5, 0x00, 0x5a, 0x00, +0x8e, 0x01, 0x8f, 0x01, 0x02, 0x00, 0x90, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x91, 0x01, 0x92, 0x01, 0x93, 0x01, +0x94, 0x01, 0x95, 0x01, 0x96, 0x01, 0x97, 0x01, 0x98, 0x01, 0x99, 0x01, 0x9a, 0x01, 0x9b, 0x01, 0x9c, 0x01, 0x9d, 0x01, +0x9e, 0x01, 0x5a, 0x00, 0x9f, 0x01, 0xa0, 0x01, 0xa1, 0x01, 0xa2, 0x01, 0xa3, 0x01, 0x5a, 0x00, 0x02, 0x03, 0x00, 0x00, +0x1c, 0x00, 0x00, 0x00, 0x46, 0x01, 0x47, 0x01, 0x30, 0x01, 0x02, 0x00, 0xa4, 0x01, 0xa5, 0x01, 0xa6, 0x01, 0xa7, 0x01, +0xa8, 0x01, 0xa9, 0x01, 0xaa, 0x01, 0x38, 0x01, 0x39, 0x01, 0x3a, 0x01, 0x3b, 0x01, 0x3c, 0x01, 0x3d, 0x01, 0x02, 0x00, +0x3e, 0x01, 0x3f, 0x01, 0xab, 0x01, 0xac, 0x01, 0xad, 0x01, 0x4e, 0x00, 0x02, 0x00, 0x43, 0x01, 0x44, 0x01, 0x5a, 0x00, +0x92, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x46, 0x01, 0x47, 0x01, 0xb8, 0x00, 0x4e, 0x00, 0x02, 0x00, 0x45, 0x01, +0x5a, 0x00, + +}; + +int IMAGE_IMAGE_OFFSET = 0; +int IMAGE_IMAGE_SIZE = 13622; diff --git a/ios/include/material/image.h b/thermion_flutter/thermion_flutter/windows/include/material/image.h similarity index 100% rename from ios/include/material/image.h rename to thermion_flutter/thermion_flutter/windows/include/material/image.h diff --git a/windows/include/flutter_filament/flutter_filament_plugin_c_api.h b/thermion_flutter/thermion_flutter/windows/include/thermion_flutter/thermion_flutter_plugin_c_api.h similarity index 88% rename from windows/include/flutter_filament/flutter_filament_plugin_c_api.h rename to thermion_flutter/thermion_flutter/windows/include/thermion_flutter/thermion_flutter_plugin_c_api.h index 83de093a..29117bce 100644 --- a/windows/include/flutter_filament/flutter_filament_plugin_c_api.h +++ b/thermion_flutter/thermion_flutter/windows/include/thermion_flutter/thermion_flutter_plugin_c_api.h @@ -13,7 +13,7 @@ extern "C" { #endif -FLUTTER_PLUGIN_EXPORT void FlutterFilamentPluginCApiRegisterWithRegistrar( +FLUTTER_PLUGIN_EXPORT void ThermionFlutterPluginCApiRegisterWithRegistrar( FlutterDesktopPluginRegistrarRef registrar); #if defined(__cplusplus) diff --git a/windows/opengl_texture_buffer.cpp b/thermion_flutter/thermion_flutter/windows/opengl_texture_buffer.cpp similarity index 91% rename from windows/opengl_texture_buffer.cpp rename to thermion_flutter/thermion_flutter/windows/opengl_texture_buffer.cpp index f261abcb..dbaca0ab 100644 --- a/windows/opengl_texture_buffer.cpp +++ b/thermion_flutter/thermion_flutter/windows/opengl_texture_buffer.cpp @@ -7,7 +7,7 @@ #include -namespace flutter_filament { +namespace thermion_filament { void _release_callback(void *releaseContext) { // ((OpenGLTextureBuffer*)releaseContext)->unlock(); @@ -117,11 +117,15 @@ OpenGLTextureBuffer::OpenGLTextureBuffer( flutterTextureId = textureRegistrar->RegisterTexture(texture.get()); std::cout << "Registered Flutter texture ID " << flutterTextureId << std::endl; - std::vector resultList; - resultList.push_back(flutter::EncodableValue(flutterTextureId)); - resultList.push_back(flutter::EncodableValue((int64_t) nullptr)); - resultList.push_back(flutter::EncodableValue(glTextureId)); - result->Success(resultList); + + if (flutterTextureId != -1) { + std::vector resultList; + resultList.push_back(flutter::EncodableValue(flutterTextureId)); + resultList.push_back(flutter::EncodableValue((int64_t) nullptr)); + resultList.push_back(flutter::EncodableValue(glTextureId)); + resultList.push_back(flutter::EncodableValue((int64_t)_context)); + result->Success(resultList); + } } OpenGLTextureBuffer::~OpenGLTextureBuffer() { @@ -137,4 +141,4 @@ OpenGLTextureBuffer::~OpenGLTextureBuffer() { wglMakeCurrent(NULL, NULL); } -} // namespace flutter_filament \ No newline at end of file +} // namespace thermion_filament \ No newline at end of file diff --git a/windows/opengl_texture_buffer.h b/thermion_flutter/thermion_flutter/windows/opengl_texture_buffer.h similarity index 97% rename from windows/opengl_texture_buffer.h rename to thermion_flutter/thermion_flutter/windows/opengl_texture_buffer.h index a8001723..df17c02c 100644 --- a/windows/opengl_texture_buffer.h +++ b/thermion_flutter/thermion_flutter/windows/opengl_texture_buffer.h @@ -20,7 +20,7 @@ typedef uint32_t GLuint; -namespace flutter_filament { +namespace thermion_filament { class OpenGLTextureBuffer : public FlutterTextureBuffer { public: diff --git a/windows/test/flutter_filament_plugin_test.cpp b/thermion_flutter/thermion_flutter/windows/test/thermion_flutter_plugin_test.cpp similarity index 84% rename from windows/test/flutter_filament_plugin_test.cpp rename to thermion_flutter/thermion_flutter/windows/test/thermion_flutter_plugin_test.cpp index af331fb5..38f05c58 100644 --- a/windows/test/flutter_filament_plugin_test.cpp +++ b/thermion_flutter/thermion_flutter/windows/test/thermion_flutter_plugin_test.cpp @@ -8,9 +8,9 @@ #include #include -#include "flutter_filament_plugin.h" +#include "thermion_flutter_plugin.h" -namespace flutter_filament { +namespace thermion_filament { namespace test { namespace { @@ -22,8 +22,8 @@ using flutter::MethodResultFunctions; } // namespace -TEST(FlutterFilamentPlugin, GetPlatformVersion) { - FlutterFilamentPlugin plugin; +TEST(ThermionFlutterPlugin, GetPlatformVersion) { + ThermionFlutterPlugin plugin; // Save the reply value from the success callback. std::string result_string; plugin.HandleMethodCall( @@ -40,4 +40,4 @@ TEST(FlutterFilamentPlugin, GetPlatformVersion) { } } // namespace test -} // namespace flutter_filament +} // namespace thermion_filament diff --git a/windows/flutter_filament_plugin.cpp b/thermion_flutter/thermion_flutter/windows/thermion_flutter_plugin.cpp similarity index 75% rename from windows/flutter_filament_plugin.cpp rename to thermion_flutter/thermion_flutter/windows/thermion_flutter_plugin.cpp index 2c23bbd0..6e870225 100644 --- a/windows/flutter_filament_plugin.cpp +++ b/thermion_flutter/thermion_flutter/windows/thermion_flutter_plugin.cpp @@ -1,13 +1,11 @@ #pragma comment(lib, "dxgi.lib") #pragma comment(lib, "d3d11.lib") +#pragma comment(lib, "Shlwapi.lib") +#pragma comment(lib, "opengl32.lib") -#include "flutter_filament_plugin.h" +#include "thermion_flutter_plugin.h" -// This must be included before many other Windows headers. -#include - -// For getPlatformVersion; remove unless needed for your plugin implementation. -#include +#include #include #include @@ -18,7 +16,7 @@ #include #include #include -#include + #include #include #include @@ -29,13 +27,6 @@ #include #include -#include "FlutterFilamentApi.h" - -#include -#include -#include -#include - #include "flutter_render_context.h" #if USE_ANGLE @@ -44,24 +35,24 @@ #include "wgl_context.h" #endif +namespace thermion_filament { + using namespace std::chrono_literals; -namespace flutter_filament { - -void FlutterFilamentPlugin::RegisterWithRegistrar( +void ThermionFlutterPlugin::RegisterWithRegistrar( flutter::PluginRegistrarWindows *registrar) { auto channel = std::make_unique>( registrar->messenger(), "app.polyvox.filament/event", &flutter::StandardMethodCodec::GetInstance()); - auto plugin = std::make_unique( + auto plugin = std::make_unique( registrar->texture_registrar(), registrar, channel); registrar->AddPlugin(std::move(plugin)); } -FlutterFilamentPlugin::FlutterFilamentPlugin( +ThermionFlutterPlugin::ThermionFlutterPlugin( flutter::TextureRegistrar *textureRegistrar, flutter::PluginRegistrarWindows *pluginRegistrar, std::unique_ptr> &channel) @@ -76,9 +67,9 @@ FlutterFilamentPlugin::FlutterFilamentPlugin( } -FlutterFilamentPlugin::~FlutterFilamentPlugin() {} +ThermionFlutterPlugin::~ThermionFlutterPlugin() {} -ResourceBuffer FlutterFilamentPlugin::loadResource(const char *name) { +ResourceBuffer ThermionFlutterPlugin::loadResource(const char *name) { std::string name_str(name); std::filesystem::path targetFilePath; @@ -128,16 +119,17 @@ ResourceBuffer FlutterFilamentPlugin::loadResource(const char *name) { return rb; } -void FlutterFilamentPlugin::freeResource(ResourceBuffer rbuf) { +void ThermionFlutterPlugin::freeResource(ResourceBuffer rbuf) { free((void *)rbuf.data); } static ResourceBuffer _loadResource(const char *path, void *const plugin) { - return ((FlutterFilamentPlugin *)plugin)->loadResource(path); + std::wcout << "Loading resource from path " << path << std::endl; + return ((ThermionFlutterPlugin *)plugin)->loadResource(path); } static void _freeResource(ResourceBuffer rbf, void *const plugin) { - ((FlutterFilamentPlugin *)plugin)->freeResource(rbf); + ((ThermionFlutterPlugin *)plugin)->freeResource(rbf); } // this is the C-style function that will be returned via getRenderCallback @@ -145,32 +137,38 @@ static void _freeResource(ResourceBuffer rbf, void *const plugin) { // this is just a convenient wrapper to call RenderCallback on the actual plugin // instance void render_callback(void *owner) { - ((FlutterFilamentPlugin *)owner)->RenderCallback(); + ((ThermionFlutterPlugin *)owner)->RenderCallback(); } -// this is the method on FlutterFilamentPlugin that will copy between D3D +// this is the method on ThermionFlutterPlugin that will copy between D3D // textures -void FlutterFilamentPlugin::RenderCallback() { +void ThermionFlutterPlugin::RenderCallback() { if (_context) { auto flutterTextureId = _context->GetFlutterTextureId(); + if(flutterTextureId == -1) { + std::cout << "Bad texture" << std::endl; + return; + } #ifdef USE_ANGLE - _active->RenderCallback(); + _context->RenderCallback(); #endif +#if !WGL_USE_BACKING_WINDOW _textureRegistrar->MarkTextureFrameAvailable(flutterTextureId); +#endif } } -void FlutterFilamentPlugin::CreateTexture( +void ThermionFlutterPlugin::CreateTexture( const flutter::MethodCall &methodCall, std::unique_ptr> result) { const auto *args = std::get_if(methodCall.arguments()); - double dWidth = *(std::get_if(&(args->at(0)))); - double dHeight = *(std::get_if(&(args->at(1)))); - double dLeft = *(std::get_if(&(args->at(2)))); - double dTop = *(std::get_if(&(args->at(3)))); + int dWidth = *(std::get_if(&(args->at(0)))); + int dHeight = *(std::get_if(&(args->at(1)))); + int dLeft = *(std::get_if(&(args->at(2)))); + int dTop = *(std::get_if(&(args->at(3)))); auto width = (uint32_t)round(dWidth ); auto height = (uint32_t)round(dHeight ); auto left = (uint32_t)round(dLeft ); @@ -182,7 +180,7 @@ void FlutterFilamentPlugin::CreateTexture( // this will be used to create a backing texture and passed to Filament if (!_context) { #ifdef USE_ANGLE - _context = std::make_unique(_pluginRegistrar); + _context = std::make_unique(_pluginRegistrar, _textureRegistrar); #else _context = std::make_unique(_pluginRegistrar, _textureRegistrar); #endif @@ -190,11 +188,10 @@ void FlutterFilamentPlugin::CreateTexture( _context->CreateRenderingSurface(width, height, std::move(result), left, top); } -void FlutterFilamentPlugin::DestroyTexture( +void ThermionFlutterPlugin::DestroyTexture( const flutter::MethodCall &methodCall, std::unique_ptr> result) { - const auto *flutterTextureId = std::get_if(methodCall.arguments()); if (!flutterTextureId) { @@ -211,7 +208,7 @@ void FlutterFilamentPlugin::DestroyTexture( } -void FlutterFilamentPlugin::HandleMethodCall( +void ThermionFlutterPlugin::HandleMethodCall( const flutter::MethodCall &methodCall, std::unique_ptr> result) { @@ -224,17 +221,25 @@ void FlutterFilamentPlugin::HandleMethodCall( #endif )); } else if (methodCall.method_name() == "getResourceLoaderWrapper") { - const ResourceLoaderWrapper *const resourceLoader = - new ResourceLoaderWrapper(_loadResource, _freeResource, this); - result->Success(flutter::EncodableValue((int64_t)resourceLoader)); + auto wrapper = (ResourceLoaderWrapper*)malloc(sizeof(ResourceLoaderWrapper)); + wrapper->loadFromOwner = _loadResource; + wrapper->freeFromOwner = _freeResource, + wrapper->owner = this; + wrapper->loadResource = nullptr; + wrapper->loadToOut = nullptr; + wrapper->freeResource = nullptr; + result->Success(flutter::EncodableValue((int64_t)wrapper)); + } else if(methodCall.method_name() == "getSharedContext") { + result->Success(NULL); } else if (methodCall.method_name() == "resizeWindow") { #if WGL_USE_BACKING_WINDOW const auto *args = std::get_if(methodCall.arguments()); - double dWidth = *(std::get_if(&(args->at(0)))); - double dHeight = *(std::get_if(&(args->at(1)))); - double dLeft = *(std::get_if(&(args->at(2)))); - double dTop = *(std::get_if(&(args->at(3)))); + + int dWidth = *(std::get_if(&(args->at(0)))); + int dHeight = *(std::get_if(&(args->at(1)))); + int dLeft = *(std::get_if(&(args->at(2)))); + int dTop = *(std::get_if(&(args->at(3)))); auto width = (uint32_t)round(dWidth ); auto height = (uint32_t)round(dHeight ); auto left = (uint32_t)round(dLeft ); @@ -260,7 +265,7 @@ void FlutterFilamentPlugin::HandleMethodCall( result->Success(resultList); } else if (methodCall.method_name() == "getDriverPlatform") { #ifdef USE_ANGLE - result->Success(flutter::EncodableValue((int64_t)_platform)); + result->Success(flutter::EncodableValue((int64_t)_context->GetPlatform())); #else result->Success(flutter::EncodableValue((int64_t) nullptr)); #endif @@ -270,4 +275,4 @@ void FlutterFilamentPlugin::HandleMethodCall( } } -} // namespace flutter_filament +} // namespace thermion_filament diff --git a/windows/flutter_filament_plugin.h b/thermion_flutter/thermion_flutter/windows/thermion_flutter_plugin.h similarity index 79% rename from windows/flutter_filament_plugin.h rename to thermion_flutter/thermion_flutter/windows/thermion_flutter_plugin.h index 95502014..712e2182 100644 --- a/windows/flutter_filament_plugin.h +++ b/thermion_flutter/thermion_flutter/windows/thermion_flutter_plugin.h @@ -14,28 +14,28 @@ #include "GL/GL.h" #include "GL/GLu.h" -#include "FlutterFilamentApi.h" +#include "ResourceBuffer.hpp" -#if ANGLE +#if USE_ANGLE #include "egl_context.h" #else #include "wgl_context.h" #endif -namespace flutter_filament { +namespace thermion_filament { -class FlutterFilamentPlugin : public flutter::Plugin { +class ThermionFlutterPlugin : public flutter::Plugin { public: static void RegisterWithRegistrar(flutter::PluginRegistrarWindows *registrar); - FlutterFilamentPlugin(flutter::TextureRegistrar *textureRegistrar, + ThermionFlutterPlugin(flutter::TextureRegistrar *textureRegistrar, flutter::PluginRegistrarWindows *registrar, std::unique_ptr>& channel); - virtual ~FlutterFilamentPlugin(); + virtual ~ThermionFlutterPlugin(); // Disallow copy and assign. - FlutterFilamentPlugin(const FlutterFilamentPlugin &) = delete; - FlutterFilamentPlugin &operator=(const FlutterFilamentPlugin &) = delete; + ThermionFlutterPlugin(const ThermionFlutterPlugin &) = delete; + ThermionFlutterPlugin &operator=(const ThermionFlutterPlugin &) = delete; // Called when a method is called on this plugin's channel from Dart. void HandleMethodCall( @@ -60,12 +60,12 @@ public: private: #ifdef USE_ANGLE - std::unique_ptr _context = nullptr; + std::unique_ptr _context = nullptr; #else std::unique_ptr _context = nullptr; #endif }; -} // namespace flutter_filament +} // namespace thermion_filament #endif // FLUTTER_PLUGIN_FLUTTER_FILAMENT_PLUGIN_H_ diff --git a/windows/flutter_filament_plugin_c_api.cpp b/thermion_flutter/thermion_flutter/windows/thermion_flutter_plugin_c_api.cpp similarity index 51% rename from windows/flutter_filament_plugin_c_api.cpp rename to thermion_flutter/thermion_flutter/windows/thermion_flutter_plugin_c_api.cpp index 6338e1e3..2dc2c5e8 100644 --- a/windows/flutter_filament_plugin_c_api.cpp +++ b/thermion_flutter/thermion_flutter/windows/thermion_flutter_plugin_c_api.cpp @@ -1,12 +1,12 @@ -#include "include/flutter_filament/flutter_filament_plugin_c_api.h" +#include "include/thermion_flutter/thermion_flutter_plugin_c_api.h" #include -#include "flutter_filament_plugin.h" +#include "thermion_flutter_plugin.h" -void FlutterFilamentPluginCApiRegisterWithRegistrar( +void ThermionFlutterPluginCApiRegisterWithRegistrar( FlutterDesktopPluginRegistrarRef registrar) { - flutter_filament::FlutterFilamentPlugin::RegisterWithRegistrar( + thermion_flutter::ThermionFlutterPlugin::RegisterWithRegistrar( flutter::PluginRegistrarManager::GetInstance() ->GetRegistrar(registrar)); } diff --git a/windows/wgl_context.cpp b/thermion_flutter/thermion_flutter/windows/wgl_context.cpp similarity index 76% rename from windows/wgl_context.cpp rename to thermion_flutter/thermion_flutter/windows/wgl_context.cpp index bf377e8b..cb5485a3 100644 --- a/windows/wgl_context.cpp +++ b/thermion_flutter/thermion_flutter/windows/wgl_context.cpp @@ -6,11 +6,15 @@ #include "flutter_texture_buffer.h" -namespace flutter_filament { +namespace thermion_filament { WGLContext::WGLContext(flutter::PluginRegistrarWindows *pluginRegistrar, flutter::TextureRegistrar *textureRegistrar) - : _pluginRegistrar(pluginRegistrar), _textureRegistrar(textureRegistrar) { + : FlutterRenderContext(pluginRegistrar, textureRegistrar) { + + #if WGL_USE_BACKING_WINDOW + return; + #endif auto hwnd = pluginRegistrar->GetView()->GetNativeWindow(); @@ -25,9 +29,9 @@ WGLContext::WGLContext(flutter::PluginRegistrarWindows *pluginRegistrar, PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), 1, - PFD_DRAW_TO_BITMAP | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, // Flags + PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, // Flags PFD_TYPE_RGBA, // The kind of framebuffer. RGBA or palette. - 32, // Colordepth of the framebuffer. + 24, // Colordepth of the framebuffer. 0, 0, 0, @@ -41,7 +45,7 @@ WGLContext::WGLContext(flutter::PluginRegistrarWindows *pluginRegistrar, 0, 0, 0, - 32, // Number of bits for the depthbuffer + 16, // Number of bits for the depthbuffer 0, // Number of bits for the stencilbuffer 0, // Number of Aux buffers in the framebuffer. PFD_MAIN_PLANE, @@ -97,7 +101,9 @@ WGLContext::WGLContext(flutter::PluginRegistrarWindows *pluginRegistrar, } void WGLContext::ResizeRenderingSurface(uint32_t width, uint32_t height, uint32_t left, uint32_t top) { + #if WGL_USE_BACKING_WINDOW _backingWindow->Resize(width, height, left, top); + #endif } void WGLContext::CreateRenderingSurface( @@ -112,11 +118,10 @@ void WGLContext::CreateRenderingSurface( ResizeRenderingSurface(width, height, left, top); } std::vector resultList; - resultList.push_back(flutter::EncodableValue((int64_t) nullptr)); + resultList.push_back(flutter::EncodableValue()); // return null for Flutter texture ID + resultList.push_back(flutter::EncodableValue()); // return null for hardware texture ID resultList.push_back( - flutter::EncodableValue((int64_t)_backingWindow->GetHandle())); - resultList.push_back(flutter::EncodableValue((int64_t) nullptr)); - resultList.push_back(flutter::EncodableValue((int64_t)sharedContext)); + flutter::EncodableValue((int64_t)_backingWindow->GetHandle())); // return the HWND handle for the native window result->Success(resultList); #else if(left != 0 || top != 0) { @@ -128,24 +133,14 @@ void WGLContext::CreateRenderingSurface( "attempting to create a new one."); } else { - _active = std::make_unique( + auto active = std::make_unique( _pluginRegistrar, _textureRegistrar, std::move(result), width, height, _context); - - if (_active->flutterTextureId != -1) { - std::vector resultList; - resultList.push_back(flutter::EncodableValue((int64_t) nullptr)); - resultList.push_back(flutter::EncodableValue((int64_t) nullptr)); - resultList.push_back(flutter::EncodableValue((int64_t) nullptr)); - resultList.push_back(flutter::EncodableValue((int64_t)sharedContext)); - result->Success(resultList); - } else { - result->Error("NO_FLUTTER_TEXTURE", "Unknown error registering texture with Flutter.", nullptr); - } + _active = std::move(active); } #endif } void *WGLContext::GetSharedContext() { return (void *)_context; } -} // namespace flutter_filament +} // namespace thermion_filament diff --git a/windows/wgl_context.h b/thermion_flutter/thermion_flutter/windows/wgl_context.h similarity index 84% rename from windows/wgl_context.h rename to thermion_flutter/thermion_flutter/windows/wgl_context.h index e08e5f3d..46b8bc77 100644 --- a/windows/wgl_context.h +++ b/thermion_flutter/thermion_flutter/windows/wgl_context.h @@ -7,7 +7,7 @@ #if WGL_USE_BACKING_WINDOW #include "backing_window.h" #endif -namespace flutter_filament { +namespace thermion_filament { class WGLContext : public FlutterRenderContext { public: @@ -20,9 +20,6 @@ namespace flutter_filament { uint32_t width, uint32_t height, uint32_t left, uint32_t top ); private: - - flutter::PluginRegistrarWindows* _pluginRegistrar = nullptr; - flutter::TextureRegistrar* _textureRegistrar = nullptr; HGLRC _context = NULL; #if WGL_USE_BACKING_WINDOW std::unique_ptr _backingWindow = nullptr; diff --git a/thermion_flutter/thermion_flutter_ffi/CHANGELOG.md b/thermion_flutter/thermion_flutter_ffi/CHANGELOG.md new file mode 100644 index 00000000..feb7a4bf --- /dev/null +++ b/thermion_flutter/thermion_flutter_ffi/CHANGELOG.md @@ -0,0 +1,2 @@ +## 0.0.1 +* First release of Dart-only package diff --git a/thermion_flutter/thermion_flutter_ffi/LICENSE b/thermion_flutter/thermion_flutter_ffi/LICENSE new file mode 100644 index 00000000..e6853914 --- /dev/null +++ b/thermion_flutter/thermion_flutter_ffi/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024 Nick Fisher + + 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. diff --git a/thermion_flutter/thermion_flutter_ffi/README.md b/thermion_flutter/thermion_flutter_ffi/README.md new file mode 100644 index 00000000..ac7c835a --- /dev/null +++ b/thermion_flutter/thermion_flutter_ffi/README.md @@ -0,0 +1,2 @@ +# FFI implementation of the thermion_flutter 3D rendering package. +Do not import this directly; you should import `thermion_flutter` instead. \ No newline at end of file diff --git a/thermion_flutter/thermion_flutter_ffi/lib/thermion_flutter_ffi.dart b/thermion_flutter/thermion_flutter_ffi/lib/thermion_flutter_ffi.dart new file mode 100644 index 00000000..415925a3 --- /dev/null +++ b/thermion_flutter/thermion_flutter_ffi/lib/thermion_flutter_ffi.dart @@ -0,0 +1,221 @@ +import 'dart:async'; +import 'package:flutter/services.dart'; +import 'dart:ffi'; +import 'package:thermion_dart/thermion_dart.dart'; +import 'package:thermion_flutter_platform_interface/thermion_flutter_platform_interface.dart'; +import 'package:thermion_flutter_platform_interface/thermion_flutter_texture.dart'; + +/// +/// A subclass of [ThermionViewerFFI] that uses Flutter platform channels +/// to create rendering contexts, callbacks and surfaces (either backing texture(s). +/// +class ThermionFlutterFFI extends ThermionFlutterPlatform { + final _channel = const MethodChannel("app.polyvox.filament/event"); + + late final ThermionViewerFFI viewer; + + static void registerWith() { + ThermionFlutterPlatform.instance = ThermionFlutterFFI(); + } + + final _textures = {}; + + Future initialize({String? uberArchivePath}) async { + var resourceLoader = Pointer.fromAddress( + await _channel.invokeMethod("getResourceLoaderWrapper")); + + if (resourceLoader == nullptr) { + throw Exception("Failed to get resource loader"); + } + + var renderCallbackResult = await _channel.invokeMethod("getRenderCallback"); + var renderCallback = + Pointer)>>.fromAddress( + renderCallbackResult[0]); + var renderCallbackOwner = + Pointer.fromAddress(renderCallbackResult[1]); + + var driverPlatform = await _channel.invokeMethod("getDriverPlatform"); + var driverPtr = driverPlatform == null + ? nullptr + : Pointer.fromAddress(driverPlatform); + + var sharedContext = await _channel.invokeMethod("getSharedContext"); + + var sharedContextPtr = sharedContext == null + ? nullptr + : Pointer.fromAddress(sharedContext); + + viewer = ThermionViewerFFI( + resourceLoader: resourceLoader, + renderCallback: renderCallback, + renderCallbackOwner: renderCallbackOwner, + driver: driverPtr, + sharedContext: sharedContextPtr, + uberArchivePath: uberArchivePath); + await viewer.initialized; + } + + bool _creatingTexture = false; + + Future _waitForTextureCreationToComplete() async { + var iter = 0; + + while (_creatingTexture) { + await Future.delayed(Duration(milliseconds: 50)); + iter++; + if (iter > 10) { + throw Exception( + "Previous call to createTexture failed to complete within 500ms"); + } + } + } + + /// + /// Create a backing surface for rendering. + /// This is called by [ThermionWidget]; don't call this yourself. + /// + /// The name here is slightly misleading because we only create + /// a texture render target on macOS and iOS; on Android, we render into + /// a native window derived from a Surface, and on Windows we render into + /// a HWND. + /// + /// Currently, this only supports a single "texture" (aka rendering surface) + /// at any given time. If a [ThermionWidget] is disposed, it will call + /// [destroyTexture]; if it is resized, it will call [resizeTexture]. + /// + /// In future, we probably want to be able to create multiple distinct + /// textures/render targets. This would make it possible to have multiple + /// Flutter Texture widgets, each with its own Filament View attached. + /// The current design doesn't accommodate this (for example, it seems we can + /// only create a single native window from a Surface at any one time). + /// + Future createTexture( + int width, int height, int offsetLeft, int offsetRight) async { + // when a ThermionWidget is inserted, disposed then immediately reinserted + // into the widget hierarchy (e.g. rebuilding due to setState(() {}) being called in an ancestor widget) + // the first call to createTexture may not have completed before the second. + // add a loop here to wait (max 500ms) for the first call to complete + await _waitForTextureCreationToComplete(); + + // note that when [ThermionWidget] is disposed, we don't destroy the + // texture; instead, we keep it around in case a subsequent call requests + // a texture of the same size. + + if (_textures.length > 1) { + throw Exception("Multiple textures not yet supported"); + } else if (_textures.length == 1 && + _textures.first.height == height && + _textures.first.width == width) { + return _textures.first; + } + + _creatingTexture = true; + + var result = await _channel + .invokeMethod("createTexture", [width, height, offsetLeft, offsetLeft]); + + if (result == null || (result[0] == -1)) { + throw Exception("Failed to create texture"); + } + final flutterTextureId = result[0] as int?; + final hardwareTextureId = result[1] as int?; + final surfaceAddress = result[2] as int?; + + print( + "Created texture with flutter texture id ${flutterTextureId}, hardwareTextureId $hardwareTextureId and surfaceAddress $surfaceAddress"); + + viewer.viewportDimensions = (width.toDouble(), height.toDouble()); + + final texture = ThermionFlutterTexture( + flutterTextureId, hardwareTextureId, width, height, surfaceAddress); + + await viewer.createSwapChain(width.toDouble(), height.toDouble(), + surface: texture.surfaceAddress == null + ? nullptr + : Pointer.fromAddress(texture.surfaceAddress!)); + + if (texture.hardwareTextureId != null) { + print("Creating render target"); + // ignore: unused_local_variable + var renderTarget = await viewer.createRenderTarget( + width.toDouble(), height.toDouble(), texture.hardwareTextureId!); + } + + await viewer.updateViewportAndCameraProjection( + width.toDouble(), height.toDouble()); + viewer.render(); + _creatingTexture = false; + + _textures.add(texture); + + return texture; + } + + /// + /// Called by [ThermionWidget] to destroy a texture. Don't call this yourself. + /// + Future destroyTexture(ThermionFlutterTexture texture) async { + await _channel.invokeMethod("destroyTexture", texture.flutterTextureId); + _textures.remove(texture); + } + + bool _resizing = false; + + /// + /// Called by [ThermionWidget] to resize a texture. Don't call this yourself. + /// + @override + Future resizeTexture(ThermionFlutterTexture texture, + int width, int height, int offsetLeft, int offsetRight) async { + if (_resizing) { + throw Exception("Resize underway"); + } + + if ((width - viewer.viewportDimensions.$1).abs() < 0.001 || + (height - viewer.viewportDimensions.$2).abs() < 0.001) { + return texture; + } + _resizing = true; + bool wasRendering = viewer.rendering; + await viewer.setRendering(false); + await viewer.destroySwapChain(); + await destroyTexture(texture); + + var result = await _channel + .invokeMethod("createTexture", [width, height, offsetLeft, offsetLeft]); + + if (result == null || result[0] == -1) { + throw Exception("Failed to create texture"); + } + viewer.viewportDimensions = (width.toDouble(), height.toDouble()); + var newTexture = + ThermionFlutterTexture(result[0], result[1], width, height, result[2]); + + await viewer.createSwapChain(width.toDouble(), height.toDouble(), + surface: newTexture.surfaceAddress == null + ? nullptr + : Pointer.fromAddress(newTexture.surfaceAddress!)); + + if (newTexture.hardwareTextureId != null) { + // ignore: unused_local_variable + var renderTarget = await viewer.createRenderTarget( + width.toDouble(), height.toDouble(), newTexture.hardwareTextureId!); + } + await viewer.updateViewportAndCameraProjection( + width.toDouble(), height.toDouble()); + + viewer.viewportDimensions = (width.toDouble(), height.toDouble()); + if (wasRendering) { + await viewer.setRendering(true); + } + _textures.add(newTexture); + _resizing = false; + return newTexture; + } + + @override + void dispose() { + // TODO: implement dispose + } +} diff --git a/thermion_flutter/thermion_flutter_ffi/pubspec.yaml b/thermion_flutter/thermion_flutter_ffi/pubspec.yaml new file mode 100644 index 00000000..f68e2118 --- /dev/null +++ b/thermion_flutter/thermion_flutter_ffi/pubspec.yaml @@ -0,0 +1,31 @@ +name: thermion_flutter_ffi +description: An FFI interface for the thermion_flutter plugin (all platforms except web). +repository: https://github.com/nmfisher/thermion_flutter/thermion_flutter +version: 0.0.1 + +environment: + sdk: ">=3.3.0 <4.0.0" + flutter: ">=3.0.0" +flutter: + plugin: + implements: thermion_flutter_platform_interface + platforms: + ios: + dartPluginClass: ThermionFlutterFFI + android: + dartPluginClass: ThermionFlutterFFI + macos: + dartPluginClass: ThermionFlutterFFI + windows: + dartPluginClass: ThermionFlutterFFI +dependencies: + flutter: + sdk: flutter + plugin_platform_interface: ^2.1.0 + thermion_flutter_platform_interface: ^0.0.1-pre + thermion_dart: ^0.0.1-pre2 + +dev_dependencies: + flutter_test: + sdk: flutter + mockito: ^5.0.0 diff --git a/thermion_flutter/thermion_flutter_platform_interface/CHANGELOG.md b/thermion_flutter/thermion_flutter_platform_interface/CHANGELOG.md new file mode 100644 index 00000000..24e9bcce --- /dev/null +++ b/thermion_flutter/thermion_flutter_platform_interface/CHANGELOG.md @@ -0,0 +1,2 @@ +## 0.0.1 +* First release diff --git a/thermion_flutter/thermion_flutter_platform_interface/LICENSE b/thermion_flutter/thermion_flutter_platform_interface/LICENSE new file mode 100644 index 00000000..e6853914 --- /dev/null +++ b/thermion_flutter/thermion_flutter_platform_interface/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024 Nick Fisher + + 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. diff --git a/thermion_flutter/thermion_flutter_platform_interface/README.md b/thermion_flutter/thermion_flutter_platform_interface/README.md new file mode 100644 index 00000000..e69de29b diff --git a/thermion_flutter/thermion_flutter_platform_interface/lib/thermion_flutter_platform_interface.dart b/thermion_flutter/thermion_flutter_platform_interface/lib/thermion_flutter_platform_interface.dart new file mode 100644 index 00000000..b7425e64 --- /dev/null +++ b/thermion_flutter/thermion_flutter_platform_interface/lib/thermion_flutter_platform_interface.dart @@ -0,0 +1,34 @@ +import 'dart:async'; + +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; +import 'package:plugin_platform_interface/plugin_platform_interface.dart'; +import 'thermion_flutter_texture.dart'; + +abstract class ThermionFlutterPlatform extends PlatformInterface { + ThermionFlutterPlatform() : super(token: _token); + + static final Object _token = Object(); + + static late ThermionFlutterPlatform _instance; + + static ThermionFlutterPlatform get instance => _instance; + + static set instance(ThermionFlutterPlatform instance) { + PlatformInterface.verifyToken(instance, _token); + _instance = instance; + } + + ThermionViewer get viewer; + + Future initialize({String? uberArchivePath}); + + Future createTexture( + int width, int height, int offsetLeft, int offsetRight); + + Future destroyTexture(ThermionFlutterTexture texture); + + Future resizeTexture(ThermionFlutterTexture texture, + int width, int height, int offsetLeft, int offsetRight); + + void dispose(); +} diff --git a/thermion_flutter/thermion_flutter_platform_interface/lib/thermion_flutter_texture.dart b/thermion_flutter/thermion_flutter_platform_interface/lib/thermion_flutter_texture.dart new file mode 100644 index 00000000..c71723ee --- /dev/null +++ b/thermion_flutter/thermion_flutter_platform_interface/lib/thermion_flutter_texture.dart @@ -0,0 +1,13 @@ +class ThermionFlutterTexture { + final int width; + final int height; + final int? flutterTextureId; + final int? hardwareTextureId; + final int? surfaceAddress; + bool get usesBackingWindow => flutterTextureId == null; + + ThermionFlutterTexture(this.flutterTextureId, this.hardwareTextureId, + this.width, this.height, this.surfaceAddress) { + + } +} diff --git a/thermion_flutter/thermion_flutter_platform_interface/pubspec.yaml b/thermion_flutter/thermion_flutter_platform_interface/pubspec.yaml new file mode 100644 index 00000000..d2ef55ab --- /dev/null +++ b/thermion_flutter/thermion_flutter_platform_interface/pubspec.yaml @@ -0,0 +1,19 @@ +name: thermion_flutter_platform_interface +description: A common platform interface for the thermion_flutter plugin. +repository: https://github.com/nmfisher/thermion_flutter/thermion_flutter +version: 0.0.1 + +environment: + sdk: ">=3.3.0 <4.0.0" + flutter: ">=3.0.0" + +dependencies: + flutter: + sdk: flutter + plugin_platform_interface: ^2.1.0 + thermion_dart: ^0.0.1-pre2 + +dev_dependencies: + flutter_test: + sdk: flutter + mockito: ^5.0.0 diff --git a/thermion_flutter/thermion_flutter_web/CHANGELOG.md b/thermion_flutter/thermion_flutter_web/CHANGELOG.md new file mode 100644 index 00000000..feb7a4bf --- /dev/null +++ b/thermion_flutter/thermion_flutter_web/CHANGELOG.md @@ -0,0 +1,2 @@ +## 0.0.1 +* First release of Dart-only package diff --git a/thermion_flutter/thermion_flutter_web/LICENSE b/thermion_flutter/thermion_flutter_web/LICENSE new file mode 100644 index 00000000..e6853914 --- /dev/null +++ b/thermion_flutter/thermion_flutter_web/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024 Nick Fisher + + 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. diff --git a/thermion_flutter/thermion_flutter_web/README.md b/thermion_flutter/thermion_flutter_web/README.md new file mode 100644 index 00000000..ac7c835a --- /dev/null +++ b/thermion_flutter/thermion_flutter_web/README.md @@ -0,0 +1,2 @@ +# FFI implementation of the thermion_flutter 3D rendering package. +Do not import this directly; you should import `thermion_flutter` instead. \ No newline at end of file diff --git a/thermion_flutter/thermion_flutter_web/lib/thermion_flutter_web.dart b/thermion_flutter/thermion_flutter_web/lib/thermion_flutter_web.dart new file mode 100644 index 00000000..c5a20055 --- /dev/null +++ b/thermion_flutter/thermion_flutter_web/lib/thermion_flutter_web.dart @@ -0,0 +1,41 @@ +import 'package:thermion_dart/thermion_dart/thermion_viewer.dart'; +import 'package:thermion_flutter_platform_interface/thermion_flutter_platform_interface.dart'; +import 'package:thermion_flutter_platform_interface/thermion_flutter_texture.dart'; +import 'package:flutter_web_plugins/flutter_web_plugins.dart'; +import 'package:thermion_dart/thermion_dart/compatibility/web/interop/thermion_dart_js_extension_type.dart'; +import 'package:thermion_dart/thermion_dart/compatibility/web/interop/js_interop_filament_viewer.dart'; + +class ThermionFlutterWebPlugin extends ThermionFlutterPlatform { + static void registerWith(Registrar registrar) { + ThermionFlutterPlatform.instance = ThermionFlutterWebPlugin(); + } + + @override + Future createTexture( + int width, int height, int offsetLeft, int offsetRight) async {} + + @override + Future destroyTexture(ThermionFlutterTexture texture) async {} + + @override + void dispose() { + // TODO: implement dispose + } + + @override + Future initialize({String? uberArchivePath}) async { + print("Creating viewer in web plugin"); + viewer = JsInteropThermionViewerFFI("filamentViewer"); + print("Waiting for initialized"); + await viewer.initialized; + print("int complete"); + } + + @override + Future resizeTexture(ThermionFlutterTexture texture, + int width, int height, int offsetLeft, int offsetRight) async {} + + @override + // TODO: implement viewer + late final ThermionViewer viewer; +} diff --git a/thermion_flutter/thermion_flutter_web/pubspec.yaml b/thermion_flutter/thermion_flutter_web/pubspec.yaml new file mode 100644 index 00000000..f96ff058 --- /dev/null +++ b/thermion_flutter/thermion_flutter_web/pubspec.yaml @@ -0,0 +1,31 @@ +name: thermion_flutter_web +description: A web platform interface for the thermion_flutter plugin. +repository: https://github.com/nmfisher/thermion_flutter/thermion_flutter +version: 0.0.1 + +environment: + sdk: ">=3.3.0 <4.0.0" + flutter: ">=3.0.0" + +flutter: + plugin: + implements: thermion_flutter_platform_interface + platforms: + web: + pluginClass: ThermionFlutterWebPlugin + fileName: thermion_flutter_web.dart + +dependencies: + flutter: + sdk: flutter + plugin_platform_interface: ^2.1.0 + web: ^0.5.1 + thermion_dart: ^0.0.1-pre + thermion_flutter_platform_interface: ^0.0.1-pre + flutter_web_plugins: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter + mockito: ^5.0.0 diff --git a/web/CMakeLists.txt b/web/CMakeLists.txt deleted file mode 100644 index 5c04307d..00000000 --- a/web/CMakeLists.txt +++ /dev/null @@ -1,128 +0,0 @@ -cmake_minimum_required(VERSION 3.10) - -set(PROJECT_NAME "flutter_filament") -project(${PROJECT_NAME}) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -fPIC -Wno-unused-variable -Wno-unused-function") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wno-unused-variable -Wno-unused-function") - -set(PLUGIN_NAME "flutter_filament_plugin") - -link_directories("${CMAKE_CURRENT_SOURCE_DIR}/lib") - -add_library(FILAMENT_SHADERS STATIC - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/include/material/image.c" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/include/material/unlit_opaque.c" -) - -add_library(${PLUGIN_NAME} STATIC - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/AssetManager.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/FilamentViewer.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/FlutterFilamentApi.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/StreamBufferAdapter.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/TimeIt.cpp" -) - -set_target_properties(${PLUGIN_NAME} PROPERTIES - CXX_VISIBILITY_PRESET hidden) -target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL) - -target_compile_features(${PLUGIN_NAME} PRIVATE cxx_std_17) - -target_include_directories(${PLUGIN_NAME} INTERFACE - "${CMAKE_CURRENT_SOURCE_DIR}/include") - -include_directories(../ios/src) -include_directories(../ios/include) -include_directories(../example/linux) - -# add_library(geometry STATIC IMPORTED) -# set_property(TARGET geometry PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libgeometry.a") -# add_library(filament STATIC IMPORTED) -# set_property(TARGET filament PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libfilament.a") -# add_library(backend STATIC IMPORTED) -# set_property(TARGET backend PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libbackend.a") -# add_library(filameshio STATIC IMPORTED) -# set_property(TARGET filameshio PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libfilameshio.a") -# add_library(filament_viewer STATIC IMPORTED) -# set_property(TARGET filament_viewer PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libviewer.a") -# add_library(utils STATIC IMPORTED) -# set_property(TARGET utils PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libutils.a") -# add_library(filabridge STATIC IMPORTED) -# set_property(TARGET filabridge PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libfilabridge.a") -# add_library(gltfio_core STATIC IMPORTED) -# set_property(TARGET gltfio_core PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libgltfio_core.a") -# add_library(filament-iblprefilter STATIC IMPORTED) -# set_property(TARGET filament-iblprefilter PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libfilament-iblprefilter.a") -# add_library(image STATIC IMPORTED) -# set_property(TARGET image PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libimage.a") -# add_library(camutils STATIC IMPORTED) -# set_property(TARGET camutils PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libcamutils.a") -# add_library(filaflat STATIC IMPORTED) -# set_property(TARGET filaflat PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libfilaflat.a") -# add_library(dracodec STATIC IMPORTED) -# set_property(TARGET dracodec PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libdracodec.a") -# add_library(ibl STATIC IMPORTED) -# set_property(TARGET ibl PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libibl.a") -# add_library(ktxreader STATIC IMPORTED) -# set_property(TARGET ktxreader PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libktxreader.a") -# add_library(imageio STATIC IMPORTED) -# set_property(TARGET imageio PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libimageio.a") -# add_library(tinyexr STATIC IMPORTED) -# set_property(TARGET tinyexr PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libtinyexr.a") -# add_library(stb STATIC IMPORTED) -# set_property(TARGET stb PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libstb.a") -# # add_library(bluegl STATIC IMPORTED) -# # set_property(TARGET bluegl PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libbluegl.a") -# add_library(uberzlib STATIC IMPORTED) -# set_property(TARGET uberzlib PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libuberzlib.a") -# add_library(smol-v STATIC IMPORTED) -# set_property(TARGET smol-v PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libsmol-v.a") -# add_library(png STATIC IMPORTED) -# set_property(TARGET png PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libpng.a") -# add_library(uberarchive STATIC IMPORTED) -# set_property(TARGET uberarchive PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libuberarchive.a") -# add_library(meshoptimizer STATIC IMPORTED) -# set_property(TARGET meshoptimizer PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libmeshoptimizer.a") -# add_library(mathio STATIC IMPORTED) -# set_property(TARGET mathio PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libmathio.a") -# add_library(math STATIC IMPORTED) -# set_property(TARGET math PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libmath.a") -# add_library(basis_transcoder STATIC IMPORTED) -# set_property(TARGET basis_transcoder PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libbasis_transcoder.a") -# add_library(z STATIC IMPORTED) -# set_property(TARGET z PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libz.a") - -# target_link_libraries(${PLUGIN_NAME} PRIVATE -# FILAMENT_SHADERS -# gltfio_core -# filament -# backend -# geometry -# filameshio -# filament_viewer -# filabridge -# filament-iblprefilter -# camutils -# filaflat -# dracodec -# ibl -# ktxreader -# imageio -# image -# png -# utils -# tinyexr -# stb -# # bluegl -# uberzlib -# smol-v -# uberarchive -# meshoptimizer -# mathio -# math -# geometry -# basis_transcoder -# z -# ) - diff --git a/web/lib/libbackend.a b/web/lib/libbackend.a deleted file mode 100644 index 06db80f6..00000000 --- a/web/lib/libbackend.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eee0a341e5757f9e191e614b7da0cab0af2d59a604d79d6a9bb01cf8e7774f0b -size 10111468 diff --git a/web/lib/libbasis_encoder.a b/web/lib/libbasis_encoder.a deleted file mode 100644 index f824c9b8..00000000 --- a/web/lib/libbasis_encoder.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4019eca79d4bccee14f9b7fbc4986ca77efb5af6d2222949b03fd44f3d812395 -size 7375212 diff --git a/web/lib/libbasis_transcoder.a b/web/lib/libbasis_transcoder.a deleted file mode 100644 index aadcdeda..00000000 --- a/web/lib/libbasis_transcoder.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1f5067dad455dc4454160927e8d6c99d3a3bab5fc3c953e8e430a3d15523eee2 -size 1091366 diff --git a/web/lib/libcamutils.a b/web/lib/libcamutils.a deleted file mode 100644 index ff932607..00000000 --- a/web/lib/libcamutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:78a208e730d7944feb3021759e00daf1c828f1cab23e41246098b87378e22e01 -size 234312 diff --git a/web/lib/libcivetweb.a b/web/lib/libcivetweb.a deleted file mode 100644 index 78cc5cdd..00000000 --- a/web/lib/libcivetweb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:655b62ea26c41ca62cc3850ecf1118f1c0735200645766ffe12a9180e1df8907 -size 1204006 diff --git a/web/lib/libdracodec.a b/web/lib/libdracodec.a deleted file mode 100644 index 5c8c04d0..00000000 --- a/web/lib/libdracodec.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4657bc8ab1aaf63b6fb2941ad9b4bf1801b9620a87efa6509234c780a4312018 -size 38874698 diff --git a/web/lib/libfilabridge.a b/web/lib/libfilabridge.a deleted file mode 100644 index 84017781..00000000 --- a/web/lib/libfilabridge.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fe28c6b3391432460b53081cbd66d5a10a80a851ca6eecc03439fcc52cf7577b -size 1121830 diff --git a/web/lib/libfilaflat.a b/web/lib/libfilaflat.a deleted file mode 100644 index 99e4a746..00000000 --- a/web/lib/libfilaflat.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c46e7a3f72973daa3a9de155f934c5a8510bd291315bf8029e4bafa91292a69 -size 981306 diff --git a/web/lib/libfilagui.a b/web/lib/libfilagui.a deleted file mode 100644 index 45a73380..00000000 --- a/web/lib/libfilagui.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:721df3a41be6f4bb137c528e94bf3b89617c38ec6713040c3aed63ab23d5313a -size 907430 diff --git a/web/lib/libfilament-iblprefilter.a b/web/lib/libfilament-iblprefilter.a deleted file mode 100644 index 8071e355..00000000 --- a/web/lib/libfilament-iblprefilter.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e2093b436d7b133504649e53b18e4131de81f160cce9b343f9ef2e73a26fb3d -size 257086 diff --git a/web/lib/libfilament.a b/web/lib/libfilament.a deleted file mode 100644 index abe9bff6..00000000 --- a/web/lib/libfilament.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c8050b6ed57d451d1e79d192acd5118ade9860b073c447b87323a6a0c5f024dd -size 35488792 diff --git a/web/lib/libfilameshio.a b/web/lib/libfilameshio.a deleted file mode 100644 index 30da217d..00000000 --- a/web/lib/libfilameshio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:22cadde3af22a4cdbd28086aaf109d4e1899148d99ba6f528daea20b771f0c9f -size 519964 diff --git a/web/lib/libgeometry_combined.a b/web/lib/libgeometry_combined.a deleted file mode 100644 index 6475d2e7..00000000 --- a/web/lib/libgeometry_combined.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fc1cca42d9984f6571c35277a93863ba34c64dd22e06fe81225954b13e15a5e6 -size 1649864 diff --git a/web/lib/libgltfio_core.a b/web/lib/libgltfio_core.a deleted file mode 100644 index 84c43164..00000000 --- a/web/lib/libgltfio_core.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:64c99015fb16a4fc90a9b7a1c6f0f15af106788f7b2d067f3202a2a7d73021a9 -size 20036550 diff --git a/web/lib/libgtest.a b/web/lib/libgtest.a deleted file mode 100644 index ce0f49e2..00000000 --- a/web/lib/libgtest.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3bee92add3827a631d4e2b6e510fe558a713010e4b16e788f5f3b4e232e65012 -size 3180862 diff --git a/web/lib/libibl-lite.a b/web/lib/libibl-lite.a deleted file mode 100644 index d1ae5004..00000000 --- a/web/lib/libibl-lite.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99f5810d33ed2eb8e527ee4ffda1ab54c85aad494dffafafebb726753abe4c11 -size 4067816 diff --git a/web/lib/libimage.a b/web/lib/libimage.a deleted file mode 100644 index 1f02d43d..00000000 --- a/web/lib/libimage.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6d8d57162844f191a7fa96386bf4424fd1f203d058567a14cd3358d7fb7c2a2f -size 1322118 diff --git a/web/lib/libimageio.a b/web/lib/libimageio.a deleted file mode 100644 index f8020853..00000000 --- a/web/lib/libimageio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0dbfc689ede2d02e7b3d693bd82ceb4d96fd16274fc6caf9944885ff7c015c85 -size 441468 diff --git a/web/lib/libimgui.a b/web/lib/libimgui.a deleted file mode 100644 index fb577b33..00000000 --- a/web/lib/libimgui.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:80807eb12dc7e1c5f1c0b81ed626efc65b9003f79054d5204ffbe28968a867c7 -size 4244440 diff --git a/web/lib/libktxreader.a b/web/lib/libktxreader.a deleted file mode 100644 index 5132ffde..00000000 --- a/web/lib/libktxreader.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fcd513463f50b4ffbc9e5dec4e351c67e1d8075f570f771e6a67ac9d38cee33a -size 383404 diff --git a/web/lib/libmath.a b/web/lib/libmath.a deleted file mode 100644 index e6d6bb30..00000000 --- a/web/lib/libmath.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d1c21e108da7e0ea9fbd3702b1ca646c6eea83f95234fbba956469d858395ef2 -size 390 diff --git a/web/lib/libmathio.a b/web/lib/libmathio.a deleted file mode 100644 index 8ab6f616..00000000 --- a/web/lib/libmathio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c60fd646554f32e5fbc5e7dcc2f5c80a56d6c761d601e3caddeaf5512fa7333f -size 234400 diff --git a/web/lib/libmeshoptimizer.a b/web/lib/libmeshoptimizer.a deleted file mode 100644 index 5bd53f1b..00000000 --- a/web/lib/libmeshoptimizer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:849672ead2d9a2baf242afe9ec8017ecd4bfd24a5ce417b8d659ccbc1e3348ba -size 519206 diff --git a/web/lib/libmikktspace.a b/web/lib/libmikktspace.a deleted file mode 100644 index 39baf734..00000000 --- a/web/lib/libmikktspace.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fa160ff2456faf79eb02caff867794d263866d23424ffdd5d468813b2f88df72 -size 132298 diff --git a/web/lib/libshaders.a b/web/lib/libshaders.a deleted file mode 100644 index ce46d8ee..00000000 --- a/web/lib/libshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1fd7e117c4240fa92dd3ebbdb73c5139c83b429f010b716c45eb42794153368d -size 212602 diff --git a/web/lib/libsmol-v.a b/web/lib/libsmol-v.a deleted file mode 100644 index 8e376578..00000000 --- a/web/lib/libsmol-v.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:584463c70699aef1ab890a524aac05bebfee51bd2939801972b1414062079145 -size 261174 diff --git a/web/lib/libstb.a b/web/lib/libstb.a deleted file mode 100644 index 633159e5..00000000 --- a/web/lib/libstb.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc95704ae4a37e7b60c55e4ec20d41ad3ef9ad9f1d827471dbdcda46a10c835b -size 273962 diff --git a/web/lib/libuberarchive.a b/web/lib/libuberarchive.a deleted file mode 100644 index 5cd3ee33..00000000 --- a/web/lib/libuberarchive.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d5f303c8a6f3096f247a44ea1deab604aa1968d7ea2014d0940a65df5c056bcc -size 63460 diff --git a/web/lib/libuberzlib.a b/web/lib/libuberzlib.a deleted file mode 100644 index f2a8205f..00000000 --- a/web/lib/libuberzlib.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a85783edb19dbdda69d4cf3dd9f4caae9647521b242ab52058a2a9dacf8b1e5 -size 640804 diff --git a/web/lib/libutils.a b/web/lib/libutils.a deleted file mode 100644 index 39b9b486..00000000 --- a/web/lib/libutils.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:137f9ae3c004541a661a6eb435d7b2f43f7d5c882a34c514409e2bc61825dcb1 -size 2990668 diff --git a/web/lib/libviewer.a b/web/lib/libviewer.a deleted file mode 100644 index ac936fb7..00000000 --- a/web/lib/libviewer.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c4b55a8f3604326c50a7609f2429e0d713f48946bce94043eceb0c038efb68cf -size 3212920 diff --git a/web/lib/libvkshaders.a b/web/lib/libvkshaders.a deleted file mode 100644 index 1872df4a..00000000 --- a/web/lib/libvkshaders.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0cc6942fd1531ae2912948035b42824e54267197ae21fdceeccc45007e64ab70 -size 3002 diff --git a/web/lib/libz.a b/web/lib/libz.a deleted file mode 100644 index 6f8f7dbd..00000000 --- a/web/lib/libz.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c474d8c297275aca4daf6a50a6bb2ed333a2e6ea27d690f3aadd8fd17947db96 -size 249984 diff --git a/web/lib/libzstd.a b/web/lib/libzstd.a deleted file mode 100644 index 0f7bde68..00000000 --- a/web/lib/libzstd.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c8909f37a859a6a9f23297a81febb20f827ccd2433a6d659a58dc3886ea7abcf -size 3601048 diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt deleted file mode 100644 index a3366232..00000000 --- a/windows/CMakeLists.txt +++ /dev/null @@ -1,281 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -set(PROJECT_NAME "flutter_filament") -project(${PROJECT_NAME} LANGUAGES C CXX) - -cmake_policy(VERSION 3.14...3.25) - -# This value is used when generating builds using this plugin, so it must -# not be changed -set(PLUGIN_NAME "flutter_filament_plugin") - -# Any new source files that you add to the plugin should be added here. -list(APPEND PLUGIN_SOURCES - "flutter_filament_plugin.cpp" - "flutter_filament_plugin.h" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/AssetManager.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/FilamentViewer.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/FlutterFilamentApi.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/FlutterFilamentFFIApi.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/StreamBufferAdapter.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/TimeIt.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/camutils/Manipulator.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../ios/src/camutils/Bookmark.cpp" -) - -set(USE_ANGLE FALSE) -set(WGL_USE_BACKING_WINDOW TRUE) - -if(USE_ANGLE) - add_compile_definitions(USE_ANGLE) - list(APPEND PLUGIN_SOURCES "flutter_angle_texture.cpp" "egl_context.cpp" ) -else() - add_compile_definitions(WGL_USE_BACKING_WINDOW) - list(APPEND PLUGIN_SOURCES "wgl_context.cpp" "opengl_texture_buffer.cpp" "backing_window.cpp") - # if(WGL_USE_BACKING_WINDOW) - # list(APPEND PLUGIN_SOURCES ) - # else() - # list(APPEND PLUGIN_SOURCES ) - # endif() -endif() - -# Define the plugin library target. Its name must not be changed (see comment -# on PLUGIN_NAME above). -add_library(${PLUGIN_NAME} SHARED - "include/flutter_filament/flutter_filament_plugin_c_api.h" - "flutter_filament_plugin_c_api.cpp" - ${PLUGIN_SOURCES} - "include/material/image.c" -) - -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - -apply_standard_settings(${PLUGIN_NAME}) - -set_target_properties(${PLUGIN_NAME} PROPERTIES - CXX_VISIBILITY_PRESET hidden) -target_compile_features(${PLUGIN_NAME} PUBLIC cxx_std_20) -target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL) -target_include_directories(${PLUGIN_NAME} INTERFACE - "${CMAKE_CURRENT_SOURCE_DIR}/include" -) - -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/filament") - -if(USE_ANGLE) - list(APPEND GL_LIBS - EGL - GLESv2 - ) - set(ANGLE_OR_OPENGL_DIR angle) - add_library(EGL SHARED IMPORTED) - set_property(TARGET EGL PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/angle/libEGL.dll.lib") - set_property(TARGET EGL PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/angle/libEGL.dll.lib") - set_property(TARGET EGL PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/angle/libEGL.dll.lib") - add_library(GLESv2 SHARED IMPORTED) - set_property(TARGET GLESv2 PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/angle/libGLESv2.dll.lib") - set_property(TARGET GLESv2 PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/angle/libGLESv2.dll.lib") - set_property(TARGET GLESv2 PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/angle/libGLESv2.dll.lib") -else() - list(APPEND GL_LIBS - bluegl - opengl32 - dwmapi - comctl32 - ) - set(ANGLE_OR_OPENGL_DIR opengl) - add_library(bluegl SHARED IMPORTED) - set_property(TARGET bluegl PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/opengl/bluegl.lib") - set_property(TARGET bluegl PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/opengl/bluegl.lib") - set_property(TARGET bluegl PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/opengl/bluegl.lib") -endif() - -add_library(backend SHARED IMPORTED) -set_property(TARGET backend PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/${ANGLE_OR_OPENGL_DIR}/backend.lib") -set_property(TARGET backend PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/${ANGLE_OR_OPENGL_DIR}/backend.lib") -set_property(TARGET backend PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/${ANGLE_OR_OPENGL_DIR}/backend.lib") - -add_library(geometry SHARED IMPORTED) -set_property(TARGET geometry PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/geometry.lib") -set_property(TARGET geometry PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/geometry.lib") -set_property(TARGET geometry PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/geometry.lib") - -add_library(filament SHARED IMPORTED) -set_property(TARGET filament PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/${ANGLE_OR_OPENGL_DIR}/filament.lib") -set_property(TARGET filament PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/${ANGLE_OR_OPENGL_DIR}/filament.lib") -set_property(TARGET filament PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/${ANGLE_OR_OPENGL_DIR}/filament.lib") - -add_library(filameshio SHARED IMPORTED) -set_property(TARGET filameshio PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/filameshio.lib") -set_property(TARGET filameshio PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/filameshio.lib") -set_property(TARGET filameshio PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/filameshio.lib") - -add_library(filamat SHARED IMPORTED) -set_property(TARGET filamat PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/filamat.lib") -set_property(TARGET filamat PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/filamat.lib") -set_property(TARGET filamat PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/filamat.lib") - -add_library(utils SHARED IMPORTED) -set_property(TARGET utils PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/utils.lib") -set_property(TARGET utils PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/utils.lib") -set_property(TARGET utils PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/utils.lib") - -add_library(filabridge SHARED IMPORTED) -set_property(TARGET filabridge PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/filabridge.lib") -set_property(TARGET filabridge PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/filabridge.lib") -set_property(TARGET filabridge PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/filabridge.lib") - -add_library(gltfio SHARED IMPORTED) -set_property(TARGET gltfio PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/gltfio.lib") -set_property(TARGET gltfio PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/gltfio.lib") -set_property(TARGET gltfio PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/gltfio.lib") - -add_library(gltfio_core SHARED IMPORTED) -set_property(TARGET gltfio_core PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/gltfio_core.lib") -set_property(TARGET gltfio_core PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/gltfio_core.lib") -set_property(TARGET gltfio_core PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/gltfio_core.lib") - -add_library(image SHARED IMPORTED) -set_property(TARGET image PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/image.lib") -set_property(TARGET image PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/image.lib") -set_property(TARGET image PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/image.lib") - -add_library(imageio STATIC IMPORTED) -set_property(TARGET imageio PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/imageio.lib") -set_property(TARGET imageio PROPERTY IMPORTED_LOCATION_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/imageio.lib") -set_property(TARGET imageio PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/imageio.lib") - -add_library(tinyexr STATIC IMPORTED) -set_property(TARGET tinyexr PROPERTY IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/tinyexr.lib") -set_property(TARGET tinyexr PROPERTY IMPORTED_LOCATION_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/tinyexr.lib") -set_property(TARGET tinyexr PROPERTY IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/tinyexr.lib") - -add_library(camutils SHARED IMPORTED) -set_property(TARGET camutils PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/camutils.lib") -set_property(TARGET camutils PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/camutils.lib") -set_property(TARGET camutils PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/camutils.lib") - -add_library(filaflat SHARED IMPORTED) -set_property(TARGET filaflat PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/filaflat.lib") -set_property(TARGET filaflat PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/filaflat.lib") -set_property(TARGET filaflat PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/filaflat.lib") - -add_library(dracodec SHARED IMPORTED) -set_property(TARGET dracodec PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/dracodec.lib") -set_property(TARGET dracodec PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/dracodec.lib") -set_property(TARGET dracodec PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/dracodec.lib") - -add_library(ibl SHARED IMPORTED) -set_property(TARGET ibl PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/ibl.lib") -set_property(TARGET ibl PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/ibl.lib") -set_property(TARGET ibl PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/ibl.lib") - -add_library(ktxreader SHARED IMPORTED) -set_property(TARGET ktxreader PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/ktxreader.lib") -set_property(TARGET ktxreader PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/ktxreader.lib") -set_property(TARGET ktxreader PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/ktxreader.lib") - -add_library(stb SHARED IMPORTED) -set_property(TARGET stb PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/stb.lib") -set_property(TARGET stb PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/stb.lib") -set_property(TARGET stb PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/stb.lib") - -add_library(bluevk SHARED IMPORTED) -set_property(TARGET bluevk PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/bluevk.lib") -set_property(TARGET bluevk PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/bluevk.lib") -set_property(TARGET bluevk PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/bluevk.lib") - -add_library(vkshaders SHARED IMPORTED) -set_property(TARGET vkshaders PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/vkshaders.lib") -set_property(TARGET vkshaders PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/vkshaders.lib") -set_property(TARGET vkshaders PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/vkshaders.lib") - -add_library(uberzlib SHARED IMPORTED) -set_property(TARGET uberzlib PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/uberzlib.lib") -set_property(TARGET uberzlib PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/uberzlib.lib") -set_property(TARGET uberzlib PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/uberzlib.lib") - -add_library(smol-v SHARED IMPORTED) -set_property(TARGET smol-v PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/smol-v.lib") -set_property(TARGET smol-v PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/smol-v.lib") -set_property(TARGET smol-v PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/smol-v.lib") - -add_library(uberarchive SHARED IMPORTED) -set_property(TARGET uberarchive PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/${ANGLE_OR_OPENGL_DIR}/uberarchive.lib") -set_property(TARGET uberarchive PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/${ANGLE_OR_OPENGL_DIR}/uberarchive.lib") -set_property(TARGET uberarchive PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/${ANGLE_OR_OPENGL_DIR}/uberarchive.lib") - -add_library(meshoptimizer SHARED IMPORTED) -set_property(TARGET meshoptimizer PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/meshoptimizer.lib") -set_property(TARGET meshoptimizer PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/meshoptimizer.lib") -set_property(TARGET meshoptimizer PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/meshoptimizer.lib") - -add_library(basis_transcoder SHARED IMPORTED) -set_property(TARGET basis_transcoder PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/basis_transcoder.lib") -set_property(TARGET basis_transcoder PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/basis_transcoder.lib") -set_property(TARGET basis_transcoder PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/basis_transcoder.lib") - -add_library(z SHARED IMPORTED) -set_property(TARGET z PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/z.lib") -set_property(TARGET z PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/z.lib") -set_property(TARGET z PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/z.lib") - -add_library(zstd SHARED IMPORTED) -set_property(TARGET zstd PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/zstd.lib") -set_property(TARGET zstd PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/zstd.lib") -set_property(TARGET zstd PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/zstd.lib") - -add_library(png SHARED IMPORTED) -set_property(TARGET png PROPERTY IMPORTED_IMPLIB_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/png.lib") -set_property(TARGET png PROPERTY IMPORTED_IMPLIB_PROFILE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/png.lib") -set_property(TARGET png PROPERTY IMPORTED_IMPLIB_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/lib/Release/png.lib") - -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR}/../ios/include - ${CMAKE_CURRENT_SOURCE_DIR}/include -) - -target_link_libraries(${PLUGIN_NAME} PRIVATE - flutter - flutter_wrapper_plugin - gltfio - gltfio_core - filament - backend - geometry - filamat - filabridge - camutils - filaflat - dracodec - ibl - ktxreader - image - imageio - utils - stb - uberzlib - smol-v - uberarchive - meshoptimizer - geometry - basis_transcoder - z - zstd - png - tinyexr - Shlwapi - ${GL_LIBS} -) - -# List of absolute paths to libraries that should be bundled with the plugin -if(USE_ANGLE) -set(flutter_filament_bundled_libraries - ${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/angle/libEGL.dll - ${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/angle/libGLESv2.dll - ${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/libc++.dll - ${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/third_party_abseil-cpp_absl.dll - ${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug/third_party_zlib.dll - PARENT_SCOPE -) -endif() - diff --git a/windows/egl_context.h b/windows/egl_context.h deleted file mode 100644 index 454cae0f..00000000 --- a/windows/egl_context.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _EGL_CONTEXT_H -#define _EGL_CONTEXT_H - -#include "flutter_angle_texture.h" -#include "backend/platforms/PlatformEGL.h" - -namespace flutter_filament { - -class EGLContext : public FlutterRenderingContext { -public: - EGLContext(flutter::PluginRegistrarWindows* pluginRegistrar, flutter::TextureRegistrar* textureRegistrar); -private: - EGLContext _context = NULL; - EGLConfig _eglConfig = NULL; - EGLDisplay _eglDisplay = NULL; - std::unique_ptr _active = nullptr; - std::unique_ptr _inactive = nullptr; - ID3D11Device* _D3D11Device = nullptr; - ID3D11DeviceContext* _D3D11DeviceContext = nullptr; - filament::backend::Platform* _platform = nullptr; -} - -} - -#endif \ No newline at end of file diff --git a/windows/include/filament/backend/AcquiredImage.h b/windows/include/filament/backend/AcquiredImage.h deleted file mode 100644 index fec27a53..00000000 --- a/windows/include/filament/backend/AcquiredImage.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_PRIVATE_ACQUIREDIMAGE_H -#define TNT_FILAMENT_BACKEND_PRIVATE_ACQUIREDIMAGE_H - -#include - -namespace filament::backend { - -class CallbackHandler; - -// This lightweight POD allows us to bundle the state required to process an ACQUIRED stream. -// Since these types of external images need to be moved around and queued up, an encapsulation is -// very useful. - -struct AcquiredImage { - void* image = nullptr; - backend::StreamCallback callback = nullptr; - void* userData = nullptr; - CallbackHandler* handler = nullptr; -}; - -} // namespace filament::backend - -#endif // TNT_FILAMENT_BACKEND_PRIVATE_ACQUIREDIMAGE_H diff --git a/windows/include/filament/backend/CallbackHandler.h b/windows/include/filament/backend/CallbackHandler.h deleted file mode 100644 index dee3aaa2..00000000 --- a/windows/include/filament/backend/CallbackHandler.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_CALLBACKHANDLER_H -#define TNT_FILAMENT_BACKEND_CALLBACKHANDLER_H - -#include - -namespace filament::backend { - -/** - * A generic interface to dispatch callbacks. - * - * All APIs that take a callback as argument also take a - * CallbackHandler* which is used to dispatch the - * callback: CallbackHandler::post() method is called from a service thread as soon - * as possible (this will NEVER be the main thread), CallbackHandler::post() - * is responsible for scheduling the callback onto the thread the - * user desires. - * - * This is intended to make callbacks interoperate with - * the platform/OS's own messaging system. - * - * CallbackHandler* can always be nullptr in which case the default handler is used. The - * default handler always dispatches callbacks on filament's main thread opportunistically. - * - * Life time: - * --------- - * - * Filament make no attempts to manage the life time of the CallbackHandler* and never takes - * ownership. - * In particular, this means that the CallbackHandler instance must stay valid until all - * pending callbacks are been dispatched. - * - * Similarly, when shutting down filament, care must be taken to ensure that all pending callbacks - * that might access filament's state have been dispatched. Filament can no longer ensure this - * because callback execution is the responsibility of the CallbackHandler, which is external to - * filament. - * Typically, the concrete CallbackHandler would have a mechanism to drain and/or wait for all - * callbacks to be processed. - * - */ -class CallbackHandler { -public: - using Callback = void(*)(void* user); - - /** - * Schedules the callback to be called onto the appropriate thread. - * Typically this will be the application's main thead. - * - * Must be thread-safe. - */ - virtual void post(void* user, Callback callback) = 0; - -protected: - virtual ~CallbackHandler(); -}; - -} // namespace filament::backend - -#endif // TNT_FILAMENT_BACKEND_CALLBACKHANDLER_H diff --git a/windows/include/filament/backend/DriverApiForward.h b/windows/include/filament/backend/DriverApiForward.h deleted file mode 100644 index 9cc56c03..00000000 --- a/windows/include/filament/backend/DriverApiForward.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_PRIVATE_DRIVERAPIFORWARD_H -#define TNT_FILAMENT_BACKEND_PRIVATE_DRIVERAPIFORWARD_H - -namespace filament::backend { - -class CommandStream; - -using DriverApi = CommandStream; - -} // namespace filament::backend - -#endif // TNT_FILAMENT_BACKEND_PRIVATE_DRIVERAPIFORWARD_H diff --git a/windows/include/filament/backend/DriverEnums.h b/windows/include/filament/backend/DriverEnums.h deleted file mode 100644 index d66ce9f7..00000000 --- a/windows/include/filament/backend/DriverEnums.h +++ /dev/null @@ -1,1181 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_BACKEND_DRIVERENUMS_H -#define TNT_FILAMENT_BACKEND_DRIVERENUMS_H - -#include -#include // Because we define ERROR in the FenceStatus enum. - -#include - -#include - -#include - -#include // FIXME: STL headers are not allowed in public headers - -#include -#include - -/** - * Types and enums used by filament's driver. - * - * Effectively these types are public but should not be used directly. Instead use public classes - * internal redeclaration of these types. - * For e.g. Use Texture::Sampler instead of filament::SamplerType. - */ -namespace filament::backend { - -/** - * Requests a SwapChain with an alpha channel. - */ -static constexpr uint64_t SWAP_CHAIN_CONFIG_TRANSPARENT = 0x1; - -/** - * This flag indicates that the swap chain may be used as a source surface - * for reading back render results. This config flag must be set when creating - * any SwapChain that will be used as the source for a blit operation. - */ -static constexpr uint64_t SWAP_CHAIN_CONFIG_READABLE = 0x2; - -/** - * Indicates that the native X11 window is an XCB window rather than an XLIB window. - * This is ignored on non-Linux platforms and in builds that support only one X11 API. - */ -static constexpr uint64_t SWAP_CHAIN_CONFIG_ENABLE_XCB = 0x4; - -/** - * Indicates that the native window is a CVPixelBufferRef. - * - * This is only supported by the Metal backend. The CVPixelBuffer must be in the - * kCVPixelFormatType_32BGRA format. - * - * It is not necessary to add an additional retain call before passing the pixel buffer to - * Filament. Filament will call CVPixelBufferRetain during Engine::createSwapChain, and - * CVPixelBufferRelease when the swap chain is destroyed. - */ -static constexpr uint64_t SWAP_CHAIN_CONFIG_APPLE_CVPIXELBUFFER = 0x8; - -/** - * Indicates that the SwapChain must automatically perform linear to srgb encoding. - */ -static constexpr uint64_t SWAP_CHAIN_CONFIG_SRGB_COLORSPACE = 0x10; - - -static constexpr size_t MAX_VERTEX_ATTRIBUTE_COUNT = 16; // This is guaranteed by OpenGL ES. -static constexpr size_t MAX_SAMPLER_COUNT = 62; // Maximum needed at feature level 3. -static constexpr size_t MAX_VERTEX_BUFFER_COUNT = 16; // Max number of bound buffer objects. -static constexpr size_t MAX_SSBO_COUNT = 4; // This is guaranteed by OpenGL ES. - -// Per feature level caps -// Use (int)FeatureLevel to index this array -static constexpr struct { - const size_t MAX_VERTEX_SAMPLER_COUNT; - const size_t MAX_FRAGMENT_SAMPLER_COUNT; -} FEATURE_LEVEL_CAPS[4] = { - { 0, 0 }, // do not use - { 16, 16 }, // guaranteed by OpenGL ES, Vulkan and Metal - { 16, 16 }, // guaranteed by OpenGL ES, Vulkan and Metal - { 31, 31 }, // guaranteed by Metal -}; - -static_assert(MAX_VERTEX_BUFFER_COUNT <= MAX_VERTEX_ATTRIBUTE_COUNT, - "The number of buffer objects that can be attached to a VertexBuffer must be " - "less than or equal to the maximum number of vertex attributes."); - -static constexpr size_t CONFIG_UNIFORM_BINDING_COUNT = 10; // This is guaranteed by OpenGL ES. -static constexpr size_t CONFIG_SAMPLER_BINDING_COUNT = 4; // This is guaranteed by OpenGL ES. - -/** - * Defines the backend's feature levels. - */ -enum class FeatureLevel : uint8_t { - FEATURE_LEVEL_1 = 1, //!< OpenGL ES 3.0 features (default) - FEATURE_LEVEL_2, //!< OpenGL ES 3.1 features + 16 textures units + cubemap arrays - FEATURE_LEVEL_3 //!< OpenGL ES 3.1 features + 31 textures units + cubemap arrays -}; - -/** - * Selects which driver a particular Engine should use. - */ -enum class Backend : uint8_t { - DEFAULT = 0, //!< Automatically selects an appropriate driver for the platform. - OPENGL = 1, //!< Selects the OpenGL/ES driver (default on Android) - VULKAN = 2, //!< Selects the Vulkan driver if the platform supports it (default on Linux/Windows) - METAL = 3, //!< Selects the Metal driver if the platform supports it (default on MacOS/iOS). - NOOP = 4, //!< Selects the no-op driver for testing purposes. -}; - -static constexpr const char* backendToString(Backend backend) { - switch (backend) { - case Backend::NOOP: - return "Noop"; - case Backend::OPENGL: - return "OpenGL"; - case Backend::VULKAN: - return "Vulkan"; - case Backend::METAL: - return "Metal"; - default: - return "Unknown"; - } -} - -/** - * Bitmask for selecting render buffers - */ -enum class TargetBufferFlags : uint32_t { - NONE = 0x0u, //!< No buffer selected. - COLOR0 = 0x00000001u, //!< Color buffer selected. - COLOR1 = 0x00000002u, //!< Color buffer selected. - COLOR2 = 0x00000004u, //!< Color buffer selected. - COLOR3 = 0x00000008u, //!< Color buffer selected. - COLOR4 = 0x00000010u, //!< Color buffer selected. - COLOR5 = 0x00000020u, //!< Color buffer selected. - COLOR6 = 0x00000040u, //!< Color buffer selected. - COLOR7 = 0x00000080u, //!< Color buffer selected. - - COLOR = COLOR0, //!< \deprecated - COLOR_ALL = COLOR0 | COLOR1 | COLOR2 | COLOR3 | COLOR4 | COLOR5 | COLOR6 | COLOR7, - DEPTH = 0x10000000u, //!< Depth buffer selected. - STENCIL = 0x20000000u, //!< Stencil buffer selected. - DEPTH_AND_STENCIL = DEPTH | STENCIL, //!< depth and stencil buffer selected. - ALL = COLOR_ALL | DEPTH | STENCIL //!< Color, depth and stencil buffer selected. -}; - -inline constexpr TargetBufferFlags getTargetBufferFlagsAt(size_t index) noexcept { - if (index == 0u) return TargetBufferFlags::COLOR0; - if (index == 1u) return TargetBufferFlags::COLOR1; - if (index == 2u) return TargetBufferFlags::COLOR2; - if (index == 3u) return TargetBufferFlags::COLOR3; - if (index == 4u) return TargetBufferFlags::COLOR4; - if (index == 5u) return TargetBufferFlags::COLOR5; - if (index == 6u) return TargetBufferFlags::COLOR6; - if (index == 7u) return TargetBufferFlags::COLOR7; - if (index == 8u) return TargetBufferFlags::DEPTH; - if (index == 9u) return TargetBufferFlags::STENCIL; - return TargetBufferFlags::NONE; -} - -/** - * Frequency at which a buffer is expected to be modified and used. This is used as an hint - * for the driver to make better decisions about managing memory internally. - */ -enum class BufferUsage : uint8_t { - STATIC, //!< content modified once, used many times - DYNAMIC, //!< content modified frequently, used many times -}; - -/** - * Defines a viewport, which is the origin and extent of the clip-space. - * All drawing is clipped to the viewport. - */ -struct Viewport { - int32_t left; //!< left coordinate in window space. - int32_t bottom; //!< bottom coordinate in window space. - uint32_t width; //!< width in pixels - uint32_t height; //!< height in pixels - //! get the right coordinate in window space of the viewport - int32_t right() const noexcept { return left + int32_t(width); } - //! get the top coordinate in window space of the viewport - int32_t top() const noexcept { return bottom + int32_t(height); } -}; - -/** - * Specifies the mapping of the near and far clipping plane to window coordinates. - */ -struct DepthRange { - float near = 0.0f; //!< mapping of the near plane to window coordinates. - float far = 1.0f; //!< mapping of the far plane to window coordinates. -}; - -/** - * Error codes for Fence::wait() - * @see Fence, Fence::wait() - */ -enum class FenceStatus : int8_t { - ERROR = -1, //!< An error occurred. The Fence condition is not satisfied. - CONDITION_SATISFIED = 0, //!< The Fence condition is satisfied. - TIMEOUT_EXPIRED = 1, //!< wait()'s timeout expired. The Fence condition is not satisfied. -}; - -/** - * Status codes for sync objects - */ -enum class SyncStatus : int8_t { - ERROR = -1, //!< An error occurred. The Sync is not signaled. - SIGNALED = 0, //!< The Sync is signaled. - NOT_SIGNALED = 1, //!< The Sync is not signaled yet -}; - -static constexpr uint64_t FENCE_WAIT_FOR_EVER = uint64_t(-1); - -/** - * Shader model. - * - * These enumerants are used across all backends and refer to a level of functionality and quality. - * - * For example, the OpenGL backend returns `MOBILE` if it supports OpenGL ES, or `DESKTOP` if it - * supports Desktop OpenGL, this is later used to select the proper shader. - * - * Shader quality vs. performance is also affected by ShaderModel. - */ -enum class ShaderModel : uint8_t { - MOBILE = 1, //!< Mobile level functionality - DESKTOP = 2, //!< Desktop level functionality -}; -static constexpr size_t SHADER_MODEL_COUNT = 2; - -/** - * Primitive types - */ -enum class PrimitiveType : uint8_t { - // don't change the enums values (made to match GL) - POINTS = 0, //!< points - LINES = 1, //!< lines - LINE_STRIP = 3, //!< line strip - TRIANGLES = 4, //!< triangles - TRIANGLE_STRIP = 5 //!< triangle strip -}; - -/** - * Supported uniform types - */ -enum class UniformType : uint8_t { - BOOL, - BOOL2, - BOOL3, - BOOL4, - FLOAT, - FLOAT2, - FLOAT3, - FLOAT4, - INT, - INT2, - INT3, - INT4, - UINT, - UINT2, - UINT3, - UINT4, - MAT3, //!< a 3x3 float matrix - MAT4, //!< a 4x4 float matrix - STRUCT -}; - -/** - * Supported constant parameter types - */ - enum class ConstantType : uint8_t { - INT, - FLOAT, - BOOL -}; - -enum class Precision : uint8_t { - LOW, - MEDIUM, - HIGH, - DEFAULT -}; - -//! Texture sampler type -enum class SamplerType : uint8_t { - SAMPLER_2D, //!< 2D texture - SAMPLER_2D_ARRAY, //!< 2D array texture - SAMPLER_CUBEMAP, //!< Cube map texture - SAMPLER_EXTERNAL, //!< External texture - SAMPLER_3D, //!< 3D texture - SAMPLER_CUBEMAP_ARRAY, //!< Cube map array texture (feature level 2) -}; - -//! Subpass type -enum class SubpassType : uint8_t { - SUBPASS_INPUT -}; - -//! Texture sampler format -enum class SamplerFormat : uint8_t { - INT = 0, //!< signed integer sampler - UINT = 1, //!< unsigned integer sampler - FLOAT = 2, //!< float sampler - SHADOW = 3 //!< shadow sampler (PCF) -}; - -/** - * Supported element types - */ -enum class ElementType : uint8_t { - BYTE, - BYTE2, - BYTE3, - BYTE4, - UBYTE, - UBYTE2, - UBYTE3, - UBYTE4, - SHORT, - SHORT2, - SHORT3, - SHORT4, - USHORT, - USHORT2, - USHORT3, - USHORT4, - INT, - UINT, - FLOAT, - FLOAT2, - FLOAT3, - FLOAT4, - HALF, - HALF2, - HALF3, - HALF4, -}; - -//! Buffer object binding type -enum class BufferObjectBinding : uint8_t { - VERTEX, - UNIFORM, - SHADER_STORAGE -}; - -//! Face culling Mode -enum class CullingMode : uint8_t { - NONE, //!< No culling, front and back faces are visible - FRONT, //!< Front face culling, only back faces are visible - BACK, //!< Back face culling, only front faces are visible - FRONT_AND_BACK //!< Front and Back, geometry is not visible -}; - -//! Pixel Data Format -enum class PixelDataFormat : uint8_t { - R, //!< One Red channel, float - R_INTEGER, //!< One Red channel, integer - RG, //!< Two Red and Green channels, float - RG_INTEGER, //!< Two Red and Green channels, integer - RGB, //!< Three Red, Green and Blue channels, float - RGB_INTEGER, //!< Three Red, Green and Blue channels, integer - RGBA, //!< Four Red, Green, Blue and Alpha channels, float - RGBA_INTEGER, //!< Four Red, Green, Blue and Alpha channels, integer - UNUSED, // used to be rgbm - DEPTH_COMPONENT, //!< Depth, 16-bit or 24-bits usually - DEPTH_STENCIL, //!< Two Depth (24-bits) + Stencil (8-bits) channels - ALPHA //! One Alpha channel, float -}; - -//! Pixel Data Type -enum class PixelDataType : uint8_t { - UBYTE, //!< unsigned byte - BYTE, //!< signed byte - USHORT, //!< unsigned short (16-bit) - SHORT, //!< signed short (16-bit) - UINT, //!< unsigned int (32-bit) - INT, //!< signed int (32-bit) - HALF, //!< half-float (16-bit float) - FLOAT, //!< float (32-bits float) - COMPRESSED, //!< compressed pixels, @see CompressedPixelDataType - UINT_10F_11F_11F_REV, //!< three low precision floating-point numbers - USHORT_565, //!< unsigned int (16-bit), encodes 3 RGB channels - UINT_2_10_10_10_REV, //!< unsigned normalized 10 bits RGB, 2 bits alpha -}; - -//! Compressed pixel data types -enum class CompressedPixelDataType : uint16_t { - // Mandatory in GLES 3.0 and GL 4.3 - EAC_R11, EAC_R11_SIGNED, EAC_RG11, EAC_RG11_SIGNED, - ETC2_RGB8, ETC2_SRGB8, - ETC2_RGB8_A1, ETC2_SRGB8_A1, - ETC2_EAC_RGBA8, ETC2_EAC_SRGBA8, - - // Available everywhere except Android/iOS - DXT1_RGB, DXT1_RGBA, DXT3_RGBA, DXT5_RGBA, - DXT1_SRGB, DXT1_SRGBA, DXT3_SRGBA, DXT5_SRGBA, - - // ASTC formats are available with a GLES extension - RGBA_ASTC_4x4, - RGBA_ASTC_5x4, - RGBA_ASTC_5x5, - RGBA_ASTC_6x5, - RGBA_ASTC_6x6, - RGBA_ASTC_8x5, - RGBA_ASTC_8x6, - RGBA_ASTC_8x8, - RGBA_ASTC_10x5, - RGBA_ASTC_10x6, - RGBA_ASTC_10x8, - RGBA_ASTC_10x10, - RGBA_ASTC_12x10, - RGBA_ASTC_12x12, - SRGB8_ALPHA8_ASTC_4x4, - SRGB8_ALPHA8_ASTC_5x4, - SRGB8_ALPHA8_ASTC_5x5, - SRGB8_ALPHA8_ASTC_6x5, - SRGB8_ALPHA8_ASTC_6x6, - SRGB8_ALPHA8_ASTC_8x5, - SRGB8_ALPHA8_ASTC_8x6, - SRGB8_ALPHA8_ASTC_8x8, - SRGB8_ALPHA8_ASTC_10x5, - SRGB8_ALPHA8_ASTC_10x6, - SRGB8_ALPHA8_ASTC_10x8, - SRGB8_ALPHA8_ASTC_10x10, - SRGB8_ALPHA8_ASTC_12x10, - SRGB8_ALPHA8_ASTC_12x12, - - // RGTC formats available with a GLES extension - RED_RGTC1, // BC4 unsigned - SIGNED_RED_RGTC1, // BC4 signed - RED_GREEN_RGTC2, // BC5 unsigned - SIGNED_RED_GREEN_RGTC2, // BC5 signed - - // BPTC formats available with a GLES extension - RGB_BPTC_SIGNED_FLOAT, // BC6H signed - RGB_BPTC_UNSIGNED_FLOAT,// BC6H unsigned - RGBA_BPTC_UNORM, // BC7 - SRGB_ALPHA_BPTC_UNORM, // BC7 sRGB -}; - -/** Supported texel formats - * These formats are typically used to specify a texture's internal storage format. - * - * Enumerants syntax format - * ======================== - * - * `[components][size][type]` - * - * `components` : List of stored components by this format.\n - * `size` : Size in bit of each component.\n - * `type` : Type this format is stored as.\n - * - * - * Name | Component - * :--------|:------------------------------- - * R | Linear Red - * RG | Linear Red, Green - * RGB | Linear Red, Green, Blue - * RGBA | Linear Red, Green Blue, Alpha - * SRGB | sRGB encoded Red, Green, Blue - * DEPTH | Depth - * STENCIL | Stencil - * - * \n - * Name | Type - * :--------|:--------------------------------------------------- - * (none) | Unsigned Normalized Integer [0, 1] - * _SNORM | Signed Normalized Integer [-1, 1] - * UI | Unsigned Integer @f$ [0, 2^{size}] @f$ - * I | Signed Integer @f$ [-2^{size-1}, 2^{size-1}-1] @f$ - * F | Floating-point - * - * - * Special color formats - * --------------------- - * - * There are a few special color formats that don't follow the convention above: - * - * Name | Format - * :----------------|:-------------------------------------------------------------------------- - * RGB565 | 5-bits for R and B, 6-bits for G. - * RGB5_A1 | 5-bits for R, G and B, 1-bit for A. - * RGB10_A2 | 10-bits for R, G and B, 2-bits for A. - * RGB9_E5 | **Unsigned** floating point. 9-bits mantissa for RGB, 5-bits shared exponent - * R11F_G11F_B10F | **Unsigned** floating point. 6-bits mantissa, for R and G, 5-bits for B. 5-bits exponent. - * SRGB8_A8 | sRGB 8-bits with linear 8-bits alpha. - * DEPTH24_STENCIL8 | 24-bits unsigned normalized integer depth, 8-bits stencil. - * DEPTH32F_STENCIL8| 32-bits floating-point depth, 8-bits stencil. - * - * - * Compressed texture formats - * -------------------------- - * - * Many compressed texture formats are supported as well, which include (but are not limited to) - * the following list: - * - * Name | Format - * :----------------|:-------------------------------------------------------------------------- - * EAC_R11 | Compresses R11UI - * EAC_R11_SIGNED | Compresses R11I - * EAC_RG11 | Compresses RG11UI - * EAC_RG11_SIGNED | Compresses RG11I - * ETC2_RGB8 | Compresses RGB8 - * ETC2_SRGB8 | compresses SRGB8 - * ETC2_EAC_RGBA8 | Compresses RGBA8 - * ETC2_EAC_SRGBA8 | Compresses SRGB8_A8 - * ETC2_RGB8_A1 | Compresses RGB8 with 1-bit alpha - * ETC2_SRGB8_A1 | Compresses sRGB8 with 1-bit alpha - * - * - * @see Texture - */ -enum class TextureFormat : uint16_t { - // 8-bits per element - R8, R8_SNORM, R8UI, R8I, STENCIL8, - - // 16-bits per element - R16F, R16UI, R16I, - RG8, RG8_SNORM, RG8UI, RG8I, - RGB565, - RGB9_E5, // 9995 is actually 32 bpp but it's here for historical reasons. - RGB5_A1, - RGBA4, - DEPTH16, - - // 24-bits per element - RGB8, SRGB8, RGB8_SNORM, RGB8UI, RGB8I, - DEPTH24, - - // 32-bits per element - R32F, R32UI, R32I, - RG16F, RG16UI, RG16I, - R11F_G11F_B10F, - RGBA8, SRGB8_A8,RGBA8_SNORM, - UNUSED, // used to be rgbm - RGB10_A2, RGBA8UI, RGBA8I, - DEPTH32F, DEPTH24_STENCIL8, DEPTH32F_STENCIL8, - - // 48-bits per element - RGB16F, RGB16UI, RGB16I, - - // 64-bits per element - RG32F, RG32UI, RG32I, - RGBA16F, RGBA16UI, RGBA16I, - - // 96-bits per element - RGB32F, RGB32UI, RGB32I, - - // 128-bits per element - RGBA32F, RGBA32UI, RGBA32I, - - // compressed formats - - // Mandatory in GLES 3.0 and GL 4.3 - EAC_R11, EAC_R11_SIGNED, EAC_RG11, EAC_RG11_SIGNED, - ETC2_RGB8, ETC2_SRGB8, - ETC2_RGB8_A1, ETC2_SRGB8_A1, - ETC2_EAC_RGBA8, ETC2_EAC_SRGBA8, - - // Available everywhere except Android/iOS - DXT1_RGB, DXT1_RGBA, DXT3_RGBA, DXT5_RGBA, - DXT1_SRGB, DXT1_SRGBA, DXT3_SRGBA, DXT5_SRGBA, - - // ASTC formats are available with a GLES extension - RGBA_ASTC_4x4, - RGBA_ASTC_5x4, - RGBA_ASTC_5x5, - RGBA_ASTC_6x5, - RGBA_ASTC_6x6, - RGBA_ASTC_8x5, - RGBA_ASTC_8x6, - RGBA_ASTC_8x8, - RGBA_ASTC_10x5, - RGBA_ASTC_10x6, - RGBA_ASTC_10x8, - RGBA_ASTC_10x10, - RGBA_ASTC_12x10, - RGBA_ASTC_12x12, - SRGB8_ALPHA8_ASTC_4x4, - SRGB8_ALPHA8_ASTC_5x4, - SRGB8_ALPHA8_ASTC_5x5, - SRGB8_ALPHA8_ASTC_6x5, - SRGB8_ALPHA8_ASTC_6x6, - SRGB8_ALPHA8_ASTC_8x5, - SRGB8_ALPHA8_ASTC_8x6, - SRGB8_ALPHA8_ASTC_8x8, - SRGB8_ALPHA8_ASTC_10x5, - SRGB8_ALPHA8_ASTC_10x6, - SRGB8_ALPHA8_ASTC_10x8, - SRGB8_ALPHA8_ASTC_10x10, - SRGB8_ALPHA8_ASTC_12x10, - SRGB8_ALPHA8_ASTC_12x12, - - // RGTC formats available with a GLES extension - RED_RGTC1, // BC4 unsigned - SIGNED_RED_RGTC1, // BC4 signed - RED_GREEN_RGTC2, // BC5 unsigned - SIGNED_RED_GREEN_RGTC2, // BC5 signed - - // BPTC formats available with a GLES extension - RGB_BPTC_SIGNED_FLOAT, // BC6H signed - RGB_BPTC_UNSIGNED_FLOAT,// BC6H unsigned - RGBA_BPTC_UNORM, // BC7 - SRGB_ALPHA_BPTC_UNORM, // BC7 sRGB -}; - -//! Bitmask describing the intended Texture Usage -enum class TextureUsage : uint8_t { - NONE = 0x0, - COLOR_ATTACHMENT = 0x1, //!< Texture can be used as a color attachment - DEPTH_ATTACHMENT = 0x2, //!< Texture can be used as a depth attachment - STENCIL_ATTACHMENT = 0x4, //!< Texture can be used as a stencil attachment - UPLOADABLE = 0x8, //!< Data can be uploaded into this texture (default) - SAMPLEABLE = 0x10, //!< Texture can be sampled (default) - SUBPASS_INPUT = 0x20, //!< Texture can be used as a subpass input - DEFAULT = UPLOADABLE | SAMPLEABLE //!< Default texture usage -}; - -//! Texture swizzle -enum class TextureSwizzle : uint8_t { - SUBSTITUTE_ZERO, - SUBSTITUTE_ONE, - CHANNEL_0, - CHANNEL_1, - CHANNEL_2, - CHANNEL_3 -}; - -//! returns whether this format a depth format -static constexpr bool isDepthFormat(TextureFormat format) noexcept { - switch (format) { - case TextureFormat::DEPTH32F: - case TextureFormat::DEPTH24: - case TextureFormat::DEPTH16: - case TextureFormat::DEPTH32F_STENCIL8: - case TextureFormat::DEPTH24_STENCIL8: - return true; - default: - return false; - } -} - -static constexpr bool isUnsignedIntFormat(TextureFormat format) { - switch (format) { - case TextureFormat::R8UI: - case TextureFormat::R16UI: - case TextureFormat::R32UI: - case TextureFormat::RG8UI: - case TextureFormat::RG16UI: - case TextureFormat::RG32UI: - case TextureFormat::RGB8UI: - case TextureFormat::RGB16UI: - case TextureFormat::RGB32UI: - case TextureFormat::RGBA8UI: - case TextureFormat::RGBA16UI: - case TextureFormat::RGBA32UI: - return true; - - default: - return false; - } -} - -static constexpr bool isSignedIntFormat(TextureFormat format) { - switch (format) { - case TextureFormat::R8I: - case TextureFormat::R16I: - case TextureFormat::R32I: - case TextureFormat::RG8I: - case TextureFormat::RG16I: - case TextureFormat::RG32I: - case TextureFormat::RGB8I: - case TextureFormat::RGB16I: - case TextureFormat::RGB32I: - case TextureFormat::RGBA8I: - case TextureFormat::RGBA16I: - case TextureFormat::RGBA32I: - return true; - - default: - return false; - } -} - -//! returns whether this format is a compressed format -static constexpr bool isCompressedFormat(TextureFormat format) noexcept { - return format >= TextureFormat::EAC_R11; -} - -//! returns whether this format is an ETC2 compressed format -static constexpr bool isETC2Compression(TextureFormat format) noexcept { - return format >= TextureFormat::EAC_R11 && format <= TextureFormat::ETC2_EAC_SRGBA8; -} - -//! returns whether this format is an S3TC compressed format -static constexpr bool isS3TCCompression(TextureFormat format) noexcept { - return format >= TextureFormat::DXT1_RGB && format <= TextureFormat::DXT5_SRGBA; -} - -static constexpr bool isS3TCSRGBCompression(TextureFormat format) noexcept { - return format >= TextureFormat::DXT1_SRGB && format <= TextureFormat::DXT5_SRGBA; -} - -//! returns whether this format is an RGTC compressed format -static constexpr bool isRGTCCompression(TextureFormat format) noexcept { - return format >= TextureFormat::RED_RGTC1 && format <= TextureFormat::SIGNED_RED_GREEN_RGTC2; -} - -//! returns whether this format is an BPTC compressed format -static constexpr bool isBPTCCompression(TextureFormat format) noexcept { - return format >= TextureFormat::RGB_BPTC_SIGNED_FLOAT && format <= TextureFormat::SRGB_ALPHA_BPTC_UNORM; -} - -static constexpr bool isASTCCompression(TextureFormat format) noexcept { - return format >= TextureFormat::RGBA_ASTC_4x4 && format <= TextureFormat::SRGB8_ALPHA8_ASTC_12x12; -} - -//! Texture Cubemap Face -enum class TextureCubemapFace : uint8_t { - // don't change the enums values - POSITIVE_X = 0, //!< +x face - NEGATIVE_X = 1, //!< -x face - POSITIVE_Y = 2, //!< +y face - NEGATIVE_Y = 3, //!< -y face - POSITIVE_Z = 4, //!< +z face - NEGATIVE_Z = 5, //!< -z face -}; - -//! Sampler Wrap mode -enum class SamplerWrapMode : uint8_t { - CLAMP_TO_EDGE, //!< clamp-to-edge. The edge of the texture extends to infinity. - REPEAT, //!< repeat. The texture infinitely repeats in the wrap direction. - MIRRORED_REPEAT, //!< mirrored-repeat. The texture infinitely repeats and mirrors in the wrap direction. -}; - -//! Sampler minification filter -enum class SamplerMinFilter : uint8_t { - // don't change the enums values - NEAREST = 0, //!< No filtering. Nearest neighbor is used. - LINEAR = 1, //!< Box filtering. Weighted average of 4 neighbors is used. - NEAREST_MIPMAP_NEAREST = 2, //!< Mip-mapping is activated. But no filtering occurs. - LINEAR_MIPMAP_NEAREST = 3, //!< Box filtering within a mip-map level. - NEAREST_MIPMAP_LINEAR = 4, //!< Mip-map levels are interpolated, but no other filtering occurs. - LINEAR_MIPMAP_LINEAR = 5 //!< Both interpolated Mip-mapping and linear filtering are used. -}; - -//! Sampler magnification filter -enum class SamplerMagFilter : uint8_t { - // don't change the enums values - NEAREST = 0, //!< No filtering. Nearest neighbor is used. - LINEAR = 1, //!< Box filtering. Weighted average of 4 neighbors is used. -}; - -//! Sampler compare mode -enum class SamplerCompareMode : uint8_t { - // don't change the enums values - NONE = 0, - COMPARE_TO_TEXTURE = 1 -}; - -//! comparison function for the depth / stencil sampler -enum class SamplerCompareFunc : uint8_t { - // don't change the enums values - LE = 0, //!< Less or equal - GE, //!< Greater or equal - L, //!< Strictly less than - G, //!< Strictly greater than - E, //!< Equal - NE, //!< Not equal - A, //!< Always. Depth / stencil testing is deactivated. - N //!< Never. The depth / stencil test always fails. -}; - -//! Sampler parameters -struct SamplerParams { // NOLINT - union { - struct { - SamplerMagFilter filterMag : 1; //!< magnification filter (NEAREST) - SamplerMinFilter filterMin : 3; //!< minification filter (NEAREST) - SamplerWrapMode wrapS : 2; //!< s-coordinate wrap mode (CLAMP_TO_EDGE) - SamplerWrapMode wrapT : 2; //!< t-coordinate wrap mode (CLAMP_TO_EDGE) - - SamplerWrapMode wrapR : 2; //!< r-coordinate wrap mode (CLAMP_TO_EDGE) - uint8_t anisotropyLog2 : 3; //!< anisotropy level (0) - SamplerCompareMode compareMode : 1; //!< sampler compare mode (NONE) - uint8_t padding0 : 2; //!< reserved. must be 0. - - SamplerCompareFunc compareFunc : 3; //!< sampler comparison function (LE) - uint8_t padding1 : 5; //!< reserved. must be 0. - - uint8_t padding2 : 8; //!< reserved. must be 0. - }; - uint32_t u; - }; -private: - friend inline bool operator < (SamplerParams lhs, SamplerParams rhs) { - return lhs.u < rhs.u; - } -}; - -static_assert(sizeof(SamplerParams) == sizeof(uint32_t), "SamplerParams must be 32 bits"); - -//! blending equation function -enum class BlendEquation : uint8_t { - ADD, //!< the fragment is added to the color buffer - SUBTRACT, //!< the fragment is subtracted from the color buffer - REVERSE_SUBTRACT, //!< the color buffer is subtracted from the fragment - MIN, //!< the min between the fragment and color buffer - MAX //!< the max between the fragment and color buffer -}; - -//! blending function -enum class BlendFunction : uint8_t { - ZERO, //!< f(src, dst) = 0 - ONE, //!< f(src, dst) = 1 - SRC_COLOR, //!< f(src, dst) = src - ONE_MINUS_SRC_COLOR, //!< f(src, dst) = 1-src - DST_COLOR, //!< f(src, dst) = dst - ONE_MINUS_DST_COLOR, //!< f(src, dst) = 1-dst - SRC_ALPHA, //!< f(src, dst) = src.a - ONE_MINUS_SRC_ALPHA, //!< f(src, dst) = 1-src.a - DST_ALPHA, //!< f(src, dst) = dst.a - ONE_MINUS_DST_ALPHA, //!< f(src, dst) = 1-dst.a - SRC_ALPHA_SATURATE //!< f(src, dst) = (1,1,1) * min(src.a, 1 - dst.a), 1 -}; - -//! stencil operation -enum class StencilOperation : uint8_t { - KEEP, //!< Keeps the current value. - ZERO, //!< Sets the value to 0. - REPLACE, //!< Sets the value to the stencil reference value. - INCR, //!< Increments the current value. Clamps to the maximum representable unsigned value. - INCR_WRAP, //!< Increments the current value. Wraps value to zero when incrementing the maximum representable unsigned value. - DECR, //!< Decrements the current value. Clamps to 0. - DECR_WRAP, //!< Decrements the current value. Wraps value to the maximum representable unsigned value when decrementing a value of zero. - INVERT, //!< Bitwise inverts the current value. -}; - -//! stencil faces -enum class StencilFace : uint8_t { - FRONT = 0x1, //!< Update stencil state for front-facing polygons. - BACK = 0x2, //!< Update stencil state for back-facing polygons. - FRONT_AND_BACK = FRONT | BACK, //!< Update stencil state for all polygons. -}; - -//! Stream for external textures -enum class StreamType { - NATIVE, //!< Not synchronized but copy-free. Good for video. - ACQUIRED, //!< Synchronized, copy-free, and take a release callback. Good for AR but requires API 26+. -}; - -//! Releases an ACQUIRED external texture, guaranteed to be called on the application thread. -using StreamCallback = void(*)(void* image, void* user); - -//! Vertex attribute descriptor -struct Attribute { - //! attribute is normalized (remapped between 0 and 1) - static constexpr uint8_t FLAG_NORMALIZED = 0x1; - //! attribute is an integer - static constexpr uint8_t FLAG_INTEGER_TARGET = 0x2; - static constexpr uint8_t BUFFER_UNUSED = 0xFF; - uint32_t offset = 0; //!< attribute offset in bytes - uint8_t stride = 0; //!< attribute stride in bytes - uint8_t buffer = BUFFER_UNUSED; //!< attribute buffer index - ElementType type = ElementType::BYTE; //!< attribute element type - uint8_t flags = 0x0; //!< attribute flags -}; - -using AttributeArray = std::array; - -//! Raster state descriptor -struct RasterState { - - using CullingMode = backend::CullingMode; - using DepthFunc = backend::SamplerCompareFunc; - using BlendEquation = backend::BlendEquation; - using BlendFunction = backend::BlendFunction; - - RasterState() noexcept { // NOLINT - static_assert(sizeof(RasterState) == sizeof(uint32_t), - "RasterState size not what was intended"); - culling = CullingMode::BACK; - blendEquationRGB = BlendEquation::ADD; - blendEquationAlpha = BlendEquation::ADD; - blendFunctionSrcRGB = BlendFunction::ONE; - blendFunctionSrcAlpha = BlendFunction::ONE; - blendFunctionDstRGB = BlendFunction::ZERO; - blendFunctionDstAlpha = BlendFunction::ZERO; - } - - bool operator == (RasterState rhs) const noexcept { return u == rhs.u; } - bool operator != (RasterState rhs) const noexcept { return u != rhs.u; } - - void disableBlending() noexcept { - blendEquationRGB = BlendEquation::ADD; - blendEquationAlpha = BlendEquation::ADD; - blendFunctionSrcRGB = BlendFunction::ONE; - blendFunctionSrcAlpha = BlendFunction::ONE; - blendFunctionDstRGB = BlendFunction::ZERO; - blendFunctionDstAlpha = BlendFunction::ZERO; - } - - // note: clang reduces this entire function to a simple load/mask/compare - bool hasBlending() const noexcept { - // This is used to decide if blending needs to be enabled in the h/w - return !(blendEquationRGB == BlendEquation::ADD && - blendEquationAlpha == BlendEquation::ADD && - blendFunctionSrcRGB == BlendFunction::ONE && - blendFunctionSrcAlpha == BlendFunction::ONE && - blendFunctionDstRGB == BlendFunction::ZERO && - blendFunctionDstAlpha == BlendFunction::ZERO); - } - - union { - struct { - //! culling mode - CullingMode culling : 2; // 2 - - //! blend equation for the red, green and blue components - BlendEquation blendEquationRGB : 3; // 5 - //! blend equation for the alpha component - BlendEquation blendEquationAlpha : 3; // 8 - - //! blending function for the source color - BlendFunction blendFunctionSrcRGB : 4; // 12 - //! blending function for the source alpha - BlendFunction blendFunctionSrcAlpha : 4; // 16 - //! blending function for the destination color - BlendFunction blendFunctionDstRGB : 4; // 20 - //! blending function for the destination alpha - BlendFunction blendFunctionDstAlpha : 4; // 24 - - //! Whether depth-buffer writes are enabled - bool depthWrite : 1; // 25 - //! Depth test function - DepthFunc depthFunc : 3; // 28 - - //! Whether color-buffer writes are enabled - bool colorWrite : 1; // 29 - - //! use alpha-channel as coverage mask for anti-aliasing - bool alphaToCoverage : 1; // 30 - - //! whether front face winding direction must be inverted - bool inverseFrontFaces : 1; // 31 - - //! padding, must be 0 - uint8_t padding : 1; // 32 - }; - uint32_t u = 0; - }; -}; - -/** - ********************************************************************************************** - * \privatesection - */ - -enum class ShaderStage : uint8_t { - VERTEX = 0, - FRAGMENT = 1, - COMPUTE = 2 -}; - -static constexpr size_t PIPELINE_STAGE_COUNT = 2; -enum class ShaderStageFlags : uint8_t { - NONE = 0, - VERTEX = 0x1, - FRAGMENT = 0x2, - COMPUTE = 0x4, - ALL_SHADER_STAGE_FLAGS = VERTEX | FRAGMENT | COMPUTE -}; - -static inline constexpr bool hasShaderType(ShaderStageFlags flags, ShaderStage type) noexcept { - switch (type) { - case ShaderStage::VERTEX: - return bool(uint8_t(flags) & uint8_t(ShaderStageFlags::VERTEX)); - case ShaderStage::FRAGMENT: - return bool(uint8_t(flags) & uint8_t(ShaderStageFlags::FRAGMENT)); - case ShaderStage::COMPUTE: - return bool(uint8_t(flags) & uint8_t(ShaderStageFlags::COMPUTE)); - } -} - -/** - * Selects which buffers to clear at the beginning of the render pass, as well as which buffers - * can be discarded at the beginning and end of the render pass. - * - */ -struct RenderPassFlags { - /** - * bitmask indicating which buffers to clear at the beginning of a render pass. - * This implies discard. - */ - TargetBufferFlags clear; - - /** - * bitmask indicating which buffers to discard at the beginning of a render pass. - * Discarded buffers have uninitialized content, they must be entirely drawn over or cleared. - */ - TargetBufferFlags discardStart; - - /** - * bitmask indicating which buffers to discard at the end of a render pass. - * Discarded buffers' content becomes invalid, they must not be read from again. - */ - TargetBufferFlags discardEnd; -}; - -/** - * Parameters of a render pass. - */ -struct RenderPassParams { - RenderPassFlags flags{}; //!< operations performed on the buffers for this pass - - Viewport viewport{}; //!< viewport for this pass - DepthRange depthRange{}; //!< depth range for this pass - - //! Color to use to clear the COLOR buffer. RenderPassFlags::clear must be set. - math::float4 clearColor = {}; - - //! Depth value to clear the depth buffer with - double clearDepth = 0.0; - - //! Stencil value to clear the stencil buffer with - uint32_t clearStencil = 0; - - /** - * The subpass mask specifies which color attachments are designated for read-back in the second - * subpass. If this is zero, the render pass has only one subpass. The least significant bit - * specifies that the first color attachment in the render target is a subpass input. - * - * For now only 2 subpasses are supported, so only the lower 8 bits are used, one for each color - * attachment (see MRT::MAX_SUPPORTED_RENDER_TARGET_COUNT). - */ - uint16_t subpassMask = 0; - - /** - * This mask makes a promise to the backend about read-only usage of the depth attachment (bit - * 0) and the stencil attachment (bit 1). Some backends need to know if writes are disabled in - * order to allow sampling from the depth attachment. - */ - uint16_t readOnlyDepthStencil = 0; - - static constexpr uint16_t READONLY_DEPTH = 1 << 0; - static constexpr uint16_t READONLY_STENCIL = 1 << 1; -}; - -struct PolygonOffset { - float slope = 0; // factor in GL-speak - float constant = 0; // units in GL-speak -}; - -struct StencilState { - using StencilFunction = SamplerCompareFunc; - - struct StencilOperations { - //! Stencil test function - StencilFunction stencilFunc : 3; // 3 - - //! Stencil operation when stencil test fails - StencilOperation stencilOpStencilFail : 3; // 6 - - uint8_t padding0 : 2; // 8 - - //! Stencil operation when stencil test passes but depth test fails - StencilOperation stencilOpDepthFail : 3; // 11 - - //! Stencil operation when both stencil and depth test pass - StencilOperation stencilOpDepthStencilPass : 3; // 14 - - uint8_t padding1 : 2; // 16 - - //! Reference value for stencil comparison tests and updates - uint8_t ref; // 24 - - //! Masks the bits of the stencil values participating in the stencil comparison test. - uint8_t readMask; // 32 - - //! Masks the bits of the stencil values updated by the stencil test. - uint8_t writeMask; // 40 - }; - - //! Stencil operations for front-facing polygons - StencilOperations front = { - .stencilFunc = StencilFunction::A, .ref = 0, .readMask = 0xff, .writeMask = 0xff }; - - //! Stencil operations for back-facing polygons - StencilOperations back = { - .stencilFunc = StencilFunction::A, .ref = 0, .readMask = 0xff, .writeMask = 0xff }; - - //! Whether stencil-buffer writes are enabled - bool stencilWrite = false; - - uint8_t padding = 0; -}; - -static_assert(sizeof(StencilState::StencilOperations) == 5u, - "StencilOperations size not what was intended"); - -static_assert(sizeof(StencilState) == 12u, - "StencilState size not what was intended"); - -using FrameScheduledCallback = void(*)(PresentCallable callable, void* user); - -using FrameCompletedCallback = void(*)(void* user); - -enum class Workaround : uint16_t { - // The EASU pass must split because shader compiler flattens early-exit branch - SPLIT_EASU, - // Backend allows feedback loop with ancillary buffers (depth/stencil) as long as they're read-only for - // the whole render pass. - ALLOW_READ_ONLY_ANCILLARY_FEEDBACK_LOOP, - // for some uniform arrays, it's needed to do an initialization to avoid crash on adreno gpu - ADRENO_UNIFORM_ARRAY_CRASH, - // Workaround a Metal pipeline compilation error with the message: - // "Could not statically determine the target of a texture". See light_indirect.fs - A8X_STATIC_TEXTURE_TARGET_ERROR -}; - -} // namespace filament::backend - -template<> struct utils::EnableBitMaskOperators - : public std::true_type {}; -template<> struct utils::EnableBitMaskOperators - : public std::true_type {}; -template<> struct utils::EnableBitMaskOperators - : public std::true_type {}; -template<> struct utils::EnableBitMaskOperators - : public std::true_type {}; -template<> struct utils::EnableIntegerOperators - : public std::true_type {}; -template<> struct utils::EnableIntegerOperators - : public std::true_type {}; - -#if !defined(NDEBUG) -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::BufferUsage usage); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::CullingMode mode); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::ElementType type); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::PixelDataFormat format); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::PixelDataType type); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::Precision precision); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::PrimitiveType type); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::TargetBufferFlags f); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::SamplerCompareFunc func); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::SamplerCompareMode mode); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::SamplerFormat format); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::SamplerMagFilter filter); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::SamplerMinFilter filter); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::SamplerParams params); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::SamplerType type); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::SamplerWrapMode wrap); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::ShaderModel model); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::TextureCubemapFace face); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::TextureFormat format); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::TextureUsage usage); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::BufferObjectBinding binding); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::TextureSwizzle swizzle); -utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::AttributeArray& type); -utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::PolygonOffset& po); -utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::RasterState& rs); -utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::RenderPassParams& b); -utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::Viewport& v); -utils::io::ostream& operator<<(utils::io::ostream& out, filament::backend::ShaderStageFlags stageFlags); -#endif - -#endif // TNT_FILAMENT_BACKEND_DRIVERENUMS_H diff --git a/windows/include/filament/backend/Handle.h b/windows/include/filament/backend/Handle.h deleted file mode 100644 index 7317e2c5..00000000 --- a/windows/include/filament/backend/Handle.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_HANDLE_H -#define TNT_FILAMENT_BACKEND_HANDLE_H - -#include -#if !defined(NDEBUG) -#include -#endif -#include - -#include - -#include -#include - -namespace filament::backend { - -struct HwBufferObject; -struct HwFence; -struct HwIndexBuffer; -struct HwProgram; -struct HwRenderPrimitive; -struct HwRenderTarget; -struct HwSamplerGroup; -struct HwStream; -struct HwSwapChain; -struct HwSync; -struct HwTexture; -struct HwTimerQuery; -struct HwVertexBuffer; - -/* - * A handle to a backend resource. HandleBase is for internal use only. - * HandleBase *must* be a trivial for the purposes of calls, that is, it cannot have user-defined - * copy or move constructors. - */ - -//! \privatesection - -class HandleBase { -public: - using HandleId = uint32_t; - static constexpr const HandleId nullid = HandleId{ std::numeric_limits::max() }; - - constexpr HandleBase() noexcept: object(nullid) {} - - // whether this Handle is initialized - explicit operator bool() const noexcept { return object != nullid; } - - // clear the handle, this doesn't free associated resources - void clear() noexcept { object = nullid; } - - // compare handles - bool operator==(const HandleBase& rhs) const noexcept { return object == rhs.object; } - bool operator!=(const HandleBase& rhs) const noexcept { return object != rhs.object; } - bool operator<(const HandleBase& rhs) const noexcept { return object < rhs.object; } - bool operator<=(const HandleBase& rhs) const noexcept { return object <= rhs.object; } - bool operator>(const HandleBase& rhs) const noexcept { return object > rhs.object; } - bool operator>=(const HandleBase& rhs) const noexcept { return object >= rhs.object; } - - // get this handle's handleId - HandleId getId() const noexcept { return object; } - - // initialize a handle, for internal use only. - explicit HandleBase(HandleId id) noexcept : object(id) { - assert_invariant(object != nullid); // usually means an uninitialized handle is used - } - -protected: - HandleBase(HandleBase const& rhs) noexcept = default; - HandleBase& operator=(HandleBase const& rhs) noexcept = default; - -private: - HandleId object; -}; - -/** - * Type-safe handle to backend resources - * @tparam T Type of the resource - */ -template -struct Handle : public HandleBase { - - Handle() noexcept = default; - - Handle(Handle const& rhs) noexcept = default; - - Handle& operator=(Handle const& rhs) noexcept = default; - - explicit Handle(HandleId id) noexcept : HandleBase(id) { } - - // type-safe Handle cast - template::value> > - Handle(Handle const& base) noexcept : HandleBase(base) { } // NOLINT(hicpp-explicit-conversions,google-explicit-constructor) - -private: -#if !defined(NDEBUG) - template - friend utils::io::ostream& operator<<(utils::io::ostream& out, const Handle& h) noexcept; -#endif -}; - -// Types used by the command stream -// (we use this renaming because the macro-system doesn't deal well with "<" and ">") -using BufferObjectHandle = Handle; -using FenceHandle = Handle; -using IndexBufferHandle = Handle; -using ProgramHandle = Handle; -using RenderPrimitiveHandle = Handle; -using RenderTargetHandle = Handle; -using SamplerGroupHandle = Handle; -using StreamHandle = Handle; -using SwapChainHandle = Handle; -using SyncHandle = Handle; -using TextureHandle = Handle; -using TimerQueryHandle = Handle; -using VertexBufferHandle = Handle; - -} // namespace filament::backend - -#endif // TNT_FILAMENT_BACKEND_HANDLE_H diff --git a/windows/include/filament/backend/PixelBufferDescriptor.h b/windows/include/filament/backend/PixelBufferDescriptor.h deleted file mode 100644 index 1b498032..00000000 --- a/windows/include/filament/backend/PixelBufferDescriptor.h +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_BACKEND_PIXELBUFFERDESCRIPTOR_H -#define TNT_FILAMENT_BACKEND_PIXELBUFFERDESCRIPTOR_H - -#include -#include - -#include -#include - -#include -#include - -namespace filament::backend { - -/** - * A descriptor to an image in main memory, typically used to transfer image data from the CPU - * to the GPU. - * - * A PixelBufferDescriptor owns the memory buffer it references, therefore PixelBufferDescriptor - * cannot be copied, but can be moved. - * - * PixelBufferDescriptor releases ownership of the memory-buffer when it's destroyed. - */ -class UTILS_PUBLIC PixelBufferDescriptor : public BufferDescriptor { -public: - using PixelDataFormat = backend::PixelDataFormat; - using PixelDataType = backend::PixelDataType; - - PixelBufferDescriptor() = default; - - /** - * Creates a new PixelBufferDescriptor referencing an image in main memory - * - * @param buffer Virtual address of the buffer containing the image - * @param size Size in bytes of the buffer containing the image - * @param format Format of the image pixels - * @param type Type of the image pixels - * @param alignment Alignment in bytes of pixel rows - * @param left Left coordinate in pixels - * @param top Top coordinate in pixels - * @param stride Stride of a row in pixels - * @param handler Handler to dispatch the callback or nullptr for the default handler - * @param callback A callback used to release the CPU buffer - * @param user An opaque user pointer passed to the callback function when it's called - */ - PixelBufferDescriptor(void const* buffer, size_t size, - PixelDataFormat format, PixelDataType type, uint8_t alignment, - uint32_t left, uint32_t top, uint32_t stride, - CallbackHandler* handler, Callback callback, void* user = nullptr) noexcept - : BufferDescriptor(buffer, size, handler, callback, user), - left(left), top(top), stride(stride), - format(format), type(type), alignment(alignment) { - } - - PixelBufferDescriptor(void const* buffer, size_t size, - PixelDataFormat format, PixelDataType type, uint8_t alignment = 1, - uint32_t left = 0, uint32_t top = 0, uint32_t stride = 0, - Callback callback = nullptr, void* user = nullptr) noexcept - : BufferDescriptor(buffer, size, callback, user), - left(left), top(top), stride(stride), - format(format), type(type), alignment(alignment) { - } - - /** - * Creates a new PixelBufferDescriptor referencing an image in main memory - * - * @param buffer Virtual address of the buffer containing the image - * @param size Size in bytes of the buffer containing the image - * @param format Format of the image pixels - * @param type Type of the image pixels - * @param handler Handler to dispatch the callback or nullptr for the default handler - * @param callback A callback used to release the CPU buffer - * @param user An opaque user pointer passed to the callback function when it's called - */ - PixelBufferDescriptor(void const* buffer, size_t size, - PixelDataFormat format, PixelDataType type, - CallbackHandler* handler, Callback callback, void* user = nullptr) noexcept - : BufferDescriptor(buffer, size, handler, callback, user), - stride(0), format(format), type(type), alignment(1) { - } - - PixelBufferDescriptor(void const* buffer, size_t size, - PixelDataFormat format, PixelDataType type, - Callback callback, void* user = nullptr) noexcept - : BufferDescriptor(buffer, size, callback, user), - stride(0), format(format), type(type), alignment(1) { - } - - - /** - * Creates a new PixelBufferDescriptor referencing a compressed image in main memory - * - * @param buffer Virtual address of the buffer containing the image - * @param size Size in bytes of the buffer containing the image - * @param format Compressed format of the image - * @param imageSize Compressed size of the image - * @param handler Handler to dispatch the callback or nullptr for the default handler - * @param callback A callback used to release the CPU buffer - * @param user An opaque user pointer passed to the callback function when it's called - */ - PixelBufferDescriptor(void const* buffer, size_t size, - backend::CompressedPixelDataType format, uint32_t imageSize, - CallbackHandler* handler, Callback callback, void* user = nullptr) noexcept - : BufferDescriptor(buffer, size, handler, callback, user), - imageSize(imageSize), compressedFormat(format), type(PixelDataType::COMPRESSED), - alignment(1) { - } - - PixelBufferDescriptor(void const* buffer, size_t size, - backend::CompressedPixelDataType format, uint32_t imageSize, - Callback callback, void* user = nullptr) noexcept - : BufferDescriptor(buffer, size, callback, user), - imageSize(imageSize), compressedFormat(format), type(PixelDataType::COMPRESSED), - alignment(1) { - } - - // -------------------------------------------------------------------------------------------- - - template - static PixelBufferDescriptor make(void const* buffer, size_t size, - PixelDataFormat format, PixelDataType type, uint8_t alignment, - uint32_t left, uint32_t top, uint32_t stride, T* data, - CallbackHandler* handler = nullptr) noexcept { - return { buffer, size, format, type, alignment, left, top, stride, - handler, [](void* b, size_t s, void* u) { - (*static_cast(u)->*method)(b, s); }, data }; - } - - template - static PixelBufferDescriptor make(void const* buffer, size_t size, - PixelDataFormat format, PixelDataType type, T* data, - CallbackHandler* handler = nullptr) noexcept { - return { buffer, size, format, type, handler, [](void* b, size_t s, void* u) { - (*static_cast(u)->*method)(b, s); }, data }; - } - - template - static PixelBufferDescriptor make(void const* buffer, size_t size, - backend::CompressedPixelDataType format, uint32_t imageSize, T* data, - CallbackHandler* handler = nullptr) noexcept { - return { buffer, size, format, imageSize, handler, [](void* b, size_t s, void* u) { - (*static_cast(u)->*method)(b, s); }, data - }; - } - - template - static PixelBufferDescriptor make(void const* buffer, size_t size, - PixelDataFormat format, PixelDataType type, uint8_t alignment, - uint32_t left, uint32_t top, uint32_t stride, T&& functor, - CallbackHandler* handler = nullptr) noexcept { - return { buffer, size, format, type, alignment, left, top, stride, - handler, [](void* b, size_t s, void* u) { - T& that = *static_cast(u); - that(b, s); - delete &that; - }, new T(std::forward(functor)) - }; - } - - template - static PixelBufferDescriptor make(void const* buffer, size_t size, - PixelDataFormat format, PixelDataType type, T&& functor, - CallbackHandler* handler = nullptr) noexcept { - return { buffer, size, format, type, - handler, [](void* b, size_t s, void* u) { - T& that = *static_cast(u); - that(b, s); - delete &that; - }, new T(std::forward(functor)) - }; - } - - template - static PixelBufferDescriptor make(void const* buffer, size_t size, - backend::CompressedPixelDataType format, uint32_t imageSize, T&& functor, - CallbackHandler* handler = nullptr) noexcept { - return { buffer, size, format, imageSize, - handler, [](void* b, size_t s, void* u) { - T& that = *static_cast(u); - that(b, s); - delete &that; - }, new T(std::forward(functor)) - }; - } - - // -------------------------------------------------------------------------------------------- - - /** - * Computes the size in bytes needed to fit an image of given dimensions and format - * - * @param format Format of the image pixels - * @param type Type of the image pixels - * @param stride Stride of a row in pixels - * @param height Height of the image in rows - * @param alignment Alignment in bytes of pixel rows - * @return The buffer size needed to fit this image in bytes - */ - static constexpr size_t computeDataSize(PixelDataFormat format, PixelDataType type, - size_t stride, size_t height, size_t alignment) noexcept { - assert_invariant(alignment); - - if (type == PixelDataType::COMPRESSED) { - return 0; - } - - size_t n = 0; - switch (format) { - case PixelDataFormat::R: - case PixelDataFormat::R_INTEGER: - case PixelDataFormat::DEPTH_COMPONENT: - case PixelDataFormat::ALPHA: - n = 1; - break; - case PixelDataFormat::RG: - case PixelDataFormat::RG_INTEGER: - case PixelDataFormat::DEPTH_STENCIL: - n = 2; - break; - case PixelDataFormat::RGB: - case PixelDataFormat::RGB_INTEGER: - n = 3; - break; - case PixelDataFormat::UNUSED: // shouldn't happen (used to be rgbm) - case PixelDataFormat::RGBA: - case PixelDataFormat::RGBA_INTEGER: - n = 4; - break; - } - - size_t bpp = n; - switch (type) { - case PixelDataType::COMPRESSED: // Impossible -- to squash the IDE warnings - case PixelDataType::UBYTE: - case PixelDataType::BYTE: - // nothing to do - break; - case PixelDataType::USHORT: - case PixelDataType::SHORT: - case PixelDataType::HALF: - bpp *= 2; - break; - case PixelDataType::UINT: - case PixelDataType::INT: - case PixelDataType::FLOAT: - bpp *= 4; - break; - case PixelDataType::UINT_10F_11F_11F_REV: - // Special case, format must be RGB and uses 4 bytes - assert_invariant(format == PixelDataFormat::RGB); - bpp = 4; - break; - case PixelDataType::UINT_2_10_10_10_REV: - // Special case, format must be RGBA and uses 4 bytes - assert_invariant(format == PixelDataFormat::RGBA); - bpp = 4; - break; - case PixelDataType::USHORT_565: - // Special case, format must be RGB and uses 2 bytes - assert_invariant(format == PixelDataFormat::RGB); - bpp = 2; - break; - } - - size_t const bpr = bpp * stride; - size_t const bprAligned = (bpr + (alignment - 1)) & (~alignment + 1); - return bprAligned * height; - } - - //! left coordinate in pixels - uint32_t left = 0; - //! top coordinate in pixels - uint32_t top = 0; - union { - struct { - //! stride in pixels - uint32_t stride; - //! Pixel data format - PixelDataFormat format; - }; - struct { - //! compressed image size - uint32_t imageSize; - //! compressed image format - backend::CompressedPixelDataType compressedFormat; - }; - }; - //! pixel data type - PixelDataType type : 4; - //! row alignment in bytes - uint8_t alignment : 4; -}; - -} // namespace backend::filament - -#if !defined(NDEBUG) -utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::PixelBufferDescriptor& b); -#endif - -#endif // TNT_FILAMENT_BACKEND_PIXELBUFFERDESCRIPTOR_H diff --git a/windows/include/filament/backend/Platform.h b/windows/include/filament/backend/Platform.h deleted file mode 100644 index 210b047c..00000000 --- a/windows/include/filament/backend/Platform.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_BACKEND_PLATFORM_H -#define TNT_FILAMENT_BACKEND_PLATFORM_H - -#include - -#include - -namespace filament::backend { - -class Driver; - -/** - * Platform is an interface that abstracts how the backend (also referred to as Driver) is - * created. The backend provides several common Platform concrete implementations, which are - * selected automatically. It is possible however to provide a custom Platform when creating - * the filament Engine. - */ -class UTILS_PUBLIC Platform { -public: - struct SwapChain {}; - struct Fence {}; - struct Stream {}; - - struct DriverConfig { - /* - * size of handle arena in bytes. Setting to 0 indicates default value is to be used. - * Driver clamps to valid values. - */ - size_t handleArenaSize = 0; - }; - - virtual ~Platform() noexcept; - - /** - * Queries the underlying OS version. - * @return The OS version. - */ - virtual int getOSVersion() const noexcept = 0; - - /** - * Creates and initializes the low-level API (e.g. an OpenGL context or Vulkan instance), - * then creates the concrete Driver. - * The caller takes ownership of the returned Driver* and must destroy it with delete. - * - * @param sharedContext an optional shared context. This is not meaningful with all graphic - * APIs and platforms. - * For EGL platforms, this is an EGLContext. - * - * @param driverConfig specifies driver initialization parameters - * - * @return nullptr on failure, or a pointer to the newly created driver. - */ - virtual backend::Driver* createDriver(void* sharedContext, - const DriverConfig& driverConfig) noexcept = 0; - - /** - * Processes the platform's event queue when called from its primary event-handling thread. - * - * Internally, Filament might need to call this when waiting on a fence. It is only implemented - * on platforms that need it, such as macOS + OpenGL. Returns false if this is not the main - * thread, or if the platform does not need to perform any special processing. - */ - virtual bool pumpEvents() noexcept; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_BACKEND_PLATFORM_H diff --git a/windows/include/filament/backend/PresentCallable.h b/windows/include/filament/backend/PresentCallable.h deleted file mode 100644 index 26579420..00000000 --- a/windows/include/filament/backend/PresentCallable.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_BACKEND_PRESENTCALLABLE -#define TNT_FILAMENT_BACKEND_PRESENTCALLABLE - -#include - -namespace filament { -namespace backend { - -/** - * A PresentCallable is a callable object that, when called, schedules a frame for presentation on - * a SwapChain. - * - * Typically, Filament's backend is responsible scheduling a frame's presentation. However, there - * are certain cases where the application might want to control when a frame is scheduled for - * presentation. - * - * For example, on iOS, UIKit elements can be synchronized to 3D content by scheduling a present - * within a CATransation: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * void myFrameScheduledCallback(PresentCallable presentCallable, void* user) { - * [CATransaction begin]; - * // Update other UI elements... - * presentCallable(); - * [CATransaction commit]; - * } - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * To obtain a PresentCallable, set a SwapChain::FrameScheduledCallback on a SwapChain with the - * SwapChain::setFrameScheduledCallback method. The callback is called with a PresentCallable object - * and optional user data: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * swapChain->setFrameScheduledCallback(myFrameScheduledCallback, nullptr); - * if (renderer->beginFrame(swapChain)) { - * renderer->render(view); - * renderer->endFrame(); - * } - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * @remark Only Filament's Metal backend supports PresentCallables and frame callbacks. Other - * backends ignore the callback (which will never be called) and proceed normally. - * - * @remark The SwapChain::FrameScheduledCallback is called on an arbitrary thread. - * - * Applications *must* call each PresentCallable they receive. Each PresentCallable represents a - * frame that is waiting to be presented. If an application fails to call a PresentCallable, a - * memory leak could occur. To "cancel" the presentation of a frame, pass false to the - * PresentCallable, which will cancel the presentation of the frame and release associated memory. - * - * @see Renderer, SwapChain::setFrameScheduledCallback - */ -class UTILS_PUBLIC PresentCallable { -public: - - using PresentFn = void(*)(bool presentFrame, void* user); - - PresentCallable(PresentFn fn, void* user) noexcept; - ~PresentCallable() noexcept = default; - PresentCallable(const PresentCallable& rhs) = default; - PresentCallable& operator=(const PresentCallable& rhs) = default; - - /** - * Call this PresentCallable, scheduling the associated frame for presentation. Pass false for - * presentFrame to effectively "cancel" the presentation of the frame. - * - * @param presentFrame if false, will not present the frame but releases associated memory - */ - void operator()(bool presentFrame = true) noexcept; - -private: - - PresentFn mPresentFn; - void* mUser = nullptr; - -}; - -/** - * @deprecated, FrameFinishedCallback has been renamed to SwapChain::FrameScheduledCallback. - */ -using FrameFinishedCallback UTILS_DEPRECATED = void(*)(PresentCallable callable, void* user); - -} // namespace backend -} // namespace filament - -#endif // TNT_FILAMENT_BACKEND_PRESENTCALLABLE diff --git a/windows/include/filament/backend/Program.h b/windows/include/filament/backend/Program.h deleted file mode 100644 index 217bcbeb..00000000 --- a/windows/include/filament/backend/Program.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_PRIVATE_PROGRAM_H -#define TNT_FILAMENT_BACKEND_PRIVATE_PROGRAM_H - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -namespace filament::backend { - -class Program { -public: - - static constexpr size_t SHADER_TYPE_COUNT = 3; - static constexpr size_t UNIFORM_BINDING_COUNT = CONFIG_UNIFORM_BINDING_COUNT; - static constexpr size_t SAMPLER_BINDING_COUNT = CONFIG_SAMPLER_BINDING_COUNT; - - struct Sampler { - utils::CString name = {}; // name of the sampler in the shader - uint32_t binding = 0; // binding point of the sampler in the shader - }; - - struct SamplerGroupData { - utils::FixedCapacityVector samplers; - ShaderStageFlags stageFlags = ShaderStageFlags::ALL_SHADER_STAGE_FLAGS; - }; - - using UniformBlockInfo = std::array; - using SamplerGroupInfo = std::array; - using ShaderBlob = utils::FixedCapacityVector; - using ShaderSource = std::array; - - Program() noexcept; - - Program(const Program& rhs) = delete; - Program& operator=(const Program& rhs) = delete; - - Program(Program&& rhs) noexcept; - Program& operator=(Program&& rhs) noexcept; - - ~Program() noexcept; - - // sets the material name and variant for diagnostic purposes only - Program& diagnostics(utils::CString const& name, - utils::Invocable&& logger); - - // sets one of the program's shader (e.g. vertex, fragment) - // string-based shaders are null terminated, consequently the size parameter must include the - // null terminating character. - Program& shader(ShaderStage shader, void const* data, size_t size); - - // Note: This is only needed for GLES3.0 backends, because the layout(binding=) syntax is - // not permitted in glsl. The backend needs a way to associate a uniform block - // to a binding point. - Program& uniformBlockBindings( - utils::FixedCapacityVector> const& uniformBlockBindings) noexcept; - - // sets the 'bindingPoint' sampler group descriptor for this program. - // 'samplers' can be destroyed after this call. - // This effectively associates a set of (BindingPoints, index) to a texture unit in the shader. - // Or more precisely, what layout(binding=) is set to in GLSL. - Program& setSamplerGroup(size_t bindingPoint, ShaderStageFlags stageFlags, - Sampler const* samplers, size_t count) noexcept; - - struct SpecializationConstant { - uint32_t id; // id set in glsl - std::variant value; // value and type - }; - - Program& specializationConstants( - utils::FixedCapacityVector specConstants) noexcept; - - - ShaderSource const& getShadersSource() const noexcept { return mShadersSource; } - ShaderSource& getShadersSource() noexcept { return mShadersSource; } - - UniformBlockInfo const& getUniformBlockBindings() const noexcept { return mUniformBlocks; } - UniformBlockInfo& getUniformBlockBindings() noexcept { return mUniformBlocks; } - - SamplerGroupInfo const& getSamplerGroupInfo() const { return mSamplerGroups; } - SamplerGroupInfo& getSamplerGroupInfo() { return mSamplerGroups; } - - utils::CString const& getName() const noexcept { return mName; } - utils::CString& getName() noexcept { return mName; } - - utils::FixedCapacityVector const& getSpecializationConstants() const noexcept { - return mSpecializationConstants; - } - utils::FixedCapacityVector& getSpecializationConstants() noexcept { - return mSpecializationConstants; - } - -private: - friend utils::io::ostream& operator<<(utils::io::ostream& out, const Program& builder); - - UniformBlockInfo mUniformBlocks = {}; - SamplerGroupInfo mSamplerGroups = {}; - ShaderSource mShadersSource; - utils::CString mName; - utils::Invocable mLogger; - utils::FixedCapacityVector mSpecializationConstants; -}; - -} // namespace filament::backend - -#endif // TNT_FILAMENT_BACKEND_PRIVATE_PROGRAM_H diff --git a/windows/include/filament/backend/README.md b/windows/include/filament/backend/README.md deleted file mode 100644 index 02268268..00000000 --- a/windows/include/filament/backend/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# include/backend Headers - -Headers in `include/backend/` are fully public, in particular they can be included in filament's -public headers. diff --git a/windows/include/filament/backend/SamplerDescriptor.h b/windows/include/filament/backend/SamplerDescriptor.h deleted file mode 100644 index fe78d610..00000000 --- a/windows/include/filament/backend/SamplerDescriptor.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_BACKEND_SAMPLERDESCRIPTOR_H -#define TNT_FILAMENT_BACKEND_SAMPLERDESCRIPTOR_H - -#include -#include - -#include - -#include -#include - -namespace filament::backend { - -struct UTILS_PUBLIC SamplerDescriptor { - Handle t; - SamplerParams s{}; -}; - -} // namespace filament::backend - -#endif // TNT_FILAMENT_BACKEND_SAMPLERDESCRIPTOR_H diff --git a/windows/include/filament/backend/TargetBufferInfo.h b/windows/include/filament/backend/TargetBufferInfo.h deleted file mode 100644 index a2f30d45..00000000 --- a/windows/include/filament/backend/TargetBufferInfo.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_TARGETBUFFERINFO_H -#define TNT_FILAMENT_BACKEND_TARGETBUFFERINFO_H - -#include -#include - -#include - -namespace filament::backend { - -//! \privatesection - -struct TargetBufferInfo { - // texture to be used as render target - Handle handle; - - // level to be used - uint8_t level = 0; - - // for cubemaps and 3D textures. See TextureCubemapFace for the face->layer mapping - uint16_t layer = 0; -}; - -class MRT { -public: - static constexpr uint8_t MIN_SUPPORTED_RENDER_TARGET_COUNT = 4u; - - // When updating this, make sure to also take care of RenderTarget.java - static constexpr uint8_t MAX_SUPPORTED_RENDER_TARGET_COUNT = 8u; - -private: - TargetBufferInfo mInfos[MAX_SUPPORTED_RENDER_TARGET_COUNT]; - -public: - TargetBufferInfo const& operator[](size_t i) const noexcept { - return mInfos[i]; - } - - TargetBufferInfo& operator[](size_t i) noexcept { - return mInfos[i]; - } - - MRT() noexcept = default; - - MRT(TargetBufferInfo const& color) noexcept // NOLINT(hicpp-explicit-conversions) - : mInfos{ color } { - } - - MRT(TargetBufferInfo const& color0, TargetBufferInfo const& color1) noexcept - : mInfos{ color0, color1 } { - } - - MRT(TargetBufferInfo const& color0, TargetBufferInfo const& color1, - TargetBufferInfo const& color2) noexcept - : mInfos{ color0, color1, color2 } { - } - - MRT(TargetBufferInfo const& color0, TargetBufferInfo const& color1, - TargetBufferInfo const& color2, TargetBufferInfo const& color3) noexcept - : mInfos{ color0, color1, color2, color3 } { - } - - // this is here for backward compatibility - MRT(Handle handle, uint8_t level, uint16_t layer) noexcept - : mInfos{{ handle, level, layer }} { - } -}; - -} // namespace filament::backend - -#if !defined(NDEBUG) -utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::TargetBufferInfo& tbi); -utils::io::ostream& operator<<(utils::io::ostream& out, const filament::backend::MRT& mrt); -#endif - -#endif //TNT_FILAMENT_BACKEND_TARGETBUFFERINFO_H diff --git a/windows/include/filament/backend/platforms/OpenGLPlatform.h b/windows/include/filament/backend/platforms/OpenGLPlatform.h deleted file mode 100644 index 8cdbc0f6..00000000 --- a/windows/include/filament/backend/platforms/OpenGLPlatform.h +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_PRIVATE_OPENGLPLATFORM_H -#define TNT_FILAMENT_BACKEND_PRIVATE_OPENGLPLATFORM_H - -#include -#include - -namespace filament::backend { - -class Driver; - -/** - * A Platform interface that creates an OpenGL backend. - * - * WARNING: None of the methods below are allowed to change the GL state and must restore it - * upon return. - * - */ -class OpenGLPlatform : public Platform { -protected: - - /* - * Derived classes can use this to instantiate the default OpenGLDriver backend. - * This is typically called from your implementation of createDriver() - */ - static Driver* createDefaultDriver(OpenGLPlatform* platform, - void* sharedContext, const DriverConfig& driverConfig); - - ~OpenGLPlatform() noexcept override; - -public: - - struct ExternalTexture { - unsigned int target; // GLenum target - unsigned int id; // GLuint id - }; - - /** - * Called by the driver to destroy the OpenGL context. This should clean up any windows - * or buffers from initialization. This is for instance where `eglDestroyContext` would be - * called. - */ - virtual void terminate() noexcept = 0; - - /** - * Called by the driver to create a SwapChain for this driver. - * - * @param nativeWindow a token representing the native window. See concrete implementation - * for details. - * @param flags extra flags used by the implementation, see filament::SwapChain - * @return The driver's SwapChain object. - * - */ - virtual SwapChain* createSwapChain(void* nativeWindow, uint64_t flags) noexcept = 0; - - /** - * Return whether createSwapChain supports the SWAP_CHAIN_CONFIG_SRGB_COLORSPACE flag. - * The default implementation returns false. - * - * @return true if SWAP_CHAIN_CONFIG_SRGB_COLORSPACE is supported, false otherwise. - */ - virtual bool isSRGBSwapChainSupported() const noexcept; - - /** - * Called by the driver create a headless SwapChain. - * - * @param width width of the buffer - * @param height height of the buffer - * @param flags extra flags used by the implementation, see filament::SwapChain - * @return The driver's SwapChain object. - * - * TODO: we need a more generic way of passing construction parameters - * A void* might be enough. - */ - virtual SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept = 0; - - /** - * Called by the driver to destroys the SwapChain - * @param swapChain SwapChain to be destroyed. - */ - virtual void destroySwapChain(SwapChain* swapChain) noexcept = 0; - - /** - * Called by the driver to establish the default FBO. The default implementation returns 0. - * @return a GLuint casted to a uint32_t that is an OpenGL framebuffer object. - */ - virtual uint32_t createDefaultRenderTarget() noexcept; - - /** - * Called by the driver to make the OpenGL context active on the calling thread and bind - * the drawSwapChain to the default render target (FBO) created with createDefaultRenderTarget. - * @param drawSwapChain SwapChain to draw to. It must be bound to the default FBO. - * @param readSwapChain SwapChain to read from (for operation like `glBlitFramebuffer`) - */ - virtual void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept = 0; - - /** - * Called by the driver once the current frame finishes drawing. Typically, this should present - * the drawSwapChain. This is for example where `eglMakeCurrent()` would be called. - * @param swapChain the SwapChain to present. - */ - virtual void commit(SwapChain* swapChain) noexcept = 0; - - /** - * Set the time the next committed buffer should be presented to the user at. - * - * @param presentationTimeInNanosecond time in the future in nanosecond. The clock used depends - * on the concrete platform implementation. - */ - virtual void setPresentationTime(int64_t presentationTimeInNanosecond) noexcept; - - // -------------------------------------------------------------------------------------------- - // Fence support - - /** - * Can this implementation create a Fence. - * @return true if supported, false otherwise. The default implementation returns false. - */ - virtual bool canCreateFence() noexcept; - - /** - * Creates a Fence (e.g. eglCreateSyncKHR). This must be implemented if `canCreateFence` - * returns true. Fences are used for frame pacing. - * - * @return A Fence object. The default implementation returns nullptr. - */ - virtual Fence* createFence() noexcept; - - /** - * Destroys a Fence object. The default implementation does nothing. - * - * @param fence Fence to destroy. - */ - virtual void destroyFence(Fence* fence) noexcept; - - /** - * Waits on a Fence. - * - * @param fence Fence to wait on. - * @param timeout Timeout. - * @return Whether the fence signaled or timed out. See backend::FenceStatus. - * The default implementation always return backend::FenceStatus::ERROR. - */ - virtual backend::FenceStatus waitFence(Fence* fence, uint64_t timeout) noexcept; - - - // -------------------------------------------------------------------------------------------- - // Streaming support - - /** - * Creates a Stream from a native Stream. - * - * WARNING: This is called synchronously from the application thread (NOT the Driver thread) - * - * @param nativeStream The native stream, this parameter depends on the concrete implementation. - * @return A new Stream object. - */ - virtual Stream* createStream(void* nativeStream) noexcept; - - /** - * Destroys a Stream. - * @param stream Stream to destroy. - */ - virtual void destroyStream(Stream* stream) noexcept; - - /** - * The specified stream takes ownership of the texture (tname) object - * Once attached, the texture is automatically updated with the Stream's content, which - * could be a video stream for instance. - * - * @param stream Stream to take ownership of the texture - * @param tname GL texture id to "bind" to the Stream. - */ - virtual void attach(Stream* stream, intptr_t tname) noexcept; - - /** - * Destroys the texture associated to the stream - * @param stream Stream to detach from its texture - */ - virtual void detach(Stream* stream) noexcept; - - /** - * Updates the content of the texture attached to the stream. - * @param stream Stream to update - * @param timestamp Output parameter: Timestamp of the image bound to the texture. - */ - virtual void updateTexImage(Stream* stream, int64_t* timestamp) noexcept; - - - // -------------------------------------------------------------------------------------------- - // External Image support - - /** - * Creates an external texture handle. External textures don't have any parameters because - * these are undefined until setExternalImage() is called. - * @return a pointer to an ExternalTexture structure filled with valid token. However, the - * implementation could just return { 0, GL_TEXTURE_2D } at this point. The actual - * values can be delayed until setExternalImage. - */ - virtual ExternalTexture *createExternalImageTexture() noexcept; - - /** - * Destroys an external texture handle and associated data. - * @param texture a pointer to the handle to destroy. - */ - virtual void destroyExternalImage(ExternalTexture* texture) noexcept; - - // called on the application thread to allow Filament to take ownership of the image - - /** - * Takes ownership of the externalImage. The externalImage parameter depends on the Platform's - * concrete implementation. Ownership is released when destroyExternalImage() is called. - * - * WARNING: This is called synchronously from the application thread (NOT the Driver thread) - * - * @param externalImage A token representing the platform's external image. - * @see destroyExternalImage - */ - virtual void retainExternalImage(void* externalImage) noexcept; - - /** - * Called to bind the platform-specific externalImage to an ExternalTexture. - * ExternalTexture::id is guaranteed to be bound when this method is called and ExternalTexture - * is updated with new values for id/target if necessary. - * - * WARNING: this method is not allowed to change the bound texture, or must restore the previous - * binding upon return. This is to avoid problem with a backend doing state caching. - * - * @param externalImage The platform-specific external image. - * @param texture an in/out pointer to ExternalTexture, id and target can be updated if necessary. - * @return true on success, false on error. - */ - virtual bool setExternalImage(void* externalImage, ExternalTexture* texture) noexcept; - - /** - * The method allows platforms to convert a user-supplied external image object into a new type - * (e.g. HardwareBuffer => EGLImage). The default implementation returns source. - * @param source Image to transform. - * @return Transformed image. - */ - virtual AcquiredImage transformAcquiredImage(AcquiredImage source) noexcept; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_BACKEND_PRIVATE_OPENGLPLATFORM_H diff --git a/windows/include/filament/backend/platforms/PlatformCocoaGL.h b/windows/include/filament/backend/platforms/PlatformCocoaGL.h deleted file mode 100644 index 97188852..00000000 --- a/windows/include/filament/backend/platforms/PlatformCocoaGL.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_GL_H -#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_GL_H - -#include - -#include - -#include - -namespace filament::backend { - -struct PlatformCocoaGLImpl; - -/** - * A concrete implementation of OpenGLPlatform that supports macOS's Cocoa. - */ -class PlatformCocoaGL : public OpenGLPlatform { -public: - PlatformCocoaGL(); - ~PlatformCocoaGL() noexcept override; - -protected: - // -------------------------------------------------------------------------------------------- - // Platform Interface - - Driver* createDriver(void* sharedContext, - const Platform::DriverConfig& driverConfig) noexcept override; - - // Currently returns 0 - int getOSVersion() const noexcept override; - - bool pumpEvents() noexcept override; - - // -------------------------------------------------------------------------------------------- - // OpenGLPlatform Interface - - void terminate() noexcept override; - - SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override; - SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override; - void destroySwapChain(SwapChain* swapChain) noexcept override; - void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; - void commit(SwapChain* swapChain) noexcept override; - OpenGLPlatform::ExternalTexture* createExternalImageTexture() noexcept override; - void destroyExternalImage(ExternalTexture* texture) noexcept override; - void retainExternalImage(void* externalImage) noexcept override; - bool setExternalImage(void* externalImage, ExternalTexture* texture) noexcept override; - -private: - PlatformCocoaGLImpl* pImpl = nullptr; -}; - -} // namespace filament::backend - -#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_GL_H diff --git a/windows/include/filament/backend/platforms/PlatformCocoaTouchGL.h b/windows/include/filament/backend/platforms/PlatformCocoaTouchGL.h deleted file mode 100644 index 5eb3b63b..00000000 --- a/windows/include/filament/backend/platforms/PlatformCocoaTouchGL.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_TOUCH_GL_H -#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_TOUCH_GL_H - -#include - -#include - -#include - -namespace filament::backend { - -struct PlatformCocoaTouchGLImpl; - -class PlatformCocoaTouchGL : public OpenGLPlatform { -public: - PlatformCocoaTouchGL(); - ~PlatformCocoaTouchGL() noexcept; - - // -------------------------------------------------------------------------------------------- - // Platform Interface - - Driver* createDriver(void* sharedGLContext, - const Platform::DriverConfig& driverConfig) noexcept override; - - int getOSVersion() const noexcept final { return 0; } - - // -------------------------------------------------------------------------------------------- - // OpenGLPlatform Interface - - void terminate() noexcept override; - - uint32_t createDefaultRenderTarget() noexcept override; - - SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override; - SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override; - void destroySwapChain(SwapChain* swapChain) noexcept override; - void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; - void commit(SwapChain* swapChain) noexcept override; - - OpenGLPlatform::ExternalTexture* createExternalImageTexture() noexcept override; - void destroyExternalImage(ExternalTexture* texture) noexcept override; - void retainExternalImage(void* externalImage) noexcept override; - bool setExternalImage(void* externalImage, ExternalTexture* texture) noexcept override; - -private: - PlatformCocoaTouchGLImpl* pImpl = nullptr; -}; - -using ContextManager = PlatformCocoaTouchGL; - -} // namespace filament::backend - -#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_COCOA_TOUCH_GL_H diff --git a/windows/include/filament/backend/platforms/PlatformEGL.h b/windows/include/filament/backend/platforms/PlatformEGL.h deleted file mode 100644 index 21fc7c96..00000000 --- a/windows/include/filament/backend/platforms/PlatformEGL.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_H -#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_H - -#include - -#include -#include - -#include - -#include - -namespace filament::backend { - -/** - * A concrete implementation of OpenGLPlatform that supports EGL. - */ -class PlatformEGL : public OpenGLPlatform { -public: - - PlatformEGL() noexcept; - -protected: - // -------------------------------------------------------------------------------------------- - // Platform Interface - - /** - * Initializes EGL, creates the OpenGL context and returns a concrete Driver implementation - * that supports OpenGL/OpenGL ES. - */ - Driver* createDriver(void* sharedContext, - const Platform::DriverConfig& driverConfig) noexcept override; - - /** - * This returns zero. This method can be overridden to return something more useful. - * @return zero - */ - int getOSVersion() const noexcept override; - - // -------------------------------------------------------------------------------------------- - // OpenGLPlatform Interface - - void terminate() noexcept override; - - bool isSRGBSwapChainSupported() const noexcept override; - SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override; - SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override; - void destroySwapChain(SwapChain* swapChain) noexcept override; - void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; - void commit(SwapChain* swapChain) noexcept override; - - bool canCreateFence() noexcept override; - Fence* createFence() noexcept override; - void destroyFence(Fence* fence) noexcept override; - FenceStatus waitFence(Fence* fence, uint64_t timeout) noexcept override; - - OpenGLPlatform::ExternalTexture* createExternalImageTexture() noexcept override; - void destroyExternalImage(ExternalTexture* texture) noexcept override; - bool setExternalImage(void* externalImage, ExternalTexture* texture) noexcept override; - - /** - * Logs glGetError() to slog.e - * @param name a string giving some context on the error. Typically __func__. - */ - static void logEglError(const char* name) noexcept; - - /** - * Calls glGetError() to clear the current error flags. logs a warning to log.w if - * an error was pending. - */ - static void clearGlError() noexcept; - - /** - * Always use this instead of eglMakeCurrent(). - */ - EGLBoolean makeCurrent(EGLSurface drawSurface, EGLSurface readSurface) noexcept; - - // TODO: this should probably use getters instead. - EGLDisplay mEGLDisplay = EGL_NO_DISPLAY; - EGLContext mEGLContext = EGL_NO_CONTEXT; - EGLSurface mCurrentDrawSurface = EGL_NO_SURFACE; - EGLSurface mCurrentReadSurface = EGL_NO_SURFACE; - EGLSurface mEGLDummySurface = EGL_NO_SURFACE; - EGLConfig mEGLConfig = EGL_NO_CONFIG_KHR; - - // supported extensions detected at runtime - struct { - struct { - bool OES_EGL_image_external_essl3 = false; - } gl; - struct { - bool KHR_no_config_context = false; - bool KHR_gl_colorspace = false; - } egl; - } ext; - -private: - void initializeGlExtensions() noexcept; - EGLConfig findSwapChainConfig(uint64_t flags) const; -}; - -} // namespace filament::backend - -#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_H diff --git a/windows/include/filament/backend/platforms/PlatformEGLAndroid.h b/windows/include/filament/backend/platforms/PlatformEGLAndroid.h deleted file mode 100644 index 1c7a4cd7..00000000 --- a/windows/include/filament/backend/platforms/PlatformEGLAndroid.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_ANDROID_H -#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_ANDROID_H - -#include - -namespace filament::backend { - -class ExternalStreamManagerAndroid; - -/** - * A concrete implementation of OpenGLPlatform and subclass of PlatformEGL that supports - * EGL on Android. It adds Android streaming functionality to PlatformEGL. - */ -class PlatformEGLAndroid : public PlatformEGL { -public: - - PlatformEGLAndroid() noexcept; - ~PlatformEGLAndroid() noexcept override; - -protected: - - // -------------------------------------------------------------------------------------------- - // Platform Interface - - /** - * Returns the Android SDK version. - * @return Android SDK version. - */ - int getOSVersion() const noexcept override; - - Driver* createDriver(void* sharedContext, - const Platform::DriverConfig& driverConfig) noexcept override; - - // -------------------------------------------------------------------------------------------- - // OpenGLPlatform Interface - - void terminate() noexcept override; - - /** - * Set the presentation time using `eglPresentationTimeANDROID` - * @param presentationTimeInNanosecond - */ - void setPresentationTime(int64_t presentationTimeInNanosecond) noexcept override; - - - Stream* createStream(void* nativeStream) noexcept override; - void destroyStream(Stream* stream) noexcept override; - void attach(Stream* stream, intptr_t tname) noexcept override; - void detach(Stream* stream) noexcept override; - void updateTexImage(Stream* stream, int64_t* timestamp) noexcept override; - - /** - * Converts a AHardwareBuffer to EGLImage - * @param source source.image is a AHardwareBuffer - * @return source.image contains an EGLImage - */ - AcquiredImage transformAcquiredImage(AcquiredImage source) noexcept override; - -private: - int mOSVersion; - ExternalStreamManagerAndroid& mExternalStreamManager; -}; - -} // namespace filament::backend - -#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_EGL_ANDROID_H diff --git a/windows/include/filament/backend/platforms/PlatformEGLHeadless.h b/windows/include/filament/backend/platforms/PlatformEGLHeadless.h deleted file mode 100644 index 13d5fa05..00000000 --- a/windows/include/filament/backend/platforms/PlatformEGLHeadless.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -#ifndef TNT_FILAMENT_DRIVER_OPENGL_PLATFORM_EGL_HEADLESS_H -#define TNT_FILAMENT_DRIVER_OPENGL_PLATFORM_EGL_HEADLESS_H - -#include "PlatformEGL.h" - -namespace filament::backend { - -/** - * A concrete implementation of OpenGLPlatform that supports EGL with only headless swapchains. - */ -class PlatformEGLHeadless : public PlatformEGL { -public: - PlatformEGLHeadless() noexcept; - - Driver* createDriver(void* sharedContext, - const Platform::DriverConfig& driverConfig) noexcept override; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_DRIVER_OPENGL_PLATFORM_EGL_HEADLESS_H diff --git a/windows/include/filament/backend/platforms/PlatformGLX.h b/windows/include/filament/backend/platforms/PlatformGLX.h deleted file mode 100644 index b2be5e40..00000000 --- a/windows/include/filament/backend/platforms/PlatformGLX.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_GLX_H -#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_GLX_H - -#include - -#include "bluegl/BlueGL.h" -#include - -#include - -#include - -#include - -namespace filament::backend { - -/** - * A concrete implementation of OpenGLPlatform that supports GLX. - */ -class PlatformGLX : public OpenGLPlatform { -protected: - // -------------------------------------------------------------------------------------------- - // Platform Interface - - Driver* createDriver(void* sharedGLContext, - const DriverConfig& driverConfig) noexcept override; - - int getOSVersion() const noexcept final override { return 0; } - - // -------------------------------------------------------------------------------------------- - // OpenGLPlatform Interface - - void terminate() noexcept override; - - SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override; - SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override; - void destroySwapChain(SwapChain* swapChain) noexcept override; - void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; - void commit(SwapChain* swapChain) noexcept override; - -private: - Display *mGLXDisplay; - GLXContext mGLXContext; - GLXFBConfig* mGLXConfig; - GLXPbuffer mDummySurface; - std::vector mPBuffers; -}; - -} // namespace filament::backend - -#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_GLX_H diff --git a/windows/include/filament/backend/platforms/PlatformWGL.h b/windows/include/filament/backend/platforms/PlatformWGL.h deleted file mode 100644 index d18a20b2..00000000 --- a/windows/include/filament/backend/platforms/PlatformWGL.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2018 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_WGL_H -#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_WGL_H - -#include - -#include -#include "utils/unwindows.h" - -#include - -#include - -namespace filament::backend { - -/** - * A concrete implementation of OpenGLPlatform that supports WGL. - */ -class PlatformWGL : public OpenGLPlatform { -protected: - // -------------------------------------------------------------------------------------------- - // Platform Interface - - Driver* createDriver(void* sharedGLContext, - const Platform::DriverConfig& driverConfig) noexcept override; - - int getOSVersion() const noexcept final override { return 0; } - - // -------------------------------------------------------------------------------------------- - // OpenGLPlatform Interface - - void terminate() noexcept override; - - SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override; - SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override; - void destroySwapChain(SwapChain* swapChain) noexcept override; - void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; - void commit(SwapChain* swapChain) noexcept override; - -protected: - HGLRC mContext = NULL; - HWND mHWnd = NULL; - HDC mWhdc = NULL; - PIXELFORMATDESCRIPTOR mPfd = {}; -}; - -} // namespace filament::backend - -#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_GLX_H diff --git a/windows/include/filament/backend/platforms/PlatformWebGL.h b/windows/include/filament/backend/platforms/PlatformWebGL.h deleted file mode 100644 index 92bff0c4..00000000 --- a/windows/include/filament/backend/platforms/PlatformWebGL.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2018 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_WEBGL_H -#define TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_WEBGL_H - -#include - -#include - -#include - -namespace filament::backend { - -/** - * A concrete implementation of OpenGLPlatform that supports WebGL. - */ -class PlatformWebGL : public OpenGLPlatform { -protected: - // -------------------------------------------------------------------------------------------- - // Platform Interface - - Driver* createDriver(void* sharedGLContext, - const Platform::DriverConfig& driverConfig) noexcept override; - - int getOSVersion() const noexcept override; - - // -------------------------------------------------------------------------------------------- - // OpenGLPlatform Interface - - void terminate() noexcept override; - - SwapChain* createSwapChain(void* nativewindow, uint64_t flags) noexcept override; - SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept override; - void destroySwapChain(SwapChain* swapChain) noexcept override; - void makeCurrent(SwapChain* drawSwapChain, SwapChain* readSwapChain) noexcept override; - void commit(SwapChain* swapChain) noexcept override; -}; - -} // namespace filament::backend - -#endif // TNT_FILAMENT_BACKEND_OPENGL_OPENGL_PLATFORM_WEBGL_H diff --git a/windows/include/filament/backend/platforms/VulkanPlatform.h b/windows/include/filament/backend/platforms/VulkanPlatform.h deleted file mode 100644 index b141e736..00000000 --- a/windows/include/filament/backend/platforms/VulkanPlatform.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef TNT_FILAMENT_BACKEND_PLATFORMS_VULKANPLATFORM_H -#define TNT_FILAMENT_BACKEND_PLATFORMS_VULKANPLATFORM_H - -#include - -namespace filament::backend { - -/** - * A Platform interface that creates a Vulkan backend. - */ - -class VulkanPlatform : public Platform { -public: - struct SurfaceBundle { - void* surface; - // On certain platforms, the extent of the surface cannot be queried from Vulkan. In those - // situations, we allow the frontend to pass in the extent to use in creating the swap - // chains. Platform implementation should set extent to 0 if they do not expect to set the - // swap chain extent. - uint32_t width; - uint32_t height; - }; - - // Given a Vulkan instance and native window handle, creates the platform-specific surface. - virtual SurfaceBundle createVkSurfaceKHR(void* nativeWindow, void* instance, - uint64_t flags) noexcept = 0; - - ~VulkanPlatform() override; -}; - -} // namespace filament::backend - -#endif //TNT_FILAMENT_BACKEND_PLATFORMS_VULKANPLATFORM_H diff --git a/windows/include/filament/camutils/Bookmark.h b/windows/include/filament/camutils/Bookmark.h deleted file mode 100644 index 44ec1d62..00000000 --- a/windows/include/filament/camutils/Bookmark.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -#ifndef CAMUTILS_BOOKMARK_H -#define CAMUTILS_BOOKMARK_H - -#include - -#include -#include - -namespace filament { -namespace camutils { - -template class FreeFlightManipulator; -template class OrbitManipulator; -template class MapManipulator; -template class Manipulator; - -enum class Mode { ORBIT, MAP, FREE_FLIGHT }; - -/** - * Opaque memento to a viewing position and orientation (e.g. the "home" camera position). - * - * This little struct is meant to be passed around by value and can be used to track camera - * animation between waypoints. In map mode this implements Van Wijk interpolation. - * - * @see Manipulator::getCurrentBookmark, Manipulator::jumpToBookmark - */ -template -struct CAMUTILS_PUBLIC Bookmark { - /** - * Interpolates between two bookmarks. The t argument must be between 0 and 1 (inclusive), and - * the two endpoints must have the same mode (ORBIT or MAP). - */ - static Bookmark interpolate(Bookmark a, Bookmark b, double t); - - /** - * Recommends a duration for animation between two MAP endpoints. The return value is a unitless - * multiplier. - */ - static double duration(Bookmark a, Bookmark b); - -private: - struct MapParams { - FLOAT extent; - filament::math::vec2 center; - }; - struct OrbitParams { - FLOAT phi; - FLOAT theta; - FLOAT distance; - filament::math::vec3 pivot; - }; - struct FlightParams { - FLOAT pitch; - FLOAT yaw; - filament::math::vec3 position; - }; - Mode mode; - MapParams map; - OrbitParams orbit; - FlightParams flight; - friend class FreeFlightManipulator; - friend class OrbitManipulator; - friend class MapManipulator; -}; - -} // namespace camutils -} // namespace filament - -#endif // CAMUTILS_BOOKMARK_H diff --git a/windows/include/filament/camutils/Manipulator.h b/windows/include/filament/camutils/Manipulator.h deleted file mode 100644 index 2cc8a4da..00000000 --- a/windows/include/filament/camutils/Manipulator.h +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -#ifndef CAMUTILS_MANIPULATOR_H -#define CAMUTILS_MANIPULATOR_H - -#include -#include - -#include -#include -#include - -#include - -namespace filament { -namespace camutils { - -enum class Fov { VERTICAL, HORIZONTAL }; - -/** - * Helper that enables camera interaction similar to sketchfab or Google Maps. - * - * Clients notify the camera manipulator of various mouse or touch events, then periodically call - * its getLookAt() method so that they can adjust their camera(s). Three modes are supported: ORBIT, - * MAP, and FREE_FLIGHT. To construct a manipulator instance, the desired mode is passed into the - * create method. - * - * Usage example: - * - * using CameraManipulator = camutils::Manipulator; - * CameraManipulator* manip; - * - * void init() { - * manip = CameraManipulator::Builder() - * .viewport(1024, 768) - * .build(camutils::Mode::ORBIT); - * } - * - * void onMouseDown(int x, int y) { - * manip->grabBegin(x, y, false); - * } - * - * void onMouseMove(int x, int y) { - * manip->grabUpdate(x, y); - * } - * - * void onMouseUp(int x, int y) { - * manip->grabEnd(); - * } - * - * void gameLoop() { - * while (true) { - * filament::math::float3 eye, center, up; - * manip->getLookAt(&eye, ¢er, &up); - * camera->lookAt(eye, center, up); - * render(); - * } - * } - * - * @see Bookmark - */ -template -class CAMUTILS_PUBLIC Manipulator { -public: - using vec2 = filament::math::vec2; - using vec3 = filament::math::vec3; - using vec4 = filament::math::vec4; - - /** Opaque handle to a viewing position and orientation to facilitate camera animation. */ - using Bookmark = filament::camutils::Bookmark; - - /** Optional raycasting function to enable perspective-correct panning. */ - typedef bool (*RayCallback)(const vec3& origin, const vec3& dir, FLOAT* t, void* userdata); - - /** Builder state, direct access is allowed but Builder methods are preferred. **/ - struct Config { - int viewport[2]; - vec3 targetPosition; - vec3 upVector; - FLOAT zoomSpeed; - vec3 orbitHomePosition; - vec2 orbitSpeed; - Fov fovDirection; - FLOAT fovDegrees; - FLOAT farPlane; - vec2 mapExtent; - FLOAT mapMinDistance; - vec3 flightStartPosition; - FLOAT flightStartPitch; - FLOAT flightStartYaw; - FLOAT flightMaxSpeed; - FLOAT flightSpeedSteps; - vec2 flightPanSpeed; - FLOAT flightMoveDamping; - vec4 groundPlane; - RayCallback raycastCallback; - void* raycastUserdata; - }; - - struct Builder { - // Common properties - Builder& viewport(int width, int height); //! Width and height of the viewing area - Builder& targetPosition(FLOAT x, FLOAT y, FLOAT z); //! World-space position of interest, defaults to (0,0,0) - Builder& upVector(FLOAT x, FLOAT y, FLOAT z); //! Orientation for the home position, defaults to (0,1,0) - Builder& zoomSpeed(FLOAT val); //! Multiplied with scroll delta, defaults to 0.01 - - // Orbit mode properties - Builder& orbitHomePosition(FLOAT x, FLOAT y, FLOAT z); //! Initial eye position in world space, defaults to (0,0,1) - Builder& orbitSpeed(FLOAT x, FLOAT y); //! Multiplied with viewport delta, defaults to 0.01 - - // Map mode properties - Builder& fovDirection(Fov fov); //! The axis that's held constant when viewport changes - Builder& fovDegrees(FLOAT degrees); //! The full FOV (not the half-angle) - Builder& farPlane(FLOAT distance); //! The distance to the far plane - Builder& mapExtent(FLOAT worldWidth, FLOAT worldHeight); //! The ground size for computing home position - Builder& mapMinDistance(FLOAT mindist); //! Constrains the zoom-in level - - // Free flight properties - Builder& flightStartPosition(FLOAT x, FLOAT y, FLOAT z); //! Initial eye position in world space, defaults to (0,0,0) - Builder& flightStartOrientation(FLOAT pitch, FLOAT yaw); //! Initial orientation in pitch and yaw, defaults to (0,0) - Builder& flightMaxMoveSpeed(FLOAT maxSpeed); //! The maximum camera speed in world units per second, defaults to 10 - Builder& flightSpeedSteps(int steps); //! The number of speed steps adjustable with scroll wheel, defaults to 80 - Builder& flightPanSpeed(FLOAT x, FLOAT y); //! Multiplied with viewport delta, defaults to 0.01,0.01 - Builder& flightMoveDamping(FLOAT damping); //! Applies a deceleration to camera movement, defaults to 0 (no damping) - //! Lower values give slower damping times, a good default is 15 - //! Too high a value may lead to instability - - // Raycast properties - Builder& groundPlane(FLOAT a, FLOAT b, FLOAT c, FLOAT d); //! Plane equation used as a raycast fallback - Builder& raycastCallback(RayCallback cb, void* userdata); //! Raycast function for accurate grab-and-pan - - /** - * Creates a new camera manipulator, either ORBIT, MAP, or FREE_FLIGHT. - * - * Clients can simply use "delete" to destroy the manipulator. - */ - Manipulator* build(Mode mode); - - Config details = {}; - }; - - virtual ~Manipulator() = default; - - /** - * Gets the immutable mode of the manipulator. - */ - Mode getMode() const { return mMode; } - - /** - * Sets the viewport dimensions. The manipulator uses this to process grab events and raycasts. - */ - void setViewport(int width, int height); - - /** - * Gets the current orthonormal basis; this is usually called once per frame. - */ - void getLookAt(vec3* eyePosition, vec3* targetPosition, vec3* upward) const; - - /** - * Given a viewport coordinate, picks a point in the ground plane, or in the actual scene if the - * raycast callback was provided. - */ - bool raycast(int x, int y, vec3* result) const; - - /** - * Given a viewport coordinate, computes a picking ray (origin + direction). - */ - void getRay(int x, int y, vec3* origin, vec3* dir) const; - - /** - * Starts a grabbing session (i.e. the user is dragging around in the viewport). - * - * In MAP mode, this starts a panning session. - * In ORBIT mode, this starts either rotating or strafing. - * In FREE_FLIGHT mode, this starts a nodal panning session. - * - * @param x X-coordinate for point of interest in viewport space - * @param y Y-coordinate for point of interest in viewport space - * @param strafe ORBIT mode only; if true, starts a translation rather than a rotation - */ - virtual void grabBegin(int x, int y, bool strafe) = 0; - - /** - * Updates a grabbing session. - * - * This must be called at least once between grabBegin / grabEnd to dirty the camera. - */ - virtual void grabUpdate(int x, int y) = 0; - - /** - * Ends a grabbing session. - */ - virtual void grabEnd() = 0; - - /** - * Keys used to translate the camera in FREE_FLIGHT mode. - * FORWARD and BACKWARD dolly the camera forwards and backwards. - * LEFT and RIGHT strafe the camera left and right. - * UP and DOWN boom the camera upwards and downwards. - */ - enum class Key { - FORWARD, - LEFT, - BACKWARD, - RIGHT, - UP, - DOWN, - - COUNT - }; - - /** - * Signals that a key is now in the down state. - * - * In FREE_FLIGHT mode, the camera is translated forward and backward and strafed left and right - * depending on the depressed keys. This allows WASD-style movement. - */ - virtual void keyDown(Key key); - - /** - * Signals that a key is now in the up state. - * - * @see keyDown - */ - virtual void keyUp(Key key); - - /** - * In MAP and ORBIT modes, dollys the camera along the viewing direction. - * In FREE_FLIGHT mode, adjusts the move speed of the camera. - * - * @param x X-coordinate for point of interest in viewport space, ignored in FREE_FLIGHT mode - * @param y Y-coordinate for point of interest in viewport space, ignored in FREE_FLIGHT mode - * @param scrolldelta In MAP and ORBIT modes, negative means "zoom in", positive means "zoom out" - * In FREE_FLIGHT mode, negative means "slower", positive means "faster" - */ - virtual void scroll(int x, int y, FLOAT scrolldelta) = 0; - - /** - * Processes input and updates internal state. - * - * This must be called once every frame before getLookAt is valid. - * - * @param deltaTime The amount of time, in seconds, passed since the previous call to update. - */ - virtual void update(FLOAT deltaTime); - - /** - * Gets a handle that can be used to reset the manipulator back to its current position. - * - * @see jumpToBookmark - */ - virtual Bookmark getCurrentBookmark() const = 0; - - /** - * Gets a handle that can be used to reset the manipulator back to its home position. - * - * @see jumpToBookmark - */ - virtual Bookmark getHomeBookmark() const = 0; - - /** - * Sets the manipulator position and orientation back to a stashed state. - * - * @see getCurrentBookmark, getHomeBookmark - */ - virtual void jumpToBookmark(const Bookmark& bookmark) = 0; - -protected: - Manipulator(Mode mode, const Config& props); - - virtual void setProperties(const Config& props); - - vec3 raycastFarPlane(int x, int y) const; - - const Mode mMode; - Config mProps; - vec3 mEye; - vec3 mTarget; -}; - -} // namespace camutils -} // namespace filament - -#endif /* CAMUTILS_MANIPULATOR_H */ diff --git a/windows/include/filament/camutils/compiler.h b/windows/include/filament/camutils/compiler.h deleted file mode 100644 index 5e5edf94..00000000 --- a/windows/include/filament/camutils/compiler.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#ifndef CAMUTILS_COMPILER_H -#define CAMUTILS_COMPILER_H - -#if __has_attribute(visibility) -# define CAMUTILS_PUBLIC __attribute__((visibility("default"))) -#else -# define CAMUTILS_PUBLIC -#endif - -#endif // CAMUTILS_COMPILER_H diff --git a/windows/include/filament/filamat/Enums.h b/windows/include/filament/filamat/Enums.h deleted file mode 100644 index 04b5ff8b..00000000 --- a/windows/include/filament/filamat/Enums.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2018 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. - */ - -#ifndef TNT_ENUMMANAGER_H -#define TNT_ENUMMANAGER_H - -#include -#include -#include - -#include - -namespace filamat { - -using Property = MaterialBuilder::Property; -using UniformType = MaterialBuilder::UniformType; -using SamplerType = MaterialBuilder::SamplerType; -using SubpassType = MaterialBuilder::SubpassType; -using SamplerFormat = MaterialBuilder::SamplerFormat; -using ParameterPrecision = MaterialBuilder::ParameterPrecision; -using OutputTarget = MaterialBuilder::OutputTarget; -using OutputQualifier = MaterialBuilder::VariableQualifier; -using OutputType = MaterialBuilder::OutputType; -using ConstantType = MaterialBuilder::ConstantType; - -// Convenience methods to convert std::string to Enum and also iterate over Enum values. -class Enums { -public: - - // Returns true if string "s" is a valid string representation of an element of enum T. - template - static bool isValid(const std::string& s) noexcept { - std::unordered_map& map = getMap(); - return map.find(s) != map.end(); - } - - // Return enum matching its string representation. Returns undefined if s is not a valid enum T - // value. You should always call isValid() first to validate a string before calling toEnum(). - template - static T toEnum(const std::string& s) noexcept { - std::unordered_map& map = getMap(); - return map.at(s); - } - - template - static std::string toString(T t) noexcept; - - // Return a map of all values in an enum with their string representation. - template - static std::unordered_map& map() noexcept { - std::unordered_map& map = getMap(); - return map; - }; - -private: - template - static std::unordered_map& getMap() noexcept; - - static std::unordered_map mStringToProperty; - static std::unordered_map mStringToUniformType; - static std::unordered_map mStringToSamplerType; - static std::unordered_map mStringToSubpassType; - static std::unordered_map mStringToSamplerFormat; - static std::unordered_map mStringToSamplerPrecision; - static std::unordered_map mStringToOutputTarget; - static std::unordered_map mStringToOutputQualifier; - static std::unordered_map mStringToOutputType; - static std::unordered_map mStringToConstantType; -}; - -template -std::string Enums::toString(T t) noexcept { - std::unordered_map& map = getMap(); - auto result = std::find_if(map.begin(), map.end(), [t](auto& pair) { - return pair.second == t; - }); - if (result != map.end()) { - return result->first; - } - return ""; -} - -} // namespace filamat - -#endif //TNT_ENUMMANAGER_H diff --git a/windows/include/filament/filamat/IncludeCallback.h b/windows/include/filament/filamat/IncludeCallback.h deleted file mode 100644 index 659ba289..00000000 --- a/windows/include/filament/filamat/IncludeCallback.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef TNT_FILAMAT_INCLUDER_H -#define TNT_FILAMAT_INCLUDER_H - -#include - -#include - -namespace filamat { - -struct IncludeResult { - // The include name of the root file, as if it were being included. - // I.e., 'foobar.h' in the case of #include "foobar.h" - const utils::CString includeName; - - // The following fields should be filled out by the IncludeCallback when processing an include, - // or when calling resolveIncludes for the root file. - - // The full contents of the include file. This may contain additional, recursive include - // directives. - utils::CString text; - - // The line number for the first line of text (first line is 0). - size_t lineNumberOffset = 0; - - // The name of the include file. This gets passed as "includerName" for any includes inside of - // source. This field isn't used by the include system; it's up to the callback to give meaning - // to this value and interpret it accordingly. In the case of DirIncluder, this is an empty - // string to represent the root include file, and a canonical path for subsequent included - // files. - utils::CString name; -}; - -/** - * A callback invoked by the include system when an #include "file.h" directive is found. - * - * For example, if a file main.h includes file.h on line 10, then IncludeCallback would be called - * with the following: - * includeCallback("main.h", {.includeName = "file.h" }) - * It's then up to the IncludeCallback to fill out the .text, .name, and (optionally) - * lineNumberOffset fields. - * - * @param includedBy is the value that was given to IncludeResult.name for this source file, or - * the empty string for the root source file. - * @param result is the IncludeResult that the callback should fill out. - * @return true, if the include was resolved successfully, false otherwise. - * - * For an example of implementing this callback, see tools/matc/src/matc/DirIncluder.h. - */ -using IncludeCallback = std::function; - -} // namespace filamat - -#endif diff --git a/windows/include/filament/filamat/MaterialBuilder.h b/windows/include/filament/filamat/MaterialBuilder.h deleted file mode 100644 index 3f668063..00000000 --- a/windows/include/filament/filamat/MaterialBuilder.h +++ /dev/null @@ -1,861 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -//! \file - -#ifndef TNT_FILAMAT_MATERIAL_PACKAGE_BUILDER_H -#define TNT_FILAMAT_MATERIAL_PACKAGE_BUILDER_H - -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace utils { -class JobSystem; -} - -namespace filament { -class BufferInterfaceBlock; -} - -namespace filamat { - -struct MaterialInfo; -struct Variant; -class ChunkContainer; - -class UTILS_PUBLIC MaterialBuilderBase { -public: - /** - * High-level hint that works in concert with TargetApi to determine the shader models (used to - * generate GLSL) and final output representations (spirv and/or text). - * When generating the GLSL this is used to differentiate OpenGL from OpenGLES, it is also - * used to make some performance adjustments. - */ - enum class Platform { - DESKTOP, - MOBILE, - ALL - }; - - /** - * TargetApi defines which language after transpilation will be used, it is used to - * account for some differences between these languages when generating the GLSL. - */ - enum class TargetApi : uint8_t { - OPENGL = 0x01u, - VULKAN = 0x02u, - METAL = 0x04u, - ALL = OPENGL | VULKAN | METAL - }; - - /* - * Generally we generate GLSL that will be converted to SPIRV, optimized and then - * transpiled to the backend's language such as MSL, ESSL300, GLSL410 or SPIRV, in this - * case the generated GLSL uses ESSL310 or GLSL450 and has Vulkan semantics and - * TargetLanguage::SPIRV must be used. - * - * However, in some cases (e.g. when no optimization is asked) we generate the *final* GLSL - * directly, this GLSL must be ESSL300 or GLSL410 and cannot use any Vulkan syntax, for this - * situation we use TargetLanguage::GLSL. In this case TargetApi is guaranteed to be OPENGL. - * - * Note that TargetLanguage::GLSL is not the common case, as it is generally not used in - * release builds. - * - * Also note that glslang performs semantics analysis on whichever GLSL ends up being generated. - */ - enum class TargetLanguage { - GLSL, // GLSL with OpenGL 4.1 / OpenGL ES 3.0 semantics - SPIRV // GLSL with Vulkan semantics - }; - - enum class Optimization { - NONE, - PREPROCESSOR, - SIZE, - PERFORMANCE - }; - - /** - * Initialize MaterialBuilder. - * - * init must be called first before building any materials. - */ - static void init(); - - /** - * Release internal MaterialBuilder resources. - * - * Call shutdown when finished building materials to release all internal resources. After - * calling shutdown, another call to MaterialBuilder::init must precede another material build. - */ - static void shutdown(); - -protected: - // Looks at platform and target API, then decides on shader models and output formats. - void prepare(bool vulkanSemantics); - - using ShaderModel = filament::backend::ShaderModel; - Platform mPlatform = Platform::DESKTOP; - TargetApi mTargetApi = (TargetApi) 0; - Optimization mOptimization = Optimization::PERFORMANCE; - bool mPrintShaders = false; - bool mGenerateDebugInfo = false; - utils::bitset32 mShaderModels; - struct CodeGenParams { - ShaderModel shaderModel; - TargetApi targetApi; - TargetLanguage targetLanguage; - }; - std::vector mCodeGenPermutations; - // For finding properties and running semantic analysis, we always use the same code gen - // permutation. This is the first permutation generated with default arguments passed to matc. - static constexpr const CodeGenParams mSemanticCodeGenParams = { - .shaderModel = ShaderModel::MOBILE, - .targetApi = TargetApi::OPENGL, - .targetLanguage = TargetLanguage::SPIRV - }; - - // Keeps track of how many times MaterialBuilder::init() has been called without a call to - // MaterialBuilder::shutdown(). Internally, glslang does something similar. We keep track for - // ourselves, so we can inform the user if MaterialBuilder::init() hasn't been called before - // attempting to build a material. - static std::atomic materialBuilderClients; -}; - -// Utility function that looks at an Engine backend to determine TargetApi -inline constexpr MaterialBuilderBase::TargetApi targetApiFromBackend( - filament::backend::Backend backend) noexcept { - using filament::backend::Backend; - using TargetApi = MaterialBuilderBase::TargetApi; - switch (backend) { - case Backend::DEFAULT: return TargetApi::ALL; - case Backend::OPENGL: return TargetApi::OPENGL; - case Backend::VULKAN: return TargetApi::VULKAN; - case Backend::METAL: return TargetApi::METAL; - case Backend::NOOP: return TargetApi::OPENGL; - } -} - -/** - * MaterialBuilder builds Filament materials from shader code. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * #include - * using namespace filamat; - * - * // Must be called before any materials can be built. - * MaterialBuilder::init(); - - * MaterialBuilder builder; - * builder - * .name("My material") - * .material("void material (inout MaterialInputs material) {" - * " prepareMaterial(material);" - * " material.baseColor.rgb = float3(1.0, 0.0, 0.0);" - * "}") - * .shading(MaterialBuilder::Shading::LIT) - * .targetApi(MaterialBuilder::TargetApi::ALL) - * .platform(MaterialBuilder::Platform::ALL); - - * Package package = builder.build(); - * if (package.isValid()) { - * // success! - * } - - * // Call when finished building all materials to release internal - * // MaterialBuilder resources. - * MaterialBuilder::shutdown(); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * @see filament::Material - */ -class UTILS_PUBLIC MaterialBuilder : public MaterialBuilderBase { -public: - MaterialBuilder(); - ~MaterialBuilder(); - - MaterialBuilder(const MaterialBuilder& rhs) = delete; - MaterialBuilder& operator=(const MaterialBuilder& rhs) = delete; - - MaterialBuilder(MaterialBuilder&& rhs) noexcept = default; - MaterialBuilder& operator=(MaterialBuilder&& rhs) noexcept = default; - - static constexpr size_t MATERIAL_VARIABLES_COUNT = 4; - enum class Variable : uint8_t { - CUSTOM0, - CUSTOM1, - CUSTOM2, - CUSTOM3 - // when adding more variables, make sure to update MATERIAL_VARIABLES_COUNT - }; - - using MaterialDomain = filament::MaterialDomain; - using RefractionMode = filament::RefractionMode; - using RefractionType = filament::RefractionType; - using ReflectionMode = filament::ReflectionMode; - using VertexAttribute = filament::VertexAttribute; - - using ShaderQuality = filament::ShaderQuality; - using BlendingMode = filament::BlendingMode; - using Shading = filament::Shading; - using Interpolation = filament::Interpolation; - using VertexDomain = filament::VertexDomain; - using TransparencyMode = filament::TransparencyMode; - using SpecularAmbientOcclusion = filament::SpecularAmbientOcclusion; - - using UniformType = filament::backend::UniformType; - using ConstantType = filament::backend::ConstantType; - using SamplerType = filament::backend::SamplerType; - using SubpassType = filament::backend::SubpassType; - using SamplerFormat = filament::backend::SamplerFormat; - using ParameterPrecision = filament::backend::Precision; - using CullingMode = filament::backend::CullingMode; - using FeatureLevel = filament::backend::FeatureLevel; - - enum class VariableQualifier : uint8_t { - OUT - }; - - enum class OutputTarget : uint8_t { - COLOR, - DEPTH - }; - - enum class OutputType : uint8_t { - FLOAT, - FLOAT2, - FLOAT3, - FLOAT4 - }; - - struct PreprocessorDefine { - std::string name; - std::string value; - - PreprocessorDefine(std::string name, std::string value) : - name(std::move(name)), value(std::move(value)) {} - }; - using PreprocessorDefineList = std::vector; - - //! Set the name of this material. - MaterialBuilder& name(const char* name) noexcept; - - //! Set the file name of this material file. Used in error reporting. - MaterialBuilder& fileName(const char* name) noexcept; - - //! Set the shading model. - MaterialBuilder& shading(Shading shading) noexcept; - - //! Set the interpolation mode. - MaterialBuilder& interpolation(Interpolation interpolation) noexcept; - - //! Add a parameter (i.e., a uniform) to this material. - MaterialBuilder& parameter(const char* name, UniformType type, - ParameterPrecision precision = ParameterPrecision::DEFAULT) noexcept; - - //! Add a parameter array to this material. - MaterialBuilder& parameter(const char* name, size_t size, UniformType type, - ParameterPrecision precision = ParameterPrecision::DEFAULT) noexcept; - - //! Add a constant parameter to this material. - template - using is_supported_constant_parameter_t = typename std::enable_if< - std::is_same::value || - std::is_same::value || - std::is_same::value>::type; - template> - MaterialBuilder& constant(const char *name, ConstantType type, T defaultValue = 0); - - /** - * Add a sampler parameter to this material. - * - * When SamplerType::SAMPLER_EXTERNAL is specified, format and precision are ignored. - */ - MaterialBuilder& parameter(const char* name, SamplerType samplerType, - SamplerFormat format = SamplerFormat::FLOAT, - ParameterPrecision precision = ParameterPrecision::DEFAULT) noexcept; - - /// @copydoc parameter(SamplerType, SamplerFormat, ParameterPrecision, const char*) - MaterialBuilder& parameter(const char* name, SamplerType samplerType, - ParameterPrecision precision) noexcept; - - - MaterialBuilder& buffer(filament::BufferInterfaceBlock bib) noexcept; - - //! Custom variables (all float4). - MaterialBuilder& variable(Variable v, const char* name) noexcept; - - /** - * Require a specified attribute. - * - * position is always required and normal depends on the shading model. - */ - MaterialBuilder& require(VertexAttribute attribute) noexcept; - - //! Specify the domain that this material will operate in. - MaterialBuilder& materialDomain(MaterialBuilder::MaterialDomain materialDomain) noexcept; - - /** - * Set the code content of this material. - * - * Surface Domain - * -------------- - * - * Materials in the SURFACE domain must declare a function: - * ~~~~~ - * void material(inout MaterialInputs material) { - * prepareMaterial(material); - * material.baseColor.rgb = float3(1.0, 0.0, 0.0); - * } - * ~~~~~ - * this function *must* call `prepareMaterial(material)` before it returns. - * - * Post-process Domain - * ------------------- - * - * Materials in the POST_PROCESS domain must declare a function: - * ~~~~~ - * void postProcess(inout PostProcessInputs postProcess) { - * postProcess.color = float4(1.0); - * } - * ~~~~~ - * - * @param code The source code of the material. - * @param line The line number offset of the material, where 0 is the first line. Used for error - * reporting - */ - MaterialBuilder& material(const char* code, size_t line = 0) noexcept; - - /** - * Set the callback used for resolving include directives. - * The default is no callback, which disallows all includes. - */ - MaterialBuilder& includeCallback(IncludeCallback callback) noexcept; - - /** - * Set the vertex code content of this material. - * - * Surface Domain - * -------------- - * - * Materials in the SURFACE domain must declare a function: - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * void materialVertex(inout MaterialVertexInputs material) { - * - * } - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * Post-process Domain - * ------------------- - * - * Materials in the POST_PROCESS domain must declare a function: - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * void postProcessVertex(inout PostProcessVertexInputs postProcess) { - * - * } - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - * @param code The source code of the material. - * @param line The line number offset of the material, where 0 is the first line. Used for error - * reporting - */ - MaterialBuilder& materialVertex(const char* code, size_t line = 0) noexcept; - - - MaterialBuilder& quality(ShaderQuality quality) noexcept; - - MaterialBuilder& featureLevel(FeatureLevel featureLevel) noexcept; - - /** - * Set the blending mode for this material. When set to MASKED, alpha to coverage is turned on. - * You can override this behavior using alphaToCoverage(false). - */ - MaterialBuilder& blending(BlendingMode blending) noexcept; - - /** - * Set the blending mode of the post-lighting color for this material. - * Only OPAQUE, TRANSPARENT and ADD are supported, the default is TRANSPARENT. - * This setting requires the material property "postLightingColor" to be set. - */ - MaterialBuilder& postLightingBlending(BlendingMode blending) noexcept; - - //! Set the vertex domain for this material. - MaterialBuilder& vertexDomain(VertexDomain domain) noexcept; - - /** - * How triangles are culled by default (doesn't affect points or lines, BACK by default). - * Material instances can override this. - */ - MaterialBuilder& culling(CullingMode culling) noexcept; - - //! Enable / disable color-buffer write (enabled by default, material instances can override). - MaterialBuilder& colorWrite(bool enable) noexcept; - - //! Enable / disable depth-buffer write (enabled by default for opaque, disabled for others, material instances can override). - MaterialBuilder& depthWrite(bool enable) noexcept; - - //! Enable / disable depth based culling (enabled by default, material instances can override). - MaterialBuilder& depthCulling(bool enable) noexcept; - - //! Enable / disable instanced primitives (disabled by default). - MaterialBuilder& instanced(bool enable) noexcept; - - /** - * Double-sided materials don't cull faces, equivalent to culling(CullingMode::NONE). - * doubleSided() overrides culling() if called. - * When called with "false", this enables the capability for a run-time toggle. - */ - MaterialBuilder& doubleSided(bool doubleSided) noexcept; - - /** - * Any fragment with an alpha below this threshold is clipped (MASKED blending mode only). - * The mask threshold can also be controlled by using the float material parameter called - * `_maskThreshold`, or by calling - * @ref filament::MaterialInstance::setMaskThreshold "MaterialInstance::setMaskThreshold". - */ - MaterialBuilder& maskThreshold(float threshold) noexcept; - - /** - * Enables or disables alpha-to-coverage. When enabled, the coverage of a fragment is based - * on its alpha value. This parameter is only useful when MSAA is in use. Alpha to coverage - * is enabled automatically when the blend mode is set to MASKED; this behavior can be - * overridden by calling alphaToCoverage(false). - */ - MaterialBuilder& alphaToCoverage(bool enable) noexcept; - - //! The material output is multiplied by the shadowing factor (UNLIT model only). - MaterialBuilder& shadowMultiplier(bool shadowMultiplier) noexcept; - - //! This material casts transparent shadows. The blending mode must be TRANSPARENT or FADE. - MaterialBuilder& transparentShadow(bool transparentShadow) noexcept; - - /** - * Reduces specular aliasing for materials that have low roughness. Turning this feature on also - * helps preserve the shapes of specular highlights as an object moves away from the camera. - * When turned on, two float material parameters are added to control the effect: - * `_specularAAScreenSpaceVariance` and `_specularAAThreshold`. You can also use - * @ref filament::MaterialInstance::setSpecularAntiAliasingVariance - * "MaterialInstance::setSpecularAntiAliasingVariance" and - * @ref filament::MaterialInstance::setSpecularAntiAliasingThreshold - * "setSpecularAntiAliasingThreshold" - * - * Disabled by default. - */ - MaterialBuilder& specularAntiAliasing(bool specularAntiAliasing) noexcept; - - /** - * Sets the screen-space variance of the filter kernel used when applying specular - * anti-aliasing. The default value is set to 0.15. The specified value should be between 0 and - * 1 and will be clamped if necessary. - */ - MaterialBuilder& specularAntiAliasingVariance(float screenSpaceVariance) noexcept; - - /** - * Sets the clamping threshold used to suppress estimation errors when applying specular - * anti-aliasing. The default value is set to 0.2. The specified value should be between 0 and 1 - * and will be clamped if necessary. - */ - MaterialBuilder& specularAntiAliasingThreshold(float threshold) noexcept; - - /** - * Enables or disables the index of refraction (IoR) change caused by the clear coat layer when - * present. When the IoR changes, the base color is darkened. Disabling this feature preserves - * the base color as initially specified. - * - * Enabled by default. - */ - MaterialBuilder& clearCoatIorChange(bool clearCoatIorChange) noexcept; - - //! Enable / disable flipping of the Y coordinate of UV attributes, enabled by default. - MaterialBuilder& flipUV(bool flipUV) noexcept; - - //! Enable / disable multi-bounce ambient occlusion, disabled by default on mobile. - MaterialBuilder& multiBounceAmbientOcclusion(bool multiBounceAO) noexcept; - - //! Set the specular ambient occlusion technique. Disabled by default on mobile. - MaterialBuilder& specularAmbientOcclusion(SpecularAmbientOcclusion specularAO) noexcept; - - //! Specify the refraction - MaterialBuilder& refractionMode(RefractionMode refraction) noexcept; - - //! Specify the refraction type - MaterialBuilder& refractionType(RefractionType refractionType) noexcept; - - //! Specifies how reflections should be rendered (default is DEFAULT). - MaterialBuilder& reflectionMode(ReflectionMode mode) noexcept; - - //! Specifies how transparent objects should be rendered (default is DEFAULT). - MaterialBuilder& transparencyMode(TransparencyMode mode) noexcept; - - /** - * Enable / disable custom surface shading. Custom surface shading requires the LIT - * shading model. In addition, the following function must be defined in the fragment - * block: - * - * ~~~~~ - * vec3 surfaceShading(const MaterialInputs materialInputs, - * const ShadingData shadingData, const LightData lightData) { - * - * return vec3(1.0); // Compute surface shading with custom BRDF, etc. - * } - * ~~~~~ - * - * This function is invoked once per light. Please refer to the materials documentation - * for more information about the different parameters. - * - * @param customSurfaceShading Enables or disables custom surface shading - */ - MaterialBuilder& customSurfaceShading(bool customSurfaceShading) noexcept; - - /** - * Specifies desktop vs mobile; works in concert with TargetApi to determine the shader models - * (used to generate code) and final output representations (spirv and/or text). - */ - MaterialBuilder& platform(Platform platform) noexcept; - - /** - * Specifies OpenGL, Vulkan, or Metal. - * This can be called repeatedly to build for multiple APIs. - * Works in concert with Platform to determine the shader models (used to generate code) and - * final output representations (spirv and/or text). - * If linking against filamat_lite, only `OPENGL` is allowed. - */ - MaterialBuilder& targetApi(TargetApi targetApi) noexcept; - - /** - * Specifies the level of optimization to apply to the shaders (default is PERFORMANCE). - * If linking against filamat_lite, this _must_ be called with Optimization::NONE. - */ - MaterialBuilder& optimization(Optimization optimization) noexcept; - - // TODO: this is present here for matc's "--print" flag, but ideally does not belong inside - // MaterialBuilder. - //! If true, will output the generated GLSL shader code to stdout. - MaterialBuilder& printShaders(bool printShaders) noexcept; - - //! If true, will include debugging information in generated SPIRV. - MaterialBuilder& generateDebugInfo(bool generateDebugInfo) noexcept; - - //! Specifies a list of variants that should be filtered out during code generation. - MaterialBuilder& variantFilter(filament::UserVariantFilterMask variantFilter) noexcept; - - //! Adds a new preprocessor macro definition to the shader code. Can be called repeatedly. - MaterialBuilder& shaderDefine(const char* name, const char* value) noexcept; - - //! Add a new fragment shader output variable. Only valid for materials in the POST_PROCESS domain. - MaterialBuilder& output(VariableQualifier qualifier, OutputTarget target, - OutputType type, const char* name, int location = -1) noexcept; - - MaterialBuilder& enableFramebufferFetch() noexcept; - - MaterialBuilder& vertexDomainDeviceJittered(bool enabled) noexcept; - - /** - * Legacy morphing uses the data in the VertexAttribute slots (\c MORPH_POSITION_0, etc) and is - * limited to 4 morph targets. See filament::RenderableManager::Builder::morphing(). - */ - MaterialBuilder& useLegacyMorphing() noexcept; - - //! specify compute kernel group size - MaterialBuilder& groupSize(filament::math::uint3 groupSize) noexcept; - - /** - * Build the material. If you are using the Filament engine with this library, you should use - * the job system provided by Engine. - */ - Package build(utils::JobSystem& jobSystem) noexcept; - -public: - // The methods and types below are for internal use - /// @cond never - - /** - * Add a subpass parameter to this material. - */ - MaterialBuilder& subpass(SubpassType subpassType, - SamplerFormat format, ParameterPrecision precision, const char* name) noexcept; - MaterialBuilder& subpass(SubpassType subpassType, - SamplerFormat format, const char* name) noexcept; - MaterialBuilder& subpass(SubpassType subpassType, - ParameterPrecision precision, const char* name) noexcept; - MaterialBuilder& subpass(SubpassType subpassType, const char* name) noexcept; - - struct Parameter { - Parameter() noexcept: parameterType(INVALID) {} - - // Sampler - Parameter(const char* paramName, SamplerType t, SamplerFormat f, ParameterPrecision p) - : name(paramName), size(1), precision(p), samplerType(t), format(f), parameterType(SAMPLER) { } - - // Uniform - Parameter(const char* paramName, UniformType t, size_t typeSize, ParameterPrecision p) - : name(paramName), size(typeSize), uniformType(t), precision(p), parameterType(UNIFORM) { } - - // Subpass - Parameter(const char* paramName, SubpassType t, SamplerFormat f, ParameterPrecision p) - : name(paramName), size(1), precision(p), subpassType(t), format(f), parameterType(SUBPASS) { } - - utils::CString name; - size_t size; - UniformType uniformType; - ParameterPrecision precision; - SamplerType samplerType; - SubpassType subpassType; - SamplerFormat format; - enum { - INVALID, - UNIFORM, - SAMPLER, - SUBPASS - } parameterType; - - bool isSampler() const { return parameterType == SAMPLER; } - bool isUniform() const { return parameterType == UNIFORM; } - bool isSubpass() const { return parameterType == SUBPASS; } - }; - - struct Output { - Output() noexcept = default; - Output(const char* outputName, VariableQualifier qualifier, OutputTarget target, - OutputType type, int location) noexcept - : name(outputName), qualifier(qualifier), target(target), type(type), - location(location) { } - - utils::CString name; - VariableQualifier qualifier; - OutputTarget target; - OutputType type; - int location; - }; - - struct Constant { - utils::CString name; - ConstantType type; - union { - int32_t i; - float f; - bool b; - } defaultValue; - }; - - static constexpr size_t MATERIAL_PROPERTIES_COUNT = filament::MATERIAL_PROPERTIES_COUNT; - using Property = filament::Property; - - using PropertyList = bool[MATERIAL_PROPERTIES_COUNT]; - using VariableList = utils::CString[MATERIAL_VARIABLES_COUNT]; - using OutputList = std::vector; - - static constexpr size_t MAX_COLOR_OUTPUT = filament::backend::MRT::MAX_SUPPORTED_RENDER_TARGET_COUNT; - static constexpr size_t MAX_DEPTH_OUTPUT = 1; - static_assert(MAX_COLOR_OUTPUT == 8, - "When updating MRT::MAX_SUPPORTED_RENDER_TARGET_COUNT, manually update post_process_inputs.fs" - " and post_process.fs"); - - // Preview the first shader generated by the given CodeGenParams. - // This is used to run Static Code Analysis before generating a package. - std::string peek(filament::backend::ShaderStage type, - const CodeGenParams& params, const PropertyList& properties) noexcept; - - // Returns true if any of the parameter samplers is of type samplerExternal - bool hasExternalSampler() const noexcept; - - static constexpr size_t MAX_PARAMETERS_COUNT = 48; - static constexpr size_t MAX_SUBPASS_COUNT = 1; - static constexpr size_t MAX_BUFFERS_COUNT = 4; - using ParameterList = Parameter[MAX_PARAMETERS_COUNT]; - using SubpassList = Parameter[MAX_SUBPASS_COUNT]; - using BufferList = std::vector>; - using ConstantList = std::vector; - - // returns the number of parameters declared in this material - uint8_t getParameterCount() const noexcept { return mParameterCount; } - - // returns a list of at least getParameterCount() parameters - const ParameterList& getParameters() const noexcept { return mParameters; } - - // returns the number of parameters declared in this material - uint8_t getSubpassCount() const noexcept { return mSubpassCount; } - - // returns a list of at least getParameterCount() parameters - const SubpassList& getSubPasses() const noexcept { return mSubpasses; } - - filament::UserVariantFilterMask getVariantFilter() const { return mVariantFilter; } - - FeatureLevel getFeatureLevel() const noexcept { return mFeatureLevel; } - /// @endcond - -private: - void prepareToBuild(MaterialInfo& info) noexcept; - - // Return true if the shader is syntactically and semantically valid. - // This method finds all the properties defined in the fragment and - // vertex shaders of the material. - bool findAllProperties() noexcept; - - // Multiple calls to findProperties accumulate the property sets across fragment - // and vertex shaders in mProperties. - bool findProperties(filament::backend::ShaderStage type, - MaterialBuilder::PropertyList& p) noexcept; - - bool runSemanticAnalysis(MaterialInfo const& info) noexcept; - - bool checkLiteRequirements() noexcept; - - bool checkMaterialLevelFeatures(MaterialInfo const& info) const noexcept; - - void writeCommonChunks(ChunkContainer& container, MaterialInfo& info) const noexcept; - void writeSurfaceChunks(ChunkContainer& container) const noexcept; - - bool generateShaders( - utils::JobSystem& jobSystem, - const std::vector& variants, ChunkContainer& container, - const MaterialInfo& info) const noexcept; - - bool hasCustomVaryings() const noexcept; - bool needsStandardDepthProgram() const noexcept; - - bool isLit() const noexcept { return mShading != filament::Shading::UNLIT; } - - utils::CString mMaterialName; - utils::CString mFileName; - - class ShaderCode { - public: - void setLineOffset(size_t offset) noexcept { mLineOffset = offset; } - void setUnresolved(const utils::CString& code) noexcept { - mIncludesResolved = false; - mCode = code; - } - - // Resolve all the #include directives, returns true if successful. - bool resolveIncludes(IncludeCallback callback, const utils::CString& fileName) noexcept; - - const utils::CString& getResolved() const noexcept { - assert(mIncludesResolved); - return mCode; - } - - size_t getLineOffset() const noexcept { return mLineOffset; } - - private: - utils::CString mCode; - size_t mLineOffset = 0; - bool mIncludesResolved = false; - }; - - ShaderCode mMaterialFragmentCode; - ShaderCode mMaterialVertexCode; - - IncludeCallback mIncludeCallback = nullptr; - - PropertyList mProperties; - ParameterList mParameters; - ConstantList mConstants; - SubpassList mSubpasses; - VariableList mVariables; - OutputList mOutputs; - BufferList mBuffers; - - ShaderQuality mShaderQuality = ShaderQuality::DEFAULT; - FeatureLevel mFeatureLevel = FeatureLevel::FEATURE_LEVEL_1; - BlendingMode mBlendingMode = BlendingMode::OPAQUE; - BlendingMode mPostLightingBlendingMode = BlendingMode::TRANSPARENT; - CullingMode mCullingMode = CullingMode::BACK; - Shading mShading = Shading::LIT; - MaterialDomain mMaterialDomain = MaterialDomain::SURFACE; - RefractionMode mRefractionMode = RefractionMode::NONE; - RefractionType mRefractionType = RefractionType::SOLID; - ReflectionMode mReflectionMode = ReflectionMode::DEFAULT; - Interpolation mInterpolation = Interpolation::SMOOTH; - VertexDomain mVertexDomain = VertexDomain::OBJECT; - TransparencyMode mTransparencyMode = TransparencyMode::DEFAULT; - - filament::AttributeBitset mRequiredAttributes; - - float mMaskThreshold = 0.4f; - float mSpecularAntiAliasingVariance = 0.15f; - float mSpecularAntiAliasingThreshold = 0.2f; - - filament::math::uint3 mGroupSize = { 1, 1, 1 }; - - bool mShadowMultiplier = false; - bool mTransparentShadow = false; - - uint8_t mParameterCount = 0; - uint8_t mSubpassCount = 0; - - bool mDoubleSided = false; - bool mDoubleSidedCapability = false; - bool mColorWrite = true; - bool mDepthTest = true; - bool mInstanced = false; - bool mDepthWrite = true; - bool mDepthWriteSet = false; - bool mAlphaToCoverage = false; - bool mAlphaToCoverageSet = false; - - bool mSpecularAntiAliasing = false; - bool mClearCoatIorChange = true; - - bool mFlipUV = true; - - bool mMultiBounceAO = false; - bool mMultiBounceAOSet = false; - - SpecularAmbientOcclusion mSpecularAO = SpecularAmbientOcclusion::NONE; - bool mSpecularAOSet = false; - - bool mCustomSurfaceShading = false; - - bool mEnableFramebufferFetch = false; - - bool mVertexDomainDeviceJittered = false; - - bool mUseLegacyMorphing = false; - - PreprocessorDefineList mDefines; - - filament::UserVariantFilterMask mVariantFilter = {}; -}; - -} // namespace filamat - -template<> struct utils::EnableBitMaskOperators - : public std::true_type {}; - -#endif diff --git a/windows/include/filament/filamat/Package.h b/windows/include/filament/filamat/Package.h deleted file mode 100644 index 93e74a58..00000000 --- a/windows/include/filament/filamat/Package.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_FILAMAT_PACKAGE_H -#define TNT_FILAMAT_PACKAGE_H - -#include -#include -#include - -#include -#include - -#include - -namespace filamat { - -class UTILS_PUBLIC Package { -public: - Package() = default; - - // Regular constructor - explicit Package(size_t size) : mSize(size) { - mPayload = new uint8_t[size]; - } - - Package(const void* src, size_t size) : Package(size) { - memcpy(mPayload, src, size); - } - - // Move Constructor - Package(Package&& other) noexcept : mPayload(other.mPayload), mSize(other.mSize), - mValid(other.mValid) { - other.mPayload = nullptr; - other.mSize = 0; - other.mValid = false; - } - - // Move assignment - Package& operator=(Package&& other) noexcept { - std::swap(mPayload, other.mPayload); - std::swap(mSize, other.mSize); - std::swap(mValid, other.mValid); - return *this; - } - - // Copy assignment operator disallowed. - Package& operator=(const Package& other) = delete; - - // Copy constructor disallowed. - Package(const Package& other) = delete; - - ~Package() { - delete[] mPayload; - } - - uint8_t* getData() const noexcept { - return mPayload; - } - - size_t getSize() const noexcept { - return mSize; - } - - uint8_t* getEnd() const noexcept { - return mPayload + mSize; - } - - void setValid(bool valid) noexcept { - mValid = valid; - } - - bool isValid() const noexcept { - return mValid; - } - - static Package invalidPackage() { - Package package(0); - package.setValid(false); - return package; - } - -private: - uint8_t* mPayload = nullptr; - size_t mSize = 0; - bool mValid = true; -}; - -} // namespace filamat -#endif diff --git a/windows/include/filament/filament-iblprefilter/IBLPrefilterContext.h b/windows/include/filament/filament-iblprefilter/IBLPrefilterContext.h deleted file mode 100644 index 15cd6810..00000000 --- a/windows/include/filament/filament-iblprefilter/IBLPrefilterContext.h +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#ifndef TNT_IBL_PREFILTER_IBLPREFILTER_H -#define TNT_IBL_PREFILTER_IBLPREFILTER_H - -#include -#include - -#include - -namespace filament { -class Engine; -class View; -class Scene; -class Renderer; -class Material; -class MaterialInstance; -class VertexBuffer; -class IndexBuffer; -class Camera; -class Texture; -} // namespace filament - -/** - * IBLPrefilterContext creates and initializes GPU state common to all environment map filters - * supported. Typically, only one instance per filament Engine of this object needs to exist. - * - * Usage Example: - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * #include - * using namespace filament; - * - * Engine* engine = Engine::create(); - * - * IBLPrefilterContext context(engine); - * IBLPrefilterContext::SpecularFilter filter(context); - * Texture* texture = filter(environment_cubemap); - * - * IndirectLight* indirectLight = IndirectLight::Builder() - * .reflections(texture) - * .build(engine); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - */ -class UTILS_PUBLIC IBLPrefilterContext { -public: - - /** - * Creates an IBLPrefilter context. - * @param engine filament engine to use - */ - explicit IBLPrefilterContext(filament::Engine& engine); - - /** - * Destroys all GPU resources created during initialization. - */ - ~IBLPrefilterContext() noexcept; - - // not copyable - IBLPrefilterContext(IBLPrefilterContext const&) = delete; - IBLPrefilterContext& operator=(IBLPrefilterContext const&) = delete; - - // movable - IBLPrefilterContext(IBLPrefilterContext&& rhs) noexcept; - IBLPrefilterContext& operator=(IBLPrefilterContext&& rhs) noexcept; - - // ------------------------------------------------------------------------------------------- - - /** - * EquirectangularToCubemap is use to convert an equirectangluar image to a cubemap. - */ - class EquirectangularToCubemap { - public: - /** - * Creates a EquirectangularToCubemap processor. - * @param context IBLPrefilterContext to use - */ - explicit EquirectangularToCubemap(IBLPrefilterContext& context); - - /** - * Destroys all GPU resources created during initialization. - */ - ~EquirectangularToCubemap() noexcept; - - EquirectangularToCubemap(EquirectangularToCubemap const&) = delete; - EquirectangularToCubemap& operator=(EquirectangularToCubemap const&) = delete; - EquirectangularToCubemap(EquirectangularToCubemap&& rhs) noexcept; - EquirectangularToCubemap& operator=(EquirectangularToCubemap&& rhs) noexcept; - - /** - * Converts an equirectangular image to a cubemap. - * @param equirectangular Texture to convert to a cubemap. - * - Can't be null. - * - Must be a 2d texture - * - Must have equirectangular geometry, that is width == 2*height. - * - Must be allocated with all mip levels. - * - Must be SAMPLEABLE - * @param outCubemap Output cubemap. If null the texture is automatically created - * with default parameters (size of 256 with 5 levels). - * - Must be a cubemap - * - Must have SAMPLEABLE and COLOR_ATTACHMENT usage bits - * @return returns outCubemap - */ - filament::Texture* operator()( - filament::Texture const* equirectangular, - filament::Texture* outCubemap = nullptr); - - private: - IBLPrefilterContext& mContext; - filament::Material* mEquirectMaterial = nullptr; - }; - - - /** - * SpecularFilter is a GPU based implementation of the specular probe pre-integration filter. - * An instance of SpecularFilter is needed per filter configuration. A filter configuration - * contains the filter's kernel and sample count. - */ - class SpecularFilter { - public: - enum class Kernel : uint8_t { - D_GGX, // Trowbridge-reitz distribution - }; - - /** - * Filter configuration. - */ - struct Config { - uint16_t sampleCount = 1024u; //!< filter sample count (max 2048) - uint8_t levelCount = 5u; //!< number of roughness levels - Kernel kernel = Kernel::D_GGX; //!< filter kernel - }; - - /** - * Filtering options for the current environment. - */ - struct Options { - float hdrLinear = 1024.0f; //!< no HDR compression up to this value - float hdrMax = 16384.0f; //!< HDR compression between hdrLinear and hdrMax - float lodOffset = 1.0f; //!< Good values are 1.0 or 2.0. Higher values help with heavily HDR inputs. - bool generateMipmap = true; //!< set to false if the environment map already has mipmaps - }; - - /** - * Creates a SpecularFilter processor. - * @param context IBLPrefilterContext to use - * @param config Configuration of the filter - */ - SpecularFilter(IBLPrefilterContext& context, Config config); - - /** - * Creates a filter with the default configuration. - * @param context IBLPrefilterContext to use - */ - explicit SpecularFilter(IBLPrefilterContext& context); - - /** - * Destroys all GPU resources created during initialization. - */ - ~SpecularFilter() noexcept; - - SpecularFilter(SpecularFilter const&) = delete; - SpecularFilter& operator=(SpecularFilter const&) = delete; - SpecularFilter(SpecularFilter&& rhs) noexcept; - SpecularFilter& operator=(SpecularFilter&& rhs) noexcept; - - /** - * Generates a prefiltered cubemap. - * @param options Options for this environment - * @param environmentCubemap Environment cubemap (input). Can't be null. - * This cubemap must be SAMPLEABLE and must have all its - * levels allocated. If Options.generateMipmap is true, - * the mipmap levels will be overwritten, otherwise - * it is assumed that all levels are correctly initialized. - * @param outReflectionsTexture Output prefiltered texture or, if null, it is - * automatically created with some default parameters. - * outReflectionsTexture must be a cubemap, it must have - * at least COLOR_ATTACHMENT and SAMPLEABLE usages and at - * least the same number of levels than requested by Config. - * @return returns outReflectionsTexture - */ - filament::Texture* operator()(Options options, - filament::Texture const* environmentCubemap, - filament::Texture* outReflectionsTexture = nullptr); - - /** - * Generates a prefiltered cubemap. - * @param environmentCubemap Environment cubemap (input). Can't be null. - * This cubemap must be SAMPLEABLE and must have all its - * levels allocated. All mipmap levels will be overwritten. - * @param outReflectionsTexture Output prefiltered texture or, if null, it is - * automatically created with some default parameters. - * outReflectionsTexture must be a cubemap, it must have - * at least COLOR_ATTACHMENT and SAMPLEABLE usages and at - * least the same number of levels than requested by Config. - * @return returns outReflectionsTexture - */ - filament::Texture* operator()( - filament::Texture const* environmentCubemap, - filament::Texture* outReflectionsTexture = nullptr); - - // TODO: option for progressive filtering - - // TODO: add a callback for when the processing is done? - - private: - filament::Texture* createReflectionsTexture(); - IBLPrefilterContext& mContext; - filament::Material* mKernelMaterial = nullptr; - filament::Texture* mKernelTexture = nullptr; - uint32_t mSampleCount = 0u; - uint8_t mLevelCount = 1u; - }; - -private: - friend class Filter; - filament::Engine& mEngine; - filament::Renderer* mRenderer{}; - filament::Scene* mScene{}; - filament::VertexBuffer* mVertexBuffer{}; - filament::IndexBuffer* mIndexBuffer{}; - filament::Camera* mCamera{}; - utils::Entity mFullScreenQuadEntity{}; - utils::Entity mCameraEntity{}; - filament::View* mView{}; - filament::Material* mIntegrationMaterial{}; -}; - -#endif //TNT_IBL_PREFILTER_IBLPREFILTER_H diff --git a/windows/include/filament/filament/Box.h b/windows/include/filament/filament/Box.h deleted file mode 100644 index 36f19924..00000000 --- a/windows/include/filament/filament/Box.h +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_BOX_H -#define TNT_FILAMENT_BOX_H - -#include - -#include - -#include -#include - -namespace filament { - -/** - * An axis aligned 3D box represented by its center and half-extent. - */ -class UTILS_PUBLIC Box { -public: - /** Center of the 3D box */ - math::float3 center = {}; - - /** Half extent from the center on all 3 axis */ - math::float3 halfExtent = {}; - - /** - * Whether the box is empty, i.e.: it's volume is null. - * @return true if the volume of the box is null - */ - constexpr bool isEmpty() const noexcept { - return length2(halfExtent) == 0; - } - - /** - * Computes the lowest coordinates corner of the box. - * @return center - halfExtent - */ - constexpr math::float3 getMin() const noexcept { - return center - halfExtent; - } - - /** - * Computes the largest coordinates corner of the box. - * @return center + halfExtent - */ - constexpr math::float3 getMax() const noexcept { - return center + halfExtent; - } - - /** - * Initializes the 3D box from its min / max coordinates on each axis - * @param min lowest coordinates corner of the box - * @param max largest coordinates corner of the box - * @return This bounding box - */ - Box& set(const math::float3& min, const math::float3& max) noexcept { - // float3 ctor needed for visual studio - center = (max + min) * math::float3(0.5f); - halfExtent = (max - min) * math::float3(0.5f); - return *this; - } - - /** - * Computes the bounding box of the union of two boxes - * @param box The box to be combined with - * @return The bounding box of the union of *this and box - */ - Box& unionSelf(const Box& box) noexcept { - set(min(getMin(), box.getMin()), max(getMax(), box.getMax())); - return *this; - } - - /** - * Translates the box *to* a given center position - * @param tr position to translate the box to - * @return A box centered in \p tr with the same extent than *this - */ - constexpr Box translateTo(const math::float3& tr) const noexcept { - return Box{ tr, halfExtent }; - } - - /** - * Computes the smallest bounding sphere of the box. - * @return The smallest sphere defined by its center (.xyz) and radius (.w) that contains *this - */ - math::float4 getBoundingSphere() const noexcept { - return { center, length(halfExtent) }; - } - - /** - * Transform a Box by a linear transform and a translation. - * - * @param m a 3x3 matrix, the linear transform - * @param t a float3, the translation - * @param box the box to transform - * @return the bounding box of the transformed box - */ - static Box transform(const math::mat3f& m, math::float3 const& t, const Box& box) noexcept { - return { m * box.center + t, abs(m) * box.halfExtent }; - } - - /** - * @deprecated Use transform() instead - * @see transform() - */ - friend Box rigidTransform(Box const& box, const math::mat4f& m) noexcept { - return transform(m.upperLeft(), m[3].xyz, box); - } -}; - -/** - * An axis aligned box represented by its min and max coordinates - */ -struct UTILS_PUBLIC Aabb { - - /** min coordinates */ - math::float3 min = std::numeric_limits::max(); - - /** max coordinates */ - math::float3 max = std::numeric_limits::lowest(); - - /** - * Computes the center of the box. - * @return (max + min)/2 - */ - math::float3 center() const noexcept { - // float3 ctor needed for visual studio - return (max + min) * math::float3(0.5f); - } - - /** - * Computes the half-extent of the box. - * @return (max - min)/2 - */ - math::float3 extent() const noexcept { - // float3 ctor needed for visual studio - return (max - min) * math::float3(0.5f); - } - - /** - * Whether the box is empty, i.e.: it's volume is null or negative. - * @return true if min >= max, i.e: the volume of the box is null or negative - */ - bool isEmpty() const noexcept { - return any(greaterThanEqual(min, max)); - } - - struct Corners { - using value_type = math::float3; - value_type const* begin() const { return vertices; } - value_type const* end() const { return vertices + 8; } - value_type * begin() { return vertices; } - value_type * end() { return vertices + 8; } - value_type const* data() const { return vertices; } - value_type * data() { return vertices; } - size_t size() const { return 8; } - value_type vertices[8]; - }; - - /** - * Returns the 8 corner vertices of the AABB. - */ - Corners getCorners() const { - return Aabb::Corners{ .vertices = { - { min.x, min.y, min.z }, - { max.x, min.y, min.z }, - { min.x, max.y, min.z }, - { max.x, max.y, min.z }, - { min.x, min.y, max.z }, - { max.x, min.y, max.z }, - { min.x, max.y, max.z }, - { max.x, max.y, max.z }, - }}; - } - - /** - * Returns whether the box contains a given point. - * - * @param p the point to test - * @return the maximum signed distance to the box. Negative if p is in the box - */ - float contains(math::float3 p) const noexcept { - float d = min.x - p.x; - d = std::max(d, min.y - p.y); - d = std::max(d, min.z - p.z); - d = std::max(d, p.x - max.x); - d = std::max(d, p.y - max.y); - d = std::max(d, p.z - max.z); - return d; - } - - /** - * Applies an affine transformation to the AABB. - * - * @param m the 3x3 transformation to apply - * @param t the translation - * @return the transformed box - */ - static Aabb transform(const math::mat3f& m, math::float3 const& t, const Aabb& box) noexcept { - // Fast AABB transformation per Jim Arvo in Graphics Gems (1990). - Aabb result{ t, t }; - for (size_t col = 0; col < 3; ++col) { - for (size_t row = 0; row < 3; ++row) { - const float a = m[col][row] * box.min[col]; - const float b = m[col][row] * box.max[col]; - result.min[row] += a < b ? a : b; - result.max[row] += a < b ? b : a; - } - } - return result; - } - - /** - * @deprecated Use transform() instead - * @see transform() - */ - Aabb transform(const math::mat4f& m) const noexcept { - return transform(m.upperLeft(), m[3].xyz, *this); - } -}; - -} // namespace filament - -#endif // TNT_FILAMENT_BOX_H diff --git a/windows/include/filament/filament/BufferObject.h b/windows/include/filament/filament/BufferObject.h deleted file mode 100644 index 1ede31b8..00000000 --- a/windows/include/filament/filament/BufferObject.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_BUFFEROBJECT_H -#define TNT_FILAMENT_BUFFEROBJECT_H - -#include - -#include - -#include - -#include - -namespace filament { - -class FBufferObject; - -class Engine; - -/** - * A generic GPU buffer containing data. - * - * Usage of this BufferObject is optional. For simple use cases it is not necessary. It is useful - * only when you need to share data between multiple VertexBuffer instances. It also allows you to - * efficiently swap-out the buffers in VertexBuffer. - * - * NOTE: For now this is only used for vertex data, but in the future we may use it for other things - * (e.g. compute). - * - * @see VertexBuffer - */ -class UTILS_PUBLIC BufferObject : public FilamentAPI { - struct BuilderDetails; - -public: - using BufferDescriptor = backend::BufferDescriptor; - using BindingType = backend::BufferObjectBinding; - - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - Builder() noexcept; - Builder(Builder const& rhs) noexcept; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder const& rhs) noexcept; - Builder& operator=(Builder&& rhs) noexcept; - - /** - * Size of the buffer in bytes. - * @param byteCount Maximum number of bytes the BufferObject can hold. - * @return A reference to this Builder for chaining calls. - */ - Builder& size(uint32_t byteCount) noexcept; - - /** - * The binding type for this buffer object. (defaults to VERTEX) - * @param BindingType Distinguishes between SSBO, VBO, etc. For now this must be VERTEX. - * @return A reference to this Builder for chaining calls. - */ - Builder& bindingType(BindingType bindingType) noexcept; - - /** - * Creates the BufferObject and returns a pointer to it. After creation, the buffer - * object is uninitialized. Use BufferObject::setBuffer() to initialize it. - * - * @param engine Reference to the filament::Engine to associate this BufferObject with. - * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. - * - * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of - * memory or other resources. - * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. - * - * @see IndexBuffer::setBuffer - */ - BufferObject* build(Engine& engine); - private: - friend class FBufferObject; - }; - - /** - * Asynchronously copy-initializes a region of this BufferObject from the data provided. - * - * @param engine Reference to the filament::Engine associated with this BufferObject. - * @param buffer A BufferDescriptor representing the data used to initialize the BufferObject. - * @param byteOffset Offset in bytes into the BufferObject - */ - void setBuffer(Engine& engine, BufferDescriptor&& buffer, uint32_t byteOffset = 0); - - /** - * Returns the size of this BufferObject in elements. - * @return The maximum capacity of the BufferObject. - */ - size_t getByteCount() const noexcept; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_BUFFEROBJECT_H diff --git a/windows/include/filament/filament/Camera.h b/windows/include/filament/filament/Camera.h deleted file mode 100644 index 4b54a8e9..00000000 --- a/windows/include/filament/filament/Camera.h +++ /dev/null @@ -1,526 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_CAMERA_H -#define TNT_FILAMENT_CAMERA_H - -#include - -#include - -#include -#include -#include - -namespace utils { -class Entity; -} // namespace utils - -namespace filament { - -/** - * Camera represents the eye through which the scene is viewed. - * - * A Camera has a position and orientation and controls the projection and exposure parameters. - * - * Creation and destruction - * ======================== - * - * In Filament, Camera is a component that must be associated with an entity. To do so, - * use Engine::createCamera(Entity). A Camera component is destroyed using - * Engine::destroyCameraComponent(Entity). - * - * ~~~~~~~~~~~{.cpp} - * filament::Engine* engine = filament::Engine::create(); - * - * utils::Entity myCameraEntity = utils::EntityManager::get().create(); - * filament::Camera* myCamera = engine->createCamera(myCameraEntity); - * myCamera->setProjection(45, 16.0/9.0, 0.1, 1.0); - * myCamera->lookAt({0, 1.60, 1}, {0, 0, 0}); - * engine->destroyCameraComponent(myCamera); - * ~~~~~~~~~~~ - * - * - * Coordinate system - * ================= - * - * The camera coordinate system defines the *view space*. The camera points towards its -z axis - * and is oriented such that its top side is in the direction of +y, and its right side in the - * direction of +x. - * - * @note - * Since the *near* and *far* planes are defined by the distance from the camera, - * their respective coordinates are -\p distance(near) and -\p distance(far). - * - * Clipping planes - * =============== - * - * The camera defines six *clipping planes* which together create a *clipping volume*. The - * geometry outside this volume is clipped. - * - * The clipping volume can either be a box or a frustum depending on which projection is used, - * respectively Projection.ORTHO or Projection.PERSPECTIVE. The six planes are specified either - * directly or indirectly using setProjection(). - * - * The six planes are: - * - left - * - right - * - bottom - * - top - * - near - * - far - * - * @note - * To increase the depth-buffer precision, the *far* clipping plane is always assumed to be at - * infinity for rendering. That is, it is not used to clip geometry during rendering. - * However, it is used during the culling phase (objects entirely behind the *far* - * plane are culled). - * - * - * Choosing the *near* plane distance - * ================================== - * - * The *near* plane distance greatly affects the depth-buffer resolution. - * - * Example: Precision at 1m, 10m, 100m and 1Km for various near distances assuming a 32-bit float - * depth-buffer: - * - * near (m) | 1 m | 10 m | 100 m | 1 Km - * -----------:|:------:|:-------:|:--------:|:--------: - * 0.001 | 7.2e-5 | 0.0043 | 0.4624 | 48.58 - * 0.01 | 6.9e-6 | 0.0001 | 0.0430 | 4.62 - * 0.1 | 3.6e-7 | 7.0e-5 | 0.0072 | 0.43 - * 1.0 | 0 | 3.8e-6 | 0.0007 | 0.07 - * - * As can be seen in the table above, the depth-buffer precision drops rapidly with the - * distance to the camera. - * - * Make sure to pick the highest *near* plane distance possible. - * - * On Vulkan and Metal platforms (or OpenGL platforms supporting either EXT_clip_control or - * ARB_clip_control extensions), the depth-buffer precision is much less dependent on the *near* - * plane value: - * - * near (m) | 1 m | 10 m | 100 m | 1 Km - * -----------:|:------:|:-------:|:--------:|:--------: - * 0.001 | 1.2e-7 | 9.5e-7 | 7.6e-6 | 6.1e-5 - * 0.01 | 1.2e-7 | 9.5e-7 | 7.6e-6 | 6.1e-5 - * 0.1 | 5.9e-8 | 9.5e-7 | 1.5e-5 | 1.2e-4 - * 1.0 | 0 | 9.5e-7 | 7.6e-6 | 1.8e-4 - * - * - * Choosing the *far* plane distance - * ================================= - * - * The far plane distance is always set internally to infinity for rendering, however it is used for - * culling and shadowing calculations. It is important to keep a reasonable ratio between - * the near and far plane distances. Typically a ratio in the range 1:100 to 1:100000 is - * commanded. Larger values may causes rendering artifacts or trigger assertions in debug builds. - * - * - * Exposure - * ======== - * - * The Camera is also used to set the scene's exposure, just like with a real camera. The lights - * intensity and the Camera exposure interact to produce the final scene's brightness. - * - * - * - * \see Frustum, View - */ -class UTILS_PUBLIC Camera : public FilamentAPI { -public: - //! Denotes the projection type used by this camera. \see setProjection - enum class Projection : int { - PERSPECTIVE, //!< perspective projection, objects get smaller as they are farther - ORTHO //!< orthonormal projection, preserves distances - }; - - //! Denotes a field-of-view direction. \see setProjection - enum class Fov : int { - VERTICAL, //!< the field-of-view angle is defined on the vertical axis - HORIZONTAL //!< the field-of-view angle is defined on the horizontal axis - }; - - /** Sets the projection matrix from a frustum defined by six planes. - * - * @param projection type of #Projection to use. - * - * @param left distance in world units from the camera to the left plane, - * at the near plane. - * Precondition: \p left != \p right. - * - * @param right distance in world units from the camera to the right plane, - * at the near plane. - * Precondition: \p left != \p right. - * - * @param bottom distance in world units from the camera to the bottom plane, - * at the near plane. - * Precondition: \p bottom != \p top. - * - * @param top distance in world units from the camera to the top plane, - * at the near plane. - * Precondition: \p left != \p right. - * - * @param near distance in world units from the camera to the near plane. The near plane's - * position in view space is z = -\p near. - * Precondition: \p near > 0 for PROJECTION::PERSPECTIVE or - * \p near != far for PROJECTION::ORTHO - * - * @param far distance in world units from the camera to the far plane. The far plane's - * position in view space is z = -\p far. - * Precondition: \p far > near for PROJECTION::PERSPECTIVE or - * \p far != near for PROJECTION::ORTHO - * - * @see Projection, Frustum - */ - void setProjection(Projection projection, - double left, double right, - double bottom, double top, - double near, double far); - - /** Sets the projection matrix from the field-of-view. - * - * @param fovInDegrees full field-of-view in degrees. 0 < \p fov < 180. - * @param aspect aspect ratio \f$ \frac{width}{height} \f$. \p aspect > 0. - * @param near distance in world units from the camera to the near plane. \p near > 0. - * @param far distance in world units from the camera to the far plane. \p far > \p near. - * @param direction direction of the \p fovInDegrees parameter. - * - * @see Fov. - */ - void setProjection(double fovInDegrees, double aspect, double near, double far, - Fov direction = Fov::VERTICAL); - - /** Sets the projection matrix from the focal length. - * - * @param focalLengthInMillimeters lens's focal length in millimeters. \p focalLength > 0. - * @param aspect aspect ratio \f$ \frac{width}{height} \f$. \p aspect > 0. - * @param near distance in world units from the camera to the near plane. \p near > 0. - * @param far distance in world units from the camera to the far plane. \p far > \p near. - */ - void setLensProjection(double focalLengthInMillimeters, - double aspect, double near, double far); - - /** Sets a custom projection matrix. - * - * The projection matrix must be of one of the following form: - * a 0 tx 0 a 0 0 tx - * 0 b ty 0 0 b 0 ty - * 0 0 tz c 0 0 c tz - * 0 0 -1 0 0 0 0 1 - * - * The projection matrix must define an NDC system that must match the OpenGL convention, - * that is all 3 axis are mapped to [-1, 1]. - * - * @param projection custom projection matrix used for rendering and culling - * @param near distance in world units from the camera to the near plane. \p near > 0. - * @param far distance in world units from the camera to the far plane. \p far > \p near. - */ - void setCustomProjection(math::mat4 const& projection, double near, double far) noexcept; - - /** Sets the projection matrix. - * - * The projection matrices must be of one of the following form: - * a 0 tx 0 a 0 0 tx - * 0 b ty 0 0 b 0 ty - * 0 0 tz c 0 0 c tz - * 0 0 -1 0 0 0 0 1 - * - * The projection matrices must define an NDC system that must match the OpenGL convention, - * that is all 3 axis are mapped to [-1, 1]. - * - * @param projection custom projection matrix used for rendering - * @param projectionForCulling custom projection matrix used for culling - * @param near distance in world units from the camera to the near plane. \p near > 0. - * @param far distance in world units from the camera to the far plane. \p far > \p near. - */ - void setCustomProjection(math::mat4 const& projection, math::mat4 const& projectionForCulling, - double near, double far) noexcept; - - /** Sets an additional matrix that scales the projection matrix. - * - * This is useful to adjust the aspect ratio of the camera independent from its projection. - * First, pass an aspect of 1.0 to setProjection. Then set the scaling with the desired aspect - * ratio: - * - * const double aspect = width / height; - * - * // with Fov::HORIZONTAL passed to setProjection: - * camera->setScaling(double4 {1.0, aspect}); - * - * // with Fov::VERTICAL passed to setProjection: - * camera->setScaling(double4 {1.0 / aspect, 1.0}); - * - * - * By default, this is an identity matrix. - * - * @param scaling diagonal of the 2x2 scaling matrix to be applied after the projection matrix. - * - * @see setProjection, setLensProjection, setCustomProjection - */ - void setScaling(math::double2 scaling) noexcept; - - /** - * Sets an additional matrix that shifts the projection matrix. - * By default, this is an identity matrix. - * - * @param shift x and y translation added to the projection matrix, specified in NDC - * coordinates, that is, if the translation must be specified in pixels, - * shift must be scaled by 1.0 / { viewport.width, viewport.height }. - * - * @see setProjection, setLensProjection, setCustomProjection - */ - void setShift(math::double2 shift) noexcept; - - /** Returns the scaling amount used to scale the projection matrix. - * - * @return the diagonal of the scaling matrix applied after the projection matrix. - * - * @see setScaling - */ - math::double4 getScaling() const noexcept; - - /** Returns the shift amount used to translate the projection matrix. - * - * @return the 2D translation x and y offsets applied after the projection matrix. - * - * @see setShift - */ - math::double2 getShift() const noexcept; - - /** Returns the projection matrix used for rendering. - * - * The projection matrix used for rendering always has its far plane set to infinity. This - * is why it may differ from the matrix set through setProjection() or setLensProjection(). - * - * @return The projection matrix used for rendering - * - * @see setProjection, setLensProjection, setCustomProjection, getCullingProjectionMatrix - */ - math::mat4 getProjectionMatrix() const noexcept; - - - /** Returns the projection matrix used for culling (far plane is finite). - * - * @return The projection matrix set by setProjection or setLensProjection. - * - * @see setProjection, setLensProjection, getProjectionMatrix - */ - math::mat4 getCullingProjectionMatrix() const noexcept; - - - //! Returns the frustum's near plane - double getNear() const noexcept; - - //! Returns the frustum's far plane used for culling - double getCullingFar() const noexcept; - - /** Sets the camera's model matrix. - * - * Helper method to set the camera's entity transform component. - * It has the same effect as calling: - * - * ~~~~~~~~~~~{.cpp} - * engine.getTransformManager().setTransform( - * engine.getTransformManager().getInstance(camera->getEntity()), model); - * ~~~~~~~~~~~ - * - * @param model The camera position and orientation provided as a rigid transform matrix. - * - * @note The Camera "looks" towards its -z axis - * - * @warning \p model must be a rigid transform - */ - void setModelMatrix(const math::mat4& model) noexcept; - void setModelMatrix(const math::mat4f& model) noexcept; //!< @overload - - /** Sets the camera's model matrix - * - * @param eye The position of the camera in world space. - * @param center The point in world space the camera is looking at. - * @param up A unit vector denoting the camera's "up" direction. - */ - void lookAt(math::double3 const& eye, - math::double3 const& center, - math::double3 const& up = math::double3{0, 1, 0}) noexcept; - - /** Returns the camera's model matrix - * - * Helper method to return the camera's entity transform component. - * It has the same effect as calling: - * - * ~~~~~~~~~~~{.cpp} - * engine.getTransformManager().getWorldTransform( - * engine.getTransformManager().getInstance(camera->getEntity())); - * ~~~~~~~~~~~ - * - * @return The camera's pose in world space as a rigid transform. Parent transforms, if any, - * are taken into account. - */ - math::mat4 getModelMatrix() const noexcept; - - //! Returns the camera's view matrix (inverse of the model matrix) - math::mat4 getViewMatrix() const noexcept; - - //! Returns the camera's position in world space - math::double3 getPosition() const noexcept; - - //! Returns the camera's normalized left vector - math::float3 getLeftVector() const noexcept; - - //! Returns the camera's normalized up vector - math::float3 getUpVector() const noexcept; - - //! Returns the camera's forward vector - math::float3 getForwardVector() const noexcept; - - //! Returns the camera's field of view in degrees - float getFieldOfViewInDegrees(Fov direction) const noexcept; - - //! Returns the camera's culling Frustum in world space - class Frustum getFrustum() const noexcept; - - //! Returns the entity representing this camera - utils::Entity getEntity() const noexcept; - - /** Sets this camera's exposure (default is f/16, 1/125s, 100 ISO) - * - * The exposure ultimately controls the scene's brightness, just like with a real camera. - * The default values provide adequate exposure for a camera placed outdoors on a sunny day - * with the sun at the zenith. - * - * @param aperture Aperture in f-stops, clamped between 0.5 and 64. - * A lower \p aperture value *increases* the exposure, leading to - * a brighter scene. Realistic values are between 0.95 and 32. - * - * @param shutterSpeed Shutter speed in seconds, clamped between 1/25,000 and 60. - * A lower shutter speed increases the exposure. Realistic values are - * between 1/8000 and 30. - * - * @param sensitivity Sensitivity in ISO, clamped between 10 and 204,800. - * A higher \p sensitivity increases the exposure. Realistic values are - * between 50 and 25600. - * - * @note - * With the default parameters, the scene must contain at least one Light of intensity - * similar to the sun (e.g.: a 100,000 lux directional light). - * - * @see LightManager, Exposure - */ - void setExposure(float aperture, float shutterSpeed, float sensitivity) noexcept; - - /** Sets this camera's exposure directly. Calling this method will set the aperture - * to 1.0, the shutter speed to 1.2 and the sensitivity will be computed to match - * the requested exposure (for a desired exposure of 1.0, the sensitivity will be - * set to 100 ISO). - * - * This method is useful when trying to match the lighting of other engines or tools. - * Many engines/tools use unit-less light intensities, which can be matched by setting - * the exposure manually. This can be typically achieved by setting the exposure to - * 1.0. - */ - void setExposure(float exposure) noexcept { - setExposure(1.0f, 1.2f, 100.0f * (1.0f / exposure)); - } - - //! returns this camera's aperture in f-stops - float getAperture() const noexcept; - - //! returns this camera's shutter speed in seconds - float getShutterSpeed() const noexcept; - - //! returns this camera's sensitivity in ISO - float getSensitivity() const noexcept; - - //! returns the focal length in meters [m] for a 35mm camera - double getFocalLength() const noexcept; - - /** - * Sets the camera focus distance. This is used by the Depth-of-field PostProcessing effect. - * @param distance Distance from the camera to the plane of focus in world units. - * Must be positive and larger than the near clipping plane. - */ - void setFocusDistance(float distance) noexcept; - - //! Returns the focus distance in world units - float getFocusDistance() const noexcept; - - /** - * Returns the inverse of a projection matrix. - * - * \param p the projection matrix to inverse - * \returns the inverse of the projection matrix \p p - * - * \warning the projection matrix to invert must have one of the form below: - * - perspective projection - * - * \f$ - * \left( - * \begin{array}{cccc} - * a & 0 & tx & 0 \\ - * 0 & b & ty & 0 \\ - * 0 & 0 & tz & c \\ - * 0 & 0 & -1 & 0 \\ - * \end{array} - * \right) - * \f$ - * - * - orthographic projection - * - * \f$ - * \left( - * \begin{array}{cccc} - * a & 0 & 0 & tx \\ - * 0 & b & 0 & ty \\ - * 0 & 0 & c & tz \\ - * 0 & 0 & 0 & 1 \\ - * \end{array} - * \right) - * \f$ - */ - static math::mat4 inverseProjection(const math::mat4& p) noexcept; - - /** - * Returns the inverse of a projection matrix. - * @see inverseProjection(const math::mat4&) - */ - static math::mat4f inverseProjection(const math::mat4f& p) noexcept; - - /** - * Helper to compute the effective focal length taking into account the focus distance - * - * @param focalLength focal length in any unit (e.g. [m] or [mm]) - * @param focusDistance focus distance in same unit as focalLength - * @return the effective focal length in same unit as focalLength - */ - static double computeEffectiveFocalLength(double focalLength, double focusDistance) noexcept; - - /** - * Helper to compute the effective field-of-view taking into account the focus distance - * - * @param fovInDegrees full field of view in degrees - * @param focusDistance focus distance in meters [m] - * @return effective full field of view in degrees - */ - static double computeEffectiveFov(double fovInDegrees, double focusDistance) noexcept; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_CAMERA_H diff --git a/windows/include/filament/filament/ColorGrading.h b/windows/include/filament/filament/ColorGrading.h deleted file mode 100644 index db709600..00000000 --- a/windows/include/filament/filament/ColorGrading.h +++ /dev/null @@ -1,485 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_COLORGRADING_H -#define TNT_FILAMENT_COLORGRADING_H - -#include -#include - -#include - -#include - -namespace filament { - -class Engine; -class FColorGrading; - -namespace color { -class ColorSpace; -} - -/** - * ColorGrading is used to transform (either to modify or correct) the colors of the HDR buffer - * rendered by Filament. Color grading transforms are applied after lighting, and after any lens - * effects (bloom for instance), and include tone mapping. - * - * Creation, usage and destruction - * =============================== - * - * A ColorGrading object is created using the ColorGrading::Builder and destroyed by calling - * Engine::destroy(const ColorGrading*). A ColorGrading object is meant to be set on a View. - * - * ~~~~~~~~~~~{.cpp} - * filament::Engine* engine = filament::Engine::create(); - * - * filament::ColorGrading* colorGrading = filament::ColorGrading::Builder() - * .toneMapping(filament::ColorGrading::ToneMapping::ACES) - * .build(*engine); - * - * myView->setColorGrading(colorGrading); - * - * engine->destroy(colorGrading); - * ~~~~~~~~~~~ - * - * Performance - * =========== - * - * Creating a new ColorGrading object may be more expensive than other Filament objects as a - * 3D LUT may need to be generated. The generation of a 3D LUT, if necessary, may happen on - * the CPU. - * - * Ordering - * ======== - * - * The various transforms held by ColorGrading are applied in the following order: - * - Exposure - * - Night adaptation - * - White balance - * - Channel mixer - * - Shadows/mid-tones/highlights - * - Slope/offset/power (CDL) - * - Contrast - * - Vibrance - * - Saturation - * - Curves - * - Tone mapping - * - Luminance scaling - * - Gamut mapping - * - * Defaults - * ======== - * - * Here are the default color grading options: - * - Exposure: 0.0 - * - Night adaptation: 0.0 - * - White balance: temperature 0, and tint 0 - * - Channel mixer: red {1,0,0}, green {0,1,0}, blue {0,0,1} - * - Shadows/mid-tones/highlights: shadows {1,1,1,0}, mid-tones {1,1,1,0}, highlights {1,1,1,0}, - * ranges {0,0.333,0.550,1} - * - Slope/offset/power: slope 1.0, offset 0.0, and power 1.0 - * - Contrast: 1.0 - * - Vibrance: 1.0 - * - Saturation: 1.0 - * - Curves: gamma {1,1,1}, midPoint {1,1,1}, and scale {1,1,1} - * - Tone mapping: ACESLegacyToneMapper - * - Luminance scaling: false - * - Gamut mapping: false - * - Output color space: Rec709-sRGB-D65 - * - * @see View - */ -class UTILS_PUBLIC ColorGrading : public FilamentAPI { - struct BuilderDetails; -public: - - enum class QualityLevel : uint8_t { - LOW, - MEDIUM, - HIGH, - ULTRA - }; - - enum class LutFormat : uint8_t { - INTEGER, //!< 10 bits per component - FLOAT, //!< 16 bits per component (10 bits mantissa precision) - }; - - - /** - * List of available tone-mapping operators. - * - * @deprecated Use Builder::toneMapper(ToneMapper*) instead - */ - enum class UTILS_DEPRECATED ToneMapping : uint8_t { - LINEAR = 0, //!< Linear tone mapping (i.e. no tone mapping) - ACES_LEGACY = 1, //!< ACES tone mapping, with a brightness modifier to match Filament's legacy tone mapper - ACES = 2, //!< ACES tone mapping - FILMIC = 3, //!< Filmic tone mapping, modelled after ACES but applied in sRGB space - DISPLAY_RANGE = 4, //!< Tone mapping used to validate/debug scene exposure - }; - - //! Use Builder to construct a ColorGrading object instance - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - Builder() noexcept; - Builder(Builder const& rhs) noexcept; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder const& rhs) noexcept; - Builder& operator=(Builder&& rhs) noexcept; - - /** - * Sets the quality level of the color grading. When color grading is implemented using - * a 3D LUT, the quality level may impact the resolution and bit depth of the backing - * 3D texture. For instance, a low quality level will use a 16x16x16 10 bit LUT, a medium - * quality level will use a 32x32x32 10 bit LUT, a high quality will use a 32x32x32 16 bit - * LUT, and a ultra quality will use a 64x64x64 16 bit LUT. - * This overrides the values set by format() and dimensions(). - * - * The default quality is medium. - * - * @param qualityLevel The desired quality of the color grading process - * - * @return This Builder, for chaining calls - */ - Builder& quality(QualityLevel qualityLevel) noexcept; - - /** - * When color grading is implemented using a 3D LUT, this sets the texture format of - * of the LUT. This overrides the value set by quality(). - * - * The default is INTEGER - * - * @param format The desired format of the 3D LUT. - * - * @return This Builder, for chaining calls - */ - Builder& format(LutFormat format) noexcept; - - /** - * When color grading is implemented using a 3D LUT, this sets the dimension of the LUT. - * This overrides the value set by quality(). - * - * The default is 32 - * - * @param dim The desired dimension of the LUT. Between 16 and 64. - * - * @return This Builder, for chaining calls - */ - Builder& dimensions(uint8_t dim) noexcept; - - /** - * Selects the tone mapping operator to apply to the HDR color buffer as the last - * operation of the color grading post-processing step. - * - * The default tone mapping operator is ACESLegacyToneMapper. - * - * The specified tone mapper must have a lifecycle that exceeds the lifetime of - * this builder. Since the build(Engine&) method is synchronous, it is safe to - * delete the tone mapper object after that finishes executing. - * - * @param toneMapper The tone mapping operator to apply to the HDR color buffer - * - * @return This Builder, for chaining calls - */ - Builder& toneMapper(const ToneMapper* toneMapper) noexcept; - - /** - * Selects the tone mapping operator to apply to the HDR color buffer as the last - * operation of the color grading post-processing step. - * - * The default tone mapping operator is ACES_LEGACY. - * - * @param toneMapping The tone mapping operator to apply to the HDR color buffer - * - * @return This Builder, for chaining calls - * - * @deprecated Use toneMapper(ToneMapper*) instead - */ - UTILS_DEPRECATED - Builder& toneMapping(ToneMapping toneMapping) noexcept; - - /** - * Enables or disables the luminance scaling component (LICH) from the exposure value - * invariant luminance system (EVILS). When this setting is enabled, pixels with high - * chromatic values will roll-off to white to offer a more natural rendering. This step - * also helps avoid undesirable hue skews caused by out of gamut colors clipped - * to the destination color gamut. - * - * When luminance scaling is enabled, tone mapping is performed on the luminance of each - * pixel instead of per-channel. - * - * @param luminanceScaling Enables or disables luminance scaling post-tone mapping - * - * @return This Builder, for chaining calls - */ - Builder& luminanceScaling(bool luminanceScaling) noexcept; - - /** - * Enables or disables gamut mapping to the destination color space's gamut. When gamut - * mapping is turned off, out-of-gamut colors are clipped to the destination's gamut, - * which may produce hue skews (blue skewing to purple, green to yellow, etc.). When - * gamut mapping is enabled, out-of-gamut colors are brought back in gamut by trying to - * preserve the perceived chroma and lightness of the original values. - * - * @param gamutMapping Enables or disables gamut mapping - * - * @return This Builder, for chaining calls - */ - Builder& gamutMapping(bool gamutMapping) noexcept; - - /** - * Adjusts the exposure of this image. The exposure is specified in stops: - * each stop brightens (positive values) or darkens (negative values) the image by - * a factor of 2. This means that an exposure of 3 will brighten the image 8 times - * more than an exposure of 0 (2^3 = 8 and 2^0 = 1). Contrary to the camera's exposure, - * this setting is applied after all post-processing (bloom, etc.) are applied. - * - * @param exposure Value in EV stops. Can be negative, 0, or positive. - * - * @return This Builder, for chaining calls - */ - Builder& exposure(float exposure) noexcept; - - /** - * Controls the amount of night adaptation to replicate a more natural representation of - * low-light conditions as perceived by the human vision system. In low-light conditions, - * peak luminance sensitivity of the eye shifts toward the blue end of the color spectrum: - * darker tones appear brighter, reducing contrast, and colors are blue shifted (the darker - * the more intense the effect). - * - * @param adaptation Amount of adaptation, between 0 (no adaptation) and 1 (full adaptation). - * - * @return This Builder, for chaining calls - */ - Builder& nightAdaptation(float adaptation) noexcept; - - /** - * Adjusts the while balance of the image. This can be used to remove color casts - * and correct the appearance of the white point in the scene, or to alter the - * overall chromaticity of the image for artistic reasons (to make the image appear - * cooler or warmer for instance). - * - * The while balance adjustment is defined with two values: - * - Temperature, to modify the color temperature. This value will modify the colors - * on a blue/yellow axis. Lower values apply a cool color temperature, and higher - * values apply a warm color temperature. The lowest value, -1.0f, is equivalent to - * a temperature of 50,000K. The highest value, 1.0f, is equivalent to a temperature - * of 2,000K. - * - Tint, to modify the colors on a green/magenta axis. The lowest value, -1.0f, will - * apply a strong green cast, and the highest value, 1.0f, will apply a strong magenta - * cast. - * - * Both values are expected to be in the range [-1.0..+1.0]. Values outside of that - * range will be clipped to that range. - * - * @param temperature Modification on the blue/yellow axis, as a value between -1.0 and +1.0. - * @param tint Modification on the green/magenta axis, as a value between -1.0 and +1.0. - * - * @return This Builder, for chaining calls - */ - Builder& whiteBalance(float temperature, float tint) noexcept; - - /** - * The channel mixer adjustment modifies each output color channel using the specified - * mix of the source color channels. - * - * By default each output color channel is set to use 100% of the corresponding source - * channel and 0% of the other channels. For instance, the output red channel is set to - * {1.0, 0.0, 1.0} or 100% red, 0% green and 0% blue. - * - * Each output channel can add or subtract data from the source channel by using values - * in the range [-2.0..+2.0]. Values outside of that range will be clipped to that range. - * - * Using the channel mixer adjustment you can for instance create a monochrome output - * by setting all 3 output channels to the same mix. For instance: {0.4, 0.4, 0.2} for - * all 3 output channels(40% red, 40% green and 20% blue). - * - * More complex mixes can be used to create more complex effects. For instance, here is - * a mix that creates a sepia tone effect: - * - outRed = {0.255, 0.858, 0.087} - * - outGreen = {0.213, 0.715, 0.072} - * - outBlue = {0.170, 0.572, 0.058} - * - * @param outRed The mix of source RGB for the output red channel, between -2.0 and +2.0 - * @param outGreen The mix of source RGB for the output green channel, between -2.0 and +2.0 - * @param outBlue The mix of source RGB for the output blue channel, between -2.0 and +2.0 - * - * @return This Builder, for chaining calls - */ - Builder& channelMixer( - math::float3 outRed, math::float3 outGreen, math::float3 outBlue) noexcept; - - /** - * Adjusts the colors separately in 3 distinct tonal ranges or zones: shadows, mid-tones, - * and highlights. - * - * The tonal zones are by the ranges parameter: the x and y components define the beginning - * and end of the transition from shadows to mid-tones, and the z and w components define - * the beginning and end of the transition from mid-tones to highlights. - * - * A smooth transition is applied between the zones which means for instance that the - * correction color of the shadows range will partially apply to the mid-tones, and the - * other way around. This ensure smooth visual transitions in the final image. - * - * Each correction color is defined as a linear RGB color and a weight. The weight is a - * value (which may be positive or negative) that is added to the linear RGB color before - * mixing. This can be used to darken or brighten the selected tonal range. - * - * Shadows/mid-tones/highlights adjustment are performed linear space. - * - * @param shadows Linear RGB color (.rgb) and weight (.w) to apply to the shadows - * @param midtones Linear RGB color (.rgb) and weight (.w) to apply to the mid-tones - * @param highlights Linear RGB color (.rgb) and weight (.w) to apply to the highlights - * @param ranges Range of the shadows (x and y), and range of the highlights (z and w) - * - * @return This Builder, for chaining calls - */ - Builder& shadowsMidtonesHighlights( - math::float4 shadows, math::float4 midtones, math::float4 highlights, - math::float4 ranges) noexcept; - - /** - * Applies a slope, offset, and power, as defined by the ASC CDL (American Society of - * Cinematographers Color Decision List) to the image. The CDL can be used to adjust the - * colors of different tonal ranges in the image. - * - * The ASC CDL is similar to the lift/gamma/gain controls found in many color grading tools. - * Lift is equivalent to a combination of offset and slope, gain is equivalent to slope, - * and gamma is equivalent to power. - * - * The slope and power values must be strictly positive. Values less than or equal to 0 will - * be clamped to a small positive value, offset can be any positive or negative value. - * - * Version 1.2 of the ASC CDL adds saturation control, which is here provided as a separate - * API. See the saturation() method for more information. - * - * Slope/offset/power adjustments are performed in log space. - * - * @param slope Multiplier of the input color, must be a strictly positive number - * @param offset Added to the input color, can be a negative or positive number, including 0 - * @param power Power exponent of the input color, must be a strictly positive number - * - * @return This Builder, for chaining calls - */ - Builder& slopeOffsetPower(math::float3 slope, math::float3 offset, math::float3 power) noexcept; - - /** - * Adjusts the contrast of the image. Lower values decrease the contrast of the image - * (the tonal range is narrowed), and higher values increase the contrast of the image - * (the tonal range is widened). A value of 1.0 has no effect. - * - * The contrast is defined as a value in the range [0.0...2.0]. Values outside of that - * range will be clipped to that range. - * - * Contrast adjustment is performed in log space. - * - * @param contrast Contrast expansion, between 0.0 and 2.0. 1.0 leaves contrast unaffected - * - * @return This Builder, for chaining calls - */ - Builder& contrast(float contrast) noexcept; - - /** - * Adjusts the saturation of the image based on the input color's saturation level. - * Colors with a high level of saturation are less affected than colors with low saturation - * levels. - * - * Lower vibrance values decrease intensity of the colors present in the image, and - * higher values increase the intensity of the colors in the image. A value of 1.0 has - * no effect. - * - * The vibrance is defined as a value in the range [0.0...2.0]. Values outside of that - * range will be clipped to that range. - * - * Vibrance adjustment is performed in linear space. - * - * @param vibrance Vibrance, between 0.0 and 2.0. 1.0 leaves vibrance unaffected - * - * @return This Builder, for chaining calls - */ - Builder& vibrance(float vibrance) noexcept; - - /** - * Adjusts the saturation of the image. Lower values decrease intensity of the colors - * present in the image, and higher values increase the intensity of the colors in the - * image. A value of 1.0 has no effect. - * - * The saturation is defined as a value in the range [0.0...2.0]. Values outside of that - * range will be clipped to that range. - * - * Saturation adjustment is performed in linear space. - * - * @param saturation Saturation, between 0.0 and 2.0. 1.0 leaves saturation unaffected - * - * @return This Builder, for chaining calls - */ - Builder& saturation(float saturation) noexcept; - - /** - * Applies a curve to each RGB channel of the image. Each curve is defined by 3 values: - * a gamma value applied to the shadows only, a mid-point indicating where shadows stop - * and highlights start, and a scale factor for the highlights. - * - * The gamma and mid-point must be strictly positive values. If they are not, they will be - * clamped to a small positive value. The scale can be any negative of positive value. - * - * Curves are applied in linear space. - * - * @param shadowGamma Power value to apply to the shadows, must be strictly positive - * @param midPoint Mid-point defining where shadows stop and highlights start, must be strictly positive - * @param highlightScale Scale factor for the highlights, can be any negative or positive value - * - * @return This Builder, for chaining calls - */ - Builder& curves(math::float3 shadowGamma, math::float3 midPoint, math::float3 highlightScale) noexcept; - - /** - * Sets the output color space for this ColorGrading object. After all color grading steps - * have been applied, the final color will be converted in the desired color space. - * - * NOTE: Currently the output color space must be one of Rec709-sRGB-D65 or - * Rec709-Linear-D65. Only the transfer function is taken into account. - * - * @param colorSpace The output color space. - * - * @return This Builder, for chaining calls - */ - Builder& outputColorSpace(const color::ColorSpace& colorSpace) noexcept; - - /** - * Creates the ColorGrading object and returns a pointer to it. - * - * @param engine Reference to the filament::Engine to associate this ColorGrading with. - * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. - */ - ColorGrading* build(Engine& engine); - - private: - friend class FColorGrading; - }; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_COLORGRADING_H diff --git a/windows/include/filament/filament/ColorSpace.h b/windows/include/filament/filament/ColorSpace.h deleted file mode 100644 index 4308f601..00000000 --- a/windows/include/filament/filament/ColorSpace.h +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_FILAMENT_COLOR_SPACE_H -#define TNT_FILAMENT_COLOR_SPACE_H - -#include -#include - -namespace filament::color { - -using namespace math; - -/** - * Holds the chromaticities of a color space's primaries as xy coordinates - * in xyY (Y is assumed to be 1). - */ -struct Primaries { - float2 r; - float2 g; - float2 b; - - bool operator==(const Primaries& rhs) const noexcept { - return r == rhs.r && b == rhs.b && g == rhs.g; - } -}; - -//! Reference white for a color space, defined as the xy coordinates in the xyY space. -using WhitePoint = float2; - -/** - *

Defines the parameters for the ICC parametric curve type 4, as - * defined in ICC.1:2004-10, section 10.15.

- * - *

The EOTF is of the form:

- * - * \(\begin{equation} - * Y = \begin{cases}c X + f & X \lt d \\\ - * \left( a X + b \right) ^{g} + e & X \ge d \end{cases} - * \end{equation}\) - * - *

The corresponding OETF is simply the inverse function.

- * - *

The parameters defined by this class form a valid transfer - * function only if all the following conditions are met:

- *
    - *
  • No parameter is a NaN
  • - *
  • \(d\) is in the range \([0..1]\)
  • - *
  • The function is not constant
  • - *
  • The function is positive and increasing
  • - *
- */ -struct TransferFunction { - /** - *

Defines the parameters for the ICC parametric curve type 3, as - * defined in ICC.1:2004-10, section 10.15.

- * - *

The EOTF is of the form:

- * - * \(\begin{equation} - * Y = \begin{cases}c X & X \lt d \\\ - * \left( a X + b \right) ^{g} & X \ge d \end{cases} - * \end{equation}\) - * - *

This constructor is equivalent to setting \(e\) and \(f\) to 0.

- * - * @param a The value of \(a\) in the equation of the EOTF described above - * @param b The value of \(b\) in the equation of the EOTF described above - * @param c The value of \(c\) in the equation of the EOTF described above - * @param d The value of \(d\) in the equation of the EOTF described above - * @param g The value of \(g\) in the equation of the EOTF described above - */ - constexpr TransferFunction( - double a, - double b, - double c, - double d, - double e, - double f, - double g - ) : a(a), - b(b), - c(c), - d(d), - e(e), - f(f), - g(g) { - } - - constexpr TransferFunction( - double a, - double b, - double c, - double d, - double g - ) : TransferFunction(a, b, c, d, 0.0, 0.0, g) { - } - - bool operator==(const TransferFunction& rhs) const noexcept { - return - a == rhs.a && - b == rhs.b && - c == rhs.c && - d == rhs.d && - e == rhs.e && - f == rhs.f && - g == rhs.g; - } - - double a; - double b; - double c; - double d; - double e; - double f; - double g; -}; - -/** - *

A color space in Filament is always an RGB color space. A specific RGB color space - * is defined by the following properties:

- *
    - *
  • Three chromaticities of the red, green and blue primaries, which - * define the gamut of the color space.
  • - *
  • A white point chromaticity that defines the stimulus to which - * color space values are normalized (also just called "white").
  • - *
  • An opto-electronic transfer function, also called opto-electronic - * conversion function or often, and approximately, gamma function.
  • - *
  • An electro-optical transfer function, also called electo-optical - * conversion function or often, and approximately, gamma function.
  • - *
- * - *

Primaries and white point chromaticities

- *

In this implementation, the chromaticity of the primaries and the white - * point of an RGB color space is defined in the CIE xyY color space. This - * color space separates the chromaticity of a color, the x and y components, - * and its luminance, the Y component. Since the primaries and the white - * point have full brightness, the Y component is assumed to be 1 and only - * the x and y components are needed to encode them.

- * - *

Transfer functions

- *

A transfer function is a color component conversion function, defined as - * a single variable, monotonic mathematical function. It is applied to each - * individual component of a color. They are used to perform the mapping - * between linear tristimulus values and non-linear electronic signal value.

- *

The opto-electronic transfer function (OETF or OECF) encodes - * tristimulus values in a scene to a non-linear electronic signal value.

- */ -class ColorSpace { -public: - constexpr ColorSpace( - const Primaries primaries, - const TransferFunction transferFunction, - const WhitePoint whitePoint - ) : mPrimaries(primaries), - mTransferFunction(transferFunction), - mWhitePoint(whitePoint) { - } - - bool operator==(const ColorSpace& rhs) const noexcept { - return mPrimaries == rhs.mPrimaries && - mTransferFunction == rhs.mTransferFunction && - mWhitePoint == rhs.mWhitePoint; - } - - constexpr const Primaries& getPrimaries() const { return mPrimaries; } - constexpr const TransferFunction& getTransferFunction() const { return mTransferFunction; } - constexpr const WhitePoint& getWhitePoint() const { return mWhitePoint; } - -private: - Primaries mPrimaries; - TransferFunction mTransferFunction; - WhitePoint mWhitePoint; -}; - -/** - * Intermediate class used when building a color space using the "-" syntax: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * // Declares a "linear sRGB" color space. - * ColorSpace myColorSpace = Rec709-Linear-sRGB; - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - */ -class PartialColorSpace { -public: - constexpr ColorSpace operator-(const WhitePoint& whitePoint) const { - return { mPrimaries, mTransferFunction, whitePoint }; - } - -private: - constexpr PartialColorSpace( - const Primaries primaries, - const TransferFunction transferFunction - ) : mPrimaries(primaries), - mTransferFunction(transferFunction) { - } - - Primaries mPrimaries; - TransferFunction mTransferFunction; - - friend class Gamut; -}; - -/** - * Defines the chromaticities of the primaries for a color space. The chromaticities - * are expressed as three pairs of xy coordinates (in xyY) for the red, green, and blue - * chromaticities. - */ -class Gamut { -public: - constexpr explicit Gamut(const Primaries primaries) : mPrimaries(primaries) { - } - - constexpr Gamut(float2 r, float2 g, float2 b) : Gamut(Primaries{ r, g, b }) { - } - - constexpr PartialColorSpace operator-(const TransferFunction& transferFunction) const { - return { mPrimaries, transferFunction }; - } - - constexpr const Primaries& getPrimaries() const { return mPrimaries; } - -private: - Primaries mPrimaries; -}; - -//! Rec.709 color gamut, used in the sRGB and DisplayP3 color spaces. -constexpr Gamut Rec709 = {{ 0.640f, 0.330f }, - { 0.300f, 0.600f }, - { 0.150f, 0.060f }}; - -//! Linear transfer function. -constexpr TransferFunction Linear = { 1.0, 0.0, 0.0, 0.0, 1.0 }; - -//! sRGB transfer function. -constexpr TransferFunction sRGB = { 1.0 / 1.055, 0.055 / 1.055, 1.0 / 12.92, 0.04045, 2.4 }; - -//! Standard CIE 1931 2° illuminant D65. This illuminant has a color temperature of 6504K. -constexpr WhitePoint D65 = { 0.31271f, 0.32902f }; - -} // namespace filament::color - -#endif // TNT_FILAMENT_COLOR_SPACE_H diff --git a/windows/include/filament/filament/Engine.h b/windows/include/filament/filament/Engine.h deleted file mode 100644 index 450e780e..00000000 --- a/windows/include/filament/filament/Engine.h +++ /dev/null @@ -1,761 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_FILAMENT_ENGINE_H -#define TNT_FILAMENT_ENGINE_H - -#include - -#include - -namespace utils { -class Entity; -class EntityManager; -class JobSystem; -} // namespace utils - -namespace filament { - -class BufferObject; -class Camera; -class ColorGrading; -class DebugRegistry; -class Fence; -class IndexBuffer; -class SkinningBuffer; -class IndirectLight; -class Material; -class MaterialInstance; -class MorphTargetBuffer; -class Renderer; -class RenderTarget; -class Scene; -class Skybox; -class Stream; -class SwapChain; -class Texture; -class VertexBuffer; -class View; - -class LightManager; -class RenderableManager; -class TransformManager; - -#ifndef FILAMENT_PER_RENDER_PASS_ARENA_SIZE_IN_MB -# define FILAMENT_PER_RENDER_PASS_ARENA_SIZE_IN_MB 3 -#endif - -#ifndef FILAMENT_PER_FRAME_COMMANDS_SIZE_IN_MB -# define FILAMENT_PER_FRAME_COMMANDS_SIZE_IN_MB 2 -#endif - -#ifndef FILAMENT_MIN_COMMAND_BUFFERS_SIZE_IN_MB -# define FILAMENT_MIN_COMMAND_BUFFERS_SIZE_IN_MB 1 -#endif - -#ifndef FILAMENT_COMMAND_BUFFER_SIZE_IN_MB -# define FILAMENT_COMMAND_BUFFER_SIZE_IN_MB (FILAMENT_MIN_COMMAND_BUFFERS_SIZE_IN_MB * 3) -#endif - -/** - * Engine is filament's main entry-point. - * - * An Engine instance main function is to keep track of all resources created by the user and - * manage the rendering thread as well as the hardware renderer. - * - * To use filament, an Engine instance must be created first: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * #include - * using namespace filament; - * - * Engine* engine = Engine::create(); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * Engine essentially represents (or is associated to) a hardware context - * (e.g. an OpenGL ES context). - * - * Rendering typically happens in an operating system's window (which can be full screen), such - * window is managed by a filament.Renderer. - * - * A typical filament render loop looks like this: - * - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * #include - * #include - * #include - * #include - * using namespace filament; - * - * Engine* engine = Engine::create(); - * SwapChain* swapChain = engine->createSwapChain(nativeWindow); - * Renderer* renderer = engine->createRenderer(); - * Scene* scene = engine->createScene(); - * View* view = engine->createView(); - * - * view->setScene(scene); - * - * do { - * // typically we wait for VSYNC and user input events - * if (renderer->beginFrame(swapChain)) { - * renderer->render(view); - * renderer->endFrame(); - * } - * } while (!quit); - * - * engine->destroy(view); - * engine->destroy(scene); - * engine->destroy(renderer); - * engine->destroy(swapChain); - * Engine::destroy(&engine); // clears engine* - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * Resource Tracking - * ================= - * - * Each Engine instance keeps track of all objects created by the user, such as vertex and index - * buffers, lights, cameras, etc... - * The user is expected to free those resources, however, leaked resources are freed when the - * engine instance is destroyed and a warning is emitted in the console. - * - * Thread safety - * ============= - * - * An Engine instance is not thread-safe. The implementation makes no attempt to synchronize - * calls to an Engine instance methods. - * If multi-threading is needed, synchronization must be external. - * - * Multi-threading - * =============== - * - * When created, the Engine instance starts a render thread as well as multiple worker threads, - * these threads have an elevated priority appropriate for rendering, based on the platform's - * best practices. The number of worker threads depends on the platform and is automatically - * chosen for best performance. - * - * On platforms with asymmetric cores (e.g. ARM's Big.Little), Engine makes some educated guesses - * as to which cores to use for the render thread and worker threads. For example, it'll try to - * keep an OpenGL ES thread on a Big core. - * - * Swap Chains - * =========== - * - * A swap chain represents an Operating System's *native* renderable surface. Typically it's a window - * or a view. Because a SwapChain is initialized from a native object, it is given to filament - * as a `void*`, which must be of the proper type for each platform filament is running on. - * - * @see SwapChain - * - * - * @see Renderer - */ -class UTILS_PUBLIC Engine { -public: - using Platform = backend::Platform; - using Backend = backend::Backend; - using DriverConfig = backend::Platform::DriverConfig; - - /** - * Config is used to define the memory footprint used by the engine, such as the - * command buffer size. Config can be used to customize engine requirements based - * on the applications needs. - * - * .perRenderPassArenaSizeMB (default: 3 MiB) - * +--------------------------+ - * | | - * | .perFrameCommandsSizeMB | - * | (default 2 MiB) | - * | | - * +--------------------------+ - * | (froxel, etc...) | - * +--------------------------+ - * - * - * .commandBufferSizeMB (default 3MiB) - * +--------------------------+ - * | .minCommandBufferSizeMB | - * +--------------------------+ - * | .minCommandBufferSizeMB | - * +--------------------------+ - * | .minCommandBufferSizeMB | - * +--------------------------+ - * : : - * : : - * - */ - struct Config { - /** - * Size in MiB of the low-level command buffer arena. - * - * Each new command buffer is allocated from here. If this buffer is too small the program - * might terminate or rendering errors might occur. - * - * This is typically set to minCommandBufferSizeMB * 3, so that up to 3 frames can be - * batched-up at once. - * - * This value affects the application's memory usage. - */ - uint32_t commandBufferSizeMB = FILAMENT_COMMAND_BUFFER_SIZE_IN_MB; - - - /** - * Size in MiB of the per-frame data arena. - * - * This is the main arena used for allocations when preparing a frame. - * e.g.: Froxel data and high-level commands are allocated from this arena. - * - * If this size is too small, the program will abort on debug builds and have undefined - * behavior otherwise. - * - * This value affects the application's memory usage. - */ - uint32_t perRenderPassArenaSizeMB = FILAMENT_PER_RENDER_PASS_ARENA_SIZE_IN_MB; - - - /** - * Size in MiB of the backend's handle arena. - * - * Backends will fallback to slower heap-based allocations when running out of space and - * log this condition. - * - * If 0, then the default value for the given platform is used - * - * This value affects the application's memory usage. - */ - uint32_t driverHandleArenaSizeMB = 0; - - - /** - * Minimum size in MiB of a low-level command buffer. - * - * This is how much space is guaranteed to be available for low-level commands when a new - * buffer is allocated. If this is too small, the engine might have to stall to wait for - * more space to become available, this situation is logged. - * - * This value does not affect the application's memory usage. - */ - uint32_t minCommandBufferSizeMB = FILAMENT_MIN_COMMAND_BUFFERS_SIZE_IN_MB; - - - /** - * Size in MiB of the per-frame high level command buffer. - * - * This buffer is related to the number of draw calls achievable within a frame, if it is - * too small, the program will abort on debug builds and have undefined behavior otherwise. - * - * It is allocated from the 'per-render-pass arena' above. Make sure that at least 1 MiB is - * left in the per-render-pass arena when deciding the size of this buffer. - * - * This value does not affect the application's memory usage. - */ - uint32_t perFrameCommandsSizeMB = FILAMENT_PER_FRAME_COMMANDS_SIZE_IN_MB; - }; - - /** - * Creates an instance of Engine - * - * @param backend Which driver backend to use. - * - * @param platform A pointer to an object that implements Platform. If this is - * provided, then this object is used to create the hardware context - * and expose platform features to it. - * - * If not provided (or nullptr is used), an appropriate Platform - * is created automatically. - * - * All methods of this interface are called from filament's - * render thread, which is different from the main thread. - * - * The lifetime of \p platform must exceed the lifetime of - * the Engine object. - * - * @param sharedGLContext A platform-dependant OpenGL context used as a shared context - * when creating filament's internal context. - * Setting this parameter will force filament to use the OpenGL - * implementation (instead of Vulkan for instance). - * - * @param config A pointer to optional parameters to specify memory size - * configuration options. If nullptr, then defaults used. - * - * @return A pointer to the newly created Engine, or nullptr if the Engine couldn't be created. - * - * nullptr if the GPU driver couldn't be initialized, for instance if it doesn't - * support the right version of OpenGL or OpenGL ES. - * - * @exception utils::PostConditionPanic can be thrown if there isn't enough memory to - * allocate the command buffer. If exceptions are disabled, this condition if fatal and - * this function will abort. - * - * \remark - * This method is thread-safe. - */ - static Engine* create(Backend backend = Backend::DEFAULT, - Platform* platform = nullptr, void* sharedGLContext = nullptr, - const Config* config = nullptr); - -#if UTILS_HAS_THREADING - /** - * A callback used with Engine::createAsync() called once the engine is initialized and it is - * safe to call Engine::getEngine(token). This callback is invoked from an arbitrary worker - * thread. Engine::getEngine() CANNOT be called from that thread, instead it must be called - * from the same thread than Engine::createAsync() was called from. - * - * @param user User provided parameter given in createAsync(). - * - * @param token An opaque token used to call Engine::getEngine(). - */ - using CreateCallback = void(void* user, void* token); - - /** - * Creates an instance of Engine asynchronously - * - * @param callback Callback called once the engine is initialized and it is safe to - * call Engine::getEngine. - * - * @param user A user provided pointer that is given back to callback unmodified. - * - * @param backend Which driver backend to use. - * - * @param platform A pointer to an object that implements Platform. If this is - * provided, then this object is used to create the hardware context - * and expose platform features to it. - * - * If not provided (or nullptr is used), an appropriate Platform - * is created automatically. - * - * All methods of this interface are called from filament's - * render thread, which is different from the main thread. - * - * The lifetime of \p platform must exceed the lifetime of - * the Engine object. - * - * @param sharedGLContext A platform-dependant OpenGL context used as a shared context - * when creating filament's internal context. - * Setting this parameter will force filament to use the OpenGL - * implementation (instead of Vulkan for instance). - * - * @param config A pointer to optional parameters to specify memory size - * configuration options - */ - static void createAsync(CreateCallback callback, void* user, - Backend backend = Backend::DEFAULT, - Platform* platform = nullptr, void* sharedGLContext = nullptr, - const Config* config = nullptr); - - /** - * Retrieve an Engine* from createAsync(). This must be called from the same thread than - * Engine::createAsync() was called from. - * - * @param token An opaque token given in the createAsync() callback function. - * - * @return A pointer to the newly created Engine, or nullptr if the Engine couldn't be created. - * - * @exception utils::PostConditionPanic can be thrown if there isn't enough memory to - * allocate the command buffer. If exceptions are disabled, this condition if fatal and - * this function will abort. - */ - static Engine* getEngine(void* token); -#endif - - /** - * Destroy the Engine instance and all associated resources. - * - * Engine.destroy() should be called last and after all other resources have been destroyed, - * it ensures all filament resources are freed. - * - * Destroy performs the following tasks: - * 1. Destroy all internal software and hardware resources. - * 2. Free all user allocated resources that are not already destroyed and logs a warning. - * This indicates a "leak" in the user's code. - * 3. Terminate the rendering engine's thread. - * - * @param engine A pointer to the filament.Engine* to be destroyed. - * \p engine is cleared upon return. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * #include - * using namespace filament; - * - * Engine* engine = Engine::create(); - * Engine::destroy(&engine); // clears engine* - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * \remark - * This method is thread-safe. - */ - static void destroy(Engine** engine); - - /** - * Destroy the Engine instance and all associated resources. - * - * Engine.destroy() should be called last and after all other resources have been destroyed, - * it ensures all filament resources are freed. - * - * Destroy performs the following tasks: - * 1. Destroy all internal software and hardware resources. - * 2. Free all user allocated resources that are not already destroyed and logs a warning. - * This indicates a "leak" in the user's code. - * 3. Terminate the rendering engine's thread. - * - * @param engine A pointer to the filament.Engine to be destroyed. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * #include - * using namespace filament; - * - * Engine* engine = Engine::create(); - * Engine::destroy(engine); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * \remark - * This method is thread-safe. - */ - static void destroy(Engine* engine); - - using FeatureLevel = backend::FeatureLevel; - - - /** - * Query the feature level supported by the selected backend. - * - * A specific feature level needs to be set before the corresponding features can be used. - * - * @return FeatureLevel supported the selected backend. - * @see setActiveFeatureLevel - */ - FeatureLevel getSupportedFeatureLevel() const noexcept; - - /** - * Activate all features of a given feature level. By default FeatureLevel::FEATURE_LEVEL_1 is - * active. The selected feature level must not be higher than the value returned by - * getActiveFeatureLevel() and it's not possible lower the active feature level. - * - * @param featureLevel the feature level to activate. If featureLevel is lower than - * getActiveFeatureLevel(), the current (higher) feature level is kept. - * If featureLevel is higher than getSupportedFeatureLevel(), an exception - * is thrown, or the program is terminated if exceptions are disabled. - * - * @return the active feature level. - * - * @see getSupportedFeatureLevel - * @see getActiveFeatureLevel - */ - FeatureLevel setActiveFeatureLevel(FeatureLevel featureLevel); - - /** - * Returns the currently active feature level. - * @return currently active feature level - * @see getSupportedFeatureLevel - * @see setActiveFeatureLevel - */ - FeatureLevel getActiveFeatureLevel() const noexcept; - - - /** - * @return EntityManager used by filament - */ - utils::EntityManager& getEntityManager() noexcept; - - /** - * @return RenderableManager reference - */ - RenderableManager& getRenderableManager() noexcept; - - /** - * @return LightManager reference - */ - LightManager& getLightManager() noexcept; - - /** - * @return TransformManager reference - */ - TransformManager& getTransformManager() noexcept; - - /** - * Helper to enable accurate translations. - * If you need this Engine to handle a very large world space, one way to achieve this - * automatically is to enable accurate translations in the TransformManager. This helper - * provides a convenient way of doing that. - * This is typically called once just after creating the Engine. - */ - void enableAccurateTranslations() noexcept; - - /** - * Enables or disables automatic instancing of render primitives. Instancing of render - * primitives can greatly reduce CPU overhead but requires the instanced primitives to be - * identical (i.e. use the same geometry) and use the same MaterialInstance. If it is known - * that the scene doesn't contain any identical primitives, automatic instancing can have some - * overhead and it is then best to disable it. - * - * Disabled by default. - * - * @param enable true to enable, false to disable automatic instancing. - * - * @see RenderableManager - * @see MaterialInstance - */ - void setAutomaticInstancingEnabled(bool enable) noexcept; - - /** - * @return true if automatic instancing is enabled, false otherwise. - * @see setAutomaticInstancingEnabled - */ - bool isAutomaticInstancingEnabled() const noexcept; - - /** - * Creates a SwapChain from the given Operating System's native window handle. - * - * @param nativeWindow An opaque native window handle. e.g.: on Android this is an - * `ANativeWindow*`. - * @param flags One or more configuration flags as defined in `SwapChain`. - * - * @return A pointer to the newly created SwapChain or nullptr if it couldn't be created. - * - * @see Renderer.beginFrame() - */ - SwapChain* createSwapChain(void* nativeWindow, uint64_t flags = 0) noexcept; - - - /** - * Creates a headless SwapChain. - * - * @param width Width of the drawing buffer in pixels. - * @param height Height of the drawing buffer in pixels. - * @param flags One or more configuration flags as defined in `SwapChain`. - * - * @return A pointer to the newly created SwapChain or nullptr if it couldn't be created. - * - * @see Renderer.beginFrame() - */ - SwapChain* createSwapChain(uint32_t width, uint32_t height, uint64_t flags = 0) noexcept; - - /** - * Creates a renderer associated to this engine. - * - * A Renderer is intended to map to a *window* on screen. - * - * @return A pointer to the newly created Renderer or nullptr if it couldn't be created. - */ - Renderer* createRenderer() noexcept; - - /** - * Creates a View. - * - * @return A pointer to the newly created View or nullptr if it couldn't be created. - */ - View* createView() noexcept; - - /** - * Creates a Scene. - * - * @return A pointer to the newly created Scene or nullptr if it couldn't be created. - */ - Scene* createScene() noexcept; - - /** - * Creates a Camera component. - * - * @param entity Entity to add the camera component to. - * @return A pointer to the newly created Camera or nullptr if it couldn't be created. - */ - Camera* createCamera(utils::Entity entity) noexcept; - - /** - * Returns the Camera component of the given entity. - * - * @param entity An entity. - * @return A pointer to the Camera component for this entity or nullptr if the entity didn't - * have a Camera component. The pointer is valid until destroyCameraComponent() - * is called or the entity itself is destroyed. - */ - Camera* getCameraComponent(utils::Entity entity) noexcept; - - /** - * Destroys the Camera component associated with the given entity. - * - * @param entity An entity. - */ - void destroyCameraComponent(utils::Entity entity) noexcept; - - /** - * Creates a Fence. - * - * @return A pointer to the newly created Fence or nullptr if it couldn't be created. - */ - Fence* createFence() noexcept; - - bool destroy(const BufferObject* p); //!< Destroys a BufferObject object. - bool destroy(const VertexBuffer* p); //!< Destroys an VertexBuffer object. - bool destroy(const Fence* p); //!< Destroys a Fence object. - bool destroy(const IndexBuffer* p); //!< Destroys an IndexBuffer object. - bool destroy(const SkinningBuffer* p); //!< Destroys a SkinningBuffer object. - bool destroy(const MorphTargetBuffer* p); //!< Destroys a MorphTargetBuffer object. - bool destroy(const IndirectLight* p); //!< Destroys an IndirectLight object. - - /** - * Destroys a Material object - * @param p the material object to destroy - * @attention All MaterialInstance of the specified material must be destroyed before - * destroying it. - * @exception utils::PreConditionPanic is thrown if some MaterialInstances remain. - * no-op if exceptions are disabled and some MaterialInstances remain. - */ - bool destroy(const Material* p); - bool destroy(const MaterialInstance* p); //!< Destroys a MaterialInstance object. - bool destroy(const Renderer* p); //!< Destroys a Renderer object. - bool destroy(const Scene* p); //!< Destroys a Scene object. - bool destroy(const Skybox* p); //!< Destroys a SkyBox object. - bool destroy(const ColorGrading* p); //!< Destroys a ColorGrading object. - bool destroy(const SwapChain* p); //!< Destroys a SwapChain object. - bool destroy(const Stream* p); //!< Destroys a Stream object. - bool destroy(const Texture* p); //!< Destroys a Texture object. - bool destroy(const RenderTarget* p); //!< Destroys a RenderTarget object. - bool destroy(const View* p); //!< Destroys a View object. - void destroy(utils::Entity e); //!< Destroys all filament-known components from this entity - - /** - * Kicks the hardware thread (e.g. the OpenGL, Vulkan or Metal thread) and blocks until - * all commands to this point are executed. Note that does guarantee that the - * hardware is actually finished. - * - *

This is typically used right after destroying the SwapChain, - * in cases where a guarantee about the SwapChain destruction is needed in a - * timely fashion, such as when responding to Android's - * android.view.SurfaceHolder.Callback.surfaceDestroyed

- */ - void flushAndWait(); - - /** - * Kicks the hardware thread (e.g. the OpenGL, Vulkan or Metal thread) but does not wait - * for commands to be either executed or the hardware finished. - * - *

This is typically used after creating a lot of objects to start draining the command - * queue which has a limited size.

- */ - void flush(); - - /** - * Drains the user callback message queue and immediately execute all pending callbacks. - * - *

Typically this should be called once per frame right after the application's vsync tick, - * and typically just before computing parameters (e.g. object positions) for the next frame. - * This is useful because otherwise callbacks will be executed by filament at a later time, - * which may increase latency in certain applications.

- */ - void pumpMessageQueues(); - - /** - * Returns the default Material. - * - * The default material is 80% white and uses the Material.Shading.LIT shading. - * - * @return A pointer to the default Material instance (a singleton). - */ - const Material* getDefaultMaterial() const noexcept; - - /** - * Returns the resolved backend. - */ - Backend getBackend() const noexcept; - - /** - * Returns the Platform object that belongs to this Engine. - * - * When Engine::create is called with no platform argument, Filament creates an appropriate - * Platform subclass automatically. The specific subclass created depends on the backend and - * OS. For example, when the OpenGL backend is used, the Platform object will be a descendant of - * OpenGLPlatform. - * - * dynamic_cast should be used to cast the returned Platform object into a specific subclass. - * Note that RTTI must be available to use dynamic_cast. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * Platform* platform = engine->getPlatform(); - * // static_cast also works, but more dangerous. - * SpecificPlatform* specificPlatform = dynamic_cast(platform); - * specificPlatform->platformSpecificMethod(); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * When a custom Platform is passed to Engine::create, Filament will use it instead, and this - * method will return it. - * - * @return A pointer to the Platform object that was provided to Engine::create, or the - * Filament-created one. - */ - Platform* getPlatform() const noexcept; - - /** - * Allocate a small amount of memory directly in the command stream. The allocated memory is - * guaranteed to be preserved until the current command buffer is executed - * - * @param size size to allocate in bytes. This should be small (e.g. < 1 KB) - * @param alignment alignment requested - * @return a pointer to the allocated buffer or nullptr if no memory was available. - * - * @note there is no need to destroy this buffer, it will be freed automatically when - * the current command buffer is executed. - */ - void* streamAlloc(size_t size, size_t alignment = alignof(double)) noexcept; - - /** - * Invokes one iteration of the render loop, used only on single-threaded platforms. - * - * This should be called every time the windowing system needs to paint (e.g. at 60 Hz). - */ - void execute(); - - /** - * Retrieves the job system that the Engine has ownership over. - * - * @return JobSystem used by filament - */ - utils::JobSystem& getJobSystem() noexcept; - -#if defined(__EMSCRIPTEN__) - /** - * WebGL only: Tells the driver to reset any internal state tracking if necessary. - * - * This is only useful when integrating an external renderer into Filament on platforms - * like WebGL, where share contexts do not exist. Filament keeps track of the GL - * state it has set (like which texture is bound), and does not re-set that state if - * it does not think it needs to. However, if an external renderer has set different - * state in the mean time, Filament will use that new state unknowingly. - * - * If you are in this situation, call this function - ideally only once per frame, - * immediately after calling Engine::execute(). - */ - void resetBackendState() noexcept; -#endif - - DebugRegistry& getDebugRegistry() noexcept; - -protected: - //! \privatesection - Engine() noexcept = default; - ~Engine() = default; - -public: - //! \privatesection - Engine(Engine const&) = delete; - Engine(Engine&&) = delete; - Engine& operator=(Engine const&) = delete; - Engine& operator=(Engine&&) = delete; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_ENGINE_H diff --git a/windows/include/filament/filament/Exposure.h b/windows/include/filament/filament/Exposure.h deleted file mode 100644 index a1e545f7..00000000 --- a/windows/include/filament/filament/Exposure.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_EXPOSURE_H -#define TNT_FILAMENT_EXPOSURE_H - -#include - -namespace filament { - -class Camera; - -/** - * A series of utilities to compute exposure, exposure value at ISO 100 (EV100), - * luminance and illuminance using a physically-based camera model. - */ -namespace Exposure { - -/** - * Returns the exposure value (EV at ISO 100) of the specified camera. - */ -UTILS_PUBLIC -float ev100(const Camera& camera) noexcept; - -/** - * Returns the exposure value (EV at ISO 100) of the specified exposure parameters. - */ -UTILS_PUBLIC -float ev100(float aperture, float shutterSpeed, float sensitivity) noexcept; - -/** - * Returns the exposure value (EV at ISO 100) for the given average luminance (in @f$ \frac{cd}{m^2} @f$). - */ -UTILS_PUBLIC -float ev100FromLuminance(float luminance) noexcept; - -/** -* Returns the exposure value (EV at ISO 100) for the given illuminance (in lux). -*/ -UTILS_PUBLIC -float ev100FromIlluminance(float illuminance) noexcept; - -/** - * Returns the photometric exposure for the specified camera. - */ -UTILS_PUBLIC -float exposure(const Camera& camera) noexcept; - -/** - * Returns the photometric exposure for the specified exposure parameters. - * This function is equivalent to calling `exposure(ev100(aperture, shutterSpeed, sensitivity))` - * but is slightly faster and offers higher precision. - */ -UTILS_PUBLIC -float exposure(float aperture, float shutterSpeed, float sensitivity) noexcept; - -/** - * Returns the photometric exposure for the given EV100. - */ -UTILS_PUBLIC -float exposure(float ev100) noexcept; - -/** - * Returns the incident luminance in @f$ \frac{cd}{m^2} @f$ for the specified camera acting as a spot meter. - */ -UTILS_PUBLIC -float luminance(const Camera& camera) noexcept; - -/** - * Returns the incident luminance in @f$ \frac{cd}{m^2} @f$ for the specified exposure parameters of - * a camera acting as a spot meter. - * This function is equivalent to calling `luminance(ev100(aperture, shutterSpeed, sensitivity))` - * but is slightly faster and offers higher precision. - */ -UTILS_PUBLIC -float luminance(float aperture, float shutterSpeed, float sensitivity) noexcept; - -/** - * Converts the specified EV100 to luminance in @f$ \frac{cd}{m^2} @f$. - * EV100 is not a measure of luminance, but an EV100 can be used to denote a - * luminance for which a camera would use said EV100 to obtain the nominally - * correct exposure - */ -UTILS_PUBLIC -float luminance(float ev100) noexcept; - -/** - * Returns the illuminance in lux for the specified camera acting as an incident light meter. - */ -UTILS_PUBLIC -float illuminance(const Camera& camera) noexcept; - -/** - * Returns the illuminance in lux for the specified exposure parameters of - * a camera acting as an incident light meter. - * This function is equivalent to calling `illuminance(ev100(aperture, shutterSpeed, sensitivity))` - * but is slightly faster and offers higher precision. - */ -UTILS_PUBLIC -float illuminance(float aperture, float shutterSpeed, float sensitivity) noexcept; - -/** - * Converts the specified EV100 to illuminance in lux. - * EV100 is not a measure of illuminance, but an EV100 can be used to denote an - * illuminance for which a camera would use said EV100 to obtain the nominally - * correct exposure. - */ -UTILS_PUBLIC -float illuminance(float ev100) noexcept; - -} // namespace exposure -} // namespace filament - -#endif // TNT_FILAMENT_EXPOSURE_H diff --git a/windows/include/filament/filament/Fence.h b/windows/include/filament/filament/Fence.h deleted file mode 100644 index f54db873..00000000 --- a/windows/include/filament/filament/Fence.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_FENCE_H -#define TNT_FILAMENT_FENCE_H - -#include - -#include - -#include - -namespace filament { - -/** - * Fence is used to synchronize rendering operations together, with the CPU or with compute. - * - * \note - * Currently Fence only provide client-side synchronization. - * - */ -class UTILS_PUBLIC Fence : public FilamentAPI { -public: - //! Special \p timeout value to disable wait()'s timeout. - static constexpr uint64_t FENCE_WAIT_FOR_EVER = backend::FENCE_WAIT_FOR_EVER; - - //! Error codes for Fence::wait() - using FenceStatus = backend::FenceStatus; - - /** Mode controls the behavior of the command stream when calling wait() - * - * @attention - * It would be unwise to call `wait(..., Mode::DONT_FLUSH)` from the same thread - * the Fence was created, as it would most certainly create a dead-lock. - */ - enum class Mode : uint8_t { - FLUSH, //!< The command stream is flushed - DONT_FLUSH //!< The command stream is not flushed - }; - - /** - * Client-side wait on the Fence. - * - * Blocks the current thread until the Fence signals. - * - * @param mode Whether the command stream is flushed before waiting or not. - * @param timeout Wait time out. Using a \p timeout of 0 is a way to query the state of the fence. - * A \p timeout value of FENCE_WAIT_FOR_EVER is used to disable the timeout. - * @return FenceStatus::CONDITION_SATISFIED on success, - * FenceStatus::TIMEOUT_EXPIRED if the time out expired or - * FenceStatus::ERROR in other cases. - * @see #Mode - */ - FenceStatus wait(Mode mode = Mode::FLUSH, uint64_t timeout = FENCE_WAIT_FOR_EVER); - - /** - * Client-side wait on a Fence and destroy the Fence. - * - * @param fence Fence object to wait on. - * - * @param mode Whether the command stream is flushed before waiting or not. - * - * @return FenceStatus::CONDITION_SATISFIED on success, - * FenceStatus::ERROR otherwise. - */ - static FenceStatus waitAndDestroy(Fence* fence, Mode mode = Mode::FLUSH); -}; - -} // namespace filament - -#endif // TNT_FILAMENT_FENCE_H diff --git a/windows/include/filament/filament/IndexBuffer.h b/windows/include/filament/filament/IndexBuffer.h deleted file mode 100644 index 09b47929..00000000 --- a/windows/include/filament/filament/IndexBuffer.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_INDEXBUFFER_H -#define TNT_FILAMENT_INDEXBUFFER_H - -#include - -#include - -#include - -#include - -#include - -namespace filament { - -class FIndexBuffer; - -class Engine; - -/** - * A buffer containing vertex indices into a VertexBuffer. Indices can be 16 or 32 bit. - * The buffer itself is a GPU resource, therefore mutating the data can be relatively slow. - * Typically these buffers are constant. - * - * It is possible, and even encouraged, to use a single index buffer for several Renderables. - * - * @see VertexBuffer, RenderableManager - */ -class UTILS_PUBLIC IndexBuffer : public FilamentAPI { - struct BuilderDetails; - -public: - using BufferDescriptor = backend::BufferDescriptor; - - /** - * Type of the index buffer - */ - enum class IndexType : uint8_t { - USHORT = uint8_t(backend::ElementType::USHORT), //!< 16-bit indices - UINT = uint8_t(backend::ElementType::UINT), //!< 32-bit indices - }; - - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - Builder() noexcept; - Builder(Builder const& rhs) noexcept; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder const& rhs) noexcept; - Builder& operator=(Builder&& rhs) noexcept; - - /** - * Size of the index buffer in elements. - * @param indexCount Number of indices the IndexBuffer can hold. - * @return A reference to this Builder for chaining calls. - */ - Builder& indexCount(uint32_t indexCount) noexcept; - - /** - * Type of the index buffer, 16-bit or 32-bit. - * @param indexType Type of indices stored in the IndexBuffer. - * @return A reference to this Builder for chaining calls. - */ - Builder& bufferType(IndexType indexType) noexcept; - - /** - * Creates the IndexBuffer object and returns a pointer to it. After creation, the index - * buffer is uninitialized. Use IndexBuffer::setBuffer() to initialize the IndexBuffer. - * - * @param engine Reference to the filament::Engine to associate this IndexBuffer with. - * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. - * - * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of - * memory or other resources. - * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. - * - * @see IndexBuffer::setBuffer - */ - IndexBuffer* build(Engine& engine); - private: - friend class FIndexBuffer; - }; - - /** - * Asynchronously copy-initializes a region of this IndexBuffer from the data provided. - * - * @param engine Reference to the filament::Engine to associate this IndexBuffer with. - * @param buffer A BufferDescriptor representing the data used to initialize the IndexBuffer. - * BufferDescriptor points to raw, untyped data that will be interpreted as - * either 16-bit or 32-bits indices based on the Type of this IndexBuffer. - * @param byteOffset Offset in *bytes* into the IndexBuffer - */ - void setBuffer(Engine& engine, BufferDescriptor&& buffer, uint32_t byteOffset = 0); - - /** - * Returns the size of this IndexBuffer in elements. - * @return The number of indices the IndexBuffer holds. - */ - size_t getIndexCount() const noexcept; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_INDEXBUFFER_H diff --git a/windows/include/filament/filament/IndirectLight.h b/windows/include/filament/filament/IndirectLight.h deleted file mode 100644 index 70448523..00000000 --- a/windows/include/filament/filament/IndirectLight.h +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_INDIRECTLIGHT_H -#define TNT_FILAMENT_INDIRECTLIGHT_H - -#include - -#include - -#include - -namespace filament { - -class Engine; -class Texture; - -class FIndirectLight; - -/** - * IndirectLight is used to simulate environment lighting, a form of global illumination. - * - * Environment lighting has a two components: - * 1. irradiance - * 2. reflections (specular component) - * - * Environments are usually captured as high-resolution HDR equirectangular images and processed - * by the **cmgen** tool to generate the data needed by IndirectLight. - * - * @note - * Currently IndirectLight is intended to be used for "distant probes", that is, to represent - * global illumination from a distant (i.e. at infinity) environment, such as the sky or distant - * mountains. Only a single IndirectLight can be used in a Scene. This limitation will be lifted - * in the future. - * - * Creation and destruction - * ======================== - * - * An IndirectLight object is created using the IndirectLight::Builder and destroyed by calling - * Engine::destroy(const IndirectLight*). - * - * ~~~~~~~~~~~{.cpp} - * filament::Engine* engine = filament::Engine::create(); - * - * filament::IndirectLight* environment = filament::IndirectLight::Builder() - * .reflections(cubemap) - * .build(*engine); - * - * engine->destroy(environment); - * ~~~~~~~~~~~ - * - * - * Irradiance - * ========== - * - * The irradiance represents the light that comes from the environment and shines an - * object's surface. - * - * The irradiance is calculated automatically from the Reflections (see below), and generally - * doesn't need to be provided explicitly. However, it can be provided separately from the - * Reflections as - * [spherical harmonics](https://en.wikipedia.org/wiki/Spherical_harmonics) (SH) of 1, 2 or - * 3 bands, respectively 1, 4 or 9 coefficients. - * - * @note - * Use the **cmgen** tool to generate the `SH` for a given environment. - * - * Reflections - * =========== - * - * The reflections on object surfaces (specular component) is calculated from a specially - * filtered cubemap pyramid generated by the **cmgen** tool. - * - * - * @see Scene, Light, Texture, Skybox - */ -class UTILS_PUBLIC IndirectLight : public FilamentAPI { - struct BuilderDetails; - -public: - - //! Use Builder to construct an IndirectLight object instance - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - Builder() noexcept; - Builder(Builder const& rhs) noexcept; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder const& rhs) noexcept; - Builder& operator=(Builder&& rhs) noexcept; - - /** - * Set the reflections cubemap mipmap chain. - * - * @param cubemap A mip-mapped cubemap generated by **cmgen**. Each cubemap level - * encodes a the irradiance for a roughness level. - * - * @return This Builder, for chaining calls. - * - */ - Builder& reflections(Texture const* cubemap) noexcept; - - /** - * Sets the irradiance as Spherical Harmonics. - * - * The irradiance must be pre-convolved by \f$ \langle n \cdot l \rangle \f$ and - * pre-multiplied by the Lambertian diffuse BRDF \f$ \frac{1}{\pi} \f$ and - * specified as Spherical Harmonics coefficients. - * - * Additionally, these Spherical Harmonics coefficients must be pre-scaled by the - * reconstruction factors \f$ A_{l}^{m} \f$ below. - * - * The final coefficients can be generated using the `cmgen` tool. - * - * The index in the \p sh array is given by: - * - * `index(l, m) = l * (l + 1) + m` - * - * \f$ sh[index(l,m)] = L_{l}^{m} \frac{1}{\pi} A_{l}^{m} \hat{C_{l}} \f$ - * - * index | l | m | \f$ A_{l}^{m} \f$ | \f$ \hat{C_{l}} \f$ | \f$ \frac{1}{\pi} A_{l}^{m}\hat{C_{l}} \f$ | - * :-----:|:---:|:---:|:------------------:|:---------------------:|:--------------------------------------------: - * 0 | 0 | 0 | 0.282095 | 3.1415926 | 0.282095 - * 1 | 1 | -1 | -0.488602 | 2.0943951 | -0.325735 - * 2 | ^ | 0 | 0.488602 | ^ | 0.325735 - * 3 | ^ | 1 | -0.488602 | ^ | -0.325735 - * 4 | 2 | -2 | 1.092548 | 0.785398 | 0.273137 - * 5 | ^ | -1 | -1.092548 | ^ | -0.273137 - * 6 | ^ | 0 | 0.315392 | ^ | 0.078848 - * 7 | ^ | 1 | -1.092548 | ^ | -0.273137 - * 8 | ^ | 2 | 0.546274 | ^ | 0.136569 - * - * - * Only 1, 2 or 3 bands are allowed. - * - * @param bands Number of spherical harmonics bands. Must be 1, 2 or 3. - * @param sh Array containing the spherical harmonics coefficients. - * The size of the array must be \f$ bands^{2} \f$. - * (i.e. 1, 4 or 9 coefficients respectively). - * - * @return This Builder, for chaining calls. - * - * @note - * Because the coefficients are pre-scaled, `sh[0]` is the environment's - * average irradiance. - */ - Builder& irradiance(uint8_t bands, math::float3 const* sh) noexcept; - - /** - * Sets the irradiance from the radiance expressed as Spherical Harmonics. - * - * The radiance must be specified as Spherical Harmonics coefficients \f$ L_{l}^{m} \f$ - * - * The index in the \p sh array is given by: - * - * `index(l, m) = l * (l + 1) + m` - * - * \f$ sh[index(l,m)] = L_{l}^{m} \f$ - * - * index | l | m - * :-----:|:---:|:---: - * 0 | 0 | 0 - * 1 | 1 | -1 - * 2 | ^ | 0 - * 3 | ^ | 1 - * 4 | 2 | -2 - * 5 | ^ | -1 - * 6 | ^ | 0 - * 7 | ^ | 1 - * 8 | ^ | 2 - * - * @param bands Number of spherical harmonics bands. Must be 1, 2 or 3. - * @param sh Array containing the spherical harmonics coefficients. - * The size of the array must be \f$ bands^{2} \f$. - * (i.e. 1, 4 or 9 coefficients respectively). - * - * @return This Builder, for chaining calls. - */ - Builder& radiance(uint8_t bands, math::float3 const* sh) noexcept; - - /** - * Sets the irradiance as a cubemap. - * - * The irradiance can alternatively be specified as a cubemap instead of Spherical - * Harmonics coefficients. It may or may not be more efficient, depending on your - * hardware (essentially, it's trading ALU for bandwidth). - * - * @param cubemap Cubemap representing the Irradiance pre-convolved by - * \f$ \langle n \cdot l \rangle \f$. - * - * @return This Builder, for chaining calls. - * - * @note - * This irradiance cubemap can be generated with the **cmgen** tool. - * - * @see irradiance(uint8_t bands, math::float3 const* sh) - */ - Builder& irradiance(Texture const* cubemap) noexcept; - - /** - * (optional) Environment intensity. - * - * Because the environment is encoded usually relative to some reference, the - * range can be adjusted with this method. - * - * @param envIntensity Scale factor applied to the environment and irradiance such that - * the result is in lux, or lumen/m^2 (default = 30000) - * - * @return This Builder, for chaining calls. - */ - Builder& intensity(float envIntensity) noexcept; - - /** - * Specifies the rigid-body transformation to apply to the IBL. - * - * @param rotation 3x3 rotation matrix. Must be a rigid-body transform. - * - * @return This Builder, for chaining calls. - */ - Builder& rotation(math::mat3f const& rotation) noexcept; - - /** - * Creates the IndirectLight object and returns a pointer to it. - * - * @param engine Reference to the filament::Engine to associate this IndirectLight with. - * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. - * - * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of - * memory or other resources. - * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. - */ - IndirectLight* build(Engine& engine); - - private: - friend class FIndirectLight; - }; - - /** - * Sets the environment's intensity. - * - * Because the environment is encoded usually relative to some reference, the - * range can be adjusted with this method. - * - * @param intensity Scale factor applied to the environment and irradiance such that - * the result is in lux, or lumen/m^2 (default = 30000) - */ - void setIntensity(float intensity) noexcept; - - /** - * Returns the environment's intensity in lux, or lumen/m^2. - */ - float getIntensity() const noexcept; - - /** - * Sets the rigid-body transformation to apply to the IBL. - * - * @param rotation 3x3 rotation matrix. Must be a rigid-body transform. - */ - void setRotation(math::mat3f const& rotation) noexcept; - - /** - * Returns the rigid-body transformation applied to the IBL. - */ - const math::mat3f& getRotation() const noexcept; - - /** - * Returns the associated reflection map, or null if it does not exist. - */ - Texture const* getReflectionsTexture() const noexcept; - - /** - * Returns the associated irradiance map, or null if it does not exist. - */ - Texture const* getIrradianceTexture() const noexcept; - - /** - * Helper to estimate the direction of the dominant light in the environment represented by - * spherical harmonics. - * - * This assumes that there is only a single dominant light (such as the sun in outdoors - * environments), if it's not the case the direction returned will be an average of the - * various lights based on their intensity. - * - * If there are no clear dominant light, as is often the case with low dynamic range (LDR) - * environments, this method may return a wrong or unexpected direction. - * - * The dominant light direction can be used to set a directional light's direction, - * for instance to produce shadows that match the environment. - * - * @param sh 3-band spherical harmonics - * - * @return A unit vector representing the direction of the dominant light - * - * @see LightManager::Builder::direction() - * @see getColorEstimate() - */ - static math::float3 getDirectionEstimate(const math::float3 sh[9]) noexcept; - - /** - * Helper to estimate the color and relative intensity of the environment represented by - * spherical harmonics in a given direction. - * - * This can be used to set the color and intensity of a directional light. In this case - * make sure to multiply this relative intensity by the the intensity of this indirect light. - * - * @param sh 3-band spherical harmonics - * @param direction a unit vector representing the direction of the light to estimate the - * color of. Typically this the value returned by getDirectionEstimate(). - * - * @return A vector of 4 floats where the first 3 components represent the linear color and - * the 4th component represents the intensity of the dominant light - * - * @see LightManager::Builder::color() - * @see LightManager::Builder::intensity() - * @see getDirectionEstimate, getIntensity, setIntensity - */ - static math::float4 getColorEstimate(const math::float3 sh[9], math::float3 direction) noexcept; - - - /** @deprecated use static versions instead */ - UTILS_DEPRECATED - math::float3 getDirectionEstimate() const noexcept; - - /** @deprecated use static versions instead */ - UTILS_DEPRECATED - math::float4 getColorEstimate(math::float3 direction) const noexcept; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_INDIRECTLIGHT_H diff --git a/windows/include/filament/filament/LightManager.h b/windows/include/filament/filament/LightManager.h deleted file mode 100644 index b764fb6b..00000000 --- a/windows/include/filament/filament/LightManager.h +++ /dev/null @@ -1,964 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_FILAMENT_LIGHTMANAGER_H -#define TNT_FILAMENT_LIGHTMANAGER_H - -#include -#include - -#include -#include -#include - -#include - -namespace utils { - class Entity; -} // namespace utils - -namespace filament { - -class Engine; -class FEngine; -class FLightManager; - -/** - * LightManager allows to create a light source in the scene, such as a sun or street lights. - * - * At least one light must be added to a scene in order to see anything - * (unless the Material.Shading.UNLIT is used). - * - * - * Creation and destruction - * ======================== - * - * A Light component is created using the LightManager::Builder and destroyed by calling - * LightManager::destroy(utils::Entity). - * - * ~~~~~~~~~~~{.cpp} - * filament::Engine* engine = filament::Engine::create(); - * utils::Entity sun = utils::EntityManager.get().create(); - * - * filament::LightManager::Builder(Type::SUN) - * .castShadows(true) - * .build(*engine, sun); - * - * engine->getLightManager().destroy(sun); - * ~~~~~~~~~~~ - * - * - * Light types - * =========== - * - * Lights come in three flavors: - * - directional lights - * - point lights - * - spot lights - * - * - * Directional lights - * ------------------ - * - * Directional lights have a direction, but don't have a position. All light rays are - * parallel and come from infinitely far away and from everywhere. Typically a directional light - * is used to simulate the sun. - * - * Directional lights and spot lights are able to cast shadows. - * - * To create a directional light use Type.DIRECTIONAL or Type.SUN, both are similar, but the later - * also draws a sun's disk in the sky and its reflection on glossy objects. - * - * @warning Currently, only a single directional light is supported. If several directional lights - * are added to the scene, the dominant one will be used. - * - * @see Builder.direction(), Builder.sunAngularRadius() - * - * Point lights - * ------------ - * - * Unlike directional lights, point lights have a position but emit light in all directions. - * The intensity of the light diminishes with the inverse square of the distance to the light. - * Builder.falloff() controls distance beyond which the light has no more influence. - * - * A scene can have multiple point lights. - * - * @see Builder.position(), Builder.falloff() - * - * Spot lights - * ----------- - * - * Spot lights are similar to point lights but the light it emits is limited to a cone defined by - * Builder.spotLightCone() and the light's direction. - * - * A spot light is therefore defined by a position, a direction and inner and outer cones. The - * spot light's influence is limited to inside the outer cone. The inner cone defines the light's - * falloff attenuation. - * - * A physically correct spot light is a little difficult to use because changing the outer angle - * of the cone changes the illumination levels, as the same amount of light is spread over a - * changing volume. The coupling of illumination and the outer cone means that an artist cannot - * tweak the influence cone of a spot light without also changing the perceived illumination. - * It therefore makes sense to provide artists with a parameter to disable this coupling. This - * is the difference between Type.FOCUSED_SPOT and Type.SPOT. - * - * @see Builder.position(), Builder.direction(), Builder.falloff(), Builder.spotLightCone() - * - * Performance considerations - * ========================== - * - * Generally, adding lights to the scene hurts performance, however filament is designed to be - * able to handle hundreds of lights in a scene under certain conditions. Here are some tips - * to keep performances high. - * - * 1. Prefer spot lights to point lights and use the smallest outer cone angle possible. - * - * 2. Use the smallest possible falloff distance for point and spot lights. - * Performance is very sensitive to overlapping lights. The falloff distance essentially - * defines a sphere of influence for the light, so try to position point and spot lights - * such that they don't overlap too much. - * - * On the other hand, a scene can contain hundreds of non overlapping lights without - * incurring a significant overhead. - * - */ -class UTILS_PUBLIC LightManager : public FilamentAPI { - struct BuilderDetails; - -public: - using Instance = utils::EntityInstance; - - /** - * Returns the number of component in the LightManager, not that component are not - * guaranteed to be active. Use the EntityManager::isAlive() before use if needed. - * - * @return number of component in the LightManager - */ - size_t getComponentCount() const noexcept; - - /** - * Returns the list of Entity for all components. Use getComponentCount() to know the size - * of the list. - * @return a pointer to Entity - */ - utils::Entity const* getEntities() const noexcept; - - /** - * Returns whether a particular Entity is associated with a component of this LightManager - * @param e An Entity. - * @return true if this Entity has a component associated with this manager. - */ - bool hasComponent(utils::Entity e) const noexcept; - - /** - * Gets an Instance representing the Light component associated with the given Entity. - * @param e An Entity. - * @return An Instance object, which represents the Light component associated with the Entity e. - * @note Use Instance::isValid() to make sure the component exists. - * @see hasComponent() - */ - Instance getInstance(utils::Entity e) const noexcept; - - // destroys this component from the given entity - void destroy(utils::Entity e) noexcept; - - - //! Denotes the type of the light being created. - enum class Type : uint8_t { - SUN, //!< Directional light that also draws a sun's disk in the sky. - DIRECTIONAL, //!< Directional light, emits light in a given direction. - POINT, //!< Point light, emits light from a position, in all directions. - FOCUSED_SPOT, //!< Physically correct spot light. - SPOT, //!< Spot light with coupling of outer cone and illumination disabled. - }; - - /** - * Control the quality / performance of the shadow map associated to this light - */ - struct ShadowOptions { - /** Size of the shadow map in texels. Must be a power-of-two and larger or equal to 8. */ - uint32_t mapSize = 1024; - - /** - * Number of shadow cascades to use for this light. Must be between 1 and 4 (inclusive). - * A value greater than 1 turns on cascaded shadow mapping (CSM). - * Only applicable to Type.SUN or Type.DIRECTIONAL lights. - * - * When using shadow cascades, cascadeSplitPositions must also be set. - * - * @see ShadowOptions::cascadeSplitPositions - */ - uint8_t shadowCascades = 1; - - /** - * The split positions for shadow cascades. - * - * Cascaded shadow mapping (CSM) partitions the camera frustum into cascades. These values - * determine the planes along the camera's Z axis to split the frustum. The camera near - * plane is represented by 0.0f and the far plane represented by 1.0f. - * - * For example, if using 4 cascades, these values would set a uniform split scheme: - * { 0.25f, 0.50f, 0.75f } - * - * For N cascades, N - 1 split positions will be read from this array. - * - * Filament provides utility methods inside LightManager::ShadowCascades to help set these - * values. For example, to use a uniform split scheme: - * - * ~~~~~~~~~~~{.cpp} - * LightManager::ShadowCascades::computeUniformSplits(options.splitPositions, 4); - * ~~~~~~~~~~~ - * - * @see ShadowCascades::computeUniformSplits - * @see ShadowCascades::computeLogSplits - * @see ShadowCascades::computePracticalSplits - */ - float cascadeSplitPositions[3] = { 0.125f, 0.25f, 0.50f }; - - /** Constant bias in world units (e.g. meters) by which shadows are moved away from the - * light. 1mm by default. - * This is ignored when the View's ShadowType is set to VSM. - */ - float constantBias = 0.001f; - - /** Amount by which the maximum sampling error is scaled. The resulting value is used - * to move the shadow away from the fragment normal. Should be 1.0. - * This is ignored when the View's ShadowType is set to VSM. - */ - float normalBias = 1.0f; - - /** Distance from the camera after which shadows are clipped. This is used to clip - * shadows that are too far and wouldn't contribute to the scene much, improving - * performance and quality. This value is always positive. - * Use 0.0f to use the camera far distance. - */ - float shadowFar = 0.0f; - - /** Optimize the quality of shadows from this distance from the camera. Shadows will - * be rendered in front of this distance, but the quality may not be optimal. - * This value is always positive. Use 0.0f to use the camera near distance. - * The default of 1m works well with many scenes. The quality of shadows may drop - * rapidly when this value decreases. - */ - float shadowNearHint = 1.0f; - - /** Optimize the quality of shadows in front of this distance from the camera. Shadows - * will be rendered behind this distance, but the quality may not be optimal. - * This value is always positive. Use std::numerical_limits::infinity() to - * use the camera far distance. - */ - float shadowFarHint = 100.0f; - - /** - * Controls whether the shadow map should be optimized for resolution or stability. - * When set to true, all resolution enhancing features that can affect stability are - * disabling, resulting in significantly lower resolution shadows, albeit stable ones. - * - * Setting this flag to true always disables LiSPSM (see below). - * - * @see lispsm - */ - bool stable = false; - - /** - * LiSPSM, or light-space perspective shadow-mapping is a technique allowing to better - * optimize the use of the shadow-map texture. When enabled the effective resolution of - * shadows is greatly improved and yields result similar to using cascades without the - * extra cost. LiSPSM comes with some drawbacks however, in particular it is incompatible - * with blurring because it effectively affects the blur kernel size. - * - * Blurring is only an issue when using ShadowType::VSM with a large blur or with - * ShadowType::PCSS however. - * - * If these blurring artifacts become problematic, this flag can be used to disable LiSPSM. - * - * @see stable - */ - bool lispsm = true; - - /** - * Constant bias in depth-resolution units by which shadows are moved away from the - * light. The default value of 0.5 is used to round depth values up. - * Generally this value shouldn't be changed or at least be small and positive. - * This is ignored when the View's ShadowType is set to VSM. - */ - float polygonOffsetConstant = 0.5f; - - /** - * Bias based on the change in depth in depth-resolution units by which shadows are moved - * away from the light. The default value of 2.0 works well with SHADOW_SAMPLING_PCF_LOW. - * Generally this value is between 0.5 and the size in texel of the PCF filter. - * Setting this value correctly is essential for LISPSM shadow-maps. - * This is ignored when the View's ShadowType is set to VSM. - */ - float polygonOffsetSlope = 2.0f; - - /** - * Whether screen-space contact shadows are used. This applies regardless of whether a - * Renderable is a shadow caster. - * Screen-space contact shadows are typically useful in large scenes. - * (off by default) - */ - bool screenSpaceContactShadows = false; - - /** - * Number of ray-marching steps for screen-space contact shadows (8 by default). - * - * CAUTION: this parameter is ignored for all lights except the directional/sun light, - * all other lights use the same value set for the directional/sun light. - * - */ - uint8_t stepCount = 8; - - /** - * Maximum shadow-occluder distance for screen-space contact shadows (world units). - * (30 cm by default) - * - * CAUTION: this parameter is ignored for all lights except the directional/sun light, - * all other lights use the same value set for the directional/sun light. - * - */ - float maxShadowDistance = 0.3f; - - /** - * Options available when the View's ShadowType is set to VSM. - * - * @warning This API is still experimental and subject to change. - * @see View::setShadowType - */ - struct Vsm { - /** - * When elvsm is set to true, "Exponential Layered VSM without Layers" are used. It is - * an improvement to the default EVSM which suffers important light leaks. Enabling - * ELVSM for a single shadowmap doubles the memory usage of all shadow maps. - * ELVSM is mostly useful when large blurs are used. - */ - bool elvsm = false; - - /** - * Blur width for the VSM blur. Zero do disable. - * The maximum value is 125. - */ - float blurWidth = 0.0f; - } vsm; - - /** - * Light bulb radius used for soft shadows. Currently this is only used when DPCF or PCSS is - * enabled. (2cm by default). - */ - float shadowBulbRadius = 0.02f; - }; - - struct ShadowCascades { - /** - * Utility method to compute ShadowOptions::cascadeSplitPositions according to a uniform - * split scheme. - * - * @param splitPositions a float array of at least size (cascades - 1) to write the split - * positions into - * @param cascades the number of shadow cascades, at most 4 - */ - static void computeUniformSplits(float* splitPositions, uint8_t cascades); - - /** - * Utility method to compute ShadowOptions::cascadeSplitPositions according to a logarithmic - * split scheme. - * - * @param splitPositions a float array of at least size (cascades - 1) to write the split - * positions into - * @param cascades the number of shadow cascades, at most 4 - * @param near the camera near plane - * @param far the camera far plane - */ - static void computeLogSplits(float* splitPositions, uint8_t cascades, - float near, float far); - - /** - * Utility method to compute ShadowOptions::cascadeSplitPositions according to a practical - * split scheme. - * - * The practical split scheme uses uses a lambda value to interpolate between the logarithmic - * and uniform split schemes. Start with a lambda value of 0.5f and adjust for your scene. - * - * See: Zhang et al 2006, "Parallel-split shadow maps for large-scale virtual environments" - * - * @param splitPositions a float array of at least size (cascades - 1) to write the split - * positions into - * @param cascades the number of shadow cascades, at most 4 - * @param near the camera near plane - * @param far the camera far plane - * @param lambda a float in the range [0, 1] that interpolates between log and - * uniform split schemes - */ - static void computePracticalSplits(float* splitPositions, uint8_t cascades, - float near, float far, float lambda); - }; - - //! Use Builder to construct a Light object instance - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - /** - * Creates a light builder and set the light's #Type. - * - * @param type #Type of Light object to create. - */ - explicit Builder(Type type) noexcept; - Builder(Builder const& rhs) noexcept; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder const& rhs) noexcept; - Builder& operator=(Builder&& rhs) noexcept; - - /** - * Enables or disables a light channel. Light channel 0 is enabled by default. - * - * @param channel Light channel to enable or disable, between 0 and 7. - * @param enable Whether to enable or disable the light channel. - * @return This Builder, for chaining calls. - */ - Builder& lightChannel(unsigned int channel, bool enable = true) noexcept; - - /** - * Whether this Light casts shadows (disabled by default) - * - * @param enable Enables or disables casting shadows from this Light. - * - * @return This Builder, for chaining calls. - */ - Builder& castShadows(bool enable) noexcept; - - /** - * Sets the shadow-map options for this light. - * - * @return This Builder, for chaining calls. - */ - Builder& shadowOptions(const ShadowOptions& options) noexcept; - - /** - * Whether this light casts light (enabled by default) - * - * @param enable Enables or disables lighting from this Light. - * - * @return This Builder, for chaining calls. - * - * @note - * In some situations it can be useful to have a light in the scene that doesn't - * actually emit light, but does cast shadows. - */ - Builder& castLight(bool enable) noexcept; - - /** - * Sets the initial position of the light in world space. - * - * @param position Light's position in world space. The default is at the origin. - * - * @return This Builder, for chaining calls. - * - * @note - * The Light's position is ignored for directional lights (Type.DIRECTIONAL or Type.SUN) - */ - Builder& position(const math::float3& position) noexcept; - - /** - * Sets the initial direction of a light in world space. - * - * @param direction Light's direction in world space. Should be a unit vector. - * The default is {0,-1,0}. - * - * @return This Builder, for chaining calls. - * - * @note - * The Light's direction is ignored for Type.POINT lights. - */ - Builder& direction(const math::float3& direction) noexcept; - - /** - * Sets the initial color of a light. - * - * @param color Color of the light specified in the linear sRGB color-space. - * The default is white {1,1,1}. - * - * @return This Builder, for chaining calls. - */ - Builder& color(const LinearColor& color) noexcept; - - /** - * Sets the initial intensity of a light. - * @param intensity This parameter depends on the Light.Type: - * - For directional lights, it specifies the illuminance in *lux* - * (or *lumen/m^2*). - * - For point lights and spot lights, it specifies the luminous power - * in *lumen*. - * - * @return This Builder, for chaining calls. - * - * For example, the sun's illuminance is about 100,000 lux. - * - * This method overrides any prior calls to intensity or intensityCandela. - * - */ - Builder& intensity(float intensity) noexcept; - - /** - * Sets the initial intensity of a spot or point light in candela. - * - * @param intensity Luminous intensity in *candela*. - * - * @return This Builder, for chaining calls. - * - * @note - * This method is equivalent to calling intensity(float intensity) for directional lights - * (Type.DIRECTIONAL or Type.SUN). - * - * This method overrides any prior calls to intensity or intensityCandela. - */ - Builder& intensityCandela(float intensity) noexcept; - - /** - * Sets the initial intensity of a light in watts. - * - * @param watts Energy consumed by a lightbulb. It is related to the energy produced - * and ultimately the brightness by the \p efficiency parameter. - * This value is often available on the packaging of commercial - * lightbulbs. - * - * @param efficiency Efficiency in percent. This depends on the type of lightbulb used. - * - * Lightbulb type | Efficiency - * ----------------:|-----------: - * Incandescent | 2.2% - * Halogen | 7.0% - * LED | 8.7% - * Fluorescent | 10.7% - * - * @return This Builder, for chaining calls. - * - * - * @note - * This call is equivalent to `Builder::intensity(efficiency * 683 * watts);` - * - * This method overrides any prior calls to intensity or intensityCandela. - */ - Builder& intensity(float watts, float efficiency) noexcept; - - /** - * Set the falloff distance for point lights and spot lights. - * - * At the falloff distance, the light has no more effect on objects. - * - * The falloff distance essentially defines a *sphere of influence* around the light, and - * therefore has an impact on performance. Larger falloffs might reduce performance - * significantly, especially when many lights are used. - * - * Try to avoid having a large number of light's spheres of influence overlap. - * - * @param radius Falloff distance in world units. Default is 1 meter. - * - * @return This Builder, for chaining calls. - * - * @note - * The Light's falloff is ignored for directional lights (Type.DIRECTIONAL or Type.SUN) - */ - Builder& falloff(float radius) noexcept; - - /** - * Defines a spot light'st angular falloff attenuation. - * - * A spot light is defined by a position, a direction and two cones, \p inner and \p outer. - * These two cones are used to define the angular falloff attenuation of the spot light - * and are defined by the angle from the center axis to where the falloff begins (i.e. - * cones are defined by their half-angle). - * - * Both inner and outer are silently clamped to a minimum value of 0.5 degrees - * (~0.00873 radians) to avoid floating-point precision issues during rendering. - * - * @param inner inner cone angle in *radians* between 0.00873 and \p outer - * @param outer outer cone angle in *radians* between 0.00873 inner and @f$ \pi/2 @f$ - * @return This Builder, for chaining calls. - * - * @note - * The spot light cone is ignored for directional and point lights. - * - * @see Type.SPOT, Type.FOCUSED_SPOT - */ - Builder& spotLightCone(float inner, float outer) noexcept; - - /** - * Defines the angular radius of the sun, in degrees, between 0.25° and 20.0° - * - * The Sun as seen from Earth has an angular size of 0.526° to 0.545° - * - * @param angularRadius sun's radius in degree. Default is 0.545°. - * - * @return This Builder, for chaining calls. - */ - Builder& sunAngularRadius(float angularRadius) noexcept; - - /** - * Defines the halo radius of the sun. The radius of the halo is defined as a - * multiplier of the sun angular radius. - * - * @param haloSize radius multiplier. Default is 10.0. - * - * @return This Builder, for chaining calls. - */ - Builder& sunHaloSize(float haloSize) noexcept; - - /** - * Defines the halo falloff of the sun. The falloff is a dimensionless number - * used as an exponent. - * - * @param haloFalloff halo falloff. Default is 80.0. - * - * @return This Builder, for chaining calls. - */ - Builder& sunHaloFalloff(float haloFalloff) noexcept; - - enum Result { Error = -1, Success = 0 }; - - /** - * Adds the Light component to an entity. - * - * @param engine Reference to the filament::Engine to associate this light with. - * @param entity Entity to add the light component to. - * @return Success if the component was created successfully, Error otherwise. - * - * If exceptions are disabled and an error occurs, this function is a no-op. - * Success can be checked by looking at the return value. - * - * If this component already exists on the given entity, it is first destroyed as if - * destroy(utils::Entity e) was called. - * - * @warning - * Currently, only 2048 lights can be created on a given Engine. - * - * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of - * memory or other resources. - * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. - */ - Result build(Engine& engine, utils::Entity entity); - - private: - friend class FEngine; - friend class FLightManager; - }; - - static constexpr float EFFICIENCY_INCANDESCENT = 0.0220f; //!< Typical efficiency of an incandescent light bulb (2.2%) - static constexpr float EFFICIENCY_HALOGEN = 0.0707f; //!< Typical efficiency of an halogen light bulb (7.0%) - static constexpr float EFFICIENCY_FLUORESCENT = 0.0878f; //!< Typical efficiency of a fluorescent light bulb (8.7%) - static constexpr float EFFICIENCY_LED = 0.1171f; //!< Typical efficiency of a LED light bulb (11.7%) - - Type getType(Instance i) const noexcept; - - /** - * Helper function that returns if a light is a directional light - * - * @param i Instance of the component obtained from getInstance(). - * @return true is this light is a type of directional light - */ - inline bool isDirectional(Instance i) const noexcept { - Type type = getType(i); - return type == Type::DIRECTIONAL || type == Type::SUN; - } - - /** - * Helper function that returns if a light is a point light - * - * @param i Instance of the component obtained from getInstance(). - * @return true is this light is a type of point light - */ - inline bool isPointLight(Instance i) const noexcept { - return getType(i) == Type::POINT; - } - - /** - * Helper function that returns if a light is a spot light - * - * @param i Instance of the component obtained from getInstance(). - * @return true is this light is a type of spot light - */ - inline bool isSpotLight(Instance i) const noexcept { - Type type = getType(i); - return type == Type::SPOT || type == Type::FOCUSED_SPOT; - } - - /** - * Enables or disables a light channel. Light channel 0 is enabled by default. - * @param channel light channel to enable or disable, between 0 and 7. - * @param enable whether to enable (true) or disable (false) the specified light channel. - */ - void setLightChannel(Instance i, unsigned int channel, bool enable = true) noexcept; - - /** - * Returns whether a light channel is enabled on a specified light. - * @param i Instance of the component obtained from getInstance(). - * @param channel Light channel to query - * @return true if the light channel is enabled, false otherwise - */ - bool getLightChannel(Instance i, unsigned int channel) const noexcept; - - /** - * Dynamically updates the light's position. - * - * @param i Instance of the component obtained from getInstance(). - * @param position Light's position in world space. The default is at the origin. - * - * @see Builder.position() - */ - void setPosition(Instance i, const math::float3& position) noexcept; - - //! returns the light's position in world space - const math::float3& getPosition(Instance i) const noexcept; - - /** - * Dynamically updates the light's direction - * - * @param i Instance of the component obtained from getInstance(). - * @param direction Light's direction in world space. Should be a unit vector. - * The default is {0,-1,0}. - * - * @see Builder.direction() - */ - void setDirection(Instance i, const math::float3& direction) noexcept; - - //! returns the light's direction in world space - const math::float3& getDirection(Instance i) const noexcept; - - /** - * Dynamically updates the light's hue as linear sRGB - * - * @param i Instance of the component obtained from getInstance(). - * @param color Color of the light specified in the linear sRGB color-space. - * The default is white {1,1,1}. - * - * @see Builder.color(), getInstance() - */ - void setColor(Instance i, const LinearColor& color) noexcept; - - /** - * @param i Instance of the component obtained from getInstance(). - * @return the light's color in linear sRGB - */ - const math::float3& getColor(Instance i) const noexcept; - - /** - * Dynamically updates the light's intensity. The intensity can be negative. - * - * @param i Instance of the component obtained from getInstance(). - * @param intensity This parameter depends on the Light.Type: - * - For directional lights, it specifies the illuminance in *lux* - * (or *lumen/m^2*). - * - For point lights and spot lights, it specifies the luminous power - * in *lumen*. - * - * @see Builder.intensity() - */ - void setIntensity(Instance i, float intensity) noexcept; - - /** - * Dynamically updates the light's intensity. The intensity can be negative. - * - * @param i Instance of the component obtained from getInstance(). - * @param watts Energy consumed by a lightbulb. It is related to the energy produced - * and ultimately the brightness by the \p efficiency parameter. - * This value is often available on the packaging of commercial - * lightbulbs. - * @param efficiency Efficiency in percent. This depends on the type of lightbulb used. - * - * Lightbulb type | Efficiency - * ----------------:|-----------: - * Incandescent | 2.2% - * Halogen | 7.0% - * LED | 8.7% - * Fluorescent | 10.7% - * - * @see Builder.intensity(float watts, float efficiency) - */ - void setIntensity(Instance i, float watts, float efficiency) noexcept { - setIntensity(i, watts * 683.0f * efficiency); - } - - /** - * Dynamically updates the light's intensity in candela. The intensity can be negative. - * - * @param i Instance of the component obtained from getInstance(). - * @param intensity Luminous intensity in *candela*. - * - * @note - * This method is equivalent to calling setIntensity(float intensity) for directional lights - * (Type.DIRECTIONAL or Type.SUN). - * - * @see Builder.intensityCandela(float intensity) - */ - void setIntensityCandela(Instance i, float intensity) noexcept; - - /** - * returns the light's luminous intensity in candela. - * - * @param i Instance of the component obtained from getInstance(). - * - * @note for Type.FOCUSED_SPOT lights, the returned value depends on the \p outer cone angle. - * - * @return luminous intensity in candela. - */ - float getIntensity(Instance i) const noexcept; - - /** - * Set the falloff distance for point lights and spot lights. - * - * @param i Instance of the component obtained from getInstance(). - * @param radius falloff distance in world units. Default is 1 meter. - * - * @see Builder.falloff() - */ - void setFalloff(Instance i, float radius) noexcept; - - /** - * returns the falloff distance of this light. - * @param i Instance of the component obtained from getInstance(). - * @return the falloff distance of this light. - */ - float getFalloff(Instance i) const noexcept; - - /** - * Dynamically updates a spot light's cone as angles - * - * @param i Instance of the component obtained from getInstance(). - * @param inner inner cone angle in *radians* between 0.00873 and outer - * @param outer outer cone angle in *radians* between 0.00873 and pi/2 - * - * @see Builder.spotLightCone() - */ - void setSpotLightCone(Instance i, float inner, float outer) noexcept; - - /** - * returns the outer cone angle in *radians* between inner and pi/2. - * @param i Instance of the component obtained from getInstance(). - * @return the outer cone angle of this light. - */ - float getSpotLightOuterCone(Instance i) const noexcept; - - /** - * returns the inner cone angle in *radians* between 0 and pi/2. - * - * The value is recomputed from the initial values, thus is not precisely - * the same as the one passed to setSpotLightCone() or Builder.spotLightCone(). - * - * @param i Instance of the component obtained from getInstance(). - * @return the inner cone angle of this light. - */ - float getSpotLightInnerCone(Instance i) const noexcept; - - /** - * Dynamically updates the angular radius of a Type.SUN light - * - * The Sun as seen from Earth has an angular size of 0.526° to 0.545° - * - * @param i Instance of the component obtained from getInstance(). - * @param angularRadius sun's radius in degrees. Default is 0.545°. - */ - void setSunAngularRadius(Instance i, float angularRadius) noexcept; - - /** - * returns the angular radius if the sun in degrees. - * @param i Instance of the component obtained from getInstance(). - * @return the angular radius if the sun in degrees. - */ - float getSunAngularRadius(Instance i) const noexcept; - - /** - * Dynamically updates the halo radius of a Type.SUN light. The radius - * of the halo is defined as a multiplier of the sun angular radius. - * - * @param i Instance of the component obtained from getInstance(). - * @param haloSize radius multiplier. Default is 10.0. - */ - void setSunHaloSize(Instance i, float haloSize) noexcept; - - /** - * returns the halo size of a Type.SUN light as a multiplier of the - * sun angular radius. - * @param i Instance of the component obtained from getInstance(). - * @return the halo size - */ - float getSunHaloSize(Instance i) const noexcept; - - /** - * Dynamically updates the halo falloff of a Type.SUN light. The falloff - * is a dimensionless number used as an exponent. - * - * @param i Instance of the component obtained from getInstance(). - * @param haloFalloff halo falloff. Default is 80.0. - */ - void setSunHaloFalloff(Instance i, float haloFalloff) noexcept; - - /** - * returns the halo falloff of a Type.SUN light as a dimensionless value. - * @param i Instance of the component obtained from getInstance(). - * @return the halo falloff - */ - float getSunHaloFalloff(Instance i) const noexcept; - - /** - * returns the shadow-map options for a given light - * @param i Instance of the component obtained from getInstance(). - * @return A ShadowOption structure - */ - ShadowOptions const& getShadowOptions(Instance i) const noexcept; - - /** - * sets the shadow-map options for a given light - * @param i Instance of the component obtained from getInstance(). - * @param options A ShadowOption structure - */ - void setShadowOptions(Instance i, ShadowOptions const& options) noexcept; - - /** - * Whether this Light casts shadows (disabled by default) - * - * @param i Instance of the component obtained from getInstance(). - * @param shadowCaster Enables or disables casting shadows from this Light. - * - * @warning - * - Only a Type.DIRECTIONAL, Type.SUN, Type.SPOT, or Type.FOCUSED_SPOT light can cast shadows - */ - void setShadowCaster(Instance i, bool shadowCaster) noexcept; - - /** - * returns whether this light casts shadows. - * @param i Instance of the component obtained from getInstance(). - */ - bool isShadowCaster(Instance i) const noexcept; - - /** - * Helper to process all components with a given function - * @tparam F a void(Entity entity, Instance instance) - * @param func a function of type F - */ - template - void forEachComponent(F func) noexcept { - utils::Entity const* const pEntity = getEntities(); - for (size_t i = 0, c = getComponentCount(); i < c; i++) { - // Instance 0 is the invalid instance - func(pEntity[i], Instance(i + 1)); - } - } -}; - -} // namespace filament - -#endif // TNT_FILAMENT_LIGHTMANAGER_H diff --git a/windows/include/filament/filament/Material.h b/windows/include/filament/filament/Material.h deleted file mode 100644 index 602df4da..00000000 --- a/windows/include/filament/filament/Material.h +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_FILAMENT_MATERIAL_H -#define TNT_FILAMENT_MATERIAL_H - -#include -#include -#include -#include - -#include - -#include - -#include - -#include - -namespace utils { - class CString; -} // namespace utils - -namespace filament { - -class Texture; -class TextureSampler; - -class FEngine; -class FMaterial; - -class Engine; - -class UTILS_PUBLIC Material : public FilamentAPI { - struct BuilderDetails; - -public: - using BlendingMode = BlendingMode; - using Shading = Shading; - using Interpolation = Interpolation; - using VertexDomain = VertexDomain; - using TransparencyMode = TransparencyMode; - - using ParameterType = backend::UniformType; - using Precision = backend::Precision; - using SamplerType = backend::SamplerType; - using SamplerFormat = backend::SamplerFormat; - using CullingMode = backend::CullingMode; - using ShaderModel = backend::ShaderModel; - using SubpassType = backend::SubpassType; - - /** - * Holds information about a material parameter. - */ - struct ParameterInfo { - //! Name of the parameter. - const char* name; - //! Whether the parameter is a sampler (texture). - bool isSampler; - //! Whether the parameter is a subpass type. - bool isSubpass; - union { - //! Type of the parameter if the parameter is not a sampler. - ParameterType type; - //! Type of the parameter if the parameter is a sampler. - SamplerType samplerType; - //! Type of the parameter if the parameter is a subpass. - SubpassType subpassType; - }; - //! Size of the parameter when the parameter is an array. - uint32_t count; - //! Requested precision of the parameter. - Precision precision; - }; - - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - Builder() noexcept; - Builder(Builder const& rhs) noexcept; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder const& rhs) noexcept; - Builder& operator=(Builder&& rhs) noexcept; - - /** - * Specifies the material data. The material data is a binary blob produced by - * libfilamat or by matc. - * - * @param payload Pointer to the material data, must stay valid until build() is called. - * @param size Size of the material data pointed to by "payload" in bytes. - */ - Builder& package(const void* payload, size_t size); - - template - using is_supported_constant_parameter_t = typename std::enable_if< - std::is_same::value || - std::is_same::value || - std::is_same::value>::type; - - /** - * Specialize a constant parameter specified in the material definition with a concrete - * value for this material. Once build() is called, this constant cannot be changed. - * Will throw an exception if the name does not match a constant specified in the - * material definition or if the type provided does not match. - * - * @tparam T The type of constant parameter, either int32_t, float, or bool. - * @param name The name of the constant parameter specified in the material definition, such - * as "myConstant". - * @param nameLength Length in `char` of the name parameter. - * @param value The value to use for the constant parameter, must match the type specified - * in the material definition. - */ - template> - Builder& constant(const char* name, size_t nameLength, T value); - - /** inline helper to provide the constant name as a null-terminated C string */ - template> - inline Builder& constant(const char* name, T value) { - return constant(name, strlen(name), value); - } - - /** - * Creates the Material object and returns a pointer to it. - * - * @param engine Reference to the filament::Engine to associate this Material with. - * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. - * - * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of - * memory or other resources. - * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. - */ - Material* build(Engine& engine); - private: - friend class FMaterial; - }; - - /** - * Creates a new instance of this material. Material instances should be freed using - * Engine::destroy(const MaterialInstance*). - * - * @param name Optional name to associate with the given material instance. If this is null, - * then the instance inherits the material's name. - * - * @return A pointer to the new instance. - */ - MaterialInstance* createInstance(const char* name = nullptr) const noexcept; - - //! Returns the name of this material as a null-terminated string. - const char* getName() const noexcept; - - //! Returns the shading model of this material. - Shading getShading() const noexcept; - - //! Returns the interpolation mode of this material. This affects how variables are interpolated. - Interpolation getInterpolation() const noexcept; - - //! Returns the blending mode of this material. - BlendingMode getBlendingMode() const noexcept; - - //! Returns the vertex domain of this material. - VertexDomain getVertexDomain() const noexcept; - - //! Returns the material domain of this material. - //! The material domain determines how the material is used. - MaterialDomain getMaterialDomain() const noexcept; - - //! Returns the default culling mode of this material. - CullingMode getCullingMode() const noexcept; - - //! Returns the transparency mode of this material. - //! This value only makes sense when the blending mode is transparent or fade. - TransparencyMode getTransparencyMode() const noexcept; - - //! Indicates whether instances of this material will, by default, write to the color buffer. - bool isColorWriteEnabled() const noexcept; - - //! Indicates whether instances of this material will, by default, write to the depth buffer. - bool isDepthWriteEnabled() const noexcept; - - //! Indicates whether instances of this material will, by default, use depth testing. - bool isDepthCullingEnabled() const noexcept; - - //! Indicates whether this material is double-sided. - bool isDoubleSided() const noexcept; - - //! Indicates whether this material uses alpha to coverage. - bool isAlphaToCoverageEnabled() const noexcept; - - //! Returns the alpha mask threshold used when the blending mode is set to masked. - float getMaskThreshold() const noexcept; - - //! Indicates whether this material uses the shadowing factor as a color multiplier. - //! This values only makes sense when the shading mode is unlit. - bool hasShadowMultiplier() const noexcept; - - //! Indicates whether this material has specular anti-aliasing enabled - bool hasSpecularAntiAliasing() const noexcept; - - //! Returns the screen-space variance for specular-antialiasing, this value is between 0 and 1. - float getSpecularAntiAliasingVariance() const noexcept; - - //! Returns the clamping threshold for specular-antialiasing, this value is between 0 and 1. - float getSpecularAntiAliasingThreshold() const noexcept; - - //! Returns the list of vertex attributes required by this material. - AttributeBitset getRequiredAttributes() const noexcept; - - //! Returns the refraction mode used by this material. - RefractionMode getRefractionMode() const noexcept; - - //! Return the refraction type used by this material. - RefractionType getRefractionType() const noexcept; - - //! Returns the reflection mode used by this material. - ReflectionMode getReflectionMode() const noexcept; - - /** - * Returns the number of parameters declared by this material. - * The returned value can be 0. - */ - size_t getParameterCount() const noexcept; - - /** - * Gets information about this material's parameters. - * - * @param parameters A pointer to a list of ParameterInfo. - * The list must be at least "count" large - * @param count The number of parameters to retrieve. Must be >= 0 and can be > count. - * - * @return The number of parameters written to the parameters pointer. - */ - size_t getParameters(ParameterInfo* parameters, size_t count) const noexcept; - - //! Indicates whether a parameter of the given name exists on this material. - bool hasParameter(const char* name) const noexcept; - - //! Indicates whether an existing parameter is a sampler or not. - bool isSampler(const char* name) const noexcept; - - /** - * Sets the value of the given parameter on this material's default instance. - * - * @param name The name of the material parameter - * @param value The value of the material parameter - * - * @see getDefaultInstance() - */ - template - void setDefaultParameter(const char* name, T value) noexcept { - getDefaultInstance()->setParameter(name, value); - } - - /** - * Sets a texture and sampler parameters on this material's default instance. - * - * @param name The name of the material texture parameter - * @param texture The texture to set as parameter - * @param sampler The sampler to be used with this texture - * - * @see getDefaultInstance() - */ - void setDefaultParameter(const char* name, Texture const* texture, - TextureSampler const& sampler) noexcept { - getDefaultInstance()->setParameter(name, texture, sampler); - } - - /** - * Sets the color of the given parameter on this material's default instance. - * - * @param name The name of the material color parameter - * @param type Whether the color is specified in the linear or sRGB space - * @param color The color as a floating point red, green, blue tuple - * - * @see getDefaultInstance() - */ - void setDefaultParameter(const char* name, RgbType type, math::float3 color) noexcept { - getDefaultInstance()->setParameter(name, type, color); - } - - /** - * Sets the color of the given parameter on this material's default instance. - * - * @param name The name of the material color parameter - * @param type Whether the color is specified in the linear or sRGB space - * @param color The color as a floating point red, green, blue, alpha tuple - * - * @see getDefaultInstance() - */ - void setDefaultParameter(const char* name, RgbaType type, math::float4 color) noexcept { - getDefaultInstance()->setParameter(name, type, color); - } - - //! Returns this material's default instance. - MaterialInstance* getDefaultInstance() noexcept; - - //! Returns this material's default instance. - MaterialInstance const* getDefaultInstance() const noexcept; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_MATERIAL_H diff --git a/windows/include/filament/filament/MaterialChunkType.h b/windows/include/filament/filament/MaterialChunkType.h deleted file mode 100644 index 5d3e95ee..00000000 --- a/windows/include/filament/filament/MaterialChunkType.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_FILAMAT_MATERIAL_CHUNK_TYPES_H -#define TNT_FILAMAT_MATERIAL_CHUNK_TYPES_H - -#include - -#include - -namespace filamat { - -// Pack an eight character string into a 64 bit integer. -constexpr inline uint64_t charTo64bitNum(const char str[9]) noexcept { - return - ( (static_cast(str[0]) << 56)) - | ((static_cast(str[1]) << 48) & 0x00FF000000000000U) - | ((static_cast(str[2]) << 40) & 0x0000FF0000000000U) - | ((static_cast(str[3]) << 32) & 0x000000FF00000000U) - | ((static_cast(str[4]) << 24) & 0x00000000FF000000U) - | ((static_cast(str[5]) << 16) & 0x0000000000FF0000U) - | ((static_cast(str[6]) << 8) & 0x000000000000FF00U) - | ( static_cast(str[7]) & 0x00000000000000FFU); -} - -enum UTILS_PUBLIC ChunkType : uint64_t { - Unknown = charTo64bitNum("UNKNOWN "), - MaterialUib = charTo64bitNum("MAT_UIB "), - MaterialSib = charTo64bitNum("MAT_SIB "), - MaterialSubpass = charTo64bitNum("MAT_SUB "), - MaterialGlsl = charTo64bitNum("MAT_GLSL"), - MaterialSpirv = charTo64bitNum("MAT_SPIR"), - MaterialMetal = charTo64bitNum("MAT_METL"), - MaterialShaderModels = charTo64bitNum("MAT_SMDL"), - MaterialSamplerBindings = charTo64bitNum("MAT_SAMP"), - MaterialUniformBindings = charTo64bitNum("MAT_UNIF"), - MaterialProperties = charTo64bitNum("MAT_PROP"), - MaterialConstants = charTo64bitNum("MAT_CONS"), - - MaterialName = charTo64bitNum("MAT_NAME"), - MaterialVersion = charTo64bitNum("MAT_VERS"), - MaterialFeatureLevel = charTo64bitNum("MAT_FEAT"), - MaterialShading = charTo64bitNum("MAT_SHAD"), - MaterialBlendingMode = charTo64bitNum("MAT_BLEN"), - MaterialTransparencyMode = charTo64bitNum("MAT_TRMD"), - MaterialMaskThreshold = charTo64bitNum("MAT_THRS"), - MaterialShadowMultiplier = charTo64bitNum("MAT_SHML"), - MaterialSpecularAntiAliasing = charTo64bitNum("MAT_SPAA"), - MaterialSpecularAntiAliasingVariance = charTo64bitNum("MAT_SVAR"), - MaterialSpecularAntiAliasingThreshold = charTo64bitNum("MAT_STHR"), - MaterialClearCoatIorChange = charTo64bitNum("MAT_CIOR"), - MaterialDomain = charTo64bitNum("MAT_DOMN"), - MaterialRefraction = charTo64bitNum("MAT_REFM"), - MaterialRefractionType = charTo64bitNum("MAT_REFT"), - MaterialReflectionMode = charTo64bitNum("MAT_REFL"), - - MaterialRequiredAttributes = charTo64bitNum("MAT_REQA"), - MaterialDoubleSidedSet = charTo64bitNum("MAT_DOSS"), - MaterialDoubleSided = charTo64bitNum("MAT_DOSI"), - - MaterialColorWrite = charTo64bitNum("MAT_CWRIT"), - MaterialDepthWriteSet = charTo64bitNum("MAT_DEWS"), - MaterialDepthWrite = charTo64bitNum("MAT_DWRIT"), - MaterialDepthTest = charTo64bitNum("MAT_DTEST"), - MaterialInstanced = charTo64bitNum("MAT_INSTA"), - MaterialCullingMode = charTo64bitNum("MAT_CUMO"), - MaterialAlphaToCoverageSet = charTo64bitNum("MAT_A2CS"), - MaterialAlphaToCoverage = charTo64bitNum("MAT_A2CO"), - - MaterialHasCustomDepthShader =charTo64bitNum("MAT_CSDP"), - - MaterialVertexDomain = charTo64bitNum("MAT_VEDO"), - MaterialInterpolation = charTo64bitNum("MAT_INTR"), - - DictionaryText = charTo64bitNum("DIC_TEXT"), - DictionarySpirv = charTo64bitNum("DIC_SPIR"), -}; - -} // namespace filamat - -#endif // TNT_FILAMAT_MATERIAL_CHUNK_TYPES_H diff --git a/windows/include/filament/filament/MaterialEnums.h b/windows/include/filament/filament/MaterialEnums.h deleted file mode 100644 index 280a2d2a..00000000 --- a/windows/include/filament/filament/MaterialEnums.h +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_MATERIAL_ENUM_H -#define TNT_FILAMENT_MATERIAL_ENUM_H - -#include - -#include -#include - -namespace filament { - -// update this when a new version of filament wouldn't work with older materials -static constexpr size_t MATERIAL_VERSION = 32; - -/** - * Supported shading models - */ -enum class Shading : uint8_t { - UNLIT, //!< no lighting applied, emissive possible - LIT, //!< default, standard lighting - SUBSURFACE, //!< subsurface lighting model - CLOTH, //!< cloth lighting model - SPECULAR_GLOSSINESS, //!< legacy lighting model -}; - -/** - * Attribute interpolation types in the fragment shader - */ -enum class Interpolation : uint8_t { - SMOOTH, //!< default, smooth interpolation - FLAT //!< flat interpolation -}; - -/** - * Shader quality, affect some global quality parameters - */ -enum class ShaderQuality : int8_t { - DEFAULT = -1, // LOW on mobile, HIGH on desktop - LOW = 0, // enable optimizations that can slightly affect correctness - NORMAL = 1, // normal quality, correctness honored - HIGH = 2 // higher quality (e.g. better upscaling, etc...) -}; - -/** - * Supported blending modes - */ -enum class BlendingMode : uint8_t { - //! material is opaque - OPAQUE, - //! material is transparent and color is alpha-pre-multiplied, affects diffuse lighting only - TRANSPARENT, - //! material is additive (e.g.: hologram) - ADD, - //! material is masked (i.e. alpha tested) - MASKED, - /** - * material is transparent and color is alpha-pre-multiplied, affects specular lighting - * when adding more entries, change the size of FRenderer::CommandKey::blending - */ - FADE, - //! material darkens what's behind it - MULTIPLY, - //! material brightens what's behind it - SCREEN, -}; - -/** - * How transparent objects are handled - */ -enum class TransparencyMode : uint8_t { - //! the transparent object is drawn honoring the raster state - DEFAULT, - /** - * the transparent object is first drawn in the depth buffer, - * then in the color buffer, honoring the culling mode, but ignoring the depth test function - */ - TWO_PASSES_ONE_SIDE, - - /** - * the transparent object is drawn twice in the color buffer, - * first with back faces only, then with front faces; the culling - * mode is ignored. Can be combined with two-sided lighting - */ - TWO_PASSES_TWO_SIDES -}; - -/** - * Supported types of vertex domains. - */ -enum class VertexDomain : uint8_t { - OBJECT, //!< vertices are in object space, default - WORLD, //!< vertices are in world space - VIEW, //!< vertices are in view space - DEVICE //!< vertices are in normalized device space - // when adding more entries, make sure to update VERTEX_DOMAIN_COUNT -}; - -/** - * Vertex attribute types - */ -enum VertexAttribute : uint8_t { - // Update hasIntegerTarget() in VertexBuffer when adding an attribute that will - // be read as integers in the shaders - - POSITION = 0, //!< XYZ position (float3) - TANGENTS = 1, //!< tangent, bitangent and normal, encoded as a quaternion (float4) - COLOR = 2, //!< vertex color (float4) - UV0 = 3, //!< texture coordinates (float2) - UV1 = 4, //!< texture coordinates (float2) - BONE_INDICES = 5, //!< indices of 4 bones, as unsigned integers (uvec4) - BONE_WEIGHTS = 6, //!< weights of the 4 bones (normalized float4) - // -- we have 1 unused slot here -- - CUSTOM0 = 8, - CUSTOM1 = 9, - CUSTOM2 = 10, - CUSTOM3 = 11, - CUSTOM4 = 12, - CUSTOM5 = 13, - CUSTOM6 = 14, - CUSTOM7 = 15, - - // Aliases for legacy vertex morphing. - // See RenderableManager::Builder::morphing(). - MORPH_POSITION_0 = CUSTOM0, - MORPH_POSITION_1 = CUSTOM1, - MORPH_POSITION_2 = CUSTOM2, - MORPH_POSITION_3 = CUSTOM3, - MORPH_TANGENTS_0 = CUSTOM4, - MORPH_TANGENTS_1 = CUSTOM5, - MORPH_TANGENTS_2 = CUSTOM6, - MORPH_TANGENTS_3 = CUSTOM7, - - // this is limited by driver::MAX_VERTEX_ATTRIBUTE_COUNT -}; - -static constexpr size_t MAX_LEGACY_MORPH_TARGETS = 4; -static constexpr size_t MAX_MORPH_TARGETS = 256; // this is limited by filament::CONFIG_MAX_MORPH_TARGET_COUNT -static constexpr size_t MAX_CUSTOM_ATTRIBUTES = 8; - -/** - * Material domains - */ -enum class MaterialDomain : uint8_t { - SURFACE = 0, //!< shaders applied to renderables - POST_PROCESS = 1, //!< shaders applied to rendered buffers - COMPUTE = 2, //!< compute shader -}; - -/** - * Specular occlusion - */ -enum class SpecularAmbientOcclusion : uint8_t { - NONE = 0, //!< no specular occlusion - SIMPLE = 1, //!< simple specular occlusion - BENT_NORMALS = 2, //!< more accurate specular occlusion, requires bent normals -}; - -/** - * Refraction - */ -enum class RefractionMode : uint8_t { - NONE = 0, //!< no refraction - CUBEMAP = 1, //!< refracted rays go to the ibl cubemap - SCREEN_SPACE = 2, //!< refracted rays go to screen space -}; - -/** - * Refraction type - */ -enum class RefractionType : uint8_t { - SOLID = 0, //!< refraction through solid objects (e.g. a sphere) - THIN = 1, //!< refraction through thin objects (e.g. window) -}; - -/** - * Reflection mode - */ -enum class ReflectionMode : uint8_t { - DEFAULT = 0, //! reflections sample from the scene's IBL only - SCREEN_SPACE = 1, //! reflections sample from screen space, and fallback to the scene's IBL -}; - -// can't really use std::underlying_type::type because the driver takes a uint32_t -using AttributeBitset = utils::bitset32; - -static constexpr size_t MATERIAL_PROPERTIES_COUNT = 26; -enum class Property : uint8_t { - BASE_COLOR, //!< float4, all shading models - ROUGHNESS, //!< float, lit shading models only - METALLIC, //!< float, all shading models, except unlit and cloth - REFLECTANCE, //!< float, all shading models, except unlit and cloth - AMBIENT_OCCLUSION, //!< float, lit shading models only, except subsurface and cloth - CLEAR_COAT, //!< float, lit shading models only, except subsurface and cloth - CLEAR_COAT_ROUGHNESS, //!< float, lit shading models only, except subsurface and cloth - CLEAR_COAT_NORMAL, //!< float, lit shading models only, except subsurface and cloth - ANISOTROPY, //!< float, lit shading models only, except subsurface and cloth - ANISOTROPY_DIRECTION, //!< float3, lit shading models only, except subsurface and cloth - THICKNESS, //!< float, subsurface shading model only - SUBSURFACE_POWER, //!< float, subsurface shading model only - SUBSURFACE_COLOR, //!< float3, subsurface and cloth shading models only - SHEEN_COLOR, //!< float3, lit shading models only, except subsurface - SHEEN_ROUGHNESS, //!< float3, lit shading models only, except subsurface and cloth - SPECULAR_COLOR, //!< float3, specular-glossiness shading model only - GLOSSINESS, //!< float, specular-glossiness shading model only - EMISSIVE, //!< float4, all shading models - NORMAL, //!< float3, all shading models only, except unlit - POST_LIGHTING_COLOR, //!< float4, all shading models - CLIP_SPACE_TRANSFORM, //!< mat4, vertex shader only - ABSORPTION, //!< float3, how much light is absorbed by the material - TRANSMISSION, //!< float, how much light is refracted through the material - IOR, //!< float, material's index of refraction - MICRO_THICKNESS, //!< float, thickness of the thin layer - BENT_NORMAL, //!< float3, all shading models only, except unlit - - // when adding new Properties, make sure to update MATERIAL_PROPERTIES_COUNT -}; - -enum class UserVariantFilterBit : uint32_t { - DIRECTIONAL_LIGHTING = 0x01, - DYNAMIC_LIGHTING = 0x02, - SHADOW_RECEIVER = 0x04, - SKINNING = 0x08, - FOG = 0x10, - VSM = 0x20, - SSR = 0x40, -}; - -using UserVariantFilterMask = uint32_t; - -} // namespace filament - -#endif diff --git a/windows/include/filament/filament/MaterialInstance.h b/windows/include/filament/filament/MaterialInstance.h deleted file mode 100644 index c2095e1c..00000000 --- a/windows/include/filament/filament/MaterialInstance.h +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_FILAMENT_MATERIALINSTANCE_H -#define TNT_FILAMENT_MATERIALINSTANCE_H - -#include -#include - -#include - -#include - -#include - -#include - -namespace filament { - -class Material; -class Texture; -class TextureSampler; -class UniformBuffer; -class BufferInterfaceBlock; - -class UTILS_PUBLIC MaterialInstance : public FilamentAPI { - template - using StringLiteralHelper = const char[N]; - - struct StringLiteral { - const char* data; - size_t size; - template - StringLiteral(StringLiteralHelper const& s) noexcept // NOLINT(google-explicit-constructor) - : data(s), size(N - 1) { - } - }; - -public: - using CullingMode = filament::backend::CullingMode; - using TransparencyMode = filament::TransparencyMode; - using StencilCompareFunc = filament::backend::SamplerCompareFunc; - using StencilOperation = filament::backend::StencilOperation; - using StencilFace = filament::backend::StencilFace; - - template - using is_supported_parameter_t = typename std::enable_if< - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - // these types are slower as they need a layout conversion - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value - >::type; - - /** - * Creates a new MaterialInstance using another MaterialInstance as a template for initialization. - * The new MaterialInstance is an instance of the same Material of the template instance and - * must be destroyed just like any other MaterialInstance. - * - * @param other A MaterialInstance to use as a template for initializing a new instance - * @param name A name for the new MaterialInstance or nullptr to use the template's name - * @return A new MaterialInstance - */ - static MaterialInstance* duplicate(MaterialInstance const* other, const char* name = nullptr) noexcept; - - /** - * @return the Material associated with this instance - */ - Material const* getMaterial() const noexcept; - - /** - * @return the name associated with this instance - */ - const char* getName() const noexcept; - - /** - * Set a uniform by name - * - * @param name Name of the parameter as defined by Material. Cannot be nullptr. - * @param nameLength Length in `char` of the name parameter. - * @param value Value of the parameter to set. - * @throws utils::PreConditionPanic if name doesn't exist or no-op if exceptions are disabled. - */ - template> - void setParameter(const char* name, size_t nameLength, T const& value); - - /** inline helper to provide the name as a null-terminated string literal */ - template> - inline void setParameter(StringLiteral name, T const& value) { - setParameter(name.data, name.size, value); - } - - /** inline helper to provide the name as a null-terminated C string */ - template> - inline void setParameter(const char* name, T const& value) { - setParameter(name, strlen(name), value); - } - - - /** - * Set a uniform array by name - * - * @param name Name of the parameter array as defined by Material. Cannot be nullptr. - * @param nameLength Length in `char` of the name parameter. - * @param values Array of values to set to the named parameter array. - * @param count Size of the array to set. - * @throws utils::PreConditionPanic if name doesn't exist or no-op if exceptions are disabled. - */ - template> - void setParameter(const char* name, size_t nameLength, const T* values, size_t count); - - /** inline helper to provide the name as a null-terminated string literal */ - template> - inline void setParameter(StringLiteral name, const T* values, size_t count) { - setParameter(name.data, name.size, values, count); - } - - /** inline helper to provide the name as a null-terminated C string */ - template> - inline void setParameter(const char* name, const T* values, size_t count) { - setParameter(name, strlen(name), values, count); - } - - - /** - * Set a texture as the named parameter - * - * Note: Depth textures can't be sampled with a linear filter unless the comparison mode is set - * to COMPARE_TO_TEXTURE. - * - * @param name Name of the parameter as defined by Material. Cannot be nullptr. - * @param nameLength Length in `char` of the name parameter. - * @param texture Non nullptr Texture object pointer. - * @param sampler Sampler parameters. - * @throws utils::PreConditionPanic if name doesn't exist or no-op if exceptions are disabled. - */ - void setParameter(const char* name, size_t nameLength, - Texture const* texture, TextureSampler const& sampler); - - /** inline helper to provide the name as a null-terminated string literal */ - inline void setParameter(StringLiteral name, - Texture const* texture, TextureSampler const& sampler) { - setParameter(name.data, name.size, texture, sampler); - } - - /** inline helper to provide the name as a null-terminated C string */ - inline void setParameter(const char* name, - Texture const* texture, TextureSampler const& sampler) { - setParameter(name, strlen(name), texture, sampler); - } - - - /** - * Set an RGB color as the named parameter. - * A conversion might occur depending on the specified type - * - * @param name Name of the parameter as defined by Material. Cannot be nullptr. - * @param nameLength Length in `char` of the name parameter. - * @param type Whether the color value is encoded as Linear or sRGB. - * @param color Array of read, green, blue channels values. - * @throws utils::PreConditionPanic if name doesn't exist or no-op if exceptions are disabled. - */ - void setParameter(const char* name, size_t nameLength, RgbType type, math::float3 color); - - /** inline helper to provide the name as a null-terminated string literal */ - inline void setParameter(StringLiteral name, RgbType type, math::float3 color) { - setParameter(name.data, name.size, type, color); - } - - /** inline helper to provide the name as a null-terminated C string */ - inline void setParameter(const char* name, RgbType type, math::float3 color) { - setParameter(name, strlen(name), type, color); - } - - - /** - * Set an RGBA color as the named parameter. - * A conversion might occur depending on the specified type - * - * @param name Name of the parameter as defined by Material. Cannot be nullptr. - * @param nameLength Length in `char` of the name parameter. - * @param type Whether the color value is encoded as Linear or sRGB/A. - * @param color Array of read, green, blue and alpha channels values. - * @throws utils::PreConditionPanic if name doesn't exist or no-op if exceptions are disabled. - */ - void setParameter(const char* name, size_t nameLength, RgbaType type, math::float4 color); - - /** inline helper to provide the name as a null-terminated string literal */ - inline void setParameter(StringLiteral name, RgbaType type, math::float4 color) { - setParameter(name.data, name.size, type, color); - } - - /** inline helper to provide the name as a null-terminated C string */ - inline void setParameter(const char* name, RgbaType type, math::float4 color) { - setParameter(name, strlen(name), type, color); - } - - /** - * Set-up a custom scissor rectangle; by default it is disabled. - * - * The scissor rectangle gets clipped by the View's viewport, in other words, the scissor - * cannot affect fragments outside of the View's Viewport. - * - * Currently the scissor is not compatible with dynamic resolution and should always be - * disabled when dynamic resolution is used. - * - * @param left left coordinate of the scissor box relative to the viewport - * @param bottom bottom coordinate of the scissor box relative to the viewport - * @param width width of the scissor box - * @param height height of the scissor box - * - * @see unsetScissor - * @see View::setViewport - * @see View::setDynamicResolutionOptions - */ - void setScissor(uint32_t left, uint32_t bottom, uint32_t width, uint32_t height) noexcept; - - /** - * Returns the scissor rectangle to its default disabled setting. - * - * Currently the scissor is not compatible with dynamic resolution and should always be - * disabled when dynamic resolution is used. - * - * @see View::setDynamicResolutionOptions - */ - void unsetScissor() noexcept; - - /** - * Sets a polygon offset that will be applied to all renderables drawn with this material - * instance. - * - * The value of the offset is scale * dz + r * constant, where dz is the change in depth - * relative to the screen area of the triangle, and r is the smallest value that is guaranteed - * to produce a resolvable offset for a given implementation. This offset is added before the - * depth test. - * - * @warning using a polygon offset other than zero has a significant negative performance - * impact, as most implementations have to disable early depth culling. DO NOT USE unless - * absolutely necessary. - * - * @param scale scale factor used to create a variable depth offset for each triangle - * @param constant scale factor used to create a constant depth offset for each triangle - */ - void setPolygonOffset(float scale, float constant) noexcept; - - /** - * Overrides the minimum alpha value a fragment must have to not be discarded when the blend - * mode is MASKED. Defaults to 0.4 if it has not been set in the parent Material. The specified - * value should be between 0 and 1 and will be clamped if necessary. - */ - void setMaskThreshold(float threshold) noexcept; - - /** - * Gets the minimum alpha value a fragment must have to not be discarded when the blend - * mode is MASKED - */ - float getMaskThreshold() const noexcept; - - /** - * Sets the screen space variance of the filter kernel used when applying specular - * anti-aliasing. The default value is set to 0.15. The specified value should be between - * 0 and 1 and will be clamped if necessary. - */ - void setSpecularAntiAliasingVariance(float variance) noexcept; - - /** - * Gets the screen space variance of the filter kernel used when applying specular - * anti-aliasing. - */ - float getSpecularAntiAliasingVariance() const noexcept; - - /** - * Sets the clamping threshold used to suppress estimation errors when applying specular - * anti-aliasing. The default value is set to 0.2. The specified value should be between 0 - * and 1 and will be clamped if necessary. - */ - void setSpecularAntiAliasingThreshold(float threshold) noexcept; - - /** - * Gets the clamping threshold used to suppress estimation errors when applying specular - * anti-aliasing. - */ - float getSpecularAntiAliasingThreshold() const noexcept; - - /** - * Enables or disables double-sided lighting if the parent Material has double-sided capability, - * otherwise prints a warning. If double-sided lighting is enabled, backface culling is - * automatically disabled. - */ - void setDoubleSided(bool doubleSided) noexcept; - - /** - * Returns whether double-sided lighting is enabled when the parent Material has double-sided - * capability. - */ - bool isDoubleSided() const noexcept; - - /** - * Specifies how transparent objects should be rendered (default is DEFAULT). - */ - void setTransparencyMode(TransparencyMode mode) noexcept; - - /** - * Returns the transparency mode. - */ - TransparencyMode getTransparencyMode() const noexcept; - - /** - * Overrides the default triangle culling state that was set on the material. - */ - void setCullingMode(CullingMode culling) noexcept; - - /** - * Returns the face culling mode. - */ - CullingMode getCullingMode() const noexcept; - - /** - * Overrides the default color-buffer write state that was set on the material. - */ - void setColorWrite(bool enable) noexcept; - - /** - * Returns whether color write is enabled. - */ - bool isColorWriteEnabled() const noexcept; - - /** - * Overrides the default depth-buffer write state that was set on the material. - */ - void setDepthWrite(bool enable) noexcept; - - /** - * Returns whether depth write is enabled. - */ - bool isDepthWriteEnabled() const noexcept; - - /** - * Overrides the default depth testing state that was set on the material. - */ - void setDepthCulling(bool enable) noexcept; - - /** - * Returns whether depth culling is enabled. - */ - bool isDepthCullingEnabled() const noexcept; - - /** - * Overrides the default stencil-buffer write state that was set on the material. - */ - void setStencilWrite(bool enable) noexcept; - - /** - * Returns whether stencil write is enabled. - */ - bool isStencilWriteEnabled() const noexcept; - - /** - * Sets the stencil comparison function (default is StencilCompareFunc::A). - * - * It's possible to set separate stencil comparison functions; one for front-facing polygons, - * and one for back-facing polygons. The face parameter determines the comparison function(s) - * updated by this call. - */ - void setStencilCompareFunction(StencilCompareFunc func, - StencilFace face = StencilFace::FRONT_AND_BACK) noexcept; - - /** - * Sets the stencil fail operation (default is StencilOperation::KEEP). - * - * The stencil fail operation is performed to update values in the stencil buffer when the - * stencil test fails. - * - * It's possible to set separate stencil fail operations; one for front-facing polygons, and one - * for back-facing polygons. The face parameter determines the stencil fail operation(s) updated - * by this call. - */ - void setStencilOpStencilFail(StencilOperation op, - StencilFace face = StencilFace::FRONT_AND_BACK) noexcept; - - /** - * Sets the depth fail operation (default is StencilOperation::KEEP). - * - * The depth fail operation is performed to update values in the stencil buffer when the depth - * test fails. - * - * It's possible to set separate depth fail operations; one for front-facing polygons, and one - * for back-facing polygons. The face parameter determines the depth fail operation(s) updated - * by this call. - */ - void setStencilOpDepthFail(StencilOperation op, - StencilFace face = StencilFace::FRONT_AND_BACK) noexcept; - - /** - * Sets the depth-stencil pass operation (default is StencilOperation::KEEP). - * - * The depth-stencil pass operation is performed to update values in the stencil buffer when - * both the stencil test and depth test pass. - * - * It's possible to set separate depth-stencil pass operations; one for front-facing polygons, - * and one for back-facing polygons. The face parameter determines the depth-stencil pass - * operation(s) updated by this call. - */ - void setStencilOpDepthStencilPass(StencilOperation op, - StencilFace face = StencilFace::FRONT_AND_BACK) noexcept; - - /** - * Sets the stencil reference value (default is 0). - * - * The stencil reference value is the left-hand side for stencil comparison tests. It's also - * used as the replacement stencil value when StencilOperation is REPLACE. - * - * It's possible to set separate stencil reference values; one for front-facing polygons, and - * one for back-facing polygons. The face parameter determines the reference value(s) updated by - * this call. - */ - void setStencilReferenceValue(uint8_t value, - StencilFace face = StencilFace::FRONT_AND_BACK) noexcept; - - /** - * Sets the stencil read mask (default is 0xFF). - * - * The stencil read mask masks the bits of the values participating in the stencil comparison - * test- both the value read from the stencil buffer and the reference value. - * - * It's possible to set separate stencil read masks; one for front-facing polygons, and one for - * back-facing polygons. The face parameter determines the stencil read mask(s) updated by this - * call. - */ - void setStencilReadMask(uint8_t readMask, - StencilFace face = StencilFace::FRONT_AND_BACK) noexcept; - - /** - * Sets the stencil write mask (default is 0xFF). - * - * The stencil write mask masks the bits in the stencil buffer updated by stencil operations. - * - * It's possible to set separate stencil write masks; one for front-facing polygons, and one for - * back-facing polygons. The face parameter determines the stencil write mask(s) updated by this - * call. - */ - void setStencilWriteMask(uint8_t writeMask, - StencilFace face = StencilFace::FRONT_AND_BACK) noexcept; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_MATERIALINSTANCE_H diff --git a/windows/include/filament/filament/MorphTargetBuffer.h b/windows/include/filament/filament/MorphTargetBuffer.h deleted file mode 100644 index d080d0da..00000000 --- a/windows/include/filament/filament/MorphTargetBuffer.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#ifndef TNT_FILAMENT_MORPHTARGETBUFFER_H -#define TNT_FILAMENT_MORPHTARGETBUFFER_H - -#include - -#include - -#include - - -namespace filament { - -/** - * MorphTargetBuffer is used to hold morphing data (positions and tangents). - * - * Both positions and tangents are required. - * - */ -class UTILS_PUBLIC MorphTargetBuffer : public FilamentAPI { - struct BuilderDetails; - -public: - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - Builder() noexcept; - Builder(Builder const& rhs) noexcept; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder const& rhs) noexcept; - Builder& operator=(Builder&& rhs) noexcept; - - /** - * Size of the morph targets in vertex counts. - * @param vertexCount Number of vertex counts the morph targets can hold. - * @return A reference to this Builder for chaining calls. - */ - Builder& vertexCount(size_t vertexCount) noexcept; - - /** - * Size of the morph targets in targets. - * @param count Number of targets the morph targets can hold. - * @return A reference to this Builder for chaining calls. - */ - Builder& count(size_t count) noexcept; - - /** - * Creates the MorphTargetBuffer object and returns a pointer to it. - * - * @param engine Reference to the filament::Engine to associate this MorphTargetBuffer with. - * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. - * - * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of - * memory or other resources. - * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. - */ - MorphTargetBuffer* build(Engine& engine); - private: - friend class FMorphTargetBuffer; - }; - - /** - * Updates positions for the given morph target. - * - * This is equivalent to the float4 method, but uses 1.0 for the 4th component. - * - * Both positions and tangents must be provided. - * - * @param engine Reference to the filament::Engine associated with this MorphTargetBuffer. - * @param targetIndex the index of morph target to be updated. - * @param positions pointer to at least "count" positions - * @param count number of float3 vectors in positions - * @param offset offset into the target buffer, expressed as a number of float4 vectors - * @see setTangentsAt - */ - void setPositionsAt(Engine& engine, size_t targetIndex, - math::float3 const* positions, size_t count, size_t offset = 0); - - /** - * Updates positions for the given morph target. - * - * Both positions and tangents must be provided. - * - * @param engine Reference to the filament::Engine associated with this MorphTargetBuffer. - * @param targetIndex the index of morph target to be updated. - * @param positions pointer to at least "count" positions - * @param count number of float4 vectors in positions - * @param offset offset into the target buffer, expressed as a number of float4 vectors - * @see setTangentsAt - */ - void setPositionsAt(Engine& engine, size_t targetIndex, - math::float4 const* positions, size_t count, size_t offset = 0); - - /** - * Updates tangents for the given morph target. - * - * These quaternions must be represented as signed shorts, where real numbers in the [-1,+1] - * range multiplied by 32767. - * - * @param engine Reference to the filament::Engine associated with this MorphTargetBuffer. - * @param targetIndex the index of morph target to be updated. - * @param tangents pointer to at least "count" tangents - * @param count number of short4 quaternions in tangents - * @param offset offset into the target buffer, expressed as a number of short4 vectors - * @see setPositionsAt - */ - void setTangentsAt(Engine& engine, size_t targetIndex, - math::short4 const* tangents, size_t count, size_t offset = 0); - - /** - * Returns the vertex count of this MorphTargetBuffer. - * @return The number of vertices the MorphTargetBuffer holds. - */ - size_t getVertexCount() const noexcept; - - /** - * Returns the target count of this MorphTargetBuffer. - * @return The number of targets the MorphTargetBuffer holds. - */ - size_t getCount() const noexcept; -}; - -} // namespace filament - -#endif //TNT_FILAMENT_MORPHTARGETBUFFER_H diff --git a/windows/include/filament/filament/Options.h b/windows/include/filament/filament/Options.h deleted file mode 100644 index b52d917e..00000000 --- a/windows/include/filament/filament/Options.h +++ /dev/null @@ -1,524 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#ifndef TNT_FILAMENT_OPTIONS_H -#define TNT_FILAMENT_OPTIONS_H - -#include - -#include - -#include - -namespace filament { - -class Texture; - -/** - * Generic quality level. - */ -enum class QualityLevel : uint8_t { - LOW, - MEDIUM, - HIGH, - ULTRA -}; - -enum class BlendMode : uint8_t { - OPAQUE, - TRANSLUCENT -}; - -/** - * Dynamic resolution can be used to either reach a desired target frame rate - * by lowering the resolution of a View, or to increase the quality when the - * rendering is faster than the target frame rate. - * - * This structure can be used to specify the minimum scale factor used when - * lowering the resolution of a View, and the maximum scale factor used when - * increasing the resolution for higher quality rendering. The scale factors - * can be controlled on each X and Y axis independently. By default, all scale - * factors are set to 1.0. - * - * enabled: enable or disables dynamic resolution on a View - * - * homogeneousScaling: by default the system scales the major axis first. Set this to true - * to force homogeneous scaling. - * - * minScale: the minimum scale in X and Y this View should use - * - * maxScale: the maximum scale in X and Y this View should use - * - * quality: upscaling quality. - * LOW: 1 bilinear tap, Medium: 4 bilinear taps, High: 9 bilinear taps (tent) - * - * \note - * Dynamic resolution is only supported on platforms where the time to render - * a frame can be measured accurately. Dynamic resolution is currently only - * supported on Android. - * - * @see Renderer::FrameRateOptions - * - */ -struct DynamicResolutionOptions { - math::float2 minScale = {0.5f, 0.5f}; //!< minimum scale factors in x and y %codegen_java_float% - math::float2 maxScale = {1.0f, 1.0f}; //!< maximum scale factors in x and y %codegen_java_float% - float sharpness = 0.9f; //!< sharpness when QualityLevel::MEDIUM or higher is used [0 (disabled), 1 (sharpest)] - bool enabled = false; //!< enable or disable dynamic resolution - bool homogeneousScaling = false; //!< set to true to force homogeneous scaling - - /** - * Upscaling quality - * LOW: bilinear filtered blit. Fastest, poor quality - * MEDIUM: AMD FidelityFX FSR1 w/ mobile optimizations - * HIGH: AMD FidelityFX FSR1 w/ mobile optimizations - * ULTRA: AMD FidelityFX FSR1 - * FSR1 require a well anti-aliased (MSAA or TAA), noise free scene. - * - * The default upscaling quality is set to LOW. - */ - QualityLevel quality = QualityLevel::LOW; -}; - -/** - * Options to control the bloom effect - * - * enabled: Enable or disable the bloom post-processing effect. Disabled by default. - * - * levels: Number of successive blurs to achieve the blur effect, the minimum is 3 and the - * maximum is 12. This value together with resolution influences the spread of the - * blur effect. This value can be silently reduced to accommodate the original - * image size. - * - * resolution: Resolution of bloom's minor axis. The minimum value is 2^levels and the - * the maximum is lower of the original resolution and 4096. This parameter is - * silently clamped to the minimum and maximum. - * It is highly recommended that this value be smaller than the target resolution - * after dynamic resolution is applied (horizontally and vertically). - * - * strength: how much of the bloom is added to the original image. Between 0 and 1. - * - * blendMode: Whether the bloom effect is purely additive (false) or mixed with the original - * image (true). - * - * anamorphism: Bloom's aspect ratio (x/y), for artistic purposes. - * - * threshold: When enabled, a threshold at 1.0 is applied on the source image, this is - * useful for artistic reasons and is usually needed when a dirt texture is used. - * - * dirt: A dirt/scratch/smudges texture (that can be RGB), which gets added to the - * bloom effect. Smudges are visible where bloom occurs. Threshold must be - * enabled for the dirt effect to work properly. - * - * dirtStrength: Strength of the dirt texture. - */ -struct BloomOptions { - enum class BlendMode : uint8_t { - ADD, //!< Bloom is modulated by the strength parameter and added to the scene - INTERPOLATE //!< Bloom is interpolated with the scene using the strength parameter - }; - Texture* dirt = nullptr; //!< user provided dirt texture %codegen_skip_json% %codegen_skip_javascript% - float dirtStrength = 0.2f; //!< strength of the dirt texture %codegen_skip_json% %codegen_skip_javascript% - float strength = 0.10f; //!< bloom's strength between 0.0 and 1.0 - uint32_t resolution = 360; //!< resolution of vertical axis (2^levels to 2048) - float anamorphism = 1.0f; //!< bloom x/y aspect-ratio (1/32 to 32) - uint8_t levels = 6; //!< number of blur levels (3 to 11) - BlendMode blendMode = BlendMode::ADD; //!< how the bloom effect is applied - bool threshold = true; //!< whether to threshold the source - bool enabled = false; //!< enable or disable bloom - float highlight = 1000.0f; //!< limit highlights to this value before bloom [10, +inf] - - bool lensFlare = false; //!< enable screen-space lens flare - bool starburst = true; //!< enable starburst effect on lens flare - float chromaticAberration = 0.005f; //!< amount of chromatic aberration - uint8_t ghostCount = 4; //!< number of flare "ghosts" - float ghostSpacing = 0.6f; //!< spacing of the ghost in screen units [0, 1[ - float ghostThreshold = 10.0f; //!< hdr threshold for the ghosts - float haloThickness = 0.1f; //!< thickness of halo in vertical screen units, 0 to disable - float haloRadius = 0.4f; //!< radius of halo in vertical screen units [0, 0.5] - float haloThreshold = 10.0f; //!< hdr threshold for the halo -}; - -/** - * Options to control large-scale fog in the scene - */ -struct FogOptions { - /** - * Distance in world units [m] from the camera to where the fog starts ( >= 0.0 ) - */ - float distance = 0.0f; - - /** - * Distance in world units [m] after which the fog calculation is disabled. - * This can be used to exclude the skybox, which is desirable if it already contains clouds or - * fog. The default value is +infinity which applies the fog to everything. - * - * Note: The SkyBox is typically at a distance of 1e19 in world space (depending on the near - * plane distance and projection used though). - */ - float cutOffDistance = INFINITY; - - /** - * fog's maximum opacity between 0 and 1 - */ - float maximumOpacity = 1.0f; - - /** - * Fog's floor in world units [m]. This sets the "sea level". - */ - float height = 0.0f; - - /** - * How fast the fog dissipates with altitude. heightFalloff has a unit of [1/m]. - * It can be expressed as 1/H, where H is the altitude change in world units [m] that causes a - * factor 2.78 (e) change in fog density. - * - * A falloff of 0 means the fog density is constant everywhere and may result is slightly - * faster computations. - */ - float heightFalloff = 1.0f; - - /** - * Fog's color is used for ambient light in-scattering, a good value is - * to use the average of the ambient light, possibly tinted towards blue - * for outdoors environments. Color component's values should be between 0 and 1, values - * above one are allowed but could create a non energy-conservative fog (this is dependant - * on the IBL's intensity as well). - * - * We assume that our fog has no absorption and therefore all the light it scatters out - * becomes ambient light in-scattering and has lost all directionality, i.e.: scattering is - * isotropic. This somewhat simulates Rayleigh scattering. - * - * This value is used as a tint instead, when fogColorFromIbl is enabled. - * - * @see fogColorFromIbl - */ - LinearColor color = { 1.0f, 1.0f, 1.0f }; - - /** - * Extinction factor in [1/m] at altitude 'height'. The extinction factor controls how much - * light is absorbed and out-scattered per unit of distance. Each unit of extinction reduces - * the incoming light to 37% of its original value. - * - * Note: The extinction factor is related to the fog density, it's usually some constant K times - * the density at sea level (more specifically at fog height). The constant K depends on - * the composition of the fog/atmosphere. - * - * For historical reason this parameter is called `density`. - */ - float density = 0.1f; - - /** - * Distance in world units [m] from the camera where the Sun in-scattering starts. - */ - float inScatteringStart = 0.0f; - - /** - * Very inaccurately simulates the Sun's in-scattering. That is, the light from the sun that - * is scattered (by the fog) towards the camera. - * Size of the Sun in-scattering (>0 to activate). Good values are >> 1 (e.g. ~10 - 100). - * Smaller values result is a larger scattering size. - */ - float inScatteringSize = -1.0f; - - /** - * The fog color will be sampled from the IBL in the view direction and tinted by `color`. - * Depending on the scene this can produce very convincing results. - * This simulate a more anisotropic phase-function. - */ - bool fogColorFromIbl = false; - - /** - * Enable or disable large-scale fog - */ - bool enabled = false; -}; - -/** - * Options to control Depth of Field (DoF) effect in the scene. - * - * cocScale can be used to set the depth of field blur independently from the camera - * aperture, e.g. for artistic reasons. This can be achieved by setting: - * cocScale = cameraAperture / desiredDoFAperture - * - * @see Camera - */ -struct DepthOfFieldOptions { - enum class Filter : uint8_t { - NONE, - UNUSED, - MEDIAN - }; - float cocScale = 1.0f; //!< circle of confusion scale factor (amount of blur) - float maxApertureDiameter = 0.01f; //!< maximum aperture diameter in meters (zero to disable rotation) - bool enabled = false; //!< enable or disable depth of field effect - Filter filter = Filter::MEDIAN; //!< filter to use for filling gaps in the kernel - bool nativeResolution = false; //!< perform DoF processing at native resolution - /** - * Number of of rings used by the gather kernels. The number of rings affects quality - * and performance. The actual number of sample per pixel is defined - * as (ringCount * 2 - 1)^2. Here are a few commonly used values: - * 3 rings : 25 ( 5x 5 grid) - * 4 rings : 49 ( 7x 7 grid) - * 5 rings : 81 ( 9x 9 grid) - * 17 rings : 1089 (33x33 grid) - * - * With a maximum circle-of-confusion of 32, it is never necessary to use more than 17 rings. - * - * Usually all three settings below are set to the same value, however, it is often - * acceptable to use a lower ring count for the "fast tiles", which improves performance. - * Fast tiles are regions of the screen where every pixels have a similar - * circle-of-confusion radius. - * - * A value of 0 means default, which is 5 on desktop and 3 on mobile. - * - * @{ - */ - uint8_t foregroundRingCount = 0; //!< number of kernel rings for foreground tiles - uint8_t backgroundRingCount = 0; //!< number of kernel rings for background tiles - uint8_t fastGatherRingCount = 0; //!< number of kernel rings for fast tiles - /** @}*/ - - /** - * maximum circle-of-confusion in pixels for the foreground, must be in [0, 32] range. - * A value of 0 means default, which is 32 on desktop and 24 on mobile. - */ - uint16_t maxForegroundCOC = 0; - - /** - * maximum circle-of-confusion in pixels for the background, must be in [0, 32] range. - * A value of 0 means default, which is 32 on desktop and 24 on mobile. - */ - uint16_t maxBackgroundCOC = 0; -}; - -/** - * Options to control the vignetting effect. - */ -struct VignetteOptions { - float midPoint = 0.5f; //!< high values restrict the vignette closer to the corners, between 0 and 1 - float roundness = 0.5f; //!< controls the shape of the vignette, from a rounded rectangle (0.0), to an oval (0.5), to a circle (1.0) - float feather = 0.5f; //!< softening amount of the vignette effect, between 0 and 1 - LinearColorA color = {0.0f, 0.0f, 0.0f, 1.0f}; //!< color of the vignette effect, alpha is currently ignored - bool enabled = false; //!< enables or disables the vignette effect -}; - -/** - * Structure used to set the precision of the color buffer and related quality settings. - * - * @see setRenderQuality, getRenderQuality - */ -struct RenderQuality { - /** - * Sets the quality of the HDR color buffer. - * - * A quality of HIGH or ULTRA means using an RGB16F or RGBA16F color buffer. This means - * colors in the LDR range (0..1) have a 10 bit precision. A quality of LOW or MEDIUM means - * using an R11G11B10F opaque color buffer or an RGBA16F transparent color buffer. With - * R11G11B10F colors in the LDR range have a precision of either 6 bits (red and green - * channels) or 5 bits (blue channel). - */ - QualityLevel hdrColorBuffer = QualityLevel::HIGH; -}; - -/** - * Options for screen space Ambient Occlusion (SSAO) and Screen Space Cone Tracing (SSCT) - * @see setAmbientOcclusionOptions() - */ -struct AmbientOcclusionOptions { - float radius = 0.3f; //!< Ambient Occlusion radius in meters, between 0 and ~10. - float power = 1.0f; //!< Controls ambient occlusion's contrast. Must be positive. - float bias = 0.0005f; //!< Self-occlusion bias in meters. Use to avoid self-occlusion. Between 0 and a few mm. - float resolution = 0.5f;//!< How each dimension of the AO buffer is scaled. Must be either 0.5 or 1.0. - float intensity = 1.0f; //!< Strength of the Ambient Occlusion effect. - float bilateralThreshold = 0.05f; //!< depth distance that constitute an edge for filtering - QualityLevel quality = QualityLevel::LOW; //!< affects # of samples used for AO. - QualityLevel lowPassFilter = QualityLevel::MEDIUM; //!< affects AO smoothness - QualityLevel upsampling = QualityLevel::LOW; //!< affects AO buffer upsampling quality - bool enabled = false; //!< enables or disables screen-space ambient occlusion - bool bentNormals = false; //!< enables bent normals computation from AO, and specular AO - float minHorizonAngleRad = 0.0f; //!< min angle in radian to consider - /** - * Screen Space Cone Tracing (SSCT) options - * Ambient shadows from dominant light - */ - struct Ssct { - float lightConeRad = 1.0f; //!< full cone angle in radian, between 0 and pi/2 - float shadowDistance = 0.3f; //!< how far shadows can be cast - float contactDistanceMax = 1.0f; //!< max distance for contact - float intensity = 0.8f; //!< intensity - math::float3 lightDirection = { 0, -1, 0 }; //!< light direction - float depthBias = 0.01f; //!< depth bias in world units (mitigate self shadowing) - float depthSlopeBias = 0.01f; //!< depth slope bias (mitigate self shadowing) - uint8_t sampleCount = 4; //!< tracing sample count, between 1 and 255 - uint8_t rayCount = 1; //!< # of rays to trace, between 1 and 255 - bool enabled = false; //!< enables or disables SSCT - }; - Ssct ssct; // %codegen_skip_javascript% %codegen_java_flatten% -}; - -/** - * Options for Temporal Multi-Sample Anti-aliasing (MSAA) - * @see setMultiSampleAntiAliasingOptions() - */ -struct MultiSampleAntiAliasingOptions { - bool enabled = false; //!< enables or disables msaa - - /** - * sampleCount number of samples to use for multi-sampled anti-aliasing.\n - * 0: treated as 1 - * 1: no anti-aliasing - * n: sample count. Effective sample could be different depending on the - * GPU capabilities. - */ - uint8_t sampleCount = 4; - - /** - * custom resolve improves quality for HDR scenes, but may impact performance. - */ - bool customResolve = false; -}; - -/** - * Options for Temporal Anti-aliasing (TAA) - * @see setTemporalAntiAliasingOptions() - */ -struct TemporalAntiAliasingOptions { - float filterWidth = 1.0f; //!< reconstruction filter width typically between 0 (sharper, aliased) and 1 (smoother) - float feedback = 0.04f; //!< history feedback, between 0 (maximum temporal AA) and 1 (no temporal AA). - bool enabled = false; //!< enables or disables temporal anti-aliasing -}; - -/** - * Options for Screen-space Reflections. - * @see setScreenSpaceReflectionsOptions() - */ -struct ScreenSpaceReflectionsOptions { - float thickness = 0.1f; //!< ray thickness, in world units - float bias = 0.01f; //!< bias, in world units, to prevent self-intersections - float maxDistance = 3.0f; //!< maximum distance, in world units, to raycast - float stride = 2.0f; //!< stride, in texels, for samples along the ray. - bool enabled = false; -}; - -/** - * Options for the screen-space guard band. - * A guard band can be enabled to avoid some artifacts towards the edge of the screen when - * using screen-space effects such as SSAO. Enabling the guard band reduces performance slightly. - * Currently the guard band can only be enabled or disabled. - */ -struct GuardBandOptions { - bool enabled = false; -}; - -/** - * List of available post-processing anti-aliasing techniques. - * @see setAntiAliasing, getAntiAliasing, setSampleCount - */ -enum class AntiAliasing : uint8_t { - NONE, //!< no anti aliasing performed as part of post-processing - FXAA //!< FXAA is a low-quality but very efficient type of anti-aliasing. (default). -}; - -/** - * List of available post-processing dithering techniques. - */ -enum class Dithering : uint8_t { - NONE, //!< No dithering - TEMPORAL //!< Temporal dithering (default) -}; - -/** - * List of available shadow mapping techniques. - * @see setShadowType - */ -enum class ShadowType : uint8_t { - PCF, //!< percentage-closer filtered shadows (default) - VSM, //!< variance shadows - DPCF, //!< PCF with contact hardening simulation - PCSS //!< PCF with soft shadows and contact hardening -}; - -/** - * View-level options for VSM Shadowing. - * @see setVsmShadowOptions() - * @warning This API is still experimental and subject to change. - */ -struct VsmShadowOptions { - /** - * Sets the number of anisotropic samples to use when sampling a VSM shadow map. If greater - * than 0, mipmaps will automatically be generated each frame for all lights. - * - * The number of anisotropic samples = 2 ^ vsmAnisotropy. - */ - uint8_t anisotropy = 0; - - /** - * Whether to generate mipmaps for all VSM shadow maps. - */ - bool mipmapping = false; - - /** - * The number of MSAA samples to use when rendering VSM shadow maps. - * Must be a power-of-two and greater than or equal to 1. A value of 1 effectively turns - * off MSAA. - * Higher values may not be available depending on the underlying hardware. - */ - uint8_t msaaSamples = 1; - - /** - * Whether to use a 32-bits or 16-bits texture format for VSM shadow maps. 32-bits - * precision is rarely needed, but it does reduces light leaks as well as "fading" - * of the shadows in some situations. Setting highPrecision to true for a single - * shadow map will double the memory usage of all shadow maps. - */ - bool highPrecision = false; - - /** - * VSM minimum variance scale, must be positive. - */ - float minVarianceScale = 0.5f; - - /** - * VSM light bleeding reduction amount, between 0 and 1. - */ - float lightBleedReduction = 0.15f; -}; - -/** - * View-level options for DPCF and PCSS Shadowing. - * @see setSoftShadowOptions() - * @warning This API is still experimental and subject to change. - */ -struct SoftShadowOptions { - /** - * Globally scales the penumbra of all DPCF and PCSS shadows - * Acceptable values are greater than 0 - */ - float penumbraScale = 1.0f; - - /** - * Globally scales the computed penumbra ratio of all DPCF and PCSS shadows. - * This effectively controls the strength of contact hardening effect and is useful for - * artistic purposes. Higher values make the shadows become softer faster. - * Acceptable values are equal to or greater than 1. - */ - float penumbraRatioScale = 1.0f; -}; - -} // namespace filament - -#endif //TNT_FILAMENT_OPTIONS_H diff --git a/windows/include/filament/filament/RenderTarget.h b/windows/include/filament/filament/RenderTarget.h deleted file mode 100644 index 950bbb8d..00000000 --- a/windows/include/filament/filament/RenderTarget.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_RENDERTARGET_H -#define TNT_FILAMENT_RENDERTARGET_H - -#include - -#include -#include - -#include - -namespace filament { - -class FRenderTarget; - -class Engine; -class Texture; - -/** - * An offscreen render target that can be associated with a View and contains - * weak references to a set of attached Texture objects. - * - * RenderTarget is intended to be used with the View's post-processing disabled for the most part. - * especially when a DEPTH attachment is also used (see Builder::texture()). - * - * Custom RenderTarget are ultimately intended to render into textures that might be used during - * the main render pass. - * - * Clients are responsible for the lifetime of all associated Texture attachments. - * - * @see View - */ -class UTILS_PUBLIC RenderTarget : public FilamentAPI { - struct BuilderDetails; - -public: - using CubemapFace = backend::TextureCubemapFace; - - /** Minimum number of color attachment supported */ - static constexpr uint8_t MIN_SUPPORTED_COLOR_ATTACHMENTS_COUNT = - backend::MRT::MIN_SUPPORTED_RENDER_TARGET_COUNT; - - /** Maximum number of color attachment supported */ - static constexpr uint8_t MAX_SUPPORTED_COLOR_ATTACHMENTS_COUNT = - backend::MRT::MAX_SUPPORTED_RENDER_TARGET_COUNT; - - /** - * Attachment identifiers - */ - enum class AttachmentPoint : uint8_t { - COLOR0 = 0, //!< identifies the 1st color attachment - COLOR1 = 1, //!< identifies the 2nd color attachment - COLOR2 = 2, //!< identifies the 3rd color attachment - COLOR3 = 3, //!< identifies the 4th color attachment - COLOR4 = 4, //!< identifies the 5th color attachment - COLOR5 = 5, //!< identifies the 6th color attachment - COLOR6 = 6, //!< identifies the 7th color attachment - COLOR7 = 7, //!< identifies the 8th color attachment - DEPTH = MAX_SUPPORTED_COLOR_ATTACHMENTS_COUNT, //!< identifies the depth attachment - COLOR = COLOR0, //!< identifies the 1st color attachment - }; - - //! Use Builder to construct a RenderTarget object instance - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - Builder() noexcept; - Builder(Builder const& rhs) noexcept; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder const& rhs) noexcept; - Builder& operator=(Builder&& rhs) noexcept; - - /** - * Sets a texture to a given attachment point. - * - * All RenderTargets must have a non-null COLOR attachment. - * - * When using a DEPTH attachment, it is important to always disable post-processing - * in the View. Failing to do so will cause the DEPTH attachment to be ignored in most - * cases. - * - * When the intention is to keep the content of the DEPTH attachment after rendering, - * Usage::SAMPLEABLE must be set on the DEPTH attachment, otherwise the content of the - * DEPTH buffer may be discarded. - * - * @param attachment The attachment point of the texture. - * @param texture The associated texture object. - * @return A reference to this Builder for chaining calls. - */ - Builder& texture(AttachmentPoint attachment, Texture* texture) noexcept; - - /** - * Sets the mipmap level for a given attachment point. - * - * @param attachment The attachment point of the texture. - * @param level The associated mipmap level, 0 by default. - * @return A reference to this Builder for chaining calls. - */ - Builder& mipLevel(AttachmentPoint attachment, uint8_t level) noexcept; - - /** - * Sets the cubemap face for a given attachment point. - * - * @param attachment The attachment point. - * @param face The associated cubemap face. - * @return A reference to this Builder for chaining calls. - */ - Builder& face(AttachmentPoint attachment, CubemapFace face) noexcept; - - /** - * Sets the layer for a given attachment point (for 3D textures). - * - * @param attachment The attachment point. - * @param layer The associated cubemap layer. - * @return A reference to this Builder for chaining calls. - */ - Builder& layer(AttachmentPoint attachment, uint32_t layer) noexcept; - - /** - * Creates the RenderTarget object and returns a pointer to it. - * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. - */ - RenderTarget* build(Engine& engine); - - private: - friend class FRenderTarget; - }; - - /** - * Gets the texture set on the given attachment point - * @param attachment Attachment point - * @return A Texture object or nullptr if no texture is set for this attachment point - */ - Texture* getTexture(AttachmentPoint attachment) const noexcept; - - /** - * Returns the mipmap level set on the given attachment point - * @param attachment Attachment point - * @return the mipmap level set on the given attachment point - */ - uint8_t getMipLevel(AttachmentPoint attachment) const noexcept; - - /** - * Returns the face of a cubemap set on the given attachment point - * @param attachment Attachment point - * @return A cubemap face identifier. This is only relevant if the attachment's texture is - * a cubemap. - */ - CubemapFace getFace(AttachmentPoint attachment) const noexcept; - - /** - * Returns the texture-layer set on the given attachment point - * @param attachment Attachment point - * @return A texture layer. This is only relevant if the attachment's texture is a 3D texture. - */ - uint32_t getLayer(AttachmentPoint attachment) const noexcept; - - /** - * Returns the number of color attachments usable by this instance of Engine. This method is - * guaranteed to return at least MIN_SUPPORTED_COLOR_ATTACHMENTS_COUNT and at most - * MAX_SUPPORTED_COLOR_ATTACHMENTS_COUNT. - * @return Number of color attachments usable in a render target. - */ - uint8_t getSupportedColorAttachmentsCount() const noexcept; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_RENDERTARGET_H diff --git a/windows/include/filament/filament/RenderableManager.h b/windows/include/filament/filament/RenderableManager.h deleted file mode 100644 index bfb9da47..00000000 --- a/windows/include/filament/filament/RenderableManager.h +++ /dev/null @@ -1,763 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_FILAMENT_RENDERABLEMANAGER_H -#define TNT_FILAMENT_RENDERABLEMANAGER_H - -#include -#include -#include -#include - -#include - -#include -#include - -#include - -#include - -namespace utils { - class Entity; -} // namespace utils - -namespace filament { - -class BufferObject; -class Engine; -class IndexBuffer; -class MaterialInstance; -class Renderer; -class SkinningBuffer; -class VertexBuffer; -class Texture; - -class FEngine; -class FRenderPrimitive; -class FRenderableManager; - -/** - * Factory and manager for \em renderables, which are entities that can be drawn. - * - * Renderables are bundles of \em primitives, each of which has its own geometry and material. All - * primitives in a particular renderable share a set of rendering attributes, such as whether they - * cast shadows or use vertex skinning. - * - * Usage example: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * auto renderable = utils::EntityManager::get().create(); - * - * RenderableManager::Builder(1) - * .boundingBox({{ -1, -1, -1 }, { 1, 1, 1 }}) - * .material(0, matInstance) - * .geometry(0, RenderableManager::PrimitiveType::TRIANGLES, vertBuffer, indBuffer, 0, 3) - * .receiveShadows(false) - * .build(engine, renderable); - * - * scene->addEntity(renderable); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * To modify the state of an existing renderable, clients should first use RenderableManager - * to get a temporary handle called an \em instance. The instance can then be used to get or set - * the renderable's state. Please note that instances are ephemeral; clients should store entities, - * not instances. - * - * - For details about constructing renderables, see RenderableManager::Builder. - * - To associate a 4x4 transform with an entity, see TransformManager. - * - To associate a human-readable label with an entity, see utils::NameComponentManager. - */ -class UTILS_PUBLIC RenderableManager : public FilamentAPI { - struct BuilderDetails; - -public: - using Instance = utils::EntityInstance; - using PrimitiveType = backend::PrimitiveType; - - /** - * Checks if the given entity already has a renderable component. - */ - bool hasComponent(utils::Entity e) const noexcept; - - /** - * Gets a temporary handle that can be used to access the renderable state. - * - * @return Non-zero handle if the entity has a renderable component, 0 otherwise. - */ - Instance getInstance(utils::Entity e) const noexcept; - - /** - * The transformation associated with a skinning joint. - * - * Clients can specify bones either using this quat-vec3 pair, or by using 4x4 matrices. - */ - struct Bone { - math::quatf unitQuaternion = { 1.f, 0.f, 0.f, 0.f }; - math::float3 translation = { 0.f, 0.f, 0.f }; - float reserved = 0; - }; - - /** - * Adds renderable components to entities using a builder pattern. - */ - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - enum Result { Error = -1, Success = 0 }; - - /** - * Default render channel - * @see Builder::channel() - */ - static constexpr uint8_t DEFAULT_CHANNEL = 2u; - - /** - * Creates a builder for renderable components. - * - * @param count the number of primitives that will be supplied to the builder - * - * Note that builders typically do not have a long lifetime since clients should discard - * them after calling build(). For a usage example, see RenderableManager. - */ - explicit Builder(size_t count) noexcept; - - /*! \cond PRIVATE */ - Builder(Builder const& rhs) = delete; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder& rhs) = delete; - Builder& operator=(Builder&& rhs) noexcept; - /*! \endcond */ - - /** - * Specifies the geometry data for a primitive. - * - * Filament primitives must have an associated VertexBuffer and IndexBuffer. Typically, each - * primitive is specified with a pair of daisy-chained calls: \c geometry(...) and \c - * material(...). - * - * @param index zero-based index of the primitive, must be less than the count passed to Builder constructor - * @param type specifies the topology of the primitive (e.g., \c RenderableManager::PrimitiveType::TRIANGLES) - * @param vertices specifies the vertex buffer, which in turn specifies a set of attributes - * @param indices specifies the index buffer (either u16 or u32) - * @param offset specifies where in the index buffer to start reading (expressed as a number of indices) - * @param minIndex specifies the minimum index contained in the index buffer - * @param maxIndex specifies the maximum index contained in the index buffer - * @param count number of indices to read (for triangles, this should be a multiple of 3) - */ - Builder& geometry(size_t index, PrimitiveType type, VertexBuffer* vertices, IndexBuffer* indices, size_t offset, size_t minIndex, size_t maxIndex, size_t count) noexcept; - Builder& geometry(size_t index, PrimitiveType type, VertexBuffer* vertices, IndexBuffer* indices, size_t offset, size_t count) noexcept; //!< \overload - Builder& geometry(size_t index, PrimitiveType type, VertexBuffer* vertices, IndexBuffer* indices) noexcept; //!< \overload - - /** - * Binds a material instance to the specified primitive. - * - * If no material is specified for a given primitive, Filament will fall back to a basic - * default material. - * - * The MaterialInstance's material must have a feature level equal or lower to the engine's - * selected feature level. - * - * @param index zero-based index of the primitive, must be less than the count passed to - * Builder constructor - * @param materialInstance the material to bind - * - * @see Engine::setActiveFeatureLevel - */ - Builder& material(size_t index, MaterialInstance const* materialInstance) noexcept; - - /** - * The axis-aligned bounding box of the renderable. - * - * This is an object-space AABB used for frustum culling. For skinning and morphing, this - * should encompass all possible vertex positions. It is mandatory unless culling is - * disabled for the renderable. - * - * \see computeAABB() - */ - Builder& boundingBox(const Box& axisAlignedBoundingBox) noexcept; - - /** - * Sets bits in a visibility mask. By default, this is 0x1. - * - * This feature provides a simple mechanism for hiding and showing groups of renderables - * in a Scene. See View::setVisibleLayers(). - * - * For example, to set bit 1 and reset bits 0 and 2 while leaving all other bits unaffected, - * do: `builder.layerMask(7, 2)`. - * - * To change this at run time, see RenderableManager::setLayerMask. - * - * @param select the set of bits to affect - * @param values the replacement values for the affected bits - */ - Builder& layerMask(uint8_t select, uint8_t values) noexcept; - - /** - * Provides coarse-grained control over draw order. - * - * In general Filament reserves the right to re-order renderables to allow for efficient - * rendering. However clients can control ordering at a coarse level using \em priority. - * The priority is applied separately for opaque and translucent objects, that is, opaque - * objects are always drawn before translucent objects regardless of the priority. - * - * For example, this could be used to draw a semitransparent HUD on top of everything, - * without using a separate View. Note that priority is completely orthogonal to - * Builder::layerMask, which merely controls visibility. - * - * The Skybox always using the lowest priority, so it's drawn last, which may improve - * performance. - * - * @param priority clamped to the range [0..7], defaults to 4; 7 is lowest priority - * (rendered last). - * - * @return Builder reference for chaining calls. - * - * @see Builder::blendOrder() - * @see Builder::channel() - * @see RenderableManager::setPriority() - * @see RenderableManager::setBlendOrderAt() - */ - Builder& priority(uint8_t priority) noexcept; - - /** - * Set the channel this renderable is associated to. There can be 4 channels. - * All renderables in a given channel are rendered together, regardless of anything else. - * They are sorted as usual within a channel. - * Channels work similarly to priorities, except that they enforce the strongest ordering. - * - * Channels 0 and 1 may not have render primitives using a material with `refractionType` - * set to `screenspace`. - * - * @param channel clamped to the range [0..3], defaults to 2. - * - * @return Builder reference for chaining calls. - * - * @see Builder::blendOrder() - * @see Builder::priority() - * @see RenderableManager::setBlendOrderAt() - */ - Builder& channel(uint8_t channel) noexcept; - - /** - * Controls frustum culling, true by default. - * - * \note Do not confuse frustum culling with backface culling. The latter is controlled via - * the material. - */ - Builder& culling(bool enable) noexcept; - - /** - * Enables or disables a light channel. Light channel 0 is enabled by default. - * - * @param channel Light channel to enable or disable, between 0 and 7. - * @param enable Whether to enable or disable the light channel. - */ - Builder& lightChannel(unsigned int channel, bool enable = true) noexcept; - - /** - * Controls if this renderable casts shadows, false by default. - * - * If the View's shadow type is set to ShadowType::VSM, castShadows should only be disabled - * if either is true: - * - receiveShadows is also disabled - * - the object is guaranteed to not cast shadows on itself or other objects (for example, - * a ground plane) - */ - Builder& castShadows(bool enable) noexcept; - - /** - * Controls if this renderable receives shadows, true by default. - */ - Builder& receiveShadows(bool enable) noexcept; - - /** - * Controls if this renderable uses screen-space contact shadows. This is more - * expensive but can improve the quality of shadows, especially in large scenes. - * (off by default). - */ - Builder& screenSpaceContactShadows(bool enable) noexcept; - - /** - * Allows bones to be swapped out and shared using SkinningBuffer. - * - * If skinning buffer mode is enabled, clients must call setSkinningBuffer() rather than - * setBones(). This allows sharing of data between renderables. - * - * @param enabled If true, enables buffer object mode. False by default. - */ - Builder& enableSkinningBuffers(bool enabled = true) noexcept; - - /** - * Enables GPU vertex skinning for up to 255 bones, 0 by default. - * - * Skinning Buffer mode must be enabled. - * - * Each vertex can be affected by up to 4 bones simultaneously. The attached - * VertexBuffer must provide data in the \c BONE_INDICES slot (uvec4) and the - * \c BONE_WEIGHTS slot (float4). - * - * See also RenderableManager::setSkinningBuffer() or SkinningBuffer::setBones(), - * which can be called on a per-frame basis to advance the animation. - * - * @param skinningBuffer nullptr to disable, otherwise the SkinningBuffer to use - * @param count 0 to disable, otherwise the number of bone transforms (up to 255) - * @param offset offset in the SkinningBuffer - */ - Builder& skinning(SkinningBuffer* skinningBuffer, size_t count, size_t offset) noexcept; - - - /** - * Enables GPU vertex skinning for up to 255 bones, 0 by default. - * - * Skinning Buffer mode must be disabled. - * - * Each vertex can be affected by up to 4 bones simultaneously. The attached - * VertexBuffer must provide data in the \c BONE_INDICES slot (uvec4) and the - * \c BONE_WEIGHTS slot (float4). - * - * See also RenderableManager::setBones(), which can be called on a per-frame basis - * to advance the animation. - * - * @param boneCount 0 to disable, otherwise the number of bone transforms (up to 255) - * @param transforms the initial set of transforms (one for each bone) - */ - Builder& skinning(size_t boneCount, math::mat4f const* transforms) noexcept; - Builder& skinning(size_t boneCount, Bone const* bones) noexcept; //!< \overload - Builder& skinning(size_t boneCount) noexcept; //!< \overload - - /** - * Controls if the renderable has vertex morphing targets, zero by default. This is - * required to enable GPU morphing. - * - * Filament supports two morphing modes: standard (default) and legacy. - * - * For standard morphing, A MorphTargetBuffer must be created and provided via - * RenderableManager::setMorphTargetBufferAt(). Standard morphing supports up to - * \c CONFIG_MAX_MORPH_TARGET_COUNT morph targets. - * - * For legacy morphing, the attached VertexBuffer must provide data in the - * appropriate VertexAttribute slots (\c MORPH_POSITION_0 etc). Legacy morphing only - * supports up to 4 morph targets and will be deprecated in the future. Legacy morphing must - * be enabled on the material definition: either via the legacyMorphing material attribute - * or by calling filamat::MaterialBuilder::useLegacyMorphing(). - * - * See also RenderableManager::setMorphWeights(), which can be called on a per-frame basis - * to advance the animation. - */ - Builder& morphing(size_t targetCount) noexcept; - - /** - * Specifies the morph target buffer for a primitive. - * - * The morph target buffer must have an associated renderable and geometry. Two conditions - * must be met: - * 1. The number of morph targets in the buffer must equal the renderable's morph target - * count. - * 2. The vertex count of each morph target must equal the geometry's vertex count. - * - * @param level the level of detail (lod), only 0 can be specified - * @param primitiveIndex zero-based index of the primitive, must be less than the count passed to Builder constructor - * @param morphTargetBuffer specifies the morph target buffer - * @param offset specifies where in the morph target buffer to start reading (expressed as a number of vertices) - * @param count number of vertices in the morph target buffer to read, must equal the geometry's count (for triangles, this should be a multiple of 3) - */ - Builder& morphing(uint8_t level, size_t primitiveIndex, - MorphTargetBuffer* morphTargetBuffer, size_t offset, size_t count) noexcept; - - inline Builder& morphing(uint8_t level, size_t primitiveIndex, - MorphTargetBuffer* morphTargetBuffer) noexcept; - - /** - * Sets the drawing order for blended primitives. The drawing order is either global or - * local (default) to this Renderable. In either case, the Renderable priority takes - * precedence. - * - * @param primitiveIndex the primitive of interest - * @param order draw order number (0 by default). Only the lowest 15 bits are used. - * - * @return Builder reference for chaining calls. - * - * @see globalBlendOrderEnabled - */ - Builder& blendOrder(size_t primitiveIndex, uint16_t order) noexcept; - - /** - * Sets whether the blend order is global or local to this Renderable (by default). - * - * @param primitiveIndex the primitive of interest - * @param enabled true for global, false for local blend ordering. - * - * @return Builder reference for chaining calls. - * - * @see blendOrder - */ - Builder& globalBlendOrderEnabled(size_t primitiveIndex, bool enabled) noexcept; - - - /** - * Specifies the number of draw instance of this renderable. The default is 1 instance and - * the maximum number of instances allowed is 32767. 0 is invalid. - * All instances are culled using the same bounding box, so care must be taken to make - * sure all instances render inside the specified bounding box. - * The material must set its `instanced` parameter to `true` in order to use - * getInstanceIndex() in the vertex or fragment shader to get the instance index and - * possibly adjust the position or transform. - * It generally doesn't make sense to use VERTEX_DOMAIN_OBJECT in the material, since it - * would pull the same transform for all instances. - * - * @param instanceCount the number of instances silently clamped between 1 and 32767. - */ - Builder& instances(size_t instanceCount) noexcept; - - /** - * Adds the Renderable component to an entity. - * - * @param engine Reference to the filament::Engine to associate this Renderable with. - * @param entity Entity to add the Renderable component to. - * @return Success if the component was created successfully, Error otherwise. - * - * If exceptions are disabled and an error occurs, this function is a no-op. - * Success can be checked by looking at the return value. - * - * If this component already exists on the given entity and the construction is successful, - * it is first destroyed as if destroy(utils::Entity e) was called. In case of error, - * the existing component is unmodified. - * - * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of - * memory or other resources. - * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. - */ - Result build(Engine& engine, utils::Entity entity); - - private: - friend class FEngine; - friend class FRenderPrimitive; - friend class FRenderableManager; - struct Entry { - VertexBuffer* vertices = nullptr; - IndexBuffer* indices = nullptr; - size_t offset = 0; - size_t minIndex = 0; - size_t maxIndex = 0; - size_t count = 0; - MaterialInstance const* materialInstance = nullptr; - PrimitiveType type = PrimitiveType::TRIANGLES; - uint16_t blendOrder = 0; - bool globalBlendOrderEnabled = false; - struct { - MorphTargetBuffer* buffer = nullptr; - size_t offset = 0; - size_t count = 0; - } morphing; - }; - }; - - /** - * Destroys the renderable component in the given entity. - */ - void destroy(utils::Entity e) noexcept; - - /** - * Changes the bounding box used for frustum culling. - * - * \see Builder::boundingBox() - * \see RenderableManager::getAxisAlignedBoundingBox() - */ - void setAxisAlignedBoundingBox(Instance instance, const Box& aabb) noexcept; - - /** - * Changes the visibility bits. - * - * \see Builder::layerMask() - * \see View::setVisibleLayers(). - * \see RenderableManager::getLayerMask() - */ - void setLayerMask(Instance instance, uint8_t select, uint8_t values) noexcept; - - /** - * Changes the coarse-level draw ordering. - * - * \see Builder::priority(). - */ - void setPriority(Instance instance, uint8_t priority) noexcept; - - /** - * Changes the channel a renderable is associated to. - * - * \see Builder::channel(). - */ - void setChannel(Instance instance, uint8_t channel) noexcept; - - /** - * Changes whether or not frustum culling is on. - * - * \see Builder::culling() - */ - void setCulling(Instance instance, bool enable) noexcept; - - /** - * Enables or disables a light channel. - * Light channel 0 is enabled by default. - * - * \see Builder::lightChannel() - */ - void setLightChannel(Instance instance, unsigned int channel, bool enable) noexcept; - - /** - * Returns whether a light channel is enabled on a specified renderable. - * @param instance Instance of the component obtained from getInstance(). - * @param channel Light channel to query - * @return true if the light channel is enabled, false otherwise - */ - bool getLightChannel(Instance instance, unsigned int channel) const noexcept; - - /** - * Changes whether or not the renderable casts shadows. - * - * \see Builder::castShadows() - */ - void setCastShadows(Instance instance, bool enable) noexcept; - - /** - * Changes whether or not the renderable can receive shadows. - * - * \see Builder::receiveShadows() - */ - void setReceiveShadows(Instance instance, bool enable) noexcept; - - /** - * Changes whether or not the renderable can use screen-space contact shadows. - * - * \see Builder::screenSpaceContactShadows() - */ - void setScreenSpaceContactShadows(Instance instance, bool enable) noexcept; - - /** - * Checks if the renderable can cast shadows. - * - * \see Builder::castShadows(). - */ - bool isShadowCaster(Instance instance) const noexcept; - - /** - * Checks if the renderable can receive shadows. - * - * \see Builder::receiveShadows(). - */ - bool isShadowReceiver(Instance instance) const noexcept; - - /** - * Updates the bone transforms in the range [offset, offset + boneCount). - * The bones must be pre-allocated using Builder::skinning(). - */ - void setBones(Instance instance, Bone const* transforms, size_t boneCount = 1, size_t offset = 0); - void setBones(Instance instance, math::mat4f const* transforms, size_t boneCount = 1, size_t offset = 0); //!< \overload - - /** - * Associates a region of a SkinningBuffer to a renderable instance - * - * Note: due to hardware limitations offset + 256 must be smaller or equal to - * skinningBuffer->getBoneCount() - * - * @param instance Instance of the component obtained from getInstance(). - * @param skinningBuffer skinning buffer to associate to the instance - * @param count Size of the region in bones, must be smaller or equal to 256. - * @param offset Start offset of the region in bones - */ - void setSkinningBuffer(Instance instance, SkinningBuffer* skinningBuffer, - size_t count, size_t offset); - - /** - * Updates the vertex morphing weights on a renderable, all zeroes by default. - * - * The renderable must be built with morphing enabled, see Builder::morphing(). In legacy - * morphing mode, only the first 4 weights are considered. - * - * @param instance Instance of the component obtained from getInstance(). - * @param weights Pointer to morph target weights to be update. - * @param count Number of morph target weights. - * @param offset Index of the first morph target weight to set at instance. - */ - void setMorphWeights(Instance instance, - float const* weights, size_t count, size_t offset = 0); - - /** - * Associates a MorphTargetBuffer to the given primitive. - */ - void setMorphTargetBufferAt(Instance instance, uint8_t level, size_t primitiveIndex, - MorphTargetBuffer* morphTargetBuffer, size_t offset, size_t count); - - /** - * Utility method to change a MorphTargetBuffer to the given primitive - */ - inline void setMorphTargetBufferAt(Instance instance, uint8_t level, size_t primitiveIndex, - MorphTargetBuffer* morphTargetBuffer); - - /** - * Get a MorphTargetBuffer to the given primitive or null if it doesn't exist. - */ - MorphTargetBuffer* getMorphTargetBufferAt(Instance instance, uint8_t level, size_t primitiveIndex) const noexcept; - - /** - * Gets the number of morphing in the given entity. - */ - size_t getMorphTargetCount(Instance instance) const noexcept; - - /** - * Gets the bounding box used for frustum culling. - * - * \see Builder::boundingBox() - * \see RenderableManager::setAxisAlignedBoundingBox() - */ - const Box& getAxisAlignedBoundingBox(Instance instance) const noexcept; - - /** - * Get the visibility bits. - * - * \see Builder::layerMask() - * \see View::setVisibleLayers(). - * \see RenderableManager::getLayerMask() - */ - uint8_t getLayerMask(Instance instance) const noexcept; - - /** - * Gets the immutable number of primitives in the given renderable. - */ - size_t getPrimitiveCount(Instance instance) const noexcept; - - /** - * Changes the material instance binding for the given primitive. - * - * The MaterialInstance's material must have a feature level equal or lower to the engine's - * selected feature level. - * - * @exception utils::PreConditionPanic if the engine doesn't support the material's - * feature level. - * - * @see Builder::material() - * @see Engine::setActiveFeatureLevel - */ - void setMaterialInstanceAt(Instance instance, - size_t primitiveIndex, MaterialInstance const* materialInstance); - - /** - * Retrieves the material instance that is bound to the given primitive. - */ - MaterialInstance* getMaterialInstanceAt(Instance instance, size_t primitiveIndex) const noexcept; - - /** - * Changes the geometry for the given primitive. - * - * \see Builder::geometry() - */ - void setGeometryAt(Instance instance, size_t primitiveIndex, - PrimitiveType type, VertexBuffer* vertices, IndexBuffer* indices, - size_t offset, size_t count) noexcept; - - /** - * Changes the drawing order for blended primitives. The drawing order is either global or - * local (default) to this Renderable. In either case, the Renderable priority takes precedence. - * - * @param instance the renderable of interest - * @param primitiveIndex the primitive of interest - * @param order draw order number (0 by default). Only the lowest 15 bits are used. - * - * @see Builder::blendOrder(), setGlobalBlendOrderEnabledAt() - */ - void setBlendOrderAt(Instance instance, size_t primitiveIndex, uint16_t order) noexcept; - - /** - * Changes whether the blend order is global or local to this Renderable (by default). - * - * @param instance the renderable of interest - * @param primitiveIndex the primitive of interest - * @param enabled true for global, false for local blend ordering. - * - * @see Builder::globalBlendOrderEnabled(), setBlendOrderAt() - */ - void setGlobalBlendOrderEnabledAt(Instance instance, size_t primitiveIndex, bool enabled) noexcept; - - /** - * Retrieves the set of enabled attribute slots in the given primitive's VertexBuffer. - */ - AttributeBitset getEnabledAttributesAt(Instance instance, size_t primitiveIndex) const noexcept; - - /*! \cond PRIVATE */ - template - struct is_supported_vector_type { - using type = typename std::enable_if< - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value - >::type; - }; - - template - struct is_supported_index_type { - using type = typename std::enable_if< - std::is_same::value || - std::is_same::value - >::type; - }; - /*! \endcond */ - - /** - * Utility method that computes the axis-aligned bounding box from a set of vertices. - * - * - The index type must be \c uint16_t or \c uint32_t. - * - The vertex type must be \c float4, \c half4, \c float3, or \c half3. - * - For 4-component vertices, the w component is ignored (implicitly replaced with 1.0). - */ - template::type, - typename = typename is_supported_index_type::type> - static Box computeAABB(VECTOR const* vertices, INDEX const* indices, size_t count, - size_t stride = sizeof(VECTOR)) noexcept; -}; - -RenderableManager::Builder& RenderableManager::Builder::morphing(uint8_t level, size_t primitiveIndex, - MorphTargetBuffer* morphTargetBuffer) noexcept { - return morphing(level, primitiveIndex, morphTargetBuffer, 0, - morphTargetBuffer->getVertexCount()); -} - -void RenderableManager::setMorphTargetBufferAt(Instance instance, uint8_t level, size_t primitiveIndex, - MorphTargetBuffer* morphTargetBuffer) { - setMorphTargetBufferAt(instance, level, primitiveIndex, morphTargetBuffer, 0, - morphTargetBuffer->getVertexCount()); -} - -template -Box RenderableManager::computeAABB(VECTOR const* vertices, INDEX const* indices, size_t count, - size_t stride) noexcept { - math::float3 bmin(std::numeric_limits::max()); - math::float3 bmax(std::numeric_limits::lowest()); - for (size_t i = 0; i < count; ++i) { - VECTOR const* p = reinterpret_cast( - (char const*)vertices + indices[i] * stride); - const math::float3 v(p->x, p->y, p->z); - bmin = min(bmin, v); - bmax = max(bmax, v); - } - return Box().set(bmin, bmax); -} - -} // namespace filament - -#endif // TNT_FILAMENT_RENDERABLEMANAGER_H diff --git a/windows/include/filament/filament/Renderer.h b/windows/include/filament/filament/Renderer.h deleted file mode 100644 index 111026bb..00000000 --- a/windows/include/filament/filament/Renderer.h +++ /dev/null @@ -1,580 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_RENDERER_H -#define TNT_FILAMENT_RENDERER_H - -#include - -#include - -#include -#include - -#include - -#include - -namespace filament { - -class Engine; -class RenderTarget; -class SwapChain; -class View; -class Viewport; - -namespace backend { -class PixelBufferDescriptor; -} // namespace backend - -/** - * A Renderer instance represents an operating system's window. - * - * Typically, applications create a Renderer per window. The Renderer generates drawing commands - * for the render thread and manages frame latency. - * - * A Renderer generates drawing commands from a View, itself containing a Scene description. - * - * Creation and Destruction - * ======================== - * - * A Renderer is created using Engine.createRenderer() and destroyed using - * Engine.destroy(const Renderer*). - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * #include - * #include - * using namespace filament; - * - * Engine* engine = Engine::create(); - * - * Renderer* renderer = engine->createRenderer(); - * engine->destroy(&renderer); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * @see Engine, View - */ -class UTILS_PUBLIC Renderer : public FilamentAPI { -public: - - /** - * Use DisplayInfo to set important Display properties. This is used to achieve correct - * frame pacing and dynamic resolution scaling. - */ - struct DisplayInfo { - // refresh-rate of the display in Hz. set to 0 for offscreen or turn off frame-pacing. - float refreshRate = 60.0f; - - UTILS_DEPRECATED uint64_t presentationDeadlineNanos = 0; - UTILS_DEPRECATED uint64_t vsyncOffsetNanos = 0; - }; - - /** - * Use FrameRateOptions to set the desired frame rate and control how quickly the system - * reacts to GPU load changes. - * - * interval: desired frame interval in multiple of the refresh period, set in DisplayInfo - * (as 1 / DisplayInfo::refreshRate) - * - * The parameters below are relevant when some Views are using dynamic resolution scaling: - * - * headRoomRatio: additional headroom for the GPU as a ratio of the targetFrameTime. - * Useful for taking into account constant costs like post-processing or - * GPU drivers on different platforms. - * history: History size. higher values, tend to filter more (clamped to 31) - * scaleRate: rate at which the gpu load is adjusted to reach the target frame rate - * This value can be computed as 1 / N, where N is the number of frames - * needed to reach 64% of the target scale factor. - * Higher values make the dynamic resolution react faster. - * - * @see View::DynamicResolutionOptions - * @see Renderer::DisplayInfo - * - */ - struct FrameRateOptions { - float headRoomRatio = 0.0f; //!< additional headroom for the GPU - float scaleRate = 1.0f / 8.0f; //!< rate at which the system reacts to load changes - uint8_t history = 15; //!< history size - uint8_t interval = 1; //!< desired frame interval in unit of 1.0 / DisplayInfo::refreshRate - }; - - /** - * ClearOptions are used at the beginning of a frame to clear or retain the SwapChain content. - */ - struct ClearOptions { - /** - * Color (sRGB linear) to use to clear the RenderTarget (typically the SwapChain). - * - * The RenderTarget is cleared using this color, which won't be tone-mapped since - * tone-mapping is part of View rendering (this is not). - * - * When a View is rendered, there are 3 scenarios to consider: - * - Pixels rendered by the View replace the clear color (or blend with it in - * `BlendMode::TRANSLUCENT` mode). - * - * - With blending mode set to `BlendMode::TRANSLUCENT`, Pixels untouched by the View - * are considered fulling transparent and let the clear color show through. - * - * - With blending mode set to `BlendMode::OPAQUE`, Pixels untouched by the View - * are set to the clear color. However, because it is now used in the context of a View, - * it will go through the post-processing stage, which includes tone-mapping. - * - * For consistency, it is recommended to always use a Skybox to clear an opaque View's - * background, or to use black or fully-transparent (i.e. {0,0,0,0}) as the clear color. - */ - math::float4 clearColor = {}; - - /** Value to clear the stencil buffer */ - uint8_t clearStencil = 0u; - - /** - * Whether the SwapChain should be cleared using the clearColor. Use this if translucent - * View will be drawn, for instance. - */ - bool clear = false; - - /** - * Whether the SwapChain content should be discarded. clear implies discard. Set this - * to false (along with clear to false as well) if the SwapChain already has content that - * needs to be preserved - */ - bool discard = true; - }; - - /** - * Information about the display this Renderer is associated to. This information is needed - * to accurately compute dynamic-resolution scaling and for frame-pacing. - */ - void setDisplayInfo(const DisplayInfo& info) noexcept; - - /** - * Set options controlling the desired frame-rate. - */ - void setFrameRateOptions(FrameRateOptions const& options) noexcept; - - /** - * Set ClearOptions which are used at the beginning of a frame to clear or retain the - * SwapChain content. - */ - void setClearOptions(const ClearOptions& options); - - /** - * Get the Engine that created this Renderer. - * - * @return A pointer to the Engine instance this Renderer is associated to. - */ - Engine* getEngine() noexcept; - - /** - * Get the Engine that created this Renderer. - * - * @return A constant pointer to the Engine instance this Renderer is associated to. - */ - inline Engine const* getEngine() const noexcept { - return const_cast(this)->getEngine(); - } - - /** - * Flags used to configure the behavior of copyFrame(). - * - * @see - * copyFrame() - */ - using CopyFrameFlag = uint32_t; - - /** - * Indicates that the dstSwapChain passed into copyFrame() should be - * committed after the frame has been copied. - * - * @see - * copyFrame() - */ - static constexpr CopyFrameFlag COMMIT = 0x1; - /** - * Indicates that the presentation time should be set on the dstSwapChain - * passed into copyFrame to the monotonic clock time when the frame is - * copied. - * - * @see - * copyFrame() - */ - static constexpr CopyFrameFlag SET_PRESENTATION_TIME = 0x2; - /** - * Indicates that the dstSwapChain passed into copyFrame() should be - * cleared to black before the frame is copied into the specified viewport. - * - * @see - * copyFrame() - */ - static constexpr CopyFrameFlag CLEAR = 0x4; - - - /** - * Set-up a frame for this Renderer. - * - * beginFrame() manages frame pacing, and returns whether or not a frame should be drawn. The - * goal of this is to skip frames when the GPU falls behind in order to keep the frame - * latency low. - * - * If a given frame takes too much time in the GPU, the CPU will get ahead of the GPU. The - * display will draw the same frame twice producing a stutter. At this point, the CPU is - * ahead of the GPU and depending on how many frames are buffered, latency increases. - * - * beginFrame() attempts to detect this situation and returns false in that case, indicating - * to the caller to skip the current frame. - * - * When beginFrame() returns true, it is mandatory to render the frame and call endFrame(). - * However, when beginFrame() returns false, the caller has the choice to either skip the - * frame and not call endFrame(), or proceed as though true was returned. - * - * @param vsyncSteadyClockTimeNano The time in nanosecond of when the current frame started, - * or 0 if unknown. This value should be the timestamp of - * the last h/w vsync. It is expressed in the - * std::chrono::steady_clock time base. - * @param swapChain A pointer to the SwapChain instance to use. - * - * @return - * *false* the current frame should be skipped, - * *true* the current frame must be drawn and endFrame() must be called. - * - * @remark - * When skipping a frame, the whole frame is canceled, and endFrame() must not be called. - * - * @note - * All calls to render() must happen *after* beginFrame(). - * - * @see - * endFrame() - */ - bool beginFrame(SwapChain* swapChain, - uint64_t vsyncSteadyClockTimeNano = 0u); - - /** - * Set the time at which the frame must be presented to the display. - * - * This must be called between beginFrame() and endFrame(). - * - * @param monotonic_clock_ns the time in nanoseconds corresponding to the system monotonic up-time clock. - * the presentation time is typically set in the middle of the period - * of interest. The presentation time cannot be too far in the - * future because it is limited by how many buffers are available in - * the display sub-system. Typically it is set to 1 or 2 vsync periods - * away. - */ - void setPresentationTime(int64_t monotonic_clock_ns); - - /** - * Render a View into this renderer's window. - * - * This is filament main rendering method, most of the CPU-side heavy lifting is performed - * here. render() main function is to generate render commands which are asynchronously - * executed by the Engine's render thread. - * - * render() generates commands for each of the following stages: - * - * 1. Shadow map passes, if needed. - * 2. Depth pre-pass. - * 3. Color pass. - * 4. Post-processing pass. - * - * A typical render loop looks like this: - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * #include - * #include - * using namespace filament; - * - * void renderLoop(Renderer* renderer, SwapChain* swapChain) { - * do { - * // typically we wait for VSYNC and user input events - * if (renderer->beginFrame(swapChain)) { - * renderer->render(mView); - * renderer->endFrame(); - * } - * } while (!quit()); - * } - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * - * @param view A pointer to the view to render. - * - * @attention - * render() must be called *after* beginFrame() and *before* endFrame(). - * - * @note - * render() must be called from the Engine's main thread (or external synchronization - * must be provided). In particular, calls to render() on different Renderer instances - * **must** be synchronized. - * - * @remark - * render() perform potentially heavy computations and cannot be multi-threaded. However, - * internally, render() is highly multi-threaded to both improve performance in mitigate - * the call's latency. - * - * @remark - * render() is typically called once per frame (but not necessarily). - * - * @see - * beginFrame(), endFrame(), View - * - */ - void render(View const* view); - - /** - * Copy the currently rendered view to the indicated swap chain, using the - * indicated source and destination rectangle. - * - * @param dstSwapChain The swap chain into which the frame should be copied. - * @param dstViewport The destination rectangle in which to draw the view. - * @param srcViewport The source rectangle to be copied. - * @param flags One or more CopyFrameFlag behavior configuration flags. - * - * @remark - * copyFrame() should be called after a frame is rendered using render() - * but before endFrame() is called. - */ - void copyFrame(SwapChain* dstSwapChain, Viewport const& dstViewport, - Viewport const& srcViewport, uint32_t flags = 0); - - /** - * Reads back the content of the SwapChain associated with this Renderer. - * - * @param xoffset Left offset of the sub-region to read back. - * @param yoffset Bottom offset of the sub-region to read back. - * @param width Width of the sub-region to read back. - * @param height Height of the sub-region to read back. - * @param buffer Client-side buffer where the read-back will be written. - * - * The following formats are always supported: - * - PixelBufferDescriptor::PixelDataFormat::RGBA - * - PixelBufferDescriptor::PixelDataFormat::RGBA_INTEGER - * - * The following types are always supported: - * - PixelBufferDescriptor::PixelDataType::UBYTE - * - PixelBufferDescriptor::PixelDataType::UINT - * - PixelBufferDescriptor::PixelDataType::INT - * - PixelBufferDescriptor::PixelDataType::FLOAT - * - * Other combinations of format/type may be supported. If a combination is - * not supported, this operation may fail silently. Use a DEBUG build - * to get some logs about the failure. - * - * - * Framebuffer as seen on User buffer (PixelBufferDescriptor&) - * screen - * - * +--------------------+ - * | | .stride .alignment - * | | ----------------------->--> - * | | O----------------------+--+ low addresses - * | | | | | | - * | w | | | .top | | - * | <---------> | | V | | - * | +---------+ | | +---------+ | | - * | | ^ | | ======> | | | | | - * | x | h| | | |.left| | | | - * +------>| v | | +---->| | | | - * | +.........+ | | +.........+ | | - * | ^ | | | | - * | y | | +----------------------+--+ high addresses - * O------------+-------+ - * - * - * readPixels() must be called within a frame, meaning after beginFrame() and before endFrame(). - * Typically, readPixels() will be called after render(). - * - * After issuing this method, the callback associated with `buffer` will be invoked on the - * main thread, indicating that the read-back has completed. Typically, this will happen - * after multiple calls to beginFrame(), render(), endFrame(). - * - * It is also possible to use a Fence to wait for the read-back. - * - * @remark - * readPixels() is intended for debugging and testing. It will impact performance significantly. - * - */ - void readPixels(uint32_t xoffset, uint32_t yoffset, uint32_t width, uint32_t height, - backend::PixelBufferDescriptor&& buffer); - - /** - * Finishes the current frame and schedules it for display. - * - * endFrame() schedules the current frame to be displayed on the Renderer's window. - * - * @note - * All calls to render() must happen *before* endFrame(). endFrame() must be called if - * beginFrame() returned true, otherwise, endFrame() must not be called unless the caller - * ignored beginFrame()'s return value. - * - * @see - * beginFrame() - */ - void endFrame(); - - - /** - * Reads back the content of the provided RenderTarget. - * - * @param renderTarget RenderTarget to read back from. - * @param xoffset Left offset of the sub-region to read back. - * @param yoffset Bottom offset of the sub-region to read back. - * @param width Width of the sub-region to read back. - * @param height Height of the sub-region to read back. - * @param buffer Client-side buffer where the read-back will be written. - * - * The following formats are always supported: - * - PixelBufferDescriptor::PixelDataFormat::RGBA - * - PixelBufferDescriptor::PixelDataFormat::RGBA_INTEGER - * - * The following types are always supported: - * - PixelBufferDescriptor::PixelDataType::UBYTE - * - PixelBufferDescriptor::PixelDataType::UINT - * - PixelBufferDescriptor::PixelDataType::INT - * - PixelBufferDescriptor::PixelDataType::FLOAT - * - * Other combinations of format/type may be supported. If a combination is - * not supported, this operation may fail silently. Use a DEBUG build - * to get some logs about the failure. - * - * - * Framebuffer as seen on User buffer (PixelBufferDescriptor&) - * screen - * - * +--------------------+ - * | | .stride .alignment - * | | ----------------------->--> - * | | O----------------------+--+ low addresses - * | | | | | | - * | w | | | .top | | - * | <---------> | | V | | - * | +---------+ | | +---------+ | | - * | | ^ | | ======> | | | | | - * | x | h| | | |.left| | | | - * +------>| v | | +---->| | | | - * | +.........+ | | +.........+ | | - * | ^ | | | | - * | y | | +----------------------+--+ high addresses - * O------------+-------+ - * - * - * Typically readPixels() will be called after render() and before endFrame(). - * - * After issuing this method, the callback associated with `buffer` will be invoked on the - * main thread, indicating that the read-back has completed. Typically, this will happen - * after multiple calls to beginFrame(), render(), endFrame(). - * - * It is also possible to use a Fence to wait for the read-back. - * - * OpenGL only: if issuing a readPixels on a RenderTarget backed by a Texture that had data - * uploaded to it via setImage, the data returned from readPixels will be y-flipped with respect - * to the setImage call. - * - * @remark - * readPixels() is intended for debugging and testing. It will impact performance significantly. - * - */ - void readPixels(RenderTarget* renderTarget, - uint32_t xoffset, uint32_t yoffset, uint32_t width, uint32_t height, - backend::PixelBufferDescriptor&& buffer); - - /** - * Render a standalone View into its associated RenderTarget - * - * This call is mostly equivalent to calling render(View*) inside a - * beginFrame / endFrame block, but incurs less overhead. It can be used - * as a poor man's compute API. - * - * @param view A pointer to the view to render. This View must have a RenderTarget associated - * to it. - * - * @attention - * renderStandaloneView() must be called outside of beginFrame() / endFrame(). - * - * @note - * renderStandaloneView() must be called from the Engine's main thread - * (or external synchronization must be provided). In particular, calls to - * renderStandaloneView() on different Renderer instances **must** be synchronized. - * - * @remark - * renderStandaloneView() perform potentially heavy computations and cannot be multi-threaded. - * However, internally, renderStandaloneView() is highly multi-threaded to both improve - * performance in mitigate the call's latency. - */ - void renderStandaloneView(View const* view); - - - /** - * Returns the time in second of the last call to beginFrame(). This value is constant for all - * views rendered during a frame. The epoch is set with resetUserTime(). - * - * In materials, this value can be queried using `vec4 getUserTime()`. The value returned - * is a highp vec4 encoded as follows: - * - * time.x = (float)Renderer.getUserTime(); - * time.y = Renderer.getUserTime() - time.x; - * - * It follows that the following invariants are true: - * - * (double)time.x + (double)time.y == Renderer.getUserTime() - * time.x == (float)Renderer.getUserTime() - * - * This encoding allows the shader code to perform high precision (i.e. double) time - * calculations when needed despite the lack of double precision in the shader, for e.g.: - * - * To compute (double)time * vertex in the material, use the following construct: - * - * vec3 result = time.x * vertex + time.y * vertex; - * - * - * Most of the time, high precision computations are not required, but be aware that the - * precision of time.x rapidly diminishes as time passes: - * - * time | precision - * --------+---------- - * 16.7s | us - * 4h39 | ms - * 77h | 1/60s - * - * - * In other words, it only possible to get microsecond accuracy for about 16s or millisecond - * accuracy for just under 5h. - * - * This problem can be mitigated by calling resetUserTime(), or using high precision time as - * described above. - * - * @return The time is seconds since resetUserTime() was last called. - * - * @see - * resetUserTime() - */ - double getUserTime() const; - - /** - * Sets the user time epoch to now, i.e. resets the user time to zero. - * - * Use this method used to keep the precision of time high in materials, in practice it should - * be called at least when the application is paused, e.g. Activity.onPause() in Android. - * - * @see - * getUserTime() - */ - void resetUserTime(); -}; - -} // namespace filament - -#endif // TNT_FILAMENT_RENDERER_H diff --git a/windows/include/filament/filament/SkinningBuffer.h b/windows/include/filament/filament/SkinningBuffer.h deleted file mode 100644 index 007feb85..00000000 --- a/windows/include/filament/filament/SkinningBuffer.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#ifndef TNT_FILAMENT_SKINNINGBUFFER_H -#define TNT_FILAMENT_SKINNINGBUFFER_H - -#include - -#include - -#include - -#include - -#include - - -namespace filament { - -/** - * SkinningBuffer is used to hold skinning data (bones). It is a simple wraper around - * a structured UBO. - * @see RenderableManager::setSkinningBuffer - */ -class UTILS_PUBLIC SkinningBuffer : public FilamentAPI { - struct BuilderDetails; - -public: - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - Builder() noexcept; - Builder(Builder const& rhs) noexcept; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder const& rhs) noexcept; - Builder& operator=(Builder&& rhs) noexcept; - - /** - * Size of the skinning buffer in bones. - * - * Due to limitation in the GLSL, the SkinningBuffer must always by a multiple of - * 256, this adjustment is done automatically, but can cause - * some memory overhead. This memory overhead can be mitigated by using the same - * SkinningBuffer to store the bone information for multiple RenderPrimitives. - * - * @param boneCount Number of bones the skinning buffer can hold. - * @return A reference to this Builder for chaining calls. - */ - Builder& boneCount(uint32_t boneCount) noexcept; - - /** - * The new buffer is created with identity bones - * @param initialize true to initializing the buffer, false to not. - * @return A reference to this Builder for chaining calls. - */ - Builder& initialize(bool initialize = true) noexcept; - - /** - * Creates the SkinningBuffer object and returns a pointer to it. - * - * @param engine Reference to the filament::Engine to associate this SkinningBuffer with. - * - * @return pointer to the newly created object or nullptr if exceptions are disabled and - * an error occurred. - * - * @exception utils::PostConditionPanic if a runtime error occurred, such as running out of - * memory or other resources. - * @exception utils::PreConditionPanic if a parameter to a builder function was invalid. - * - * @see SkinningBuffer::setBones - */ - SkinningBuffer* build(Engine& engine); - private: - friend class FSkinningBuffer; - }; - - /** - * Updates the bone transforms in the range [offset, offset + count). - * @param engine Reference to the filament::Engine to associate this SkinningBuffer with. - * @param transforms pointer to at least count Bone - * @param count number of Bone elements in transforms - * @param offset offset in elements (not bytes) in the SkinningBuffer (not in transforms) - * @see RenderableManager::setSkinningBuffer - */ - void setBones(Engine& engine, RenderableManager::Bone const* transforms, - size_t count, size_t offset = 0); - - /** - * Updates the bone transforms in the range [offset, offset + count). - * @param engine Reference to the filament::Engine to associate this SkinningBuffer with. - * @param transforms pointer to at least count mat4f - * @param count number of mat4f elements in transforms - * @param offset offset in elements (not bytes) in the SkinningBuffer (not in transforms) - * @see RenderableManager::setSkinningBuffer - */ - void setBones(Engine& engine, math::mat4f const* transforms, - size_t count, size_t offset = 0); - - /** - * Returns the size of this SkinningBuffer in elements. - * @return The number of bones the SkinningBuffer holds. - */ - size_t getBoneCount() const noexcept; -}; - -} // namespace filament - -#endif //TNT_FILAMENT_SKINNINGBUFFER_H diff --git a/windows/include/filament/filament/Skybox.h b/windows/include/filament/filament/Skybox.h deleted file mode 100644 index 5e9f2c60..00000000 --- a/windows/include/filament/filament/Skybox.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_SKYBOX_H -#define TNT_FILAMENT_SKYBOX_H - -#include - -#include - -#include -#include - -namespace filament { - -class FSkybox; - -class Engine; -class Texture; - -/** - * Skybox - * - * When added to a Scene, the Skybox fills all untouched pixels. - * - * Creation and destruction - * ======================== - * - * A Skybox object is created using the Skybox::Builder and destroyed by calling - * Engine::destroy(const Skybox*). - * - * ~~~~~~~~~~~{.cpp} - * filament::Engine* engine = filament::Engine::create(); - * - * filament::IndirectLight* skybox = filament::Skybox::Builder() - * .environment(cubemap) - * .build(*engine); - * - * engine->destroy(skybox); - * ~~~~~~~~~~~ - * - * - * @note - * Currently only Texture based sky boxes are supported. - * - * @see Scene, IndirectLight - */ -class UTILS_PUBLIC Skybox : public FilamentAPI { - struct BuilderDetails; - -public: - //! Use Builder to construct an Skybox object instance - class Builder : public BuilderBase { - friend struct BuilderDetails; - public: - Builder() noexcept; - Builder(Builder const& rhs) noexcept; - Builder(Builder&& rhs) noexcept; - ~Builder() noexcept; - Builder& operator=(Builder const& rhs) noexcept; - Builder& operator=(Builder&& rhs) noexcept; - - /** - * Set the environment map (i.e. the skybox content). - * - * The Skybox is rendered as though it were an infinitely large cube with the camera - * inside it. This means that the cubemap which is mapped onto the cube's exterior - * will appear mirrored. This follows the OpenGL conventions. - * - * The cmgen tool generates reflection maps by default which are therefore ideal to use - * as skyboxes. - * - * @param cubemap This Texture must be a cube map. - * - * @return This Builder, for chaining calls. - * - * @see Texture - */ - Builder& environment(Texture* cubemap) noexcept; - - /** - * Indicates whether the sun should be rendered. The sun can only be - * rendered if there is at least one light of type SUN in the scene. - * The default value is false. - * - * @param show True if the sun should be rendered, false otherwise - * - * @return This Builder, for chaining calls. - */ - Builder& showSun(bool show) noexcept; - - /** - * Skybox intensity when no IndirectLight is set on the Scene. - * - * This call is ignored when an IndirectLight is set on the Scene, and the intensity - * of the IndirectLight is used instead. - * - * @param envIntensity Scale factor applied to the skybox texel values such that - * the result is in lux, or lumen/m^2 (default = 30000) - * - * @return This Builder, for chaining calls. - * - * @see IndirectLight::Builder::intensity - */ - Builder& intensity(float envIntensity) noexcept; - - /** - * Sets the skybox to a constant color. Default is opaque black. - * - * Ignored if an environment is set. - * - * @param color the constant color - * - * @return This Builder, for chaining calls. - */ - Builder& color(math::float4 color) noexcept; - - /** - * Creates the Skybox object and returns a pointer to it. - * - * @param engine Reference to the filament::Engine to associate this Skybox with. - * - * @return pointer to the newly created object, or nullptr if the light couldn't be created. - */ - Skybox* build(Engine& engine); - - private: - friend class FSkybox; - }; - - void setColor(math::float4 color) noexcept; - - /** - * Sets bits in a visibility mask. By default, this is 0x1. - * - * This provides a simple mechanism for hiding or showing this Skybox in a Scene. - * - * @see View::setVisibleLayers(). - * - * For example, to set bit 1 and reset bits 0 and 2 while leaving all other bits unaffected, - * call: `setLayerMask(7, 2)`. - * - * @param select the set of bits to affect - * @param values the replacement values for the affected bits - */ - void setLayerMask(uint8_t select, uint8_t values) noexcept; - - /** - * @return the visibility mask bits - */ - uint8_t getLayerMask() const noexcept; - - /** - * Returns the skybox's intensity in lux, or lumen/m^2. - */ - float getIntensity() const noexcept; - - /** - * @return the associated texture, or null if it does not exist - */ - Texture const* getTexture() const noexcept; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_SKYBOX_H diff --git a/windows/include/filament/filament/SwapChain.h b/windows/include/filament/filament/SwapChain.h deleted file mode 100644 index 9f7a3281..00000000 --- a/windows/include/filament/filament/SwapChain.h +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_FILAMENT_SWAPCHAIN_H -#define TNT_FILAMENT_SWAPCHAIN_H - -#include -#include -#include - -#include - -namespace filament { - -class Engine; - -/** - * A swap chain represents an Operating System's *native* renderable surface. - * - * Typically it's a native window or a view. Because a SwapChain is initialized from a - * native object, it is given to filament as a `void *`, which must be of the proper type - * for each platform filament is running on. - * - * \code - * SwapChain* swapChain = engine->createSwapChain(nativeWindow); - * \endcode - * - * When Engine::create() is used without specifying a Platform, the `nativeWindow` - * parameter above must be of type: - * - * Platform | nativeWindow type - * :---------------|:----------------------------: - * Android | ANativeWindow* - * macOS - OpenGL | NSView* - * macOS - Metal | CAMetalLayer* - * iOS - OpenGL | CAEAGLLayer* - * iOS - Metal | CAMetalLayer* - * X11 | Window - * Windows | HWND - * - * Otherwise, the `nativeWindow` is defined by the concrete implementation of Platform. - * - * - * Examples: - * - * Android - * ------- - * - * On Android, an `ANativeWindow*` can be obtained from a Java `Surface` object using: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * #include - * // parameters - * // env: JNIEnv* - * // surface: jobject - * ANativeWindow* win = ANativeWindow_fromSurface(env, surface); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * \warning - * Don't use reflection to access the `mNativeObject` field, it won't work. - * - * A `Surface` can be retrieved from a `SurfaceView` or `SurfaceHolder` easily using - * `SurfaceHolder.getSurface()` and/or `SurfaceView.getHolder()`. - * - * \note - * To use a `TextureView` as a SwapChain, it is necessary to first get its `SurfaceTexture`, - * for instance using `TextureView.SurfaceTextureListener` and then create a `Surface`: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.java} - * // using a TextureView.SurfaceTextureListener: - * public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width, int height) { - * mSurface = new Surface(surfaceTexture); - * // mSurface can now be used in JNI to create an ANativeWindow. - * } - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * Linux - * ----- - * - * Example using SDL: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * SDL_SysWMinfo wmi; - * SDL_VERSION(&wmi.version); - * SDL_GetWindowWMInfo(sdlWindow, &wmi); - * Window nativeWindow = (Window) wmi.info.x11.window; - * - * using namespace filament; - * Engine* engine = Engine::create(); - * SwapChain* swapChain = engine->createSwapChain((void*) nativeWindow); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * Windows - * ------- - * - * Example using SDL: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * SDL_SysWMinfo wmi; - * SDL_VERSION(&wmi.version); - * ASSERT_POSTCONDITION(SDL_GetWindowWMInfo(sdlWindow, &wmi), "SDL version unsupported!"); - * HDC nativeWindow = (HDC) wmi.info.win.hdc; - * - * using namespace filament; - * Engine* engine = Engine::create(); - * SwapChain* swapChain = engine->createSwapChain((void*) nativeWindow); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * OSX - * --- - * - * On OSX, any `NSView` can be used *directly* as a `nativeWindow` with createSwapChain(). - * - * Example using SDL/Objective-C: - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.mm} - * #include - * - * #include - * #include - * - * SDL_SysWMinfo wmi; - * SDL_VERSION(&wmi.version); - * NSWindow* win = (NSWindow*) wmi.info.cocoa.window; - * NSView* view = [win contentView]; - * void* nativeWindow = view; - * - * using namespace filament; - * Engine* engine = Engine::create(); - * SwapChain* swapChain = engine->createSwapChain(nativeWindow); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * @see Engine - */ -class UTILS_PUBLIC SwapChain : public FilamentAPI { -public: - using FrameScheduledCallback = backend::FrameScheduledCallback; - using FrameCompletedCallback = backend::FrameCompletedCallback; - - /** - * Requests a SwapChain with an alpha channel. - */ - static const uint64_t CONFIG_TRANSPARENT = backend::SWAP_CHAIN_CONFIG_TRANSPARENT; - - /** - * This flag indicates that the swap chain may be used as a source surface - * for reading back render results. This config must be set when creating - * any swap chain that will be used as the source for a blit operation. - * - * @see - * Renderer.copyFrame() - */ - static const uint64_t CONFIG_READABLE = backend::SWAP_CHAIN_CONFIG_READABLE; - - /** - * Indicates that the native X11 window is an XCB window rather than an XLIB window. - * This is ignored on non-Linux platforms and in builds that support only one X11 API. - */ - static const uint64_t CONFIG_ENABLE_XCB = backend::SWAP_CHAIN_CONFIG_ENABLE_XCB; - - /** - * Indicates that the native window is a CVPixelBufferRef. - * - * This is only supported by the Metal backend. The CVPixelBuffer must be in the - * kCVPixelFormatType_32BGRA format. - * - * It is not necessary to add an additional retain call before passing the pixel buffer to - * Filament. Filament will call CVPixelBufferRetain during Engine::createSwapChain, and - * CVPixelBufferRelease when the swap chain is destroyed. - */ - static const uint64_t CONFIG_APPLE_CVPIXELBUFFER = - backend::SWAP_CHAIN_CONFIG_APPLE_CVPIXELBUFFER; - - /** - * Indicates that the SwapChain must automatically perform linear to sRGB encoding. - * - * This flag is ignored if isSRGBSwapChainSupported() is false. - * - * When using this flag, the output colorspace in ColorGrading should be set to - * Rec709-Linear-D65, or post-processing should be disabled. - * - * @see isSRGBSwapChainSupported() - * @see ColorGrading.outputColorSpace() - * @see View.setPostProcessingEnabled() - */ - static constexpr uint64_t CONFIG_SRGB_COLORSPACE = backend::SWAP_CHAIN_CONFIG_SRGB_COLORSPACE; - - /** - * Return whether createSwapChain supports the SWAP_CHAIN_CONFIG_SRGB_COLORSPACE flag. - * The default implementation returns false. - * - * @param engine A pointer to the filament Engine - * @return true if SWAP_CHAIN_CONFIG_SRGB_COLORSPACE is supported, false otherwise. - */ - static bool isSRGBSwapChainSupported(Engine& engine) noexcept; - - void* getNativeWindow() const noexcept; - - /** - * FrameScheduledCallback is a callback function that notifies an application when Filament has - * completed processing a frame and that frame is ready to be scheduled for presentation. - * - * Typically, Filament is responsible for scheduling the frame's presentation to the SwapChain. - * If a SwapChain::FrameScheduledCallback is set, however, the application bares the - * responsibility of scheduling a frame for presentation by calling the backend::PresentCallable - * passed to the callback function. Currently this functionality is only supported by the Metal - * backend. - * - * A FrameScheduledCallback can be set on an individual SwapChain through - * SwapChain::setFrameScheduledCallback. If the callback is set, then the SwapChain will *not* - * automatically schedule itself for presentation. Instead, the application must call the - * PresentCallable passed to the FrameScheduledCallback. - * - * @param callback A callback, or nullptr to unset. - * @param user An optional pointer to user data passed to the callback function. - * - * @remark Only Filament's Metal backend supports PresentCallables and frame callbacks. Other - * backends ignore the callback (which will never be called) and proceed normally. - * - * @remark The SwapChain::FrameScheduledCallback is called on an arbitrary thread. - * - * @see PresentCallable - */ - void setFrameScheduledCallback(FrameScheduledCallback callback, void* user = nullptr); - - /** - * FrameCompletedCallback is a callback function that notifies an application when a frame's - * contents have completed rendering on the GPU. - * - * Use SwapChain::setFrameCompletedCallback to set a callback on an individual SwapChain. Each - * time a frame completes GPU rendering, the callback will be called with optional user data. - * - * The FrameCompletedCallback is guaranteed to be called on the main Filament thread. - * - * @param callback A callback, or nullptr to unset. - * @param user An optional pointer to user data passed to the callback function. - * - * @remark Only Filament's Metal backend supports frame callbacks. Other backends ignore the - * callback (which will never be called) and proceed normally. - */ - void setFrameCompletedCallback(FrameCompletedCallback callback, void* user = nullptr); -}; - -} // namespace filament - -#endif // TNT_FILAMENT_SWAPCHAIN_H diff --git a/windows/include/filament/filament/TextureSampler.h b/windows/include/filament/filament/TextureSampler.h deleted file mode 100644 index 4a4cb9cb..00000000 --- a/windows/include/filament/filament/TextureSampler.h +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_TEXTURESAMPLER_H -#define TNT_FILAMENT_TEXTURESAMPLER_H - -#include - -#include - -#include - -namespace filament { - -/** - * TextureSampler defines how a texture is accessed. - */ -class UTILS_PUBLIC TextureSampler { -public: - using WrapMode = backend::SamplerWrapMode; - using MinFilter = backend::SamplerMinFilter; - using MagFilter = backend::SamplerMagFilter; - using CompareMode = backend::SamplerCompareMode; - using CompareFunc = backend::SamplerCompareFunc; - - /** - * Creates a default sampler. - * The default parameters are: - * - filterMag : NEAREST - * - filterMin : NEAREST - * - wrapS : CLAMP_TO_EDGE - * - wrapT : CLAMP_TO_EDGE - * - wrapR : CLAMP_TO_EDGE - * - compareMode : NONE - * - compareFunc : Less or equal - * - no anisotropic filtering - */ - TextureSampler() noexcept = default; - - TextureSampler(const TextureSampler& rhs) noexcept = default; - TextureSampler& operator=(const TextureSampler& rhs) noexcept = default; - - /** - * Creates a TextureSampler with the default parameters but setting the filtering and wrap modes. - * @param minMag filtering for both minification and magnification - * @param str wrapping mode for all texture coordinate axes - */ - explicit TextureSampler(MagFilter minMag, WrapMode str = WrapMode::CLAMP_TO_EDGE) noexcept { - mSamplerParams.filterMin = MinFilter(minMag); - mSamplerParams.filterMag = minMag; - mSamplerParams.wrapS = str; - mSamplerParams.wrapT = str; - mSamplerParams.wrapR = str; - } - - /** - * Creates a TextureSampler with the default parameters but setting the filtering and wrap modes. - * @param min filtering for minification - * @param mag filtering for magnification - * @param str wrapping mode for all texture coordinate axes - */ - TextureSampler(MinFilter min, MagFilter mag, WrapMode str = WrapMode::CLAMP_TO_EDGE) noexcept { - mSamplerParams.filterMin = min; - mSamplerParams.filterMag = mag; - mSamplerParams.wrapS = str; - mSamplerParams.wrapT = str; - mSamplerParams.wrapR = str; - } - - /** - * Creates a TextureSampler with the default parameters but setting the filtering and wrap modes. - * @param min filtering for minification - * @param mag filtering for magnification - * @param s wrap mode for the s (horizontal)texture coordinate - * @param t wrap mode for the t (vertical) texture coordinate - * @param r wrap mode for the r (depth) texture coordinate - */ - TextureSampler(MinFilter min, MagFilter mag, WrapMode s, WrapMode t, WrapMode r) noexcept { - mSamplerParams.filterMin = min; - mSamplerParams.filterMag = mag; - mSamplerParams.wrapS = s; - mSamplerParams.wrapT = t; - mSamplerParams.wrapR = r; - } - - /** - * Creates a TextureSampler with the default parameters but setting the compare mode and function - * @param mode Compare mode - * @param func Compare function - */ - explicit TextureSampler(CompareMode mode, CompareFunc func = CompareFunc::LE) noexcept { - mSamplerParams.compareMode = mode; - mSamplerParams.compareFunc = func; - } - - /** - * Sets the minification filter - * @param v Minification filter - */ - void setMinFilter(MinFilter v) noexcept { - mSamplerParams.filterMin = v; - } - - /** - * Sets the magnification filter - * @param v Magnification filter - */ - void setMagFilter(MagFilter v) noexcept { - mSamplerParams.filterMag = v; - } - - /** - * Sets the wrap mode for the s (horizontal) texture coordinate - * @param v wrap mode - */ - void setWrapModeS(WrapMode v) noexcept { - mSamplerParams.wrapS = v; - } - - /** - * Sets the wrap mode for the t (vertical) texture coordinate - * @param v wrap mode - */ - void setWrapModeT(WrapMode v) noexcept { - mSamplerParams.wrapT = v; - } - - /** - * Sets the wrap mode for the r (depth, for 3D textures) texture coordinate - * @param v wrap mode - */ - void setWrapModeR(WrapMode v) noexcept { - mSamplerParams.wrapR = v; - } - - /** - * This controls anisotropic filtering. - * @param anisotropy Amount of anisotropy, should be a power-of-two. The default is 0. - * The maximum permissible value is 7. - */ - void setAnisotropy(float anisotropy) noexcept { - const int log2 = ilogbf(anisotropy > 0 ? anisotropy : -anisotropy); - mSamplerParams.anisotropyLog2 = uint8_t(log2 < 7 ? log2 : 7); - } - - /** - * Sets the compare mode and function. - * @param mode Compare mode - * @param func Compare function - */ - void setCompareMode(CompareMode mode, CompareFunc func = CompareFunc::LE) noexcept { - mSamplerParams.compareMode = mode; - mSamplerParams.compareFunc = func; - } - - //! returns the minification filter value - MinFilter getMinFilter() const noexcept { return mSamplerParams.filterMin; } - - //! returns the magnification filter value - MagFilter getMagFilter() const noexcept { return mSamplerParams.filterMag; } - - //! returns the s-coordinate wrap mode (horizontal) - WrapMode getWrapModeS() const noexcept { return mSamplerParams.wrapS; } - - //! returns the t-coordinate wrap mode (vertical) - WrapMode getWrapModeT() const noexcept { return mSamplerParams.wrapT; } - - //! returns the r-coordinate wrap mode (depth) - WrapMode getWrapModeR() const noexcept { return mSamplerParams.wrapR; } - - //! returns the anisotropy value - float getAnisotropy() const noexcept { return float(1u << mSamplerParams.anisotropyLog2); } - - //! returns the compare mode - CompareMode getCompareMode() const noexcept { return mSamplerParams.compareMode; } - - //! returns the compare function - CompareFunc getCompareFunc() const noexcept { return mSamplerParams.compareFunc; } - - - // no user-serviceable parts below... - backend::SamplerParams getSamplerParams() const noexcept { return mSamplerParams; } - -private: - backend::SamplerParams mSamplerParams{}; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_TEXTURESAMPLER_H diff --git a/windows/include/filament/filament/TransformManager.h b/windows/include/filament/filament/TransformManager.h deleted file mode 100644 index 9afa6897..00000000 --- a/windows/include/filament/filament/TransformManager.h +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_FILAMENT_TRANSFORMMANAGER_H -#define TNT_FILAMENT_TRANSFORMMANAGER_H - -#include - -#include -#include - -#include - -#include - - -namespace utils { -class Entity; -} // namespace utils - -namespace filament { - -class FTransformManager; - -/** - * TransformManager is used to add transform components to entities. - * - * A Transform component gives an entity a position and orientation in space in the coordinate - * space of its parent transform. The TransformManager takes care of computing the world-space - * transform of each component (i.e. its transform relative to the root). - * - * Creation and destruction - * ======================== - * - * A transform component is created using TransformManager::create() and destroyed by calling - * TransformManager::destroy(). - * - * ~~~~~~~~~~~{.cpp} - * filament::Engine* engine = filament::Engine::create(); - * utils::Entity object = utils::EntityManager.get().create(); - * - * auto& tcm = engine->getTransformManager(); - * - * // create the transform component - * tcm.create(object); - * - * // set its transform - * auto i = tcm.getInstance(object); - * tcm.setTransform(i, mat4f::translation({ 0, 0, -1 })); - * - * // destroy the transform component - * tcm.destroy(object); - * ~~~~~~~~~~~ - * - */ -class UTILS_PUBLIC TransformManager : public FilamentAPI { -public: - using Instance = utils::EntityInstance; - - class children_iterator { - friend class FTransformManager; - TransformManager const& mManager; - Instance mInstance; - children_iterator(TransformManager const& mgr, Instance instance) noexcept - : mManager(mgr), mInstance(instance) { } - public: - using value_type = Instance; - using difference_type = ptrdiff_t; - using pointer = Instance*; - using reference = Instance&; - using iterator_category = std::forward_iterator_tag; - - children_iterator& operator++(); - - children_iterator operator++(int) { // NOLINT - children_iterator ret(*this); - ++(*this); - return ret; - } - - bool operator == (const children_iterator& other) const noexcept { - return mInstance == other.mInstance; - } - - bool operator != (const children_iterator& other) const noexcept { - return mInstance != other.mInstance; - } - - value_type operator*() const { return mInstance; } - }; - - /** - * Returns whether a particular Entity is associated with a component of this TransformManager - * @param e An Entity. - * @return true if this Entity has a component associated with this manager. - */ - bool hasComponent(utils::Entity e) const noexcept; - - /** - * Gets an Instance representing the transform component associated with the given Entity. - * @param e An Entity. - * @return An Instance object, which represents the transform component associated with the Entity e. - * @note Use Instance::isValid() to make sure the component exists. - * @see hasComponent() - */ - Instance getInstance(utils::Entity e) const noexcept; - - /** - * Enables or disable the accurate translation mode. Disabled by default. - * - * When accurate translation mode is active, the translation component of all transforms is - * maintained at double precision. This is only useful if the mat4 version of setTransform() - * is used, as well as getTransformAccurate(). - * - * @param enable true to enable the accurate translation mode, false to disable. - * - * @see isAccurateTranslationsEnabled - * @see create(utils::Entity, Instance, const math::mat4&); - * @see setTransform(Instance, const math::mat4&) - * @see getTransformAccurate - * @see getWorldTransformAccurate - */ - void setAccurateTranslationsEnabled(bool enable) noexcept; - - /** - * Returns whether the high precision translation mode is active. - * @return true if accurate translations mode is active, false otherwise - * @see setAccurateTranslationsEnabled - */ - bool isAccurateTranslationsEnabled() const noexcept; - - /** - * Creates a transform component and associate it with the given entity. - * @param entity An Entity to associate a transform component to. - * @param parent The Instance of the parent transform, or Instance{} if no parent. - * @param localTransform The transform to initialize the transform component with. - * This is always relative to the parent. - * - * If this component already exists on the given entity, it is first destroyed as if - * destroy(utils::Entity e) was called. - * - * @see destroy() - */ - void create(utils::Entity entity, Instance parent, const math::mat4f& localTransform); - void create(utils::Entity entity, Instance parent, const math::mat4& localTransform); //!< \overload - void create(utils::Entity entity, Instance parent = {}); //!< \overload - - /** - * Destroys this component from the given entity, children are orphaned. - * @param e An entity. - * - * @note If this transform had children, these are orphaned, which means their local - * transform becomes a world transform. Usually it's nonsensical. It's recommended to make - * sure that a destroyed transform doesn't have children. - * - * @see create() - */ - void destroy(utils::Entity e) noexcept; - - /** - * Re-parents an entity to a new one. - * @param i The instance of the transform component to re-parent - * @param newParent The instance of the new parent transform - * @attention It is an error to re-parent an entity to a descendant and will cause undefined behaviour. - * @see getInstance() - */ - void setParent(Instance i, Instance newParent) noexcept; - - /** - * Returns the parent of a transform component, or the null entity if it is a root. - * @param i The instance of the transform component to query. - */ - utils::Entity getParent(Instance i) const noexcept; - - /** - * Returns the number of children of a transform component. - * @param i The instance of the transform component to query. - * @return The number of children of the queried component. - */ - size_t getChildCount(Instance i) const noexcept; - - /** - * Gets a list of children for a transform component. - * - * @param i The instance of the transform component to query. - * @param children Pointer to array-of-Entity. The array must have at least "count" elements. - * @param count The maximum number of children to retrieve. - * @return The number of children written to the pointer. - */ - size_t getChildren(Instance i, utils::Entity* children, size_t count) const noexcept; - - /** - * Returns an iterator to the Instance of the first child of the given parent. - * - * @param parent Instance of the parent - * @return A forward iterator pointing to the first child of the given parent. - * - * A child_iterator can only safely be dereferenced if it's different from getChildrenEnd(parent) - */ - children_iterator getChildrenBegin(Instance parent) const noexcept; - - /** - * Returns an undreferencable iterator representing the end of the children list - * - * @param parent Instance of the parent - * @return A forward iterator. - * - * This iterator cannot be dereferenced - */ - children_iterator getChildrenEnd(Instance parent) const noexcept; - - /** - * Sets a local transform of a transform component. - * @param ci The instance of the transform component to set the local transform to. - * @param localTransform The local transform (i.e. relative to the parent). - * @see getTransform() - * @attention This operation can be slow if the hierarchy of transform is too deep, and this - * will be particularly bad when updating a lot of transforms. In that case, - * consider using openLocalTransformTransaction() / commitLocalTransformTransaction(). - */ - void setTransform(Instance ci, const math::mat4f& localTransform) noexcept; - - /** - * Sets a local transform of a transform component and keeps double precision translation. - * All other values of the transform are stored at single precision. - * @param ci The instance of the transform component to set the local transform to. - * @param localTransform The local transform (i.e. relative to the parent). - * @see getTransform() - * @attention This operation can be slow if the hierarchy of transform is too deep, and this - * will be particularly bad when updating a lot of transforms. In that case, - * consider using openLocalTransformTransaction() / commitLocalTransformTransaction(). - */ - void setTransform(Instance ci, const math::mat4& localTransform) noexcept; - - /** - * Returns the local transform of a transform component. - * @param ci The instance of the transform component to query the local transform from. - * @return The local transform of the component (i.e. relative to the parent). This always - * returns the value set by setTransform(). - * @see setTransform() - */ - const math::mat4f& getTransform(Instance ci) const noexcept; - - /** - * Returns the local transform of a transform component. - * @param ci The instance of the transform component to query the local transform from. - * @return The local transform of the component (i.e. relative to the parent). This always - * returns the value set by setTransform(). - * @see setTransform() - */ - const math::mat4 getTransformAccurate(Instance ci) const noexcept; - - /** - * Return the world transform of a transform component. - * @param ci The instance of the transform component to query the world transform from. - * @return The world transform of the component (i.e. relative to the root). This is the - * composition of this component's local transform with its parent's world transform. - * @see setTransform() - */ - const math::mat4f& getWorldTransform(Instance ci) const noexcept; - - /** - * Return the world transform of a transform component. - * @param ci The instance of the transform component to query the world transform from. - * @return The world transform of the component (i.e. relative to the root). This is the - * composition of this component's local transform with its parent's world transform. - * @see setTransform() - */ - const math::mat4 getWorldTransformAccurate(Instance ci) const noexcept; - - /** - * Opens a local transform transaction. During a transaction, getWorldTransform() can - * return an invalid transform until commitLocalTransformTransaction() is called. However, - * setTransform() will perform significantly better and in constant time. - * - * This is useful when updating many transforms and the transform hierarchy is deep (say more - * than 4 or 5 levels). - * - * @note If the local transform transaction is already open, this is a no-op. - * - * @see commitLocalTransformTransaction(), setTransform() - */ - void openLocalTransformTransaction() noexcept; - - /** - * Commits the currently open local transform transaction. When this returns, calls - * to getWorldTransform() will return the proper value. - * - * @attention failing to call this method when done updating the local transform will cause - * a lot of rendering problems. The system never closes the transaction - * automatically. - * - * @note If the local transform transaction is not open, this is a no-op. - * - * @see openLocalTransformTransaction(), setTransform() - */ - void commitLocalTransformTransaction() noexcept; -}; - -} // namespace filament - - -#endif // TNT_TRANSFORMMANAGER_H diff --git a/windows/include/filament/filament/View.h b/windows/include/filament/filament/View.h deleted file mode 100644 index 5153b868..00000000 --- a/windows/include/filament/filament/View.h +++ /dev/null @@ -1,839 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -//! \file - -#ifndef TNT_FILAMENT_VIEW_H -#define TNT_FILAMENT_VIEW_H - -#include -#include -#include - -#include - -#include -#include - -#include - -namespace filament { - -namespace backend { -class CallbackHandler; -} // namespace backend - -class Camera; -class ColorGrading; -class MaterialInstance; -class RenderTarget; -class Scene; -class Viewport; - -/** - * A View encompasses all the state needed for rendering a Scene. - * - * Renderer::render() operates on View objects. These View objects specify important parameters - * such as: - * - The Scene - * - The Camera - * - The Viewport - * - Some rendering parameters - * - * \note - * View instances are heavy objects that internally cache a lot of data needed for rendering. - * It is not advised for an application to use many View objects. - * - * For example, in a game, a View could be used for the main scene and another one for the - * game's user interface. More View instances could be used for creating special effects (e.g. - * a View is akin to a rendering pass). - * - * - * @see Renderer, Scene, Camera, RenderTarget - */ -class UTILS_PUBLIC View : public FilamentAPI { -public: - using QualityLevel = QualityLevel; - using BlendMode = BlendMode; - using AntiAliasing = AntiAliasing; - using Dithering = Dithering; - using ShadowType = ShadowType; - - using DynamicResolutionOptions = DynamicResolutionOptions; - using BloomOptions = BloomOptions; - using FogOptions = FogOptions; - using DepthOfFieldOptions = DepthOfFieldOptions; - using VignetteOptions = VignetteOptions; - using RenderQuality = RenderQuality; - using AmbientOcclusionOptions = AmbientOcclusionOptions; - using TemporalAntiAliasingOptions = TemporalAntiAliasingOptions; - using MultiSampleAntiAliasingOptions = MultiSampleAntiAliasingOptions; - using VsmShadowOptions = VsmShadowOptions; - using SoftShadowOptions = SoftShadowOptions; - using ScreenSpaceReflectionsOptions = ScreenSpaceReflectionsOptions; - using GuardBandOptions = GuardBandOptions; - - /** - * Sets the View's name. Only useful for debugging. - * @param name Pointer to the View's name. The string is copied. - */ - void setName(const char* name) noexcept; - - /** - * Returns the View's name - * - * @return a pointer owned by the View instance to the View's name. - * - * @attention Do *not* free the pointer or modify its content. - */ - const char* getName() const noexcept; - - /** - * Set this View instance's Scene. - * - * @param scene Associate the specified Scene to this View. A Scene can be associated to - * several View instances.\n - * \p scene can be nullptr to dissociate the currently set Scene - * from this View.\n - * The View doesn't take ownership of the Scene pointer (which - * acts as a reference). - * - * @note - * There is no reference-counting. - * Make sure to dissociate a Scene from all Views before destroying it. - */ - void setScene(Scene* scene); - - /** - * Returns the Scene currently associated with this View. - * @return A pointer to the Scene associated to this View. nullptr if no Scene is set. - */ - Scene* getScene() noexcept; - - /** - * Returns the Scene currently associated with this View. - * @return A pointer to the Scene associated to this View. nullptr if no Scene is set. - */ - Scene const* getScene() const noexcept { - return const_cast(this)->getScene(); - } - - /** - * Specifies an offscreen render target to render into. - * - * By default, the view's associated render target is nullptr, which corresponds to the - * SwapChain associated with the engine. - * - * A view with a custom render target cannot rely on Renderer::ClearOptions, which only apply - * to the SwapChain. Such view can use a Skybox instead. - * - * @param renderTarget Render target associated with view, or nullptr for the swap chain. - */ - void setRenderTarget(RenderTarget* renderTarget) noexcept; - - /** - * Gets the offscreen render target associated with this view. - * - * Returns nullptr if the render target is the swap chain (which is default). - * - * @see setRenderTarget - */ - RenderTarget* getRenderTarget() const noexcept; - - /** - * Sets the rectangular region to render to. - * - * The viewport specifies where the content of the View (i.e. the Scene) is rendered in - * the render target. The Render target is automatically clipped to the Viewport. - * - * @param viewport The Viewport to render the Scene into. The Viewport is a value-type, it is - * therefore copied. The parameter can be discarded after this call returns. - */ - void setViewport(Viewport const& viewport) noexcept; - - /** - * Returns the rectangular region that gets rendered to. - * @return A constant reference to View's viewport. - */ - Viewport const& getViewport() const noexcept; - - /** - * Sets this View's Camera. - * - * @param camera Associate the specified Camera to this View. A Camera can be associated to - * several View instances.\n - * \p camera can be nullptr to dissociate the currently set Camera from this - * View.\n - * The View doesn't take ownership of the Camera pointer (which - * acts as a reference). - * - * @note - * There is no reference-counting. - * Make sure to dissociate a Camera from all Views before destroying it. - */ - void setCamera(Camera* camera) noexcept; - - /** - * Returns the Camera currently associated with this View. - * @return A reference to the Camera associated to this View. - */ - Camera& getCamera() noexcept; - - /** - * Returns the Camera currently associated with this View. - * @return A reference to the Camera associated to this View. - */ - Camera const& getCamera() const noexcept { - return const_cast(this)->getCamera(); - } - - /** - * Sets the blending mode used to draw the view into the SwapChain. - * - * @param blendMode either BlendMode::OPAQUE or BlendMode::TRANSLUCENT - * @see getBlendMode - */ - void setBlendMode(BlendMode blendMode) noexcept; - - /** - * - * @return blending mode set by setBlendMode - * @see setBlendMode - */ - BlendMode getBlendMode() const noexcept; - - /** - * Sets which layers are visible. - * - * Renderable objects can have one or several layers associated to them. Layers are - * represented with an 8-bits bitmask, where each bit corresponds to a layer. - * - * This call sets which of those layers are visible. Renderables in invisible layers won't be - * rendered. - * - * @param select a bitmask specifying which layer to set or clear using \p values. - * @param values a bitmask where each bit sets the visibility of the corresponding layer - * (1: visible, 0: invisible), only layers in \p select are affected. - * - * @see RenderableManager::setLayerMask(). - * - * @note By default only layer 0 (bitmask 0x01) is visible. - * @note This is a convenient way to quickly show or hide sets of Renderable objects. - */ - void setVisibleLayers(uint8_t select, uint8_t values) noexcept; - - /** - * Helper function to enable or disable a visibility layer. - * @param layer layer between 0 and 7 to enable or disable - * @param enabled true to enable the layer, false to disable it - * @see RenderableManager::setVisibleLayers() - */ - inline void setLayerEnabled(size_t layer, bool enabled) noexcept { - const uint8_t mask = 1u << layer; - setVisibleLayers(mask, enabled ? mask : 0); - } - - /** - * Get the visible layers. - * - * @see View::setVisibleLayers() - */ - uint8_t getVisibleLayers() const noexcept; - - /** - * Enables or disables shadow mapping. Enabled by default. - * - * @param enabled true enables shadow mapping, false disables it. - * - * @see LightManager::Builder::castShadows(), - * RenderableManager::Builder::receiveShadows(), - * RenderableManager::Builder::castShadows(), - */ - void setShadowingEnabled(bool enabled) noexcept; - - /** - * @return whether shadowing is enabled - */ - bool isShadowingEnabled() const noexcept; - - /** - * Enables or disables screen space refraction. Enabled by default. - * - * @param enabled true enables screen space refraction, false disables it. - */ - void setScreenSpaceRefractionEnabled(bool enabled) noexcept; - - /** - * @return whether screen space refraction is enabled - */ - bool isScreenSpaceRefractionEnabled() const noexcept; - - /** - * Sets how many samples are to be used for MSAA in the post-process stage. - * Default is 1 and disables MSAA. - * - * @param count number of samples to use for multi-sampled anti-aliasing.\n - * 0: treated as 1 - * 1: no anti-aliasing - * n: sample count. Effective sample could be different depending on the - * GPU capabilities. - * - * @note Anti-aliasing can also be performed in the post-processing stage, generally at lower - * cost. See setAntialiasing. - * - * @see setAntialiasing - * @deprecated use setMultiSampleAntiAliasingOptions instead - */ - UTILS_DEPRECATED - void setSampleCount(uint8_t count = 1) noexcept; - - /** - * Returns the sample count set by setSampleCount(). Effective sample count could be different. - * A value of 0 or 1 means MSAA is disabled. - * - * @return value set by setSampleCount(). - * @deprecated use getMultiSampleAntiAliasingOptions instead - */ - UTILS_DEPRECATED - uint8_t getSampleCount() const noexcept; - - /** - * Enables or disables anti-aliasing in the post-processing stage. Enabled by default. - * MSAA can be enabled in addition, see setSampleCount(). - * - * @param type FXAA for enabling, NONE for disabling anti-aliasing. - * - * @note For MSAA anti-aliasing, see setSamplerCount(). - * - * @see setSampleCount - */ - void setAntiAliasing(AntiAliasing type) noexcept; - - /** - * Queries whether anti-aliasing is enabled during the post-processing stage. To query - * whether MSAA is enabled, see getSampleCount(). - * - * @return The post-processing anti-aliasing method. - */ - AntiAliasing getAntiAliasing() const noexcept; - - /** - * Enables or disable temporal anti-aliasing (TAA). Disabled by default. - * - * @param options temporal anti-aliasing options - */ - void setTemporalAntiAliasingOptions(TemporalAntiAliasingOptions options) noexcept; - - /** - * Returns temporal anti-aliasing options. - * - * @return temporal anti-aliasing options - */ - TemporalAntiAliasingOptions const& getTemporalAntiAliasingOptions() const noexcept; - - /** - * Enables or disable screen-space reflections. Disabled by default. - * - * @param options screen-space reflections options - */ - void setScreenSpaceReflectionsOptions(ScreenSpaceReflectionsOptions options) noexcept; - - /** - * Returns screen-space reflections options. - * - * @return screen-space reflections options - */ - ScreenSpaceReflectionsOptions const& getScreenSpaceReflectionsOptions() const noexcept; - - /** - * Enables or disable screen-space guard band. Disabled by default. - * - * @param options guard band options - */ - void setGuardBandOptions(GuardBandOptions options) noexcept; - - /** - * Returns screen-space guard band options. - * - * @return guard band options - */ - GuardBandOptions const& getGuardBandOptions() const noexcept; - - /** - * Enables or disable multi-sample anti-aliasing (MSAA). Disabled by default. - * - * @param options multi-sample anti-aliasing options - */ - void setMultiSampleAntiAliasingOptions(MultiSampleAntiAliasingOptions options) noexcept; - - /** - * Returns multi-sample anti-aliasing options. - * - * @return multi-sample anti-aliasing options - */ - MultiSampleAntiAliasingOptions const& getMultiSampleAntiAliasingOptions() const noexcept; - - /** - * Sets this View's color grading transforms. - * - * @param colorGrading Associate the specified ColorGrading to this View. A ColorGrading can be - * associated to several View instances.\n - * \p colorGrading can be nullptr to dissociate the currently set - * ColorGrading from this View. Doing so will revert to the use of the - * default color grading transforms.\n - * The View doesn't take ownership of the ColorGrading pointer (which - * acts as a reference). - * - * @note - * There is no reference-counting. - * Make sure to dissociate a ColorGrading from all Views before destroying it. - */ - void setColorGrading(ColorGrading* colorGrading) noexcept; - - /** - * Returns the color grading transforms currently associated to this view. - * @return A pointer to the ColorGrading associated to this View. - */ - const ColorGrading* getColorGrading() const noexcept; - - /** - * Sets ambient occlusion options. - * - * @param options Options for ambient occlusion. - */ - void setAmbientOcclusionOptions(AmbientOcclusionOptions const& options) noexcept; - - /** - * Gets the ambient occlusion options. - * - * @return ambient occlusion options currently set. - */ - AmbientOcclusionOptions const& getAmbientOcclusionOptions() const noexcept; - - /** - * Enables or disables bloom in the post-processing stage. Disabled by default. - * - * @param options options - */ - void setBloomOptions(BloomOptions options) noexcept; - - /** - * Queries the bloom options. - * - * @return the current bloom options for this view. - */ - BloomOptions getBloomOptions() const noexcept; - - /** - * Enables or disables fog. Disabled by default. - * - * @param options options - */ - void setFogOptions(FogOptions options) noexcept; - - /** - * Queries the fog options. - * - * @return the current fog options for this view. - */ - FogOptions getFogOptions() const noexcept; - - /** - * Enables or disables Depth of Field. Disabled by default. - * - * @param options options - */ - void setDepthOfFieldOptions(DepthOfFieldOptions options) noexcept; - - /** - * Queries the depth of field options. - * - * @return the current depth of field options for this view. - */ - DepthOfFieldOptions getDepthOfFieldOptions() const noexcept; - - /** - * Enables or disables the vignetted effect in the post-processing stage. Disabled by default. - * - * @param options options - */ - void setVignetteOptions(VignetteOptions options) noexcept; - - /** - * Queries the vignette options. - * - * @return the current vignette options for this view. - */ - VignetteOptions getVignetteOptions() const noexcept; - - /** - * Enables or disables dithering in the post-processing stage. Enabled by default. - * - * @param dithering dithering type - */ - void setDithering(Dithering dithering) noexcept; - - /** - * Queries whether dithering is enabled during the post-processing stage. - * - * @return the current dithering type for this view. - */ - Dithering getDithering() const noexcept; - - /** - * Sets the dynamic resolution options for this view. Dynamic resolution options - * controls whether dynamic resolution is enabled, and if it is, how it behaves. - * - * @param options The dynamic resolution options to use on this view - */ - void setDynamicResolutionOptions(DynamicResolutionOptions const& options) noexcept; - - /** - * Returns the dynamic resolution options associated with this view. - * @return value set by setDynamicResolutionOptions(). - */ - DynamicResolutionOptions getDynamicResolutionOptions() const noexcept; - - /** - * Sets the rendering quality for this view. Refer to RenderQuality for more - * information about the different settings available. - * - * @param renderQuality The render quality to use on this view - */ - void setRenderQuality(RenderQuality const& renderQuality) noexcept; - - /** - * Returns the render quality used by this view. - * @return value set by setRenderQuality(). - */ - RenderQuality getRenderQuality() const noexcept; - - /** - * Sets options relative to dynamic lighting for this view. - * - * @param zLightNear Distance from the camera where the lights are expected to shine. - * This parameter can affect performance and is useful because depending - * on the scene, lights that shine close to the camera may not be - * visible -- in this case, using a larger value can improve performance. - * e.g. when standing and looking straight, several meters of the ground - * isn't visible and if lights are expected to shine there, there is no - * point using a short zLightNear. (Default 5m). - * - * @param zLightFar Distance from the camera after which lights are not expected to be visible. - * Similarly to zLightNear, setting this value properly can improve - * performance. (Default 100m). - * - * - * Together zLightNear and zLightFar must be chosen so that the visible influence of lights - * is spread between these two values. - * - */ - void setDynamicLightingOptions(float zLightNear, float zLightFar) noexcept; - - /* - * Set the shadow mapping technique this View uses. - * - * The ShadowType affects all the shadows seen within the View. - * - * ShadowType::VSM imposes a restriction on marking renderables as only shadow receivers (but - * not casters). To ensure correct shadowing with VSM, all shadow participant renderables should - * be marked as both receivers and casters. Objects that are guaranteed to not cast shadows on - * themselves or other objects (such as flat ground planes) can be set to not cast shadows, - * which might improve shadow quality. - * - * @warning This API is still experimental and subject to change. - */ - void setShadowType(ShadowType shadow) noexcept; - - /** - * Sets VSM shadowing options that apply across the entire View. - * - * Additional light-specific VSM options can be set with LightManager::setShadowOptions. - * - * Only applicable when shadow type is set to ShadowType::VSM. - * - * @param options Options for shadowing. - * - * @see setShadowType - * - * @warning This API is still experimental and subject to change. - */ - void setVsmShadowOptions(VsmShadowOptions const& options) noexcept; - - /** - * Returns the VSM shadowing options associated with this View. - * - * @return value set by setVsmShadowOptions(). - */ - VsmShadowOptions getVsmShadowOptions() const noexcept; - - /** - * Sets soft shadowing options that apply across the entire View. - * - * Additional light-specific soft shadow parameters can be set with LightManager::setShadowOptions. - * - * Only applicable when shadow type is set to ShadowType::DPCF or ShadowType::PCSS. - * - * @param options Options for shadowing. - * - * @see setShadowType - * - * @warning This API is still experimental and subject to change. - */ - void setSoftShadowOptions(SoftShadowOptions const& options) noexcept; - - /** - * Returns the soft shadowing options associated with this View. - * - * @return value set by setSoftShadowOptions(). - */ - SoftShadowOptions getSoftShadowOptions() const noexcept; - - /** - * Enables or disables post processing. Enabled by default. - * - * Post-processing includes: - * - Depth-of-field - * - Bloom - * - Vignetting - * - Temporal Anti-aliasing (TAA) - * - Color grading & gamma encoding - * - Dithering - * - FXAA - * - Dynamic scaling - * - * Disabling post-processing forgoes color correctness as well as some anti-aliasing techniques - * and should only be used for debugging, UI overlays or when using custom render targets - * (see RenderTarget). - * - * @param enabled true enables post processing, false disables it. - * - * @see setBloomOptions, setColorGrading, setAntiAliasing, setDithering, setSampleCount - */ - void setPostProcessingEnabled(bool enabled) noexcept; - - //! Returns true if post-processing is enabled. See setPostProcessingEnabled() for more info. - bool isPostProcessingEnabled() const noexcept; - - /** - * Inverts the winding order of front faces. By default front faces use a counter-clockwise - * winding order. When the winding order is inverted, front faces are faces with a clockwise - * winding order. - * - * Changing the winding order will directly affect the culling mode in materials - * (see Material::getCullingMode()). - * - * Inverting the winding order of front faces is useful when rendering mirrored reflections - * (water, mirror surfaces, front camera in AR, etc.). - * - * @param inverted True to invert front faces, false otherwise. - */ - void setFrontFaceWindingInverted(bool inverted) noexcept; - - /** - * Returns true if the winding order of front faces is inverted. - * See setFrontFaceWindingInverted() for more information. - */ - bool isFrontFaceWindingInverted() const noexcept; - - /** - * Enables use of the stencil buffer. - * - * The stencil buffer is an 8-bit, per-fragment unsigned integer stored alongside the depth - * buffer. The stencil buffer is cleared at the beginning of a frame and discarded after the - * color pass. - * - * Each fragment's stencil value is set during rasterization by specifying stencil operations on - * a Material. The stencil buffer can be used as a mask for later rendering by setting a - * Material's stencil comparison function and reference value. Fragments that don't pass the - * stencil test are then discarded. - * - * Post-processing must be enabled in order to use the stencil buffer. - * - * A renderable's priority (see RenderableManager::setPriority) is useful to control the order - * in which primitives are drawn. - * - * @param enabled True to enable the stencil buffer, false disables it (default) - */ - void setStencilBufferEnabled(bool enabled) noexcept; - - /** - * Returns true if the stencil buffer is enabled. - * See setStencilBufferEnabled() for more information. - */ - bool isStencilBufferEnabled() const noexcept; - - // for debugging... - - //! debugging: allows to entirely disable frustum culling. (culling enabled by default). - void setFrustumCullingEnabled(bool culling) noexcept; - - //! debugging: returns whether frustum culling is enabled. - bool isFrustumCullingEnabled() const noexcept; - - //! debugging: sets the Camera used for rendering. It may be different from the culling camera. - void setDebugCamera(Camera* camera) noexcept; - - //! debugging: returns a Camera from the point of view of *the* dominant directional light used for shadowing. - Camera const* getDirectionalLightCamera() const noexcept; - - - /** Result of a picking query */ - struct PickingQueryResult { - utils::Entity renderable{}; //! RenderableManager Entity at the queried coordinates - float depth{}; //! Depth buffer value (1 (near plane) to 0 (infinity)) - uint32_t reserved1{}; - uint32_t reserved2{}; - /** - * screen space coordinates in GL convention, this can be used to compute the view or - * world space position of the picking hit. For e.g.: - * clip_space_position = (fragCoords.xy / viewport.wh, fragCoords.z) * 2.0 - 1.0 - * view_space_position = inverse(projection) * clip_space_position - * world_space_position = model * view_space_position - * - * The viewport, projection and model matrices can be obtained from Camera. Because - * pick() has some latency, it might be more accurate to obtain these values at the - * time the View::pick() call is made. - */ - math::float3 fragCoords; //! screen space coordinates in GL convention - }; - - /** User data for PickingQueryResultCallback */ - struct PickingQuery { - // note: this is enough to store a std::function<> -- just saying... - void* storage[4]; - }; - - /** callback type used for picking queries. */ - using PickingQueryResultCallback = void(*)(PickingQueryResult const& result, PickingQuery* pq); - - /** - * Helper for creating a picking query from Foo::method, by pointer. - * e.g.: pick(x, y, &foo); - * - * @tparam T Class of the method to call (e.g.: Foo) - * @tparam method Method to call on T (e.g.: &Foo::bar) - * @param x Horizontal coordinate to query in the viewport with origin on the left. - * @param y Vertical coordinate to query on the viewport with origin at the bottom. - * @param instance A pointer to an instance of T - * @param handler Handler to dispatch the callback or nullptr for the default handler. - */ - template - void pick(uint32_t x, uint32_t y, T* instance, backend::CallbackHandler* handler = nullptr) noexcept { - PickingQuery& query = pick(x, y, [](PickingQueryResult const& result, PickingQuery* pq) { - void* user = pq->storage; - (*static_cast(user)->*method)(result); - }, handler); - query.storage[0] = instance; - } - - /** - * Helper for creating a picking query from Foo::method, by copy for a small object - * e.g.: pick(x, y, foo); - * - * @tparam T Class of the method to call (e.g.: Foo) - * @tparam method Method to call on T (e.g.: &Foo::bar) - * @param x Horizontal coordinate to query in the viewport with origin on the left. - * @param y Vertical coordinate to query on the viewport with origin at the bottom. - * @param instance An instance of T - * @param handler Handler to dispatch the callback or nullptr for the default handler. - */ - template - void pick(uint32_t x, uint32_t y, T instance, backend::CallbackHandler* handler = nullptr) noexcept { - static_assert(sizeof(instance) <= sizeof(PickingQuery::storage), "user data too large"); - PickingQuery& query = pick(x, y, [](PickingQueryResult const& result, PickingQuery* pq) { - void* user = pq->storage; - T* that = static_cast(user); - (that->*method)(result); - that->~T(); - }, handler); - new(query.storage) T(std::move(instance)); - } - - /** - * Helper for creating a picking query from a small functor - * e.g.: pick(x, y, [](PickingQueryResult const& result){}); - * - * @param x Horizontal coordinate to query in the viewport with origin on the left. - * @param y Vertical coordinate to query on the viewport with origin at the bottom. - * @param functor A functor, typically a lambda function. - * @param handler Handler to dispatch the callback or nullptr for the default handler. - */ - template - void pick(uint32_t x, uint32_t y, T functor, backend::CallbackHandler* handler = nullptr) noexcept { - static_assert(sizeof(functor) <= sizeof(PickingQuery::storage), "functor too large"); - PickingQuery& query = pick(x, y, handler, - (PickingQueryResultCallback)[](PickingQueryResult const& result, PickingQuery* pq) { - void* user = pq->storage; - T& that = *static_cast(user); - that(result); - that.~T(); - }); - new(query.storage) T(std::move(functor)); - } - - /** - * Creates a picking query. Multiple queries can be created (e.g.: multi-touch). - * Picking queries are all executed when Renderer::render() is called on this View. - * The provided callback is guaranteed to be called at some point in the future. - * - * Typically it takes a couple frames to receive the result of a picking query. - * - * @param x Horizontal coordinate to query in the viewport with origin on the left. - * @param y Vertical coordinate to query on the viewport with origin at the bottom. - * @param callback User callback, called when the picking query result is available. - * @param handler Handler to dispatch the callback or nullptr for the default handler. - * @return A reference to a PickingQuery structure, which can be used to store up to - * 8*sizeof(void*) bytes of user data. This user data is later accessible - * in the PickingQueryResultCallback callback 3rd parameter. - */ - PickingQuery& pick(uint32_t x, uint32_t y, backend::CallbackHandler* handler, - PickingQueryResultCallback callback) noexcept; - - - /** - * List of available ambient occlusion techniques - * @deprecated use AmbientOcclusionOptions::enabled instead - */ - enum class UTILS_DEPRECATED AmbientOcclusion : uint8_t { - NONE = 0, //!< No Ambient Occlusion - SSAO = 1 //!< Basic, sampling SSAO - }; - - /** - * Activates or deactivates ambient occlusion. - * @deprecated use setAmbientOcclusionOptions() instead - * @see setAmbientOcclusionOptions - * - * @param ambientOcclusion Type of ambient occlusion to use. - */ - UTILS_DEPRECATED - void setAmbientOcclusion(AmbientOcclusion ambientOcclusion) noexcept; - - /** - * Queries the type of ambient occlusion active for this View. - * @deprecated use getAmbientOcclusionOptions() instead - * @see getAmbientOcclusionOptions - * - * @return ambient occlusion type. - */ - UTILS_DEPRECATED - AmbientOcclusion getAmbientOcclusion() const noexcept; -}; - -} // namespace filament - -#endif // TNT_FILAMENT_VIEW_H diff --git a/windows/include/filament/filameshio/MeshReader.h b/windows/include/filament/filameshio/MeshReader.h deleted file mode 100644 index 22533791..00000000 --- a/windows/include/filament/filameshio/MeshReader.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ - -#ifndef TNT_FILAMENT_FILAMESHIO_MESHREADER_H -#define TNT_FILAMENT_FILAMESHIO_MESHREADER_H - -#include -#include -#include - -namespace filament { - class Engine; - class VertexBuffer; - class IndexBuffer; - class MaterialInstance; -} - -namespace utils { - class Path; -} - -namespace filamesh { - - -/** - * This API can be used to read meshes stored in the "filamesh" format produced - * by the command line tool of the same name. This file format is documented in - * "docs/filamesh.md" in the Filament distribution. - */ -class UTILS_PUBLIC MeshReader { -public: - using Callback = void(*)(void* buffer, size_t size, void* user); - - // Class to track material instances - class MaterialRegistry { - public: - MaterialRegistry(); - MaterialRegistry(const MaterialRegistry& rhs); - MaterialRegistry& operator=(const MaterialRegistry& rhs); - ~MaterialRegistry(); - MaterialRegistry(MaterialRegistry&&); - MaterialRegistry& operator=(MaterialRegistry&&); - - filament::MaterialInstance* getMaterialInstance(const utils::CString& name); - - void registerMaterialInstance(const utils::CString& name, - filament::MaterialInstance* materialInstance); - - void unregisterMaterialInstance(const utils::CString& name); - - void unregisterAll(); - - size_t numRegistered() const noexcept; - - void getRegisteredMaterials(filament::MaterialInstance** materialList, - utils::CString* materialNameList) const; - - void getRegisteredMaterials(filament::MaterialInstance** materialList) const; - - void getRegisteredMaterialNames(utils::CString* materialNameList) const; - - private: - struct MaterialRegistryImpl; - MaterialRegistryImpl* mImpl; - }; - - struct Mesh { - utils::Entity renderable; - filament::VertexBuffer* vertexBuffer = nullptr; - filament::IndexBuffer* indexBuffer = nullptr; - }; - - /** - * Loads a filamesh renderable from the specified file. The material registry - * can be used to provide named materials. If a material found in the filamesh - * file cannot be matched to a material in the registry, a default material is - * used instead. The default material can be overridden by adding a material - * named "DefaultMaterial" to the registry. - */ - static Mesh loadMeshFromFile(filament::Engine* engine, - const utils::Path& path, - MaterialRegistry& materials); - - /** - * Loads a filamesh renderable from an in-memory buffer. The material registry - * can be used to provide named materials. If a material found in the filamesh - * file cannot be matched to a material in the registry, a default material is - * used instead. The default material can be overridden by adding a material - * named "DefaultMaterial" to the registry. - */ - static Mesh loadMeshFromBuffer(filament::Engine* engine, - void const* data, Callback destructor, void* user, - MaterialRegistry& materials); - - /** - * Loads a filamesh renderable from an in-memory buffer. The material registry - * can be used to provide named materials. All the primitives of the decoded - * renderable are assigned the specified default material. - */ - static Mesh loadMeshFromBuffer(filament::Engine* engine, - void const* data, Callback destructor, void* user, - filament::MaterialInstance* defaultMaterial); -}; - -} // namespace filamesh - -#endif // TNT_FILAMENT_FILAMESHIO_MESHREADER_H diff --git a/windows/include/filament/geometry/SurfaceOrientation.h b/windows/include/filament/geometry/SurfaceOrientation.h deleted file mode 100644 index e9ad75bb..00000000 --- a/windows/include/filament/geometry/SurfaceOrientation.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef TNT_GEOMETRY_SURFACEORIENTATION_H -#define TNT_GEOMETRY_SURFACEORIENTATION_H - -#include -#include -#include - -#include - -namespace filament { - -/** - * Mesh-related utilities. - */ -namespace geometry { - -struct OrientationBuilderImpl; -struct OrientationImpl; - -/** - * The surface orientation helper can be used to populate Filament-style TANGENTS buffers. - */ -class UTILS_PUBLIC SurfaceOrientation { -public: - - /** - * The Builder is used to construct an immutable surface orientation helper. - * - * Clients provide pointers into their own data, which is synchronously consumed during build(). - * At a minimum, clients must supply a vertex count. They can supply data in any of the - * following combinations: - * - * 1. normals only ........................... not recommended, selects arbitrary orientation - * 2. normals + tangents ..................... sign of W determines bitangent orientation - * 3. normals + uvs + positions + indices .... selects Lengyel’s Method - * 4. positions + indices .................... generates normals for flat shading only - * - * Additionally, the client-side data has the following type constraints: - * - * - Normals must be float3 - * - Tangents must be float4 - * - UVs must be float2 - * - Positions must be float3 - * - Triangles must be uint3 or ushort3 - * - * Currently, mikktspace is not supported because it requires re-indexing the mesh. Instead - * we use the method described by Eric Lengyel in "Foundations of Game Engine Development" - * (Volume 2, Chapter 7). - */ - class Builder { - public: - Builder() noexcept; - ~Builder() noexcept; - Builder(Builder&& that) noexcept; - Builder& operator=(Builder&& that) noexcept; - - /** - * This attribute is required. - */ - Builder& vertexCount(size_t vertexCount) noexcept; - - Builder& normals(const filament::math::float3*, size_t stride = 0) noexcept; - Builder& tangents(const filament::math::float4*, size_t stride = 0) noexcept; - Builder& uvs(const filament::math::float2*, size_t stride = 0) noexcept; - Builder& positions(const filament::math::float3*, size_t stride = 0) noexcept; - - Builder& triangleCount(size_t triangleCount) noexcept; - Builder& triangles(const filament::math::uint3*) noexcept; - Builder& triangles(const filament::math::ushort3*) noexcept; - - /** - * Generates quats or returns null if the submitted data is an incomplete combination. - */ - SurfaceOrientation* build(); - - private: - OrientationBuilderImpl* mImpl; - Builder(const Builder&) = delete; - Builder& operator=(const Builder&) = delete; - }; - - ~SurfaceOrientation() noexcept; - SurfaceOrientation(SurfaceOrientation&& that) noexcept; - SurfaceOrientation& operator=(SurfaceOrientation&& that) noexcept; - - /** - * Returns the vertex count. - */ - size_t getVertexCount() const noexcept; - - /** - * Converts quaternions into the desired output format and writes up to "quatCount" - * to the given output pointer. Normally quatCount should be equal to the vertex count. - * The optional stride is the desired quat-to-quat stride in bytes. - * @{ - */ - void getQuats(filament::math::quatf* out, size_t quatCount, size_t stride = 0) const noexcept; - void getQuats(filament::math::short4* out, size_t quatCount, size_t stride = 0) const noexcept; - void getQuats(filament::math::quath* out, size_t quatCount, size_t stride = 0) const noexcept; - /** - * @} - */ - -private: - SurfaceOrientation(OrientationImpl*) noexcept; - SurfaceOrientation(const SurfaceOrientation&) = delete; - SurfaceOrientation& operator=(const SurfaceOrientation&) = delete; - OrientationImpl* mImpl; - friend struct OrientationBuilderImpl; -}; - -} // namespace geometry -} // namespace filament - -#endif // TNT_GEOMETRY_SURFACEORIENTATION_H diff --git a/windows/include/filament/geometry/Transcoder.h b/windows/include/filament/geometry/Transcoder.h deleted file mode 100644 index 805c2609..00000000 --- a/windows/include/filament/geometry/Transcoder.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#ifndef TNT_GEOMETRY_TRANSCODER_H -#define TNT_GEOMETRY_TRANSCODER_H - -#include - -#include -#include - -namespace filament { -namespace geometry { - -enum class ComponentType { - BYTE, //!< If normalization is enabled, this maps from [-127,127] to [-1,+1] - UBYTE, //!< If normalization is enabled, this maps from [0,255] to [0, +1] - SHORT, //!< If normalization is enabled, this maps from [-32767,32767] to [-1,+1] - USHORT, //!< If normalization is enabled, this maps from [0,65535] to [0, +1] - HALF, //!< 1 sign bit, 5 exponent bits, and 5 mantissa bits. - FLOAT, //!< Standard 32-bit float -}; - -/** - * Creates a function object that can convert vertex attribute data into tightly packed floats. - * - * This is especially useful for 3-component formats which are not supported by all backends. - * e.g. The Vulkan minspec includes float3 but not short3. - * - * Usage Example: - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * using filament::geometry::Transcoder; - * using filament::geometry::ComponentType; - * - * Transcoder transcode({ - * .componentType = ComponentType::BYTE, - * .normalized = true, - * .componentCount = 3, - * .inputStrideBytes = 0 - * }); - * - * transcode(outputPtr, inputPtr, count); - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * The interpretation of signed normalized data is consistent with Vulkan and OpenGL ES 3.0+. - * Note that this slightly differs from earlier versions of OpenGL ES. For example, a signed byte - * value of -127 maps exactly to -1.0f under ES3 and VK rules, but not ES2. - */ -class UTILS_PUBLIC Transcoder { -public: - /** - * Describes the format of all input data that get passed to this transcoder object. - */ - struct Config { - ComponentType componentType; - bool normalized; - uint32_t componentCount; - uint32_t inputStrideBytes = 0; //!< If stride is 0, the transcoder assumes tight packing. - }; - - /** - * Creates an immutable function object with the specified configuration. - * - * The config is not passed by const reference to allow for type inference at the call site. - */ - Transcoder(Config config) noexcept : mConfig(config) {} - - /** - * Converts arbitrary data into tightly packed 32-bit floating point values. - * - * If target is non-null, writes up to "count" items into target and returns the number of bytes - * actually written. - * - * If target is null, returns the number of bytes required. - * - * @param target Client owned area to write into, or null for a size query - * @param source Pointer to the data to read from (does not get retained) - * @param count The maximum number of items to write (i.e. number of float3 values, not bytes) - * @return Number of bytes required to contain "count" items after conversion to packed floats - * - */ - size_t operator()(float* UTILS_RESTRICT target, void const* UTILS_RESTRICT source, - size_t count) const noexcept; - -private: - const Config mConfig; -}; - -} // namespace geometry -} // namespace filament - -#endif // TNT_GEOMETRY_TRANSCODER_H diff --git a/windows/include/filament/gltfio/Animator.h b/windows/include/filament/gltfio/Animator.h deleted file mode 100644 index 199555a4..00000000 --- a/windows/include/filament/gltfio/Animator.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef GLTFIO_ANIMATOR_H -#define GLTFIO_ANIMATOR_H - -#include -#include - -namespace filament::gltfio { - -struct FFilamentAsset; -struct FFilamentInstance; -struct AnimatorImpl; - -/** - * \class Animator Animator.h gltfio/Animator.h - * \brief Updates matrices according to glTF \c animation and \c skin definitions. - * - * Animator can be used for two things: - * - Updating matrices in filament::TransformManager components according to glTF \c animation definitions. - * - Updating bone matrices in filament::RenderableManager components according to glTF \c skin definitions. - * - * For a usage example, see the documentation for AssetLoader. - */ -class UTILS_PUBLIC Animator { -public: - /** - * Applies rotation, translation, and scale to entities that have been targeted by the given - * animation definition. Uses filament::TransformManager. - * - * @param animationIndex Zero-based index for the \c animation of interest. - * @param time Elapsed time of interest in seconds. - */ - void applyAnimation(size_t animationIndex, float time) const; - - /** - * Computes root-to-node transforms for all bone nodes, then passes - * the results into filament::RenderableManager::setBones. - * Uses filament::TransformManager and filament::RenderableManager. - * - * NOTE: this operation is independent of \c animation. - */ - void updateBoneMatrices(); - - /** - * Applies a blended transform to the union of nodes affected by two animations. - * Used for cross-fading from a previous skinning-based animation or rigid body animation. - * - * First, this stashes the current transform hierarchy into a transient memory buffer. - * - * Next, this applies previousAnimIndex / previousAnimTime to the actual asset by internally - * calling applyAnimation(). - * - * Finally, the stashed local transforms are lerped (via the scale / translation / rotation - * components) with their live counterparts, and the results are pushed to the asset. - * - * To achieve a cross fade effect with skinned models, clients will typically call animator - * methods in this order: (1) applyAnimation (2) applyCrossFade (3) updateBoneMatrices. The - * animation that clients pass to applyAnimation is the "current" animation corresponding to - * alpha=1, while the "previous" animation passed to applyCrossFade corresponds to alpha=0. - */ - void applyCrossFade(size_t previousAnimIndex, float previousAnimTime, float alpha); - - /** - * Pass the identity matrix into all bone nodes, useful for returning to the T pose. - * - * NOTE: this operation is independent of \c animation. - */ - void resetBoneMatrices(); - - /** Returns the number of \c animation definitions in the glTF asset. */ - size_t getAnimationCount() const; - - /** Returns the duration of the specified glTF \c animation in seconds. */ - float getAnimationDuration(size_t animationIndex) const; - - /** - * Returns a weak reference to the string name of the specified \c animation, or an - * empty string if none was specified. - */ - const char* getAnimationName(size_t animationIndex) const; - - // For internal use only. - void addInstance(FFilamentInstance* instance); - -private: - - /*! \cond PRIVATE */ - friend struct FFilamentAsset; - friend struct FFilamentInstance; - /*! \endcond */ - - // If "instance" is null, then this is the primary animator. - Animator(FFilamentAsset const* asset, FFilamentInstance* instance); - ~Animator(); - - Animator(const Animator& animator) = delete; - Animator(Animator&& animator) = delete; - Animator& operator=(const Animator&) = delete; - - AnimatorImpl* mImpl; -}; - -} // namespace filament::gltfio - -#endif // GLTFIO_ANIMATOR_H diff --git a/windows/include/filament/gltfio/FilamentAsset.h b/windows/include/filament/gltfio/FilamentAsset.h deleted file mode 100644 index 6408b363..00000000 --- a/windows/include/filament/gltfio/FilamentAsset.h +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef GLTFIO_FILAMENTASSET_H -#define GLTFIO_FILAMENTASSET_H - -#include -#include - -#include - -#include -#include - -namespace filament { - class Camera; - class Engine; - class MaterialInstance; - class Scene; -} - -namespace filament::gltfio { - -class Animator; -class FilamentInstance; - -/** - * \class FilamentAsset FilamentAsset.h gltfio/FilamentAsset.h - * \brief Owns a bundle of Filament objects that have been created by AssetLoader. - * - * For usage instructions, see the documentation for AssetLoader. - * - * This class owns a hierarchy of entities that have been loaded from a glTF asset. Every entity has - * a filament::TransformManager component, and some entities also have \c Name, \c Renderable, - * \c Light, \c Camera, or \c Node components. - * - * In addition to the aforementioned entities, an asset has strong ownership over a list of - * filament::VertexBuffer, filament::IndexBuffer, filament::Texture, - * and, optionally, a simple animation engine (gltfio::Animator). - * - * Clients must use ResourceLoader to create filament::Texture objects, compute tangent quaternions, - * and upload data into vertex buffers and index buffers. - * - * \todo Only the default glTF scene is loaded, other glTF scenes are ignored. - */ -class UTILS_PUBLIC FilamentAsset { -public: - using Entity = utils::Entity; - using SceneMask = NodeManager::SceneMask; - - /** - * Gets the list of entities, one for each glTF node. All of these have a Transform component. - * Some of the returned entities may also have a Renderable component and/or a Light component. - */ - const Entity* getEntities() const noexcept; - - /** - * Gets the number of entities returned by getEntities(). - */ - size_t getEntityCount() const noexcept; - - /** - * Gets the list of entities in the scene representing lights. All of these have a Light component. - */ - const Entity* getLightEntities() const noexcept; - - /** - * Gets the number of entities returned by getLightEntities(). - */ - size_t getLightEntityCount() const noexcept; - - /** - * Gets the list of entities in the asset that have renderable components. - */ - const utils::Entity* getRenderableEntities() const noexcept; - - /** - * Gets the number of entities returned by getRenderableEntities(). - */ - size_t getRenderableEntityCount() const noexcept; - - /** - * Gets the list of entities in the scene representing cameras. All of these have a \c Camera - * component. - * - * Note about aspect ratios: - * gltfio always uses an aspect ratio of 1.0 when setting the projection matrix for perspective - * cameras. gltfio then sets the camera's scaling matrix with the aspect ratio specified in the - * glTF file (if present). - * - * The camera's scaling matrix allows clients to adjust the aspect ratio independently from the - * camera's projection. - * - * To change the aspect ratio of the glTF camera: - * - * camera->setScaling(double4 {1.0 / newAspectRatio, 1.0, 1.0, 1.0}); - * - * @see filament::Camera::setScaling - */ - const Entity* getCameraEntities() const noexcept; - - /** - * Gets the number of entities returned by getCameraEntities(). - */ - size_t getCameraEntityCount() const noexcept; - - /** - * Gets the transform root for the asset, which has no matching glTF node. - * - * This node exists for convenience, allowing users to transform the entire asset. For instanced - * assets, this is a "super root" where each of its children is a root in a particular instance. - * This allows users to transform all instances en masse if they wish to do so. - */ - Entity getRoot() const noexcept; - - /** - * Pops a ready renderable off the queue, or returns 0 if no renderables have become ready. - * - * NOTE: To determine the progress percentage or completion status, please use - * ResourceLoader#asyncGetLoadProgress. To get the number of ready renderables, - * please use popRenderables(). - * - * This method allows clients to progressively add the asset's renderables to the scene as - * textures gradually become ready through asynchronous loading. For example, on every frame - * progressive applications can do something like this: - * - * while (Entity e = popRenderable()) { scene.addEntity(e); } - * - * Progressive reveal is not supported for dynamically added instances. - * - * \see ResourceLoader#asyncBeginLoad - * \see popRenderables() - */ - Entity popRenderable() noexcept; - - /** - * Pops up to "count" ready renderables off the queue, or returns the available number. - * - * The given pointer should either be null or point to memory that can hold up to count - * entities. If the pointer is null, returns the number of available renderables. Otherwise - * returns the number of entities that have been written. - * - * \see ResourceLoader#asyncBeginLoad - */ - size_t popRenderables(Entity* entities, size_t count) noexcept; - - /** Gets resource URIs for all externally-referenced buffers. */ - const char* const* getResourceUris() const noexcept; - - /** Gets the number of resource URIs returned by getResourceUris(). */ - size_t getResourceUriCount() const noexcept; - - /** - * Gets the bounding box computed from the supplied min / max values in glTF accessors. - * - * This does not return a bounding box over all FilamentInstance, it's just a straightforward - * AAAB that can be determined at load time from the asset data. - */ - filament::Aabb getBoundingBox() const noexcept; - - /** Gets the NameComponentManager label for the given entity, if it exists. */ - const char* getName(Entity) const noexcept; - - /** Returns the first entity with the given name, or 0 if none exist. */ - Entity getFirstEntityByName(const char* name) noexcept; - - /** - * Gets a list of entities with the given name. - * - * @param name Null-terminated string to match. - * @param entities Pointer to an array to populate. - * @param maxCount Maximum number of entities to retrieve. - * - * @return If entities is non-null, the number of entities written to the entity pointer. - * Otherwise this returns the number of entities with the given name. - */ - size_t getEntitiesByName(const char* name, Entity* entities, - size_t maxCount) const noexcept; - - /** - * Gets a list of entities whose names start with the given prefix. - * - * @param prefix Null-terminated prefix string to match. - * @param entities Pointer to an array to populate. - * @param maxCount Maximum number of entities to retrieve. - * - * @return If entities is non-null, the number of entities written to the entity pointer. - * Otherwise this returns the number of entities with the given prefix. - */ - size_t getEntitiesByPrefix(const char* prefix, Entity* entities, - size_t maxCount) const noexcept; - - /** Gets the glTF extras string for a specific node, or for the asset, if it exists. */ - const char* getExtras(Entity entity = {}) const noexcept; - - /** - * Gets the morph target name at the given index in the given entity. - */ - const char* getMorphTargetNameAt(Entity entity, size_t targetIndex) const noexcept; - - /** - * Returns the number of morph targets in the given entity. - */ - size_t getMorphTargetCountAt(Entity entity) const noexcept; - - /** - * Lazily creates a single LINES renderable that draws the transformed bounding-box hierarchy - * for diagnostic purposes. The wireframe is owned by the asset so clients should not delete it. - */ - Entity getWireframe() noexcept; - - /** - * Returns the Filament engine associated with the AssetLoader that created this asset. - */ - filament::Engine* getEngine() const noexcept; - - /** - * Reclaims CPU-side memory for URI strings, binding lists, and raw animation data. - * - * This should only be called after ResourceLoader::loadResources(). - * If this is an instanced asset, this prevents creation of new instances. - */ - void releaseSourceData() noexcept; - - /** - * Returns a weak reference to the underlying cgltf hierarchy. This becomes invalid after - * calling releaseSourceData(). - */ - const void* getSourceAsset() noexcept; - - /** - * Returns the number of scenes in the asset. - */ - size_t getSceneCount() const noexcept; - - /** - * Returns the name of the given scene. - * - * Returns null if the given scene does not have a name or is out of bounds. - */ - const char* getSceneName(size_t sceneIndex) const noexcept; - - /** - * Adds entities to a Filament scene only if they belong to at least one of the given glTF - * scenes. - * - * This is just a helper that provides an alternative to directly calling scene->addEntities() - * and provides filtering functionality. - */ - void addEntitiesToScene(filament::Scene& targetScene, const Entity* entities, size_t count, - SceneMask sceneFilter) const; - - /** - * Releases ownership of entities and their Filament components. - * - * This makes the client take responsibility for destroying Filament - * components (e.g. Renderable, TransformManager component) as well as - * the underlying entities. - */ - void detachFilamentComponents() noexcept; - - bool areFilamentComponentsDetached() const noexcept; - - /** - * Convenience function to get the first instance, or null if it doesn't exist. - */ - FilamentInstance* getInstance() noexcept { - return getAssetInstanceCount() > 0 ? getAssetInstances()[0] : nullptr; - } - - /*! \cond PRIVATE */ - - FilamentInstance** getAssetInstances() noexcept; - size_t getAssetInstanceCount() const noexcept; - -protected: - FilamentAsset() noexcept = default; - ~FilamentAsset() = default; - -public: - FilamentAsset(FilamentAsset const&) = delete; - FilamentAsset(FilamentAsset&&) = delete; - FilamentAsset& operator=(FilamentAsset const&) = delete; - FilamentAsset& operator=(FilamentAsset&&) = delete; - /*! \endcond */ -}; - -} // namespace filament::gltfio - -#endif // GLTFIO_FILAMENTASSET_H diff --git a/windows/include/filament/gltfio/FilamentInstance.h b/windows/include/filament/gltfio/FilamentInstance.h deleted file mode 100644 index 04199639..00000000 --- a/windows/include/filament/gltfio/FilamentInstance.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -#ifndef GLTFIO_FILAMENTINSTANCE_H -#define GLTFIO_FILAMENTINSTANCE_H - -#include -#include - -#include - -namespace filament { -class MaterialInstance; -} - -namespace filament::gltfio { - -class Animator; -class FilamentAsset; - -/** - * \class FilamentInstance FilamentInstance.h gltfio/FilamentInstance.h - * \brief Provides access to a hierarchy of entities that have been instanced from a glTF asset. - * - * Every entity has a TransformManager component, and some entities also have \c Name or - * \c Renderable components. - * - * \see AssetLoader::createInstancedAsset() - */ -class UTILS_PUBLIC FilamentInstance { -public: - /** - * Gets the owner of this instance. - */ - FilamentAsset const* getAsset() const noexcept; - - /** - * Gets the list of entities in this instance, one for each glTF node. All of these have a - * Transform component. Some of the returned entities may also have a Renderable component or - * Name component. - */ - const utils::Entity* getEntities() const noexcept; - - /** - * Gets the number of entities returned by getEntities(). - */ - size_t getEntityCount() const noexcept; - - /** Gets the transform root for the instance, which has no matching glTF node. */ - utils::Entity getRoot() const noexcept; - - /** - * Applies the given material variant to all primitives in this instance. - * - * Ignored if variantIndex is out of bounds. - */ - void applyMaterialVariant(size_t variantIndex) noexcept; - - /** - * Returns the number of material variants in the asset. - */ - size_t getMaterialVariantCount() const noexcept; - - /** - * Returns the name of the given material variant, or null if it is out of bounds. - */ - const char* getMaterialVariantName(size_t variantIndex) const noexcept; - - /** - * Returns the animation engine for the instance. - * - * Note that an animator can be obtained either from an individual instance, or from the - * originating FilamentAsset. In the latter case, the animation frame is shared amongst all - * instances. If individual control is desired, users must obtain the animator from the - * individual instances. - * - * The animator is owned by the asset and should not be manually deleted. - */ - Animator* getAnimator() noexcept; - - /** - * Gets the number of skins. - */ - size_t getSkinCount() const noexcept; - - /** - * Gets the skin name at skin index. - */ - const char* getSkinNameAt(size_t skinIndex) const noexcept; - - /** - * Gets the number of joints at skin index. - */ - size_t getJointCountAt(size_t skinIndex) const noexcept; - - /** - * Gets joints at skin index. - */ - const utils::Entity* getJointsAt(size_t skinIndex) const noexcept; - - /** - * Attaches the given skin to the given node, which must have an associated mesh with - * BONE_INDICES and BONE_WEIGHTS attributes. - * - * This is a no-op if the given skin index or target is invalid. - */ - void attachSkin(size_t skinIndex, utils::Entity target) noexcept; - - /** - * Detaches the given skin from the given node. - * - * This is a no-op if the given skin index or target is invalid. - */ - void detachSkin(size_t skinIndex, utils::Entity target) noexcept; - - /** - * Gets inverse bind matrices for all joints at the given skin index. - * - * See getJointCountAt for determining the number of matrices returned (i.e. the number of joints). - */ - math::mat4f const* getInverseBindMatricesAt(size_t skinIndex) const; - - /** - * Resets the AABB on all renderables by manually computing the bounding box. - * - * THIS IS ONLY USEFUL FOR MALFORMED ASSETS THAT DO NOT HAVE MIN/MAX SET UP CORRECTLY. - * - * Does not affect the return value of getBoundingBox() on the owning asset. - * Cannot be called after releaseSourceData() on the owning asset. - * Can only be called after loadResources() or asyncBeginLoad(). - */ - void recomputeBoundingBoxes(); - - /** - * Gets the axis-aligned bounding box from the supplied min / max values in glTF accessors. - * - * If recomputeBoundingBoxes() has been called, then this returns the recomputed AABB. - */ - Aabb getBoundingBox() const noexcept; - - /** Gets all material instances. These are already bound to renderables. */ - const MaterialInstance* const* getMaterialInstances() const noexcept; - - /** Gets all material instances (non-const). These are already bound to renderables. */ - MaterialInstance* const* getMaterialInstances() noexcept; - - /** Gets the number of materials returned by getMaterialInstances(). */ - size_t getMaterialInstanceCount() const noexcept; - - /** - * Releases ownership of material instances. - * - * This makes the client take responsibility for destroying MaterialInstance - * objects. The getMaterialInstances query becomes invalid after detachment. - */ - void detachMaterialInstances(); -}; - -} // namespace filament::gltfio - -#endif // GLTFIO_FILAMENTINSTANCE_H diff --git a/windows/include/filament/gltfio/MaterialProvider.h b/windows/include/filament/gltfio/MaterialProvider.h deleted file mode 100644 index f62d667b..00000000 --- a/windows/include/filament/gltfio/MaterialProvider.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef GLTFIO_MATERIALPROVIDER_H -#define GLTFIO_MATERIALPROVIDER_H - -#include -#include -#include - -#include - -#include -#include - -namespace filament::gltfio { - -enum class AlphaMode : uint8_t { - OPAQUE, - MASK, - BLEND -}; - -// The following struct gets hashed so all padding bits should be explicit. -// Tell the compiler to emit a warning if it adds any padding. -UTILS_WARNING_PUSH -UTILS_WARNING_ENABLE_PADDED - -/** - * \struct MaterialKey MaterialProvider.h gltfio/MaterialProvider.h - * \brief Small POD structure that specifies the requirements for a glTF material. - * \note This key is processed by MurmurHashFn so please make padding explicit. - */ -struct alignas(4) MaterialKey { - // -- 32 bit boundary -- - bool doubleSided : 1; - bool unlit : 1; - bool hasVertexColors : 1; - bool hasBaseColorTexture : 1; - bool hasNormalTexture : 1; - bool hasOcclusionTexture : 1; - bool hasEmissiveTexture : 1; - bool useSpecularGlossiness : 1; - AlphaMode alphaMode : 4; - bool enableDiagnostics : 4; - union { - struct { - bool hasMetallicRoughnessTexture : 1; - uint8_t metallicRoughnessUV : 7; - }; - struct { - bool hasSpecularGlossinessTexture : 1; - uint8_t specularGlossinessUV : 7; - }; - }; - uint8_t baseColorUV; - // -- 32 bit boundary -- - bool hasClearCoatTexture : 1; - uint8_t clearCoatUV : 7; - bool hasClearCoatRoughnessTexture : 1; - uint8_t clearCoatRoughnessUV : 7; - bool hasClearCoatNormalTexture : 1; - uint8_t clearCoatNormalUV : 7; - bool hasClearCoat : 1; - bool hasTransmission : 1; - bool hasTextureTransforms : 6; - // -- 32 bit boundary -- - uint8_t emissiveUV; - uint8_t aoUV; - uint8_t normalUV; - bool hasTransmissionTexture : 1; - uint8_t transmissionUV : 7; - // -- 32 bit boundary -- - bool hasSheenColorTexture : 1; - uint8_t sheenColorUV : 7; - bool hasSheenRoughnessTexture : 1; - uint8_t sheenRoughnessUV : 7; - bool hasVolumeThicknessTexture : 1; - uint8_t volumeThicknessUV : 7; - bool hasSheen : 1; - bool hasIOR : 1; - bool hasVolume : 1; - uint8_t padding : 5; -}; - -static_assert(sizeof(MaterialKey) == 16, "MaterialKey has unexpected size."); - -UTILS_WARNING_POP - -bool operator==(const MaterialKey& k1, const MaterialKey& k2); - -// Define a mapping from a uv set index in the source asset to one of Filament's uv sets. -enum UvSet : uint8_t { UNUSED, UV0, UV1 }; -constexpr int UvMapSize = 8; -using UvMap = std::array; - -inline uint8_t getNumUvSets(const UvMap& uvmap) { - return std::max({ - uvmap[0], uvmap[1], uvmap[2], uvmap[3], - uvmap[4], uvmap[5], uvmap[6], uvmap[7], - }); -}; - -/** - * \class MaterialProvider MaterialProvider.h gltfio/MaterialProvider.h - * \brief Interface to a provider of glTF materials (has two implementations). - * - * - The \c JitShaderProvider implementation generates materials at run time (which can be slow) and - * requires the filamat library, but produces streamlined shaders. See createJitShaderProvider(). - * - * - The \c UbershaderProvider implementation uses a small number of pre-built materials with complex - * fragment shaders, but does not require any run time work or usage of filamat. See - * createUbershaderProvider(). - * - * Both implementations of MaterialProvider maintain a small cache of materials which must be - * explicitly freed using destroyMaterials(). These materials are not freed automatically when the - * MaterialProvider is destroyed, which allows clients to take ownership if desired. - * - */ -class UTILS_PUBLIC MaterialProvider { -public: - virtual ~MaterialProvider() {} - - /** - * Creates or fetches a compiled Filament material, then creates an instance from it. - * - * @param config Specifies requirements; might be mutated due to resource constraints. - * @param uvmap Output argument that gets populated with a small table that maps from a glTF uv - * index to a Filament uv index. - * @param label Optional tag that is not a part of the cache key. - * @param extras Optional extras as stringified JSON (not a part of the cache key). - * Does not store the pointer. - */ - virtual MaterialInstance* createMaterialInstance(MaterialKey* config, UvMap* uvmap, - const char* label = "material", const char* extras = nullptr) = 0; - - /** - * Creates or fetches a compiled Filament material corresponding to the given config. - */ - virtual Material* getMaterial(MaterialKey* config, UvMap* uvmap, - const char* label = "material") { return nullptr; } - - /** - * Gets a weak reference to the array of cached materials. - */ - virtual const Material* const* getMaterials() const noexcept = 0; - - /** - * Gets the number of cached materials. - */ - virtual size_t getMaterialsCount() const noexcept = 0; - - /** - * Destroys all cached materials. - * - * This is not called automatically when MaterialProvider is destroyed, which allows - * clients to take ownership of the cache if desired. - */ - virtual void destroyMaterials() = 0; - - /** - * Returns true if the presence of the given vertex attribute is required. - * - * Some types of providers (e.g. ubershader) require dummy attribute values - * if the glTF model does not provide them. - */ - virtual bool needsDummyData(VertexAttribute attrib) const noexcept = 0; -}; - -void constrainMaterial(MaterialKey* key, UvMap* uvmap); - -void processShaderString(std::string* shader, const UvMap& uvmap, - const MaterialKey& config); - -/** - * Creates a material provider that builds materials on the fly, composing GLSL at run time. - * - * @param optimizeShaders Optimizes shaders, but at significant cost to construction time. - * @return New material provider that can build materials at run time. - * - * Requires \c libfilamat to be linked in. Not available in \c libgltfio_core. - * - * @see createUbershaderProvider - */ -UTILS_PUBLIC -MaterialProvider* createJitShaderProvider(Engine* engine, bool optimizeShaders = false); - -/** - * Creates a material provider that loads a small set of pre-built materials. - * - * @return New material provider that can quickly load a material from a cache. - * - * @see createJitShaderProvider - */ -UTILS_PUBLIC -MaterialProvider* createUbershaderProvider(Engine* engine, const void* archive, - size_t archiveByteCount); - -} // namespace filament::gltfio - -#endif // GLTFIO_MATERIALPROVIDER_H diff --git a/windows/include/filament/gltfio/NodeManager.h b/windows/include/filament/gltfio/NodeManager.h deleted file mode 100644 index 04f7bd6d..00000000 --- a/windows/include/filament/gltfio/NodeManager.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -#ifndef GLTFIO_NODEMANAGER_H -#define GLTFIO_NODEMANAGER_H - -#include - -#include -#include -#include -#include -#include - -namespace utils { -class Entity; -} // namespace utils - -namespace filament::gltfio { - -class FNodeManager; - -/** - * NodeManager is used to add annotate entities with glTF-specific information. - * - * Node components are created by gltfio and exposed to users to allow inspection. - * - * Nodes do not store the glTF hierarchy or names; see TransformManager and NameComponentManager. - */ -class UTILS_PUBLIC NodeManager { -public: - using Instance = utils::EntityInstance; - using Entity = utils::Entity; - using CString = utils::CString; - using SceneMask = utils::bitset32; - - static constexpr size_t MAX_SCENE_COUNT = 32; - - /** - * Returns whether a particular Entity is associated with a component of this NodeManager - * @param e An Entity. - * @return true if this Entity has a component associated with this manager. - */ - bool hasComponent(Entity e) const noexcept; - - /** - * Gets an Instance representing the node component associated with the given Entity. - * @param e An Entity. - * @return An Instance object, which represents the node component associated with the Entity e. - * @note Use Instance::isValid() to make sure the component exists. - * @see hasComponent() - */ - Instance getInstance(Entity e) const noexcept; - - /** - * Creates a node component and associates it with the given entity. - * @param entity An Entity to associate a node component with. - * - * If this component already exists on the given entity, it is first destroyed as if - * destroy(Entity e) was called. - * - * @see destroy() - */ - void create(Entity entity); - - /** - * Destroys this component from the given entity. - * @param e An entity. - * - * @see create() - */ - void destroy(Entity e) noexcept; - - void setMorphTargetNames(Instance ci, utils::FixedCapacityVector names) noexcept; - const utils::FixedCapacityVector& getMorphTargetNames(Instance ci) const noexcept; - - void setExtras(Instance ci, CString extras) noexcept; - const CString& getExtras(Instance ci) const noexcept; - - void setSceneMembership(Instance ci, SceneMask scenes) noexcept; - SceneMask getSceneMembership(Instance ci) const noexcept; - -protected: - NodeManager() noexcept = default; - ~NodeManager() = default; - -public: - NodeManager(NodeManager const&) = delete; - NodeManager(NodeManager&&) = delete; - NodeManager& operator=(NodeManager const&) = delete; - NodeManager& operator=(NodeManager&&) = delete; -}; - -} // namespace filament::gltfio - - -#endif // GLTFIO_NODEMANAGER_H diff --git a/windows/include/filament/gltfio/ResourceLoader.h b/windows/include/filament/gltfio/ResourceLoader.h deleted file mode 100644 index ab0a6f10..00000000 --- a/windows/include/filament/gltfio/ResourceLoader.h +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -#ifndef GLTFIO_RESOURCELOADER_H -#define GLTFIO_RESOURCELOADER_H - -#include - -#include - -#include - -namespace filament { - class Engine; -} - -namespace filament::gltfio { - -struct FFilamentAsset; -class AssetPool; -class TextureProvider; - -/** - * \struct ResourceConfiguration ResourceLoader.h gltfio/ResourceLoader.h - * \brief Construction parameters for ResourceLoader. - */ -struct ResourceConfiguration { - //! The engine that the loader should pass to builder objects (e.g. - //! filament::Texture::Builder). - class filament::Engine* engine; - - //! Optional path or URI that points to the base glTF file. This is used solely - //! to resolve relative paths. The string pointer is not retained. - const char* gltfPath; - - //! If true, adjusts skinning weights to sum to 1. Well formed glTF files do not need this, - //! but it is useful for robustness. - bool normalizeSkinningWeights; -}; - -/** - * \class ResourceLoader ResourceLoader.h gltfio/ResourceLoader.h - * \brief Prepares and uploads vertex buffers and textures to the GPU. - * - * For a usage example, see the documentation for AssetLoader. - * - * ResourceLoader must be destroyed on the same thread that calls filament::Renderer::render() - * because it listens to filament::backend::BufferDescriptor callbacks in order to determine when to - * free CPU-side data blobs. - * - * \todo If clients persist their ResourceLoader, Filament textures are currently re-created upon - * subsequent re-loads of the same asset. To fix this, we would need to enable shared ownership - * of Texture objects between ResourceLoader and FilamentAsset. - */ -class UTILS_PUBLIC ResourceLoader { -public: - using BufferDescriptor = filament::backend::BufferDescriptor; - - ResourceLoader(const ResourceConfiguration& config); - ~ResourceLoader(); - - /** - * Feeds the binary content of an external resource into the loader's URI cache. - * - * On some platforms, `ResourceLoader` does not know how to download external resources on its - * own (external resources might come from a filesystem, a database, or the internet) so this - * method allows clients to download external resources and push them to the loader. - * - * Every resource should be passed in before calling #loadResources or #asyncBeginLoad. See - * also FilamentAsset#getResourceUris. - * - * When loading GLB files (as opposed to JSON-based glTF files), clients typically do not - * need to call this method. - */ - void addResourceData(const char* uri, BufferDescriptor&& buffer); - - /** - * Register a plugin that can consume PNG / JPEG content and produce filament::Texture objects. - * - * Destruction of the given provider is the client's responsibility. - */ - void addTextureProvider(const char* mimeType, TextureProvider* provider); - - /** - * Checks if the given resource has already been added to the URI cache. - */ - bool hasResourceData(const char* uri) const; - - /** - * Frees memory by evicting the URI cache that was populated via addResourceData. - * - * This can be called only after a model is fully loaded or after loading has been cancelled. - */ - void evictResourceData(); - - /** - * Loads resources for the given asset from the filesystem or data cache and "finalizes" the - * asset by transforming the vertex data format if necessary, decoding image files, supplying - * tangent data, etc. - * - * Returns false if resources have already been loaded, or if one or more resources could not - * be loaded. - * - * Note: this method is synchronous and blocks until all textures have been decoded. - * For an asynchronous alternative, see #asyncBeginLoad. - */ - bool loadResources(FilamentAsset* asset); - - /** - * Starts an asynchronous resource load. - * - * Returns false if the loading process was unable to start. - * - * This is an alternative to #loadResources and requires periodic calls to #asyncUpdateLoad. - * On multi-threaded systems this creates threads for texture decoding. - */ - bool asyncBeginLoad(FilamentAsset* asset); - - /** - * Gets the status of an asynchronous resource load as a percentage in [0,1]. - */ - float asyncGetLoadProgress() const; - - /** - * Updates an asynchronous load by performing any pending work that must take place - * on the main thread. - * - * Clients must periodically call this until #asyncGetLoadProgress returns 100%. - * After progress reaches 100%, calling this is harmless; it just does nothing. - */ - void asyncUpdateLoad(); - - /** - * Cancels pending decoder jobs, frees all CPU-side texel data, and flushes the Engine. - * - * Calling this is only necessary if the asyncBeginLoad API was used - * and cancellation is required before progress reaches 100%. - */ - void asyncCancelLoad(); - -private: - bool loadResources(FFilamentAsset* asset, bool async); - void normalizeSkinningWeights(FFilamentAsset* asset) const; - AssetPool* mPool; - struct Impl; - Impl* pImpl; -}; - -} // namespace filament::gltfio - -#endif // GLTFIO_RESOURCELOADER_H - diff --git a/windows/include/filament/gltfio/TextureProvider.h b/windows/include/filament/gltfio/TextureProvider.h deleted file mode 100644 index ff497af2..00000000 --- a/windows/include/filament/gltfio/TextureProvider.h +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -#ifndef GLTFIO_TEXTUREPROVIDER_H -#define GLTFIO_TEXTUREPROVIDER_H - -#include -#include - -#include -#include - -namespace filament { - class Engine; - class Texture; -} - -namespace filament::gltfio { - -/** - * TextureProvider is an interface that allows clients to implement their own texture decoding - * facility for JPEG, PNG, or KTX2 content. It constructs Filament Texture objects synchronously, - * but populates their miplevels asynchronously. - * - * gltfio calls all public methods from the foreground thread, i.e. the thread that the Filament - * engine was created with. However the implementation may create 0 or more background threads to - * perform decoding work. - * - * The following pseudocode illustrates how this interface could be used, but in practice the only - * client is the gltfio ResourceLoader. - * - * filament::Engine* engine = ...; - * TextureProvider* provider = createStbProvider(engine); - * - * for (auto filename : textureFiles) { - * std::vector buf = readEntireFile(filename); - * Texture* texture = provider->pushTexture(buf.data(), buf.size(), "image/png", 0); - * if (texture == nullptr) { puts(provider->getPushMessage()); exit(1); } - * } - * - * // At this point, the returned textures can be bound to material instances, but none of their - * // miplevel images have been populated yet. - * - * while (provider->getPoppedCount() < provider->getPushedCount()) { - * sleep(200); - * - * // The following call gives the provider an opportunity to reap the results of any - * // background decoder work that has been completed (e.g. by calling Texture::setImage). - * provider->updateQueue(); - * - * // Check for textures that now have all their miplevels initialized. - * while (Texture* texture = provider->popTexture()) { - * printf("%p has all its miplevels ready.\n", texture); - * } - * } - * - * delete provider; - */ -class UTILS_PUBLIC TextureProvider { -public: - using Texture = filament::Texture; - - enum class TextureFlags : uint64_t { - NONE = 0, - sRGB = 1 << 0, - }; - - /** - * Creates a Filament texture and pushes it to the asynchronous decoding queue. - * - * The provider synchronously determines the texture dimensions in order to create a Filament - * texture object, then populates the miplevels asynchronously. - * - * If construction fails, nothing is pushed to the queue and null is returned. The failure - * reason can be obtained with getPushMessage(). The given buffer pointer is not held, so the - * caller can free it immediately. It is also the caller's responsibility to free the returned - * Texture object, but it is only safe to do so after it has been popped from the queue. - */ - virtual Texture* pushTexture(const uint8_t* data, size_t byteCount, - const char* mimeType, TextureFlags flags) = 0; - - /** - * Checks if any texture is ready to be removed from the asynchronous decoding queue, and if so - * pops it off. - * - * Unless an error or cancellation occurred during the decoding process, the returned texture - * should have all its miplevels populated. If the texture is not complete, the reason can be - * obtained with getPopMessage(). - * - * Due to concurrency, textures are not necessarily popped off in the same order they were - * pushed. Returns null if there are no textures that are ready to be popped. - */ - virtual Texture* popTexture() = 0; - - /** - * Polls textures in the queue and uploads mipmap images if any have emerged from the decoder. - * - * This gives the provider an opportunity to call Texture::setImage() on the foreground thread. - * If needed, it can also call Texture::generateMipmaps() here. - * - * Items in the decoding queue can become "poppable" only during this call. - */ - virtual void updateQueue() = 0; - - /** - * Returns a failure message for the most recent call to pushTexture(), or null for success. - * - * Note that this method does not pertain to the decoding process. If decoding fails, clients to - * can pop the incomplete texture off the queue and obtain a failure message using the - * getPopFailure() method. - * - * The returned string is owned by the provider and becomes invalid after the next call to - * pushTexture(). - */ - virtual const char* getPushMessage() const = 0; - - /** - * Returns a failure message for the most recent call to popTexture(), or null for success. - * - * If the most recent call to popTexture() returned null, then no error occurred and this - * returns null. If the most recent call to popTexture() returned a "complete" texture (i.e. - * all miplevels present), then this returns null. This returns non-null only if an error or - * cancellation occurred while decoding the popped texture. - * - * The returned string is owned by the provider and becomes invalid after the next call to - * popTexture(). - */ - virtual const char* getPopMessage() const = 0; - - /** - * Waits for all outstanding decoding jobs to complete. - * - * Clients should call updateQueue() afterwards if they wish to update the push / pop queue. - */ - virtual void waitForCompletion() = 0; - - /** - * Cancels all not-yet-started decoding jobs and waits for all other jobs to complete. - * - * Jobs that have already started cannot be canceled. Textures whose decoding process has - * been cancelled will be made poppable on the subsequent call to updateQueue(). - */ - virtual void cancelDecoding() = 0; - - /** Total number of successful push calls since the provider was created. */ - virtual size_t getPushedCount() const = 0; - - /** Total number of successful pop calls since the provider was created. */ - virtual size_t getPoppedCount() const = 0; - - /** Total number of textures that have become ready-to-pop since the provider was created. */ - virtual size_t getDecodedCount() const = 0; - - virtual ~TextureProvider() = default; -}; - -/** - * Creates a simple decoder based on stb_image that can handle "image/png" and "image/jpeg". - * This works only if your build configuration includes STB. - */ -TextureProvider* createStbProvider(filament::Engine* engine); - -/** - * Creates a decoder that can handle certain types of "image/ktx2" content as specified in - * the KHR_texture_basisu specification. - */ -TextureProvider* createKtx2Provider(filament::Engine* engine); - -} // namespace filament::gltfio - -template<> struct utils::EnableBitMaskOperators - : public std::true_type {}; - -#endif // GLTFIO_TEXTUREPROVIDER_H diff --git a/windows/include/filament/gltfio/materials/uberarchive.h b/windows/include/filament/gltfio/materials/uberarchive.h deleted file mode 100644 index b36ddd36..00000000 --- a/windows/include/filament/gltfio/materials/uberarchive.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef UBERARCHIVE_H_ -#define UBERARCHIVE_H_ - -#include - -extern "C" { - extern const uint8_t UBERARCHIVE_PACKAGE[]; - extern int UBERARCHIVE_DEFAULT_OFFSET; - extern int UBERARCHIVE_DEFAULT_SIZE; -} -#define UBERARCHIVE_DEFAULT_DATA (UBERARCHIVE_PACKAGE + UBERARCHIVE_DEFAULT_OFFSET) - -#endif diff --git a/windows/include/filament/gltfio/math.h b/windows/include/filament/gltfio/math.h deleted file mode 100644 index dfbe0fca..00000000 --- a/windows/include/filament/gltfio/math.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef GLTFIO_MATH_H -#define GLTFIO_MATH_H - -#include -#include -#include -#include -#include - -#include - -namespace filament::gltfio { - -template -UTILS_PUBLIC T cubicSpline(const T& vert0, const T& tang0, const T& vert1, const T& tang1, float t) { - float tt = t * t, ttt = tt * t; - float s2 = -2 * ttt + 3 * tt, s3 = ttt - tt; - float s0 = 1 - s2, s1 = s3 - tt + t; - T p0 = vert0; - T m0 = tang0; - T p1 = vert1; - T m1 = tang1; - return s0 * p0 + s1 * m0 * t + s2 * p1 + s3 * m1 * t; -} - -UTILS_PUBLIC inline void decomposeMatrix(const filament::math::mat4f& mat, filament::math::float3* translation, - filament::math::quatf* rotation, filament::math::float3* scale) { - using namespace filament::math; - - // Extract translation. - *translation = mat[3].xyz; - - // Extract upper-left for determinant computation. - const float a = mat[0][0]; - const float b = mat[0][1]; - const float c = mat[0][2]; - const float d = mat[1][0]; - const float e = mat[1][1]; - const float f = mat[1][2]; - const float g = mat[2][0]; - const float h = mat[2][1]; - const float i = mat[2][2]; - const float A = e * i - f * h; - const float B = f * g - d * i; - const float C = d * h - e * g; - - // Extract scale. - const float det(a * A + b * B + c * C); - float scalex = length(float3({a, b, c})); - float scaley = length(float3({d, e, f})); - float scalez = length(float3({g, h, i})); - float3 s = { scalex, scaley, scalez }; - if (det < 0) { - s = -s; - } - *scale = s; - - // Remove scale from the matrix if it is not close to zero. - mat4f clone = mat; - if (std::abs(det) > std::numeric_limits::epsilon()) { - clone[0] /= s.x; - clone[1] /= s.y; - clone[2] /= s.z; - // Extract rotation - *rotation = clone.toQuaternion(); - } else { - // Set to identity if close to zero - *rotation = quatf(1.0f); - } -} - -UTILS_PUBLIC inline filament::math::mat4f composeMatrix(const filament::math::float3& translation, - const filament::math::quatf& rotation, const filament::math::float3& scale) { - float tx = translation[0]; - float ty = translation[1]; - float tz = translation[2]; - float qx = rotation[0]; - float qy = rotation[1]; - float qz = rotation[2]; - float qw = rotation[3]; - float sx = scale[0]; - float sy = scale[1]; - float sz = scale[2]; - return filament::math::mat4f( - (1 - 2 * qy*qy - 2 * qz*qz) * sx, - (2 * qx*qy + 2 * qz*qw) * sx, - (2 * qx*qz - 2 * qy*qw) * sx, - 0.f, - (2 * qx*qy - 2 * qz*qw) * sy, - (1 - 2 * qx*qx - 2 * qz*qz) * sy, - (2 * qy*qz + 2 * qx*qw) * sy, - 0.f, - (2 * qx*qz + 2 * qy*qw) * sz, - (2 * qy*qz - 2 * qx*qw) * sz, - (1 - 2 * qx*qx - 2 * qy*qy) * sz, - 0.f, tx, ty, tz, 1.f); -} - -inline filament::math::mat3f matrixFromUvTransform(const float offset[2], float rotation, - const float scale[2]) { - float tx = offset[0]; - float ty = offset[1]; - float sx = scale[0]; - float sy = scale[1]; - float c = cos(rotation); - float s = sin(rotation); - return filament::math::mat3f(sx * c, sx * s, tx, -sy * s, sy * c, ty, 0.0f, 0.0f, 1.0f); -}; - -} // namespace filament::gltfio - -#endif // GLTFIO_MATH_H diff --git a/windows/include/filament/ibl/Cubemap.h b/windows/include/filament/ibl/Cubemap.h deleted file mode 100644 index 2186bdb0..00000000 --- a/windows/include/filament/ibl/Cubemap.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef IBL_CUBEMAP_H -#define IBL_CUBEMAP_H - -#include - -#include - -#include -#include -#include - -#include - -namespace filament { -namespace ibl { - -/** - * Generic cubemap class. It handles writing / reading into the 6 faces of a cubemap. - * - * Seamless trilinear filtering is handled. - * - * This class doesn't own the face data, it's just a "view" on the 6 images. - * - * @see CubemapUtils - * - */ -class UTILS_PUBLIC Cubemap { -public: - - /** - * Initialize the cubemap with a given size, but no face is set and no memory is allocated. - * - * Usually Cubemaps are created using CubemapUtils. - * - * @see CubemapUtils - */ - explicit Cubemap(size_t dim); - - Cubemap(Cubemap&&) = default; - Cubemap& operator=(Cubemap&&) = default; - - ~Cubemap(); - - - enum class Face : uint8_t { - PX = 0, // left +----+ - NX, // right | PY | - PY, // bottom +----+----+----+----+ - NY, // top | NX | PZ | PX | NZ | - PZ, // back +----+----+----+----+ - NZ // front | NY | - // +----+ - }; - - using Texel = filament::math::float3; - - - //! releases all images and reset the cubemap size - void resetDimensions(size_t dim); - - //! assigns an image to a face. - void setImageForFace(Face face, const Image& image); - - //! retrieves the image attached to a face - inline const Image& getImageForFace(Face face) const; - - //! retrieves the image attached to a face - inline Image& getImageForFace(Face face); - - //! computes the center of a pixel at coordinate x, y - static inline filament::math::float2 center(size_t x, size_t y); - - //! computes a direction vector from a face and a location of the center of pixel in an Image - inline filament::math::float3 getDirectionFor(Face face, size_t x, size_t y) const; - - //! computes a direction vector from a face and a location in pixel in an Image - inline filament::math::float3 getDirectionFor(Face face, float x, float y) const; - - //! samples the cubemap at the given direction using nearest neighbor filtering - inline Texel const& sampleAt(const filament::math::float3& direction) const; - - //! samples the cubemap at the given direction using bilinear filtering - inline Texel filterAt(const filament::math::float3& direction) const; - - //! samples an image at the given location in pixel using bilinear filtering - static Texel filterAt(const Image& image, float x, float y); - static Texel filterAtCenter(const Image& image, size_t x, size_t y); - - //! samples two cubemaps in a given direction and lerps the result by a given lerp factor - static Texel trilinearFilterAt(const Cubemap& c0, const Cubemap& c1, float lerp, - const filament::math::float3& direction); - - //! reads a texel at a given address - inline static const Texel& sampleAt(void const* data) { - return *static_cast(data); - } - - //! writes a texel at a given address - inline static void writeAt(void* data, const Texel& texel) { - *static_cast(data) = texel; - } - - //! returns the size of the cubemap in pixels - size_t getDimensions() const; - - /** - * Prepares a cubemap for seamless access to its faces. - * - * @warning All faces of the cubemap must be backed-up by the same Image, and must already - * be spaced by 2 lines/rows. - */ - void makeSeamless(); - - struct Address { - Face face; - float s = 0; - float t = 0; - }; - - //! returns the face and texture coordinates of the given direction - static Address getAddressFor(const filament::math::float3& direction); - -private: - size_t mDimensions = 0; - float mScale = 1; - float mUpperBound = 0; - Image mFaces[6]; -}; - -// ------------------------------------------------------------------------------------------------ - -inline const Image& Cubemap::getImageForFace(Face face) const { - return mFaces[int(face)]; -} - -inline Image& Cubemap::getImageForFace(Face face) { - return mFaces[int(face)]; -} - -inline filament::math::float2 Cubemap::center(size_t x, size_t y) { - return { x + 0.5f, y + 0.5f }; -} - -inline filament::math::float3 Cubemap::getDirectionFor(Face face, size_t x, size_t y) const { - return getDirectionFor(face, x + 0.5f, y + 0.5f); -} - -inline filament::math::float3 Cubemap::getDirectionFor(Face face, float x, float y) const { - // map [0, dim] to [-1,1] with (-1,-1) at bottom left - float cx = (x * mScale) - 1; - float cy = 1 - (y * mScale); - - filament::math::float3 dir; - const float l = std::sqrt(cx * cx + cy * cy + 1); - switch (face) { - case Face::PX: dir = { 1, cy, -cx }; break; - case Face::NX: dir = { -1, cy, cx }; break; - case Face::PY: dir = { cx, 1, -cy }; break; - case Face::NY: dir = { cx, -1, cy }; break; - case Face::PZ: dir = { cx, cy, 1 }; break; - case Face::NZ: dir = { -cx, cy, -1 }; break; - } - return dir * (1 / l); -} - -inline Cubemap::Texel const& Cubemap::sampleAt(const filament::math::float3& direction) const { - Cubemap::Address addr(getAddressFor(direction)); - const size_t x = std::min(size_t(addr.s * mDimensions), mDimensions - 1); - const size_t y = std::min(size_t(addr.t * mDimensions), mDimensions - 1); - return sampleAt(getImageForFace(addr.face).getPixelRef(x, y)); -} - -inline Cubemap::Texel Cubemap::filterAt(const filament::math::float3& direction) const { - Cubemap::Address addr(getAddressFor(direction)); - addr.s = std::min(addr.s * mDimensions, mUpperBound); - addr.t = std::min(addr.t * mDimensions, mUpperBound); - return filterAt(getImageForFace(addr.face), addr.s, addr.t); -} - -} // namespace ibl -} // namespace filament - -#endif /* IBL_CUBEMAP_H */ diff --git a/windows/include/filament/ibl/CubemapIBL.h b/windows/include/filament/ibl/CubemapIBL.h deleted file mode 100644 index 925e27c0..00000000 --- a/windows/include/filament/ibl/CubemapIBL.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef IBL_CUBEMAPIBL_H -#define IBL_CUBEMAPIBL_H - -#include - -#include -#include - -#include - -#include -#include - -namespace utils { -class JobSystem; -} // namespace utils - -namespace filament { -namespace ibl { - -class Cubemap; -class Image; - -/** - * Generates cubemaps for the IBL. - */ -class UTILS_PUBLIC CubemapIBL { -public: - typedef void (*Progress)(size_t, float, void*); - - /** - * Computes a roughness LOD using prefiltered importance sampling GGX - * - * @param dst the destination cubemap - * @param levels a list of prefiltered lods of the source environment - * @param linearRoughness roughness - * @param maxNumSamples number of samples for importance sampling - * @param updater a callback for the caller to track progress - */ - static void roughnessFilter( - utils::JobSystem& js, Cubemap& dst, const utils::Slice& levels, - float linearRoughness, size_t maxNumSamples, math::float3 mirror, bool prefilter, - Progress updater = nullptr, void* userdata = nullptr); - - static void roughnessFilter( - utils::JobSystem& js, Cubemap& dst, const std::vector& levels, - float linearRoughness, size_t maxNumSamples, math::float3 mirror, bool prefilter, - Progress updater = nullptr, void* userdata = nullptr); - - //! Computes the "DFG" term of the "split-sum" approximation and stores it in a 2D image - static void DFG(utils::JobSystem& js, Image& dst, bool multiscatter, bool cloth); - - /** - * Computes the diffuse irradiance using prefiltered importance sampling GGX - * - * @note Usually this is done using spherical harmonics instead. - * - * @param dst the destination cubemap - * @param levels a list of prefiltered lods of the source environment - * @param maxNumSamples number of samples for importance sampling - * @param updater a callback for the caller to track progress - * - * @see CubemapSH - */ - static void diffuseIrradiance(utils::JobSystem& js, Cubemap& dst, const std::vector& levels, - size_t maxNumSamples = 1024, Progress updater = nullptr, void* userdata = nullptr); - - // for debugging. ignore. - static void brdf(utils::JobSystem& js, Cubemap& dst, float linearRoughness); -}; - -} // namespace ibl -} // namespace filament - -#endif /* IBL_CUBEMAPIBL_H */ diff --git a/windows/include/filament/ibl/CubemapSH.h b/windows/include/filament/ibl/CubemapSH.h deleted file mode 100644 index b9297c74..00000000 --- a/windows/include/filament/ibl/CubemapSH.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef IBL_CUBEMAPSH_H -#define IBL_CUBEMAPSH_H - - -#include - -#include -#include - -#include -#include - -namespace utils { -class JobSystem; -} // namespace utils - -namespace filament { -namespace ibl { - -class Cubemap; - -/** - * Computes spherical harmonics - */ -class UTILS_PUBLIC CubemapSH { -public: - /** - * Spherical Harmonics decomposition of the given cubemap - * Optionally calculates irradiance by convolving with truncated cos. - */ - static std::unique_ptr computeSH( - utils::JobSystem& js, const Cubemap& cm, size_t numBands, bool irradiance); - - /** - * Render given spherical harmonics into a cubemap - */ - static void renderSH(utils::JobSystem& js, Cubemap& cm, - const std::unique_ptr& sh, size_t numBands); - - static void windowSH(std::unique_ptr& sh, size_t numBands, float cutoff); - - /** - * Compute spherical harmonics of the irradiance of the given cubemap. - * The SH basis are pre-scaled for easier rendering by the shader. The resulting coefficients - * are not spherical harmonics (as they're scalled by various factors). In particular they - * cannot be rendered with renderSH() above. Instead use renderPreScaledSH3Bands() which - * is exactly the code ran by our shader. - */ - static void preprocessSHForShader(std::unique_ptr& sh); - - /** - * Render pre-scaled irrandiance SH - */ - static void renderPreScaledSH3Bands(utils::JobSystem& js, Cubemap& cm, - const std::unique_ptr& sh); - - static constexpr size_t getShIndex(ssize_t m, size_t l) { - return SHindex(m, l); - } - -private: - class float5 { - float v[5]; - public: - float5() = default; - constexpr float5(float a, float b, float c, float d, float e) : v{ a, b, c, d, e } {} - constexpr float operator[](size_t i) const { return v[i]; } - float& operator[](size_t i) { return v[i]; } - }; - - static inline const float5 multiply(const float5 M[5], float5 x) noexcept { - return float5{ - M[0][0] * x[0] + M[1][0] * x[1] + M[2][0] * x[2] + M[3][0] * x[3] + M[4][0] * x[4], - M[0][1] * x[0] + M[1][1] * x[1] + M[2][1] * x[2] + M[3][1] * x[3] + M[4][1] * x[4], - M[0][2] * x[0] + M[1][2] * x[1] + M[2][2] * x[2] + M[3][2] * x[3] + M[4][2] * x[4], - M[0][3] * x[0] + M[1][3] * x[1] + M[2][3] * x[2] + M[3][3] * x[3] + M[4][3] * x[4], - M[0][4] * x[0] + M[1][4] * x[1] + M[2][4] * x[2] + M[3][4] * x[3] + M[4][4] * x[4] - }; - }; - - - static inline constexpr size_t SHindex(ssize_t m, size_t l) { - return l * (l + 1) + m; - } - - static void computeShBasis(float* SHb, size_t numBands, const math::float3& s); - - static float Kml(ssize_t m, size_t l); - - static std::vector Ki(size_t numBands); - - static constexpr float computeTruncatedCosSh(size_t l); - - static float sincWindow(size_t l, float w); - - static math::float3 rotateShericalHarmonicBand1(math::float3 band1, math::mat3f const& M); - - static float5 rotateShericalHarmonicBand2(float5 const& band2, math::mat3f const& M); - - // debugging only... - static float Legendre(ssize_t l, ssize_t m, float x); - static float TSH(int l, int m, const math::float3& d); - static void printShBase(std::ostream& out, int l, int m); -}; - -} // namespace ibl -} // namespace filament - -#endif /* IBL_CUBEMAPSH_H */ diff --git a/windows/include/filament/ibl/CubemapUtils.h b/windows/include/filament/ibl/CubemapUtils.h deleted file mode 100644 index 3b4a3154..00000000 --- a/windows/include/filament/ibl/CubemapUtils.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef IBL_CUBEMAP_UTILS_H -#define IBL_CUBEMAP_UTILS_H - -#include -#include - -#include - -#include - -namespace utils { -class JobSystem; -} // namespace utils - -namespace filament { -namespace ibl { - -class CubemapIBL; - -/** - * Create and convert Cubemap formats - */ -class UTILS_PUBLIC CubemapUtils { -public: - //! Creates a cubemap object and its backing Image - static Cubemap create(Image& image, size_t dim, bool horizontal = true); - - struct EmptyState { - }; - - template - using ScanlineProc = std::function< - void(STATE& state, size_t y, Cubemap::Face f, Cubemap::Texel* data, size_t width)>; - - template - using ReduceProc = std::function; - - //! process the cubemap using multithreading - template - static void process(Cubemap& cm, - utils::JobSystem& js, - ScanlineProc proc, - ReduceProc reduce = [](STATE&) {}, - const STATE& prototype = STATE()); - - //! process the cubemap - template - static void processSingleThreaded(Cubemap& cm, - utils::JobSystem& js, - ScanlineProc proc, - ReduceProc reduce = [](STATE&) {}, - const STATE& prototype = STATE()); - - //! clamps image to acceptable range - static void clamp(Image& src); - - static void highlight(Image& src); - - //! Downsamples a cubemap by helf in x and y using a box filter - static void downsampleCubemapLevelBoxFilter(utils::JobSystem& js, Cubemap& dst, const Cubemap& src); - - //! Return the name of a face (suitable for a file name) - static const char* getFaceName(Cubemap::Face face); - - //! computes the solid angle of a pixel of a face of a cubemap - static float solidAngle(size_t dim, size_t u, size_t v); - - //! Sets a Cubemap faces from a cross image - static void setAllFacesFromCross(Cubemap& cm, const Image& image); - -private: - - //move these into cmgen? - static void setFaceFromCross(Cubemap& cm, Cubemap::Face face, const Image& image); - static Image createCubemapImage(size_t dim, bool horizontal = true); - -#ifndef FILAMENT_IBL_LITE - -public: - - //! Converts horizontal or vertical cross Image to a Cubemap - static void crossToCubemap(utils::JobSystem& js, Cubemap& dst, const Image& src); - - //! Converts equirectangular Image to a Cubemap - static void equirectangularToCubemap(utils::JobSystem& js, Cubemap& dst, const Image& src); - - //! Converts a Cubemap to an equirectangular Image - static void cubemapToEquirectangular(utils::JobSystem& js, Image& dst, const Cubemap& src); - - //! Converts a Cubemap to an octahedron - static void cubemapToOctahedron(utils::JobSystem& js, Image& dst, const Cubemap& src); - - //! mirror the cubemap in the horizontal direction - static void mirrorCubemap(utils::JobSystem& js, Cubemap& dst, const Cubemap& src); - - //! generates a UV grid in the cubemap -- useful for debugging. - static void generateUVGrid(utils::JobSystem& js, Cubemap& cml, size_t gridFrequencyX, size_t gridFrequencyY); - -#endif - - friend class CubemapIBL; -}; - - -} // namespace ibl -} // namespace filament - -#endif /* IBL_CUBEMAP_UTILS_H */ diff --git a/windows/include/filament/ibl/Image.h b/windows/include/filament/ibl/Image.h deleted file mode 100644 index 1ebaa62b..00000000 --- a/windows/include/filament/ibl/Image.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef IBL_IMAGE_H -#define IBL_IMAGE_H - -#include -#include -#include - -#include - -#include - -namespace filament { -namespace ibl { - -class UTILS_PUBLIC Image { -public: - Image(); - Image(size_t w, size_t h, size_t stride = 0); - - void reset(); - - void set(Image const& image); - - void subset(Image const& image, size_t x, size_t y, size_t w, size_t h); - - bool isValid() const { return mData != nullptr; } - - size_t getWidth() const { return mWidth; } - - size_t getStride() const { return mBpr / getBytesPerPixel(); } - - size_t getHeight() const { return mHeight; } - - size_t getBytesPerRow() const { return mBpr; } - - size_t getBytesPerPixel() const { return sizeof(math::float3); } - - void* getData() const { return mData; } - - size_t getSize() const { return mBpr * mHeight; } - - void* getPixelRef(size_t x, size_t y) const; - - std::unique_ptr detach() { return std::move(mOwnedData); } - -private: - size_t mBpr = 0; - size_t mWidth = 0; - size_t mHeight = 0; - std::unique_ptr mOwnedData; - void* mData = nullptr; -}; - -inline void* Image::getPixelRef(size_t x, size_t y) const { - return static_cast(mData) + y * getBytesPerRow() + x * getBytesPerPixel(); -} - -} // namespace ibl -} // namespace filament - -#endif /* IBL_IMAGE_H */ diff --git a/windows/include/filament/ibl/utilities.h b/windows/include/filament/ibl/utilities.h deleted file mode 100644 index 6d40cc03..00000000 --- a/windows/include/filament/ibl/utilities.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef IBL_UTILITIES_H -#define IBL_UTILITIES_H - -#include - -#include -#include - -namespace filament { -namespace ibl { - -template -static inline constexpr T sq(T x) { - return x * x; -} - -template -static inline constexpr T log4(T x) { - // log2(x)/log2(4) - // log2(x)/2 - return std::log2(x) * T(0.5); -} - -inline bool isPOT(size_t x) { - return !(x & (x - 1)); -} - -inline filament::math::float2 hammersley(uint32_t i, float iN) { - constexpr float tof = 0.5f / 0x80000000U; - uint32_t bits = i; - bits = (bits << 16u) | (bits >> 16u); - bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); - bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); - bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); - bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); - return { i * iN, bits * tof }; -} - -} // namespace ibl -} // namespace filament -#endif /* IBL_UTILITIES_H */ diff --git a/windows/include/filament/image/ColorTransform.h b/windows/include/filament/image/ColorTransform.h deleted file mode 100644 index f5f8f195..00000000 --- a/windows/include/filament/image/ColorTransform.h +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright (C) 2018 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. - */ - -#ifndef IMAGE_COLORTRANSFORM_H_ -#define IMAGE_COLORTRANSFORM_H_ - -#include - -#include - -#include -#include -#include -#include - -#include -#include - -namespace image { - -template -uint32_t linearToRGB_10_11_11_REV(const T& linear) { - using fp11 = filament::math::fp<0, 5, 6>; - using fp10 = filament::math::fp<0, 5, 5>; - // the max value for a RGB_11_11_10 is {65024, 65024, 64512} : (2 - 2^-M) * 2^(E-1) - // we clamp to the min of that - fp11 r = fp11::fromf(std::min(64512.0f, linear[0])); - fp11 g = fp11::fromf(std::min(64512.0f, linear[1])); - fp10 b = fp10::fromf(std::min(64512.0f, linear[2])); - uint32_t ir = r.bits & 0x7FF; - uint32_t ig = g.bits & 0x7FF; - uint32_t ib = b.bits & 0x3FF; - return (ib << 22) | (ig << 11) | ir; -} - -template -inline filament::math::float4 linearToRGBM(const T& linear) { - using filament::math::float4; - - float4 RGBM(linear[0], linear[1], linear[2], 1.0f); - - // Linear to gamma space - RGBM.rgb = sqrt(RGBM.rgb); - // Set the range - RGBM.rgb /= 16.0f; - - float maxComponent = std::max(std::max(RGBM.r, RGBM.g), std::max(RGBM.b, 1e-6f)); - // Don't let M go below 1 in the [0..16] range - RGBM.a = filament::math::clamp(maxComponent, 1.0f / 16.0f, 1.0f); - RGBM.a = std::ceil(RGBM.a * 255.0f) / 255.0f; - - RGBM.rgb = saturate(RGBM.rgb / RGBM.a); - - return RGBM; -} - -template -inline filament::math::float3 RGBMtoLinear(const T& rgbm) { - using filament::math::float3; - - float3 linear(rgbm[0], rgbm[1], rgbm[2]); - linear *= rgbm.a * 16.0f; - // Gamma to linear space - return linear * linear; -} - -template -inline filament::math::float3 linearTosRGB(const T& linear) { - using filament::math::float3; - constexpr float a = 0.055f; - constexpr float a1 = 1.055f; - constexpr float p = 1 / 2.4f; - float3 sRGB; - for (size_t i=0 ; i<3 ; i++) { - if (linear[i] <= 0.0031308f) { - sRGB[i] = linear[i] * 12.92f; - } else { - sRGB[i] = a1 * std::pow(linear[i], p) - a; - } - } - return sRGB; -} - -inline float linearTosRGB(float linear) { - if (linear <= 0.0031308f) { - return linear * 12.92f; - } else { - constexpr float a = 0.055f; - constexpr float a1 = 1.055f; - constexpr float p = 1 / 2.4f; - return a1 * std::pow(linear, p) - a; - } -} - -template -T sRGBToLinear(const T& sRGB); - -template<> -inline filament::math::float3 sRGBToLinear(const filament::math::float3& sRGB) { - using filament::math::float3; - constexpr float a = 0.055f; - constexpr float a1 = 1.055f; - constexpr float p = 2.4f; - float3 linear; - for (size_t i=0 ; i<3 ; i++) { - if (sRGB[i] <= 0.04045f) { - linear[i] = sRGB[i] * (1.0f / 12.92f); - } else { - linear[i] = std::pow((sRGB[i] + a) / a1, p); - } - } - return linear; -} - -template<> -inline filament::math::float4 sRGBToLinear(const filament::math::float4& sRGB) { - using filament::math::float4; - constexpr float a = 0.055f; - constexpr float a1 = 1.055f; - constexpr float p = 2.4f; - float4 linear; - for (size_t i=0 ; i<3 ; i++) { - if (sRGB[i] <= 0.04045f) { - linear[i] = sRGB[i] * (1.0f / 12.92f); - } else { - linear[i] = std::pow((sRGB[i] + a) / a1, p); - } - } - linear[3] = sRGB[3]; - return linear; -} - -template -T linearToSRGB(const T& color); - -template<> -inline filament::math::float3 linearToSRGB(const filament::math::float3& color) { - using filament::math::float3; - float3 sRGBColor{color}; - UTILS_NOUNROLL - for (size_t i = 0; i < sRGBColor.size(); i++) { - sRGBColor[i] = (sRGBColor[i] <= 0.0031308f) ? - sRGBColor[i] * 12.92f : (powf(sRGBColor[i], 1.0f / 2.4f) * 1.055f) - 0.055f; - } - return sRGBColor; -} - -// Creates a N-channel sRGB image from a linear floating-point image. -// The source image can have more than N channels, but only the first 3 are converted to sRGB. -template -std::unique_ptr fromLinearTosRGB(const LinearImage& image) { - const size_t w = image.getWidth(); - const size_t h = image.getHeight(); - const size_t nchan = image.getChannels(); - assert(nchan >= N); - std::unique_ptr dst(new uint8_t[w * h * N * sizeof(T)]); - T* d = reinterpret_cast(dst.get()); - for (size_t y = 0; y < h; ++y) { - float const* p = image.getPixelRef(0, y); - for (size_t x = 0; x < w; ++x, p += nchan, d += N) { - for (int n = 0; n < N; n++) { - float source = n < 3 ? linearTosRGB(p[n]) : p[n]; - float target = filament::math::saturate(source) * std::numeric_limits::max() + 0.5f; - d[n] = T(target); - } - } - } - return dst; -} - -// Creates a N-channel RGB u8 image from a f32 image. -template -std::unique_ptr fromLinearToRGB(const LinearImage& image) { - size_t w = image.getWidth(); - size_t h = image.getHeight(); - size_t channels = image.getChannels(); - assert(channels >= N); - std::unique_ptr dst(new uint8_t[w * h * N * sizeof(T)]); - T* d = reinterpret_cast(dst.get()); - for (size_t y = 0; y < h; ++y) { - float const* p = image.getPixelRef(0, y); - for (size_t x = 0; x < w; ++x, p += channels, d += N) { - for (int n = 0; n < N; n++) { - float target = filament::math::saturate(p[n]) * std::numeric_limits::max() + 0.5f; - d[n] = T(target); - } - } - } - return dst; -} - -// Creates a 4-channel RGBM u8 image from a f32 image. -// The source image can have three or more channels, but only the first three are honored. -template -std::unique_ptr fromLinearToRGBM(const LinearImage& image) { - using namespace filament::math; - size_t w = image.getWidth(); - size_t h = image.getHeight(); - UTILS_UNUSED_IN_RELEASE size_t channels = image.getChannels(); - assert(channels >= 3); - std::unique_ptr dst(new uint8_t[w * h * 4 * sizeof(T)]); - T* d = reinterpret_cast(dst.get()); - for (size_t y = 0; y < h; ++y) { - for (size_t x = 0; x < w; ++x, d += 4) { - auto src = image.get((uint32_t) x, (uint32_t) y); - float4 l(linearToRGBM(*src) * std::numeric_limits::max() + 0.5f); - for (size_t i = 0; i < 4; i++) { - d[i] = T(l[i]); - } - } - } - return dst; -} - -// Creates a 3-channel RGB_10_11_11_REV image from a f32 image. -// The source image can have three or more channels, but only the first three are honored. -inline std::unique_ptr fromLinearToRGB_10_11_11_REV(const LinearImage& image) { - using namespace filament::math; - size_t w = image.getWidth(); - size_t h = image.getHeight(); - UTILS_UNUSED_IN_RELEASE size_t channels = image.getChannels(); - assert(channels >= 3); - std::unique_ptr dst(new uint8_t[w * h * sizeof(uint32_t)]); - uint8_t* d = dst.get(); - for (size_t y = 0; y < h; ++y) { - for (size_t x = 0; x < w; ++x, d += sizeof(uint32_t)) { - auto src = image.get((uint32_t)x, (uint32_t)y); - uint32_t v = linearToRGB_10_11_11_REV(*src); - *reinterpret_cast(d) = v; - } - } - return dst; -} - -// Creates a packed single-channel integer-based image from a floating-point image. -// For example if T is uint8_t, then this performs a transformation from [0,1] to [0,255]. -template -std::unique_ptr fromLinearToGrayscale(const LinearImage& image) { - const size_t w = image.getWidth(); - const size_t h = image.getHeight(); - assert(image.getChannels() == 1); - std::unique_ptr dst(new uint8_t[w * h * sizeof(T)]); - T* d = reinterpret_cast(dst.get()); - for (size_t y = 0; y < h; ++y) { - float const* p = image.getPixelRef(0, y); - for (size_t x = 0; x < w; ++x, ++p, ++d) { - const float gray = filament::math::saturate(*p) * std::numeric_limits::max() + 0.5f; - d[0] = T(gray); - } - } - return dst; -} - -// Constructs a 3-channel LinearImage from an untyped data blob. -// The "proc" lambda converts a single color component into a float. -// The "transform" lambda performs an arbitrary float-to-float transformation. -template -static LinearImage toLinear(size_t w, size_t h, size_t bpr, - const uint8_t* src, PROCESS proc, TRANSFORM transform) { - LinearImage result((uint32_t) w, (uint32_t) h, 3); - auto d = result.get< filament::math::float3>(); - for (size_t y = 0; y < h; ++y) { - T const* p = reinterpret_cast(src + y * bpr); - for (size_t x = 0; x < w; ++x, p += 3) { - filament::math::float3 sRGB(proc(p[0]), proc(p[1]), proc(p[2])); - sRGB /= std::numeric_limits::max(); - *d++ = transform(sRGB); - } - } - return result; -} - -// Constructs a 3-channel LinearImage from an untyped data blob. -// The "proc" lambda converts a single color component into a float. -// The "transform" lambda performs an arbitrary float-to-float transformation. -template -static LinearImage toLinear(size_t w, size_t h, size_t bpr, - const std::unique_ptr& src, PROCESS proc, TRANSFORM transform) { - return toLinear(w, h, bpr, src.get(), proc, transform); -} - -// Constructs a 4-channel LinearImage from an untyped data blob. -// The "proc" lambda converts a single color component into a float. -// the "transform" lambda performs an arbitrary float-to-float transformation. -template -static LinearImage toLinearWithAlpha(size_t w, size_t h, size_t bpr, - const uint8_t* src, PROCESS proc, TRANSFORM transform) { - LinearImage result((uint32_t) w, (uint32_t) h, 4); - auto d = result.get< filament::math::float4>(); - for (size_t y = 0; y < h; ++y) { - T const* p = reinterpret_cast(src + y * bpr); - for (size_t x = 0; x < w; ++x, p += 4) { - filament::math::float4 sRGB(proc(p[0]), proc(p[1]), proc(p[2]), proc(p[3])); - sRGB /= std::numeric_limits::max(); - *d++ = transform(sRGB); - } - } - return result; -} - -// Constructs a 4-channel LinearImage from an untyped data blob. -// The "proc" lambda converts a single color component into a float. -// the "transform" lambda performs an arbitrary float-to-float transformation. -template -static LinearImage toLinearWithAlpha(size_t w, size_t h, size_t bpr, - const std::unique_ptr& src, PROCESS proc, TRANSFORM transform) { - return toLinearWithAlpha(w, h, bpr, src.get(), proc, transform); -} - -// Constructs a 3-channel LinearImage from RGBM data. -inline LinearImage toLinearFromRGBM( filament::math::float4 const* src, uint32_t w, uint32_t h) { - LinearImage result(w, h, 3); - auto dst = result.get< filament::math::float3>(); - for (uint32_t row = 0; row < h; ++row) { - for (uint32_t col = 0; col < w; ++col, ++src, ++dst) { - *dst = RGBMtoLinear(*src); - } - } - return result; -} - -inline LinearImage fromLinearToRGBM(const LinearImage& image) { - assert(image.getChannels() == 3); - const uint32_t w = image.getWidth(), h = image.getHeight(); - LinearImage result(w, h, 4); - auto src = image.get< filament::math::float3>(); - auto dst = result.get< filament::math::float4>(); - for (uint32_t row = 0; row < h; ++row) { - for (uint32_t col = 0; col < w; ++col, ++src, ++dst) { - *dst = linearToRGBM(*src); - } - } - return result; -} - -template -static LinearImage toLinearWithAlpha(size_t w, size_t h, size_t bpr, const uint8_t* src) { - LinearImage result(w, h, 4); - filament::math::float4* d = reinterpret_cast(result.getPixelRef(0, 0)); - for (size_t y = 0; y < h; ++y) { - T const* p = reinterpret_cast(src + y * bpr); - for (size_t x = 0; x < w; ++x, p += 4) { - filament::math::float3 sRGB(p[0], p[1], p[2]); - sRGB /= std::numeric_limits::max(); - *d++ = filament::math::float4(sRGBToLinear(sRGB), 1.0f); - } - } - return result; -} - -template -static LinearImage toLinear(size_t w, size_t h, size_t bpr, const uint8_t* src) { - LinearImage result(w, h, 3); - filament::math::float3* d = reinterpret_cast(result.getPixelRef(0, 0)); - for (size_t y = 0; y < h; ++y) { - T const* p = reinterpret_cast(src + y * bpr); - for (size_t x = 0; x < w; ++x, p += 3) { - filament::math::float3 sRGB(p[0], p[1], p[2]); - sRGB /= std::numeric_limits::max(); - *d++ = sRGBToLinear(sRGB); - } - } - return result; -} - -} // namespace Image - -#endif // IMAGE_COLORTRANSFORM_H_ diff --git a/windows/include/filament/image/ImageOps.h b/windows/include/filament/image/ImageOps.h deleted file mode 100644 index 50adc90e..00000000 --- a/windows/include/filament/image/ImageOps.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2018 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. - */ - -#ifndef IMAGE_IMAGEOPS_H -#define IMAGE_IMAGEOPS_H - -#include - -#include - -#include -#include - -namespace image { - -// Concatenates images horizontally to create a filmstrip atlas, similar to numpy's hstack. -UTILS_PUBLIC LinearImage horizontalStack(std::initializer_list images); -UTILS_PUBLIC LinearImage horizontalStack(LinearImage const* img, size_t count); - -// Concatenates images vertically to create a filmstrip atlas, similar to numpy's vstack. -UTILS_PUBLIC LinearImage verticalStack(std::initializer_list images); -UTILS_PUBLIC LinearImage verticalStack(LinearImage const* img, size_t count); - -// Horizontally or vertically mirror the given image. -UTILS_PUBLIC LinearImage horizontalFlip(const LinearImage& image); -UTILS_PUBLIC LinearImage verticalFlip(const LinearImage& image); - -// Transforms normals (components live in [-1,+1]) into colors (components live in [0,+1]). -UTILS_PUBLIC LinearImage vectorsToColors(const LinearImage& image); -UTILS_PUBLIC LinearImage colorsToVectors(const LinearImage& image); - -// Creates a single-channel image by extracting the selected channel. -UTILS_PUBLIC LinearImage extractChannel(const LinearImage& image, uint32_t channel); - -// Constructs a multi-channel image by copying data from a sequence of single-channel images. -UTILS_PUBLIC LinearImage combineChannels(std::initializer_list images); -UTILS_PUBLIC LinearImage combineChannels(LinearImage const* img, size_t count); - -// Generates a new image with rows & columns swapped. -UTILS_PUBLIC LinearImage transpose(const LinearImage& image); - -// Extracts pixels by specifying a crop window where (0,0) is the top-left corner of the image. -// The boundary is specified as Left Top Right Bottom. -UTILS_PUBLIC -LinearImage cropRegion(const LinearImage& image, uint32_t l, uint32_t t, uint32_t r, uint32_t b); - -// Lexicographically compares two images, similar to memcmp. -UTILS_PUBLIC int compare(const LinearImage& a, const LinearImage& b, float epsilon = 0.0f); - -// Sets all pixels in all channels to the given value. -UTILS_PUBLIC void clearToValue(LinearImage& img, float value); - -// Called by the coordinate field generator to query if a pixel is within the region of interest. -using PresenceCallback = bool(*)(const LinearImage& img, uint32_t col, uint32_t row, void* user); - -// Generates a two-channel field of non-normalized coordinates that indicate the nearest pixel -// whose presence function returns true. This is the first step before generating a distance -// field or generalized Voronoi map. -UTILS_PUBLIC -LinearImage computeCoordField(const LinearImage& src, PresenceCallback presence, void* user); - -// Generates a single-channel Euclidean distance field with positive values outside the region -// of interest in the source image, and zero values inside. If sqrt is false, the computed -// distances are squared. If signed distance (SDF) is desired, this function can be called a second -// time using an inverted source field. -UTILS_PUBLIC LinearImage edtFromCoordField(const LinearImage& coordField, bool sqrt); - -// Dereferences the given coordinate field. Useful for creating Voronoi diagrams or dilated images. -UTILS_PUBLIC -LinearImage voronoiFromCoordField(const LinearImage& coordField, const LinearImage& src); - -// Copies content of a source image into a target image. Requires width/height/channels to match. -UTILS_PUBLIC void blitImage(LinearImage& target, const LinearImage& source); - -} // namespace image - - -#endif /* IMAGE_LINEARIMAGE_H */ diff --git a/windows/include/filament/image/ImageSampler.h b/windows/include/filament/image/ImageSampler.h deleted file mode 100644 index e01da45e..00000000 --- a/windows/include/filament/image/ImageSampler.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (C) 2018 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. - */ - -#ifndef IMAGE_IMAGESAMPLER_H -#define IMAGE_IMAGESAMPLER_H - -#include - -#include - -namespace image { - -/** - * Value of a single point sample, allocated according to the number of image channels. - */ -struct UTILS_PUBLIC SingleSample { - float& operator[](int index) { return *(data + index); } - float* data = nullptr; - ~SingleSample(); -}; - -/** - * Controls the weighted average used across a window of source samples. - */ -enum class Filter { - DEFAULT, // Selects MITCHELL or LANCZOS dynamically. - BOX, // Computes the un-weighted average over the filter radius. - NEAREST, // Copies the source sample nearest to the center of the filter. - HERMITE, // Also known as "smoothstep", has some nice properties. - GAUSSIAN_SCALARS, // Standard Gaussian filter with sigma = 0.5 - GAUSSIAN_NORMALS, // Same as GAUSSIAN_SCALARS, but interpolates unitized vectors. - MITCHELL, // Cubic resampling per Mitchell-Netravali, default for magnification. - LANCZOS, // Popular sinc-based filter, default for minification. - MINIMUM // Takes a min val rather than avg, perhaps useful for depth maps and SDF's. -}; - -/** - * Defines a viewport inside the texture such that (0,0) is at the top-left corner of the top-left - * pixel, and (1,1) is at the bottom-right corner of the bottom-corner pixel. - */ -struct Region { - float left; - float top; - float right; - float bottom; -}; - -/** - * Transforms the texel fetching operation when sampling from adjacent images. - */ -enum class Orientation { - STANDARD = 0, - FLIP_X = 1 << 0, - FLIP_Y = 1 << 1, - FLIP_XY = FLIP_X | FLIP_Y -}; - -/** - * Specifies how to generate samples that lie outside the boundaries of the source region. - */ -struct Boundary { - enum { - EXCLUDE, // Ignore the samples and renormalize the filter. This is probably what you want. - REGION, // Keep samples that are outside sourceRegion if they are still within the image. - CLAMP, // Pretend the edge pixel is repeated forever. Gives edge pixels more weight. - REPEAT, // Resample from the region, wrapping back to the front of the row or column. - MIRROR, // Resample from the region but assume that it has been flipped. - COLOR, // Use the specified constant color. - NEIGHBOR // Sample from an adjacent image. - } mode = EXCLUDE; - SingleSample color; // Used only if mode = COLOR - LinearImage* neighbor = nullptr; // Used only if mode = NEIGHBOR - Orientation orientation; // Used only if mode = NEIGHBOR -}; - -/** - * Configuration for the resampleImage function. Provides reasonable defaults. - */ -struct ImageSampler { - Filter horizontalFilter = Filter::DEFAULT; - Filter verticalFilter = Filter::DEFAULT; - Region sourceRegion = {0, 0, 1, 1}; - float filterRadiusMultiplier = 1; - Boundary east; - Boundary north; - Boundary west; - Boundary south; -}; - -/** - * Resizes or blurs the given linear image, producing a new linear image with the given dimensions. - */ -UTILS_PUBLIC -LinearImage resampleImage(const LinearImage& source, uint32_t width, uint32_t height, - const ImageSampler& sampler); - -/** - * Resizes the given linear image using a simplified API that takes target dimensions and filter. - */ -UTILS_PUBLIC -LinearImage resampleImage(const LinearImage& source, uint32_t width, uint32_t height, - Filter filter = Filter::DEFAULT); - -/** - * Computes a single sample for the given texture coordinate and writes the resulting color - * components into the given output holder. - * - * For decent performance, do not call this across the entire image, instead call resampleImage. - * On the first call, pass in a default SingleSample to allocate the result holder. For example: - * - * SingleSample result; - * computeSingleSample(img, 0.5f, 0.5f, &result); - * printf("r g b = %f %f %f\n", result[0], result[1], result[2]); - * computeSingleSample(img, 0.9f, 0.1f, &result); - * printf("r g b = %f %f %f\n", result[0], result[1], result[2]); - * - * The x y coordinates live in "texture space" such that (0.0f, 0.0f) is the upper-left boundary of - * the top-left pixel and (+1.0f, +1.0f) is the lower-right boundary of the bottom-right pixel. - */ -UTILS_PUBLIC -void computeSingleSample(const LinearImage& source, float x, float y, SingleSample* result, - Filter filter = Filter::BOX); - -/** - * Generates a sequence of miplevels using the requested filter. To determine the number of mips - * it would take to get down to 1x1, see getMipmapCount. - * - * Source image need not be power-of-two. In the result vector, the half-size image is returned at - * index 0, the quarter-size image is at index 1, etc. Please note that the original-sized image is - * not included. - */ -UTILS_PUBLIC -void generateMipmaps(const LinearImage& source, Filter, LinearImage* result, uint32_t mipCount); - -/** - * Returns the number of miplevels it would take to downsample the given image down to 1x1. This - * number does not include the original image (i.e. mip 0). - */ -UTILS_PUBLIC -uint32_t getMipmapCount(const LinearImage& source); - -/** - * Given the string name of a filter, converts it to uppercase and returns the corresponding - * enum value. If no corresponding enumerant exists, returns DEFAULT. - */ -UTILS_PUBLIC -Filter filterFromString(const char* name); - -} // namespace image - -#endif /* IMAGE_IMAGESAMPLER_H */ diff --git a/windows/include/filament/image/Ktx1Bundle.h b/windows/include/filament/image/Ktx1Bundle.h deleted file mode 100644 index 430f92be..00000000 --- a/windows/include/filament/image/Ktx1Bundle.h +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright (C) 2018 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. - */ - -#ifndef IMAGE_KTX1BUNDLE_H -#define IMAGE_KTX1BUNDLE_H - -#include - -#include - -#include -#include - -namespace image { - -struct KtxInfo { - uint32_t endianness; - uint32_t glType; - uint32_t glTypeSize; - uint32_t glFormat; - uint32_t glInternalFormat; - uint32_t glBaseInternalFormat; - uint32_t pixelWidth; - uint32_t pixelHeight; - uint32_t pixelDepth; -}; - -struct KtxBlobIndex { - uint32_t mipLevel; - uint32_t arrayIndex; - uint32_t cubeFace; -}; - -struct KtxBlobList; -struct KtxMetadata; - -/** - * Ktx1Bundle is a structured set of opaque data blobs that can be passed straight to the GPU, such - * that a single bundle corresponds to a single texture object. It is well suited for storing - * block-compressed texture data. - * - * One bundle may be comprised of several mipmap levels, cubemap faces, and array elements. The - * number of blobs is immutable, and is determined as follows. - * - * blob_count = mip_count * array_length * (cubemap ? 6 : 1) - * - * Bundles can be quickly serialized to a certain file format (see below link), but this class lives - * in the image lib rather than imageio because it has no dependencies, and does not support CPU - * decoding. - * - * https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/ - */ -class UTILS_PUBLIC Ktx1Bundle { -public: - - ~Ktx1Bundle(); - - /** - * Creates a hierarchy of empty texture blobs, to be filled later via setBlob(). - */ - Ktx1Bundle(uint32_t numMipLevels, uint32_t arrayLength, bool isCubemap); - - /** - * Creates a new bundle by deserializing the given data. - * - * Typically, this constructor is used to consume the contents of a KTX file. - */ - Ktx1Bundle(uint8_t const* bytes, uint32_t nbytes); - - /** - * Serializes the bundle into the given target memory. Returns false if there's not enough - * memory. - * - * Typically, this method is used to write out the contents of a KTX file. - */ - bool serialize(uint8_t* destination, uint32_t numBytes) const; - - /** - * Computes the size (in bytes) of the serialized bundle. - */ - uint32_t getSerializedLength() const; - - /** - * Gets or sets information about the texture object, such as format and type. - */ - KtxInfo const& getInfo() const { return mInfo; } - KtxInfo& info() { return mInfo; } - - /** - * Gets or sets key/value metadata. - */ - const char* getMetadata(const char* key, size_t* valueSize = nullptr) const; - void setMetadata(const char* key, const char* value); - - /** - * Parses the key="sh" metadata and returns 3 bands of data. - * - * Assumes 3 bands for a total of 9 RGB coefficients. - * Returns true if successful. - */ - bool getSphericalHarmonics(filament::math::float3* result); - - /** - * Gets the number of miplevels (this is never zero). - */ - uint32_t getNumMipLevels() const { return mNumMipLevels; } - - /** - * Gets the number of array elements (this is never zero). - */ - uint32_t getArrayLength() const { return mArrayLength; } - - /** - * Returns whether or not this is a cubemap. - */ - bool isCubemap() const { return mNumCubeFaces > 1; } - - /** - * Retrieves a weak reference to a given data blob. Returns false if the given blob index is out - * of bounds, or if the blob at the given index is empty. - */ - bool getBlob(KtxBlobIndex index, uint8_t** data, uint32_t* size) const; - - /** - * Copies the given data into the blob at the given index, replacing whatever is already there. - * Returns false if the given blob index is out of bounds. - */ - bool setBlob(KtxBlobIndex index, uint8_t const* data, uint32_t size); - - /** - * Allocates the blob at the given index to the given number of bytes. This allows subsequent - * calls to setBlob to be thread-safe. - */ - bool allocateBlob(KtxBlobIndex index, uint32_t size); - - // The following constants help clients populate the "info" struct. Most of them have corollary - // constants in the OpenGL headers. - - static constexpr uint32_t R8 = 0x8229; - static constexpr uint32_t R8_SNORM = 0x8F94; - static constexpr uint32_t R8UI = 0x8232; - static constexpr uint32_t R8I = 0x8231; - static constexpr uint32_t STENCIL_INDEX8 = 0x8D48; - static constexpr uint32_t R16F = 0x822D; - static constexpr uint32_t R16UI = 0x8234; - static constexpr uint32_t R16I = 0x8233; - static constexpr uint32_t RG8 = 0x822B; - static constexpr uint32_t RG8_SNORM = 0x8F95; - static constexpr uint32_t RG8UI = 0x8238; - static constexpr uint32_t RG8I = 0x8237; - static constexpr uint32_t RGB565 = 0x8D62; - static constexpr uint32_t RGB5_A1 = 0x8057; - static constexpr uint32_t RGBA4 = 0x8056; - static constexpr uint32_t DEPTH_COMPONENT16 = 0x81A5; - static constexpr uint32_t RGB8 = 0x8051; - static constexpr uint32_t SRGB8 = 0x8C41; - static constexpr uint32_t RGB8_SNORM = 0x8F96; - static constexpr uint32_t RGB8UI = 0x8D7D; - static constexpr uint32_t RGB8I = 0x8D8F; - static constexpr uint32_t DEPTH_COMPONENT24 = 0x81A6; - static constexpr uint32_t R32F = 0x822E; - static constexpr uint32_t R32UI = 0x8236; - static constexpr uint32_t R32I = 0x8235; - static constexpr uint32_t RG16F = 0x822F; - static constexpr uint32_t RG16UI = 0x823A; - static constexpr uint32_t RG16I = 0x8239; - static constexpr uint32_t R11F_G11F_B10F = 0x8C3A; - static constexpr uint32_t RGB9_E5 = 0x8C3D; - static constexpr uint32_t RGBA8 = 0x8058; - static constexpr uint32_t SRGB8_ALPHA8 = 0x8C43; - static constexpr uint32_t RGBA8_SNORM = 0x8F97; - static constexpr uint32_t RGB10_A2 = 0x8059; - static constexpr uint32_t RGBA8UI = 0x8D7C; - static constexpr uint32_t RGBA8I = 0x8D8E; - static constexpr uint32_t DEPTH_COMPONENT32F = 0x8CAC; - static constexpr uint32_t DEPTH24_STENCIL8 = 0x88F0; - static constexpr uint32_t DEPTH32F_STENCIL8 = 0x8CAD; - static constexpr uint32_t RGB16F = 0x881B; - static constexpr uint32_t RGB16UI = 0x8D77; - static constexpr uint32_t RGB16I = 0x8D89; - static constexpr uint32_t RG32F = 0x8230; - static constexpr uint32_t RG32UI = 0x823C; - static constexpr uint32_t RG32I = 0x823B; - static constexpr uint32_t RGBA16F = 0x881A; - static constexpr uint32_t RGBA16UI = 0x8D76; - static constexpr uint32_t RGBA16I = 0x8D88; - static constexpr uint32_t RGB32F = 0x8815; - static constexpr uint32_t RGB32UI = 0x8D71; - static constexpr uint32_t RGB32I = 0x8D83; - static constexpr uint32_t RGBA32F = 0x8814; - static constexpr uint32_t RGBA32UI = 0x8D70; - static constexpr uint32_t RGBA32I = 0x8D82; - - static constexpr uint32_t RED = 0x1903; - static constexpr uint32_t RG = 0x8227; - static constexpr uint32_t RGB = 0x1907; - static constexpr uint32_t RGBA = 0x1908; - static constexpr uint32_t BGR = 0x80E0; - static constexpr uint32_t BGRA = 0x80E1; - static constexpr uint32_t LUMINANCE = 0x1909; - static constexpr uint32_t LUMINANCE_ALPHA = 0x190A; - - static constexpr uint32_t UNSIGNED_BYTE = 0x1401; - static constexpr uint32_t UNSIGNED_SHORT = 0x1403; - static constexpr uint32_t HALF_FLOAT = 0x140B; - static constexpr uint32_t FLOAT = 0x1406; - - static constexpr uint32_t ENDIAN_DEFAULT = 0x04030201; - - static constexpr uint32_t RGB_S3TC_DXT1 = 0x83F0; - static constexpr uint32_t RGBA_S3TC_DXT1 = 0x83F1; - static constexpr uint32_t RGBA_S3TC_DXT3 = 0x83F2; - static constexpr uint32_t RGBA_S3TC_DXT5 = 0x83F3; - - static constexpr uint32_t R_RGTC_BC4_UNORM = 0x8DBB; - static constexpr uint32_t R_RGTC_BC4_SNORM = 0x8DBC; - static constexpr uint32_t RG_RGTC_BC5_UNORM = 0x8DBD; - static constexpr uint32_t RG_RGTC_BC5_SNORM = 0x8DBE; - - static constexpr uint32_t RGBA_BPTC_BC7 = 0x8E8C; - static constexpr uint32_t SRGB8_ALPHA8_BPTC_BC7 = 0x8E8D; - static constexpr uint32_t RGB_BPTC_BC6H_SNORM = 0x8E8E; - static constexpr uint32_t RGB_BPTC_BC6H_UNORM = 0x8E8F; - - static constexpr uint32_t RGBA_ASTC_4x4 = 0x93B0; - static constexpr uint32_t RGBA_ASTC_5x4 = 0x93B1; - static constexpr uint32_t RGBA_ASTC_5x5 = 0x93B2; - static constexpr uint32_t RGBA_ASTC_6x5 = 0x93B3; - static constexpr uint32_t RGBA_ASTC_6x6 = 0x93B4; - static constexpr uint32_t RGBA_ASTC_8x5 = 0x93B5; - static constexpr uint32_t RGBA_ASTC_8x6 = 0x93B6; - static constexpr uint32_t RGBA_ASTC_8x8 = 0x93B7; - static constexpr uint32_t RGBA_ASTC_10x5 = 0x93B8; - static constexpr uint32_t RGBA_ASTC_10x6 = 0x93B9; - static constexpr uint32_t RGBA_ASTC_10x8 = 0x93BA; - static constexpr uint32_t RGBA_ASTC_10x10 = 0x93BB; - static constexpr uint32_t RGBA_ASTC_12x10 = 0x93BC; - static constexpr uint32_t RGBA_ASTC_12x12 = 0x93BD; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_4x4 = 0x93D0; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_5x4 = 0x93D1; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_5x5 = 0x93D2; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_6x5 = 0x93D3; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_6x6 = 0x93D4; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_8x5 = 0x93D5; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_8x6 = 0x93D6; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_8x8 = 0x93D7; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_10x5 = 0x93D8; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_10x6 = 0x93D9; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_10x8 = 0x93DA; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_10x10 = 0x93DB; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_12x10 = 0x93DC; - static constexpr uint32_t SRGB8_ALPHA8_ASTC_12x12 = 0x93DD; - - static constexpr uint32_t R11_EAC = 0x9270; - static constexpr uint32_t SIGNED_R11_EAC = 0x9271; - static constexpr uint32_t RG11_EAC = 0x9272; - static constexpr uint32_t SIGNED_RG11_EAC = 0x9273; - static constexpr uint32_t RGB8_ETC2 = 0x9274; - static constexpr uint32_t SRGB8_ETC2 = 0x9275; - static constexpr uint32_t RGB8_ALPHA1_ETC2 = 0x9276; - static constexpr uint32_t SRGB8_ALPHA1_ETC = 0x9277; - static constexpr uint32_t RGBA8_ETC2_EAC = 0x9278; - static constexpr uint32_t SRGB8_ALPHA8_ETC2_EAC = 0x9279; - -private: - image::KtxInfo mInfo = {}; - uint32_t mNumMipLevels; - uint32_t mArrayLength; - uint32_t mNumCubeFaces; - std::unique_ptr mBlobs; - std::unique_ptr mMetadata; -}; - -} // namespace image - -#endif /* IMAGE_Ktx1Bundle_H */ diff --git a/windows/include/filament/image/LinearImage.h b/windows/include/filament/image/LinearImage.h deleted file mode 100644 index de46a787..00000000 --- a/windows/include/filament/image/LinearImage.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2018 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. - */ - -#ifndef IMAGE_LINEARIMAGE_H -#define IMAGE_LINEARIMAGE_H - -#include - -#include - -/** - * Types and free functions for the Filament core imaging library, primarily used for offline tools, - * but with minimal dependencies to support potential use by the renderer. - */ -namespace image { - -/** - * LinearImage is a handle to packed floating point data arranged into a row-major grid. - * - * We use this object as input/output for core algorithms that wish to be agnostic of source and - * destination formats. The number of channels is arbitrary (1 or more) but we often use 3-channel - * images to represent color data. - * - * The underlying pixel data has shared ownership semantics to allow clients to easily pass around - * the image object without incurring a deep copy. Shared access to pixels is not thread safe. - * - * By convention, we do not use channel major order (i.e. planar). However we provide a free - * function in ImageOps to combine planar data. Pixels are stored such that the row stride is simply - * width * channels * sizeof(float). - */ -class UTILS_PUBLIC LinearImage { -public: - - ~LinearImage(); - - /** - * Allocates a zeroed-out image. - */ - LinearImage(uint32_t width, uint32_t height, uint32_t channels); - - /** - * Makes a shallow copy with shared pixel data. - */ - LinearImage(const LinearImage& that); - LinearImage& operator=(const LinearImage& that); - - /** - * Creates an empty (invalid) image. - */ - LinearImage() : mDataRef(nullptr), mData(nullptr), mWidth(0), mHeight(0), mChannels(0) {} - operator bool() const { return mData != nullptr; } - - /** - * Gets a pointer to the underlying pixel data. - */ - float* getPixelRef() { return mData; } - template T* get() { return reinterpret_cast(mData); } - - /** - * Gets a pointer to immutable pixel data. - */ - float const* getPixelRef() const { return mData; } - template T const* get() const { return reinterpret_cast(mData); } - - /** - * Gets a pointer to the pixel data at the given column and row. (not bounds checked) - */ - float* getPixelRef(uint32_t column, uint32_t row) { - return mData + (column + row * mWidth) * mChannels; - } - - template - T* get(uint32_t column, uint32_t row) { - return reinterpret_cast(getPixelRef(column, row)); - } - - /** - * Gets a pointer to the immutable pixel data at the given column and row. (not bounds checked) - */ - float const* getPixelRef(uint32_t column, uint32_t row) const { - return mData + (column + row * mWidth) * mChannels; - } - - template - T const* get(uint32_t column, uint32_t row) const { - return reinterpret_cast(getPixelRef(column, row)); - } - - uint32_t getWidth() const { return mWidth; } - uint32_t getHeight() const { return mHeight; } - uint32_t getChannels() const { return mChannels; } - void reset() { *this = LinearImage(); } - bool isValid() const { return mData; } - -private: - - struct SharedReference; - SharedReference* mDataRef = nullptr; - - float* mData; - uint32_t mWidth; - uint32_t mHeight; - uint32_t mChannels; -}; - -} // namespace image - -#endif /* IMAGE_LINEARIMAGE_H */ diff --git a/windows/include/filament/imageio/BasisEncoder.h b/windows/include/filament/imageio/BasisEncoder.h deleted file mode 100644 index cc1f14c8..00000000 --- a/windows/include/filament/imageio/BasisEncoder.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -#ifndef IMAGE_BASISENCODER_H_ -#define IMAGE_BASISENCODER_H_ - -#include -#include -#include - -#include - -namespace image { - -struct BasisEncoderBuilderImpl; -struct BasisEncoderImpl; - -class UTILS_PUBLIC BasisEncoder { -public: - enum class IntermediateFormat { - UASTC, - ETC1S, - }; - - class Builder { - public: - /** - * Constructs a Ktx2 builder with a fixed number of miplevels and layers. - * - * The number of mips and layers is required up front to allow pre-allocation of the - * appropriate BasisU input vectors. - * - * @param mipCount number of mipmap levels, including the base; must be at least 1. - * @param layerCount either 1 or the number of layers in an array texture. - * - * For cubemaps and cubemap arrays, multiply the layer count by 6 and pack the faces in - * standard GL order. - */ - Builder(size_t mipCount, size_t layerCount) noexcept; - - ~Builder() noexcept; - Builder(Builder&& that) noexcept; - Builder& operator=(Builder&& that) noexcept; - - /** - * Enables the linear flag. (default value: FALSE) - * - * This does two things: - * (1) Specifies that the image should be encoded without a transfer function. - * (2) Adds a tag to the ktx file that tells the loader that no transfer function was used. - * - * Note that the tag does not actually affect the compression process, it's basically just a - * hint to the reader. At the time of this writing, BasisU does not make a distinction - * between sRGB targets and linear targets. - */ - Builder& linear(bool enabled) noexcept; - - /** - * Enables cubemap or cubemap array mode. (default value: FALSE) - * - * When this is enabled the number of layers should be divisible by 6. - */ - Builder& cubemap(bool enabled) noexcept; - - /** - * Chooses the intermediate format as described in the BasisU docs. (default value: UASTC) - * - * For highest quality, use UASTC. - */ - Builder& intermediateFormat(IntermediateFormat format) noexcept; - - /** - * Specifies that only the first component of the incoming LinearImage should be honored. - * - * default value: FALSE - */ - Builder& grayscale(bool enabled) noexcept; - - /** - * Specifies that the incoming image should be transfored from [-1, +1] to [0, 1] before it - * passed to the Basis encoder. - * - * default value: FALSE - */ - Builder& normals(bool enabled) noexcept; - - /** - * Initializes the basis encoder with the given number of jobs. - * - * default value: 4 - */ - Builder& jobs(size_t count) noexcept; - - /** - * Supresses status messages. - * - * default value: FALSE - */ - Builder& quiet(bool enabled) noexcept; - - /** - * Submits image data in linear floating-point format. - * - * This must be called for every miplevel. - */ - Builder& miplevel(size_t mipIndex, size_t layerIndex, const LinearImage& image) noexcept; - - /** - * Creates a BasisU encoder and returns null if an error occurred. - */ - BasisEncoder* build(); - - private: - BasisEncoderBuilderImpl* mImpl; - Builder(const Builder&) = delete; - Builder& operator=(const Builder&) = delete; - }; - - ~BasisEncoder() noexcept; - BasisEncoder(BasisEncoder&& that) noexcept; - BasisEncoder& operator=(BasisEncoder&& that) noexcept; - - /** - * Triggers compression of all miplevels and waits until all jobs are done. - * - * The resulting KTX2 contents can be retrieved using the getters below. - * - * @returns false if an error occurred. - */ - bool encode(); - - /** - * Gets the number of bytes in the generated KTX2 file. - * - * This can only be called if encode() is successfully called first. - */ - size_t getKtx2ByteCount() const noexcept; - - /** - * Gets the content of the generated KTX2 file. - * - * This memory is owned by BasisEncoder and is freed when the encoder is freed. - * This can only be called if encode() is successfully called first. - */ - uint8_t const* getKtx2Data() const noexcept; - -private: - BasisEncoder(BasisEncoderImpl*) noexcept; - BasisEncoder(const BasisEncoder&) = delete; - BasisEncoder& operator=(const BasisEncoder&) = delete; - BasisEncoderImpl* mImpl; - friend struct BasisEncoderBuilderImpl; -}; - -} // namespace image - -#endif // IMAGE_BASISENCODER_H_ diff --git a/windows/include/filament/imageio/HDRDecoder.h b/windows/include/filament/imageio/HDRDecoder.h deleted file mode 100644 index bb7519ee..00000000 --- a/windows/include/filament/imageio/HDRDecoder.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#ifndef IMAGE_HDRDECODER_H_ -#define IMAGE_HDRDECODER_H_ - -#include - -namespace image { - -class HDRDecoder : public ImageDecoder::Decoder { -public: - static HDRDecoder* create(std::istream& stream); - static bool checkSignature(char const* buf); - - HDRDecoder(const HDRDecoder&) = delete; - HDRDecoder& operator=(const HDRDecoder&) = delete; - -private: - explicit HDRDecoder(std::istream& stream); - ~HDRDecoder() override; - - // ImageDecoder::Decoder interface - LinearImage decode() override; - - static const char sigRadiance[]; - static const char sigRGBE[]; - std::istream& mStream; - std::streampos mStreamStartPos; -}; - -} // namespace image - -#endif /* IMAGE_IMAGEDECODER_H_ */ diff --git a/windows/include/filament/imageio/ImageDecoder.h b/windows/include/filament/imageio/ImageDecoder.h deleted file mode 100644 index cd341c49..00000000 --- a/windows/include/filament/imageio/ImageDecoder.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef IMAGE_IMAGEDECODER_H_ -#define IMAGE_IMAGEDECODER_H_ - -#include -#include - -#include - -#include - -namespace image { - -class UTILS_PUBLIC ImageDecoder { -public: - enum class ColorSpace { - LINEAR, - SRGB - }; - - // Returns linear floating-point data, or a non-valid image if an error occured. - static LinearImage decode(std::istream& stream, const std::string& sourceName, - ColorSpace sourceSpace = ColorSpace::SRGB); - - class Decoder { - public: - virtual LinearImage decode() = 0; - virtual ~Decoder() = default; - - ColorSpace getColorSpace() const noexcept { - return mColorSpace; - } - - void setColorSpace(ColorSpace colorSpace) noexcept { - mColorSpace = colorSpace; - } - - private: - ColorSpace mColorSpace = ColorSpace::SRGB; - }; - -private: - enum class Format { - NONE, - PNG, - HDR, - PSD, - EXR - }; -}; - -} // namespace image - -#endif /* IMAGE_IMAGEDECODER_H_ */ diff --git a/windows/include/filament/imageio/ImageDiffer.h b/windows/include/filament/imageio/ImageDiffer.h deleted file mode 100644 index c3c752e3..00000000 --- a/windows/include/filament/imageio/ImageDiffer.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2018 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. - */ - -#include - -#include - -namespace image { - -enum class ComparisonMode { - SKIP, - COMPARE, - UPDATE, -}; - -// Saves an image to disk or does a load-and-compare, depending on comparison mode. -// This makes it easy for unit tests to have compare / update commands. -// The passed-in image is the "result image" and the expected image is the "golden image". -void updateOrCompare(LinearImage result, const utils::Path& golden, ComparisonMode, float epsilon); - -} // namespace image diff --git a/windows/include/filament/imageio/ImageEncoder.h b/windows/include/filament/imageio/ImageEncoder.h deleted file mode 100644 index 7cd4bd8f..00000000 --- a/windows/include/filament/imageio/ImageEncoder.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef IMAGE_IMAGEENCODER_H_ -#define IMAGE_IMAGEENCODER_H_ - -#include -#include - -#include - -#include - -namespace image { - -class UTILS_PUBLIC ImageEncoder { -public: - enum class Format { - PNG, // 8-bit sRGB, 1 or 3 channels - PNG_LINEAR, // 8-bit linear RGB, 1 or 3 channels - HDR, // 8-bit linear RGBE, 3 channels only - RGBM, // 8-bit RGBM, as PNG, 3 channels only - PSD, // 16-bit sRGB or 32-bit linear RGB, 3 channels only - // Default: 16 bit - EXR, // 16-bit linear RGB (half-float), 3 channels only - // Default: PIZ compression - DDS, // 8-bit sRGB, 1, 2 or 3 channels; - // 16-bit or 32-bit linear RGB, 1, 2 or 3 channels - // Default: 16 bit - DDS_LINEAR, // 8-bit, 16-bit or 32-bit linear RGB, 1, 2 or 3 channels - // Default: 16 bit - RGB_10_11_11_REV, // RGBA PNG file, but containing 11_11_10 data - }; - - // Consumes linear floating-point data, returns false if unable to encode. - static bool encode(std::ostream& stream, Format format, const LinearImage& image, - const std::string& compression, const std::string& destName); - - static Format chooseFormat(const std::string& name, bool forceLinear = false); - static std::string chooseExtension(Format format); - - class Encoder { - public: - virtual bool encode(const LinearImage& image) = 0; - virtual ~Encoder() = default; - }; -}; - -} // namespace image - -#endif /* IMAGE_IMAGEENCODER_H_ */ diff --git a/windows/include/filament/ktxreader/Ktx1Reader.h b/windows/include/filament/ktxreader/Ktx1Reader.h deleted file mode 100644 index ca980c1c..00000000 --- a/windows/include/filament/ktxreader/Ktx1Reader.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -#ifndef KTXREADER_KTX1READER_H -#define KTXREADER_KTX1READER_H - -#include - -#include - -namespace filament { - class Engine; -} - -namespace ktxreader { - -using KtxInfo = image::KtxInfo; -using Ktx1Bundle = image::Ktx1Bundle; - -/** - * Allows clients to create Filament textures from Ktx1Bundle objects. - */ -namespace Ktx1Reader { - - using Texture = filament::Texture; - using Engine = filament::Engine; - - using TextureFormat = Texture::InternalFormat; - using CompressedPixelDataType = Texture::CompressedType; - using PixelDataType = Texture::Type; - using PixelDataFormat = Texture::Format; - using PixelBufferDescriptor = Texture::PixelBufferDescriptor; - - using Callback = void(*)(void* userdata); - - CompressedPixelDataType toCompressedPixelDataType(const KtxInfo& info); - PixelDataType toPixelDataType(const KtxInfo& info); - PixelDataFormat toPixelDataFormat(const KtxInfo& info); - bool isCompressed(const KtxInfo& info); - TextureFormat toTextureFormat(const KtxInfo& info); - - template - T toCompressedFilamentEnum(uint32_t format) { - switch (format) { - case Ktx1Bundle::RGB_S3TC_DXT1: return T::DXT1_RGB; - case Ktx1Bundle::RGBA_S3TC_DXT1: return T::DXT1_RGBA; - case Ktx1Bundle::RGBA_S3TC_DXT3: return T::DXT3_RGBA; - case Ktx1Bundle::RGBA_S3TC_DXT5: return T::DXT5_RGBA; - case Ktx1Bundle::R_RGTC_BC4_UNORM: return T::RED_RGTC1; - case Ktx1Bundle::R_RGTC_BC4_SNORM: return T::SIGNED_RED_RGTC1; - case Ktx1Bundle::RG_RGTC_BC5_UNORM: return T::RED_GREEN_RGTC2; - case Ktx1Bundle::RG_RGTC_BC5_SNORM: return T::SIGNED_RED_GREEN_RGTC2; - case Ktx1Bundle::RGBA_BPTC_BC7: return T::RGBA_BPTC_UNORM; - case Ktx1Bundle::SRGB8_ALPHA8_BPTC_BC7: return T::SRGB_ALPHA_BPTC_UNORM; - case Ktx1Bundle::RGB_BPTC_BC6H_SNORM: return T::RGB_BPTC_SIGNED_FLOAT; - case Ktx1Bundle::RGB_BPTC_BC6H_UNORM: return T::RGB_BPTC_UNSIGNED_FLOAT; - case Ktx1Bundle::RGBA_ASTC_4x4: return T::RGBA_ASTC_4x4; - case Ktx1Bundle::RGBA_ASTC_5x4: return T::RGBA_ASTC_5x4; - case Ktx1Bundle::RGBA_ASTC_5x5: return T::RGBA_ASTC_5x5; - case Ktx1Bundle::RGBA_ASTC_6x5: return T::RGBA_ASTC_6x5; - case Ktx1Bundle::RGBA_ASTC_6x6: return T::RGBA_ASTC_6x6; - case Ktx1Bundle::RGBA_ASTC_8x5: return T::RGBA_ASTC_8x5; - case Ktx1Bundle::RGBA_ASTC_8x6: return T::RGBA_ASTC_8x6; - case Ktx1Bundle::RGBA_ASTC_8x8: return T::RGBA_ASTC_8x8; - case Ktx1Bundle::RGBA_ASTC_10x5: return T::RGBA_ASTC_10x5; - case Ktx1Bundle::RGBA_ASTC_10x6: return T::RGBA_ASTC_10x6; - case Ktx1Bundle::RGBA_ASTC_10x8: return T::RGBA_ASTC_10x8; - case Ktx1Bundle::RGBA_ASTC_10x10: return T::RGBA_ASTC_10x10; - case Ktx1Bundle::RGBA_ASTC_12x10: return T::RGBA_ASTC_12x10; - case Ktx1Bundle::RGBA_ASTC_12x12: return T::RGBA_ASTC_12x12; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_4x4: return T::SRGB8_ALPHA8_ASTC_4x4; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_5x4: return T::SRGB8_ALPHA8_ASTC_5x4; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_5x5: return T::SRGB8_ALPHA8_ASTC_5x5; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_6x5: return T::SRGB8_ALPHA8_ASTC_6x5; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_6x6: return T::SRGB8_ALPHA8_ASTC_6x6; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_8x5: return T::SRGB8_ALPHA8_ASTC_8x5; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_8x6: return T::SRGB8_ALPHA8_ASTC_8x6; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_8x8: return T::SRGB8_ALPHA8_ASTC_8x8; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_10x5: return T::SRGB8_ALPHA8_ASTC_10x5; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_10x6: return T::SRGB8_ALPHA8_ASTC_10x6; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_10x8: return T::SRGB8_ALPHA8_ASTC_10x8; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_10x10: return T::SRGB8_ALPHA8_ASTC_10x10; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_12x10: return T::SRGB8_ALPHA8_ASTC_12x10; - case Ktx1Bundle::SRGB8_ALPHA8_ASTC_12x12: return T::SRGB8_ALPHA8_ASTC_12x12; - case Ktx1Bundle::R11_EAC: return T::EAC_R11; - case Ktx1Bundle::SIGNED_R11_EAC: return T::EAC_R11_SIGNED; - case Ktx1Bundle::RG11_EAC: return T::EAC_RG11; - case Ktx1Bundle::SIGNED_RG11_EAC: return T::EAC_RG11_SIGNED; - case Ktx1Bundle::RGB8_ETC2: return T::ETC2_RGB8; - case Ktx1Bundle::SRGB8_ETC2: return T::ETC2_SRGB8; - case Ktx1Bundle::RGB8_ALPHA1_ETC2: return T::ETC2_RGB8_A1; - case Ktx1Bundle::SRGB8_ALPHA1_ETC: return T::ETC2_SRGB8_A1; - case Ktx1Bundle::RGBA8_ETC2_EAC: return T::ETC2_EAC_RGBA8; - case Ktx1Bundle::SRGB8_ALPHA8_ETC2_EAC: return T::ETC2_EAC_SRGBA8; - } - return (T) 0xffff; - } - - /** - * Creates a Texture object from a KTX file and populates all of its faces and miplevels. - * - * @param engine Used to create the Filament Texture - * @param ktx In-memory representation of a KTX file - * @param srgb Requests an sRGB format from the KTX file - * @param callback Gets called after all texture data has been uploaded to the GPU - * @param userdata Passed into the callback - */ - Texture* createTexture(Engine* engine, const Ktx1Bundle& ktx, bool srgb, - Callback callback, void* userdata); - - /** - * Creates a Texture object from a KTX bundle, populates all of its faces and miplevels, - * and automatically destroys the bundle after all the texture data has been uploaded. - * - * @param engine Used to create the Filament Texture - * @param ktx In-memory representation of a KTX file - * @param srgb Requests an sRGB format from the KTX file - */ - Texture* createTexture(Engine* engine, Ktx1Bundle* ktx, bool srgb); - - CompressedPixelDataType toCompressedPixelDataType(const KtxInfo& info); - - PixelDataType toPixelDataType(const KtxInfo& info); - - PixelDataFormat toPixelDataFormat(const KtxInfo& info); - - bool isCompressed(const KtxInfo& info); - - bool isSrgbTextureFormat(TextureFormat format); - - TextureFormat toTextureFormat(const KtxInfo& info); - -} // namespace Ktx1Reader -} // namespace ktxreader - -#endif diff --git a/windows/include/filament/ktxreader/Ktx2Reader.h b/windows/include/filament/ktxreader/Ktx2Reader.h deleted file mode 100644 index 0994a5e2..00000000 --- a/windows/include/filament/ktxreader/Ktx2Reader.h +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -#ifndef KTXREADER_KTX2READER_H -#define KTXREADER_KTX2READER_H - -#include -#include - -#include - -#include - -namespace filament { - class Engine; -} - -namespace basist { - class ktx2_transcoder; -} - -namespace ktxreader { - -class Ktx2Reader { - public: - using Engine = filament::Engine; - using Texture = filament::Texture; - enum class TransferFunction { LINEAR, sRGB }; - - enum class Result { - SUCCESS, - COMPRESSED_TRANSCODE_FAILURE, - UNCOMPRESSED_TRANSCODE_FAILURE, - FORMAT_UNSUPPORTED, - FORMAT_ALREADY_REQUESTED, - }; - - Ktx2Reader(Engine& engine, bool quiet = false); - ~Ktx2Reader(); - - /** - * Requests that the reader constructs Filament textures with given internal format. - * - * This MUST be called at least once before calling load(). - * - * As a reminder, a basis-encoded KTX2 can be quickly transcoded to any number of formats, - * so you need to tell it what formats your hw supports. That's why this method exists. - * - * Call requestFormat as many times as needed; formats that are submitted early are - * considered higher priority. - * - * If BasisU knows a priori that the given format is not available (e.g. if the build has - * disabled it), the format is not added and FORMAT_UNSUPPORTED is returned. - * - * Returns FORMAT_ALREADY_REQUESTED if the given format has already been requested. - * - * Hint: BasisU supports the following uncompressed formats: RGBA8, RGB565, RGBA4. - */ - Result requestFormat(Texture::InternalFormat format) noexcept; - - /** - * Removes the given format from the list, or does nothing if it hasn't been requested. - */ - void unrequestFormat(Texture::InternalFormat format) noexcept; - - /** - * Attempts to create and load a Filament texture from the given KTX2 blob. - * - * If none of the requested formats can be extracted from the data, this returns null. - * - * This method iterates through the requested format list, checking each one against the - * platform's capabilities and its availability from the transcoder. When a suitable format - * is determined, it then performs lossless decompression (zstd) before transcoding the data - * into the final format. - * - * The transfer function specified here is used in two ways: - * 1) It is checked against the transfer function that was specified as metadata - * in the KTX2 blob. If they do not match, this method fails. - * 2) It is used as a filter when determining the final internal format. - */ - Texture* load(const void* data, size_t size, TransferFunction transfer); - - /** - * Asynchronous Interface - * ====================== - * - * Alternative API suitable for asynchronous transcoding of mipmap levels. - * If unsure that you need to use this, then don't, just call load() instead. - * Usage pseudocode: - * - * auto async = reader->asyncCreate(data, size, TransferFunction::LINEAR); - * mTexture = async->getTexture(); - * auto backgroundThread = spawnThread({ async->doTranscoding(); }) - * backgroundThread.wait(); - * async->uploadImages(); - * reader->asyncDestroy(async); - * - * In the documentation comments, "foreground thread" refers to the thread that the - * Filament Engine was created on. - */ - class Async { - public: - /** - * Retrieves the Texture object. - * - * The texture is available immediately, but does not have its miplevels ready until - * after doTranscoding() and the subsequent uploadImages() have been completed. The - * caller has ownership over this texture and is responsible for freeing it after all - * miplevels have been uploaded. - */ - Texture* getTexture() const noexcept; - - /** - * Loads all mipmaps from the KTX2 file and transcodes them to the resolved format. - * - * This does not return until all mipmaps have been transcoded. This is typically - * called from a background thread. - */ - Result doTranscoding(); - - /** - * Uploads pending mipmaps to the texture. - * - * This can safely be called while doTranscoding() is still working in another thread. - * Since this calls Texture::setImage(), it should be called from the foreground thread; - * see "Thread safety" in the documentation for filament::Engine. - */ - void uploadImages(); - - protected: - Async() noexcept = default; - virtual ~Async(); - - public: - Async(Async const&) = delete; - Async(Async&&) = delete; - Async& operator=(Async const&) = delete; - Async& operator=(Async&&) = delete; - - friend class Ktx2Reader; - }; - - /** - * Creates a texture without starting the transcode process. - * - * This method is an alternative to load() that allows users to populate mipmap levels - * asynchronously. The texture object however is still created synchronously. - * - * - For a usage example, see the documentation for the Async object. - * - Creates a copy of the given buffer, allowing clients to free it immediately. - * - Returns null if none of the requested formats can be extracted from the data. - * - * This method iterates through the requested format list, checking each one against the - * platform's capabilities and its availability from the transcoder. When a suitable format - * is determined, it then performs lossless decompression (zstd) before transcoding the data - * into the final format. - * - * The transfer function specified here is used in two ways: - * 1) It is checked against the transfer function that was specified as metadata - * in the KTX2 blob. If they do not match, this method fails. - * 2) It is used as a filter when determining the final internal format. - */ - Async* asyncCreate(const void* data, size_t size, TransferFunction transfer); - - /** - * Frees the given async object and sets it to null. - * - * This frees the original source data (i.e. the raw content of the KTX2 file) but does not - * free the associated Texture object. This can be done after transcoding has finished. - */ - void asyncDestroy(Async** async); - - private: - Ktx2Reader(const Ktx2Reader&) = delete; - Ktx2Reader& operator=(const Ktx2Reader&) = delete; - Ktx2Reader(Ktx2Reader&& that) noexcept = delete; - Ktx2Reader& operator=(Ktx2Reader&& that) noexcept = delete; - - Texture* createTexture(basist::ktx2_transcoder* transcoder, const void* data, - size_t size, TransferFunction transfer); - - Engine& mEngine; - basist::ktx2_transcoder* const mTranscoder; - utils::FixedCapacityVector mRequestedFormats; - bool mQuiet; -}; - -} // namespace ktxreader - -#endif diff --git a/windows/include/filament/math/TMatHelpers.h b/windows/include/filament/math/TMatHelpers.h deleted file mode 100644 index ec66650c..00000000 --- a/windows/include/filament/math/TMatHelpers.h +++ /dev/null @@ -1,807 +0,0 @@ -/* - * Copyright 2013 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. - */ - -#ifndef TNT_MATH_TMATHELPERS_H -#define TNT_MATH_TMATHELPERS_H - -#include -#include -#include - -#include // for std::swap and std::min -#include // for std:: namespace - -#include -#include -#include - -namespace filament { -namespace math { -namespace details { -// ------------------------------------------------------------------------------------- - -/* - * No user serviceable parts here. - * - * Don't use this file directly, instead include math/mat*.h - */ - - -/* - * Matrix utilities - */ - -namespace matrix { - -/* - * Matrix inversion - */ -template -constexpr MATRIX MATH_PURE gaussJordanInverse(MATRIX src) { - typedef typename MATRIX::value_type T; - constexpr unsigned int N = MATRIX::NUM_ROWS; - MATRIX inverted; - - for (size_t i = 0; i < N; ++i) { - // look for largest element in i'th column - size_t swap = i; - T t = src[i][i] < 0 ? -src[i][i] : src[i][i]; - for (size_t j = i + 1; j < N; ++j) { - const T t2 = src[j][i] < 0 ? -src[j][i] : src[j][i]; - if (t2 > t) { - swap = j; - t = t2; - } - } - - if (swap != i) { - // swap columns. - std::swap(src[i], src[swap]); - std::swap(inverted[i], inverted[swap]); - } - - const T denom(src[i][i]); - for (size_t k = 0; k < N; ++k) { - src[i][k] /= denom; - inverted[i][k] /= denom; - } - - // Factor out the lower triangle - for (size_t j = 0; j < N; ++j) { - if (j != i) { - const T t = src[j][i]; - for (size_t k = 0; k < N; ++k) { - src[j][k] -= src[i][k] * t; - inverted[j][k] -= inverted[i][k] * t; - } - } - } - } - - return inverted; -} - -//------------------------------------------------------------------------------ -// 2x2 matrix inverse is easy. -template -constexpr MATRIX MATH_PURE fastInverse2(const MATRIX& x) { - typedef typename MATRIX::value_type T; - - // Assuming the input matrix is: - // | a b | - // | c d | - // - // The analytic inverse is - // | d -b | - // | -c a | / (a d - b c) - // - // Importantly, our matrices are column-major! - - MATRIX inverted{}; - - const T a = x[0][0]; - const T c = x[0][1]; - const T b = x[1][0]; - const T d = x[1][1]; - - const T det((a * d) - (b * c)); - inverted[0][0] = d / det; - inverted[0][1] = -c / det; - inverted[1][0] = -b / det; - inverted[1][1] = a / det; - return inverted; -} - -//------------------------------------------------------------------------------ -// From the Wikipedia article on matrix inversion's section on fast 3x3 -// matrix inversion: -// http://en.wikipedia.org/wiki/Invertible_matrix#Inversion_of_3.C3.973_matrices -template -constexpr MATRIX MATH_PURE fastInverse3(const MATRIX& x) { - typedef typename MATRIX::value_type T; - - // Assuming the input matrix is: - // | a b c | - // | d e f | - // | g h i | - // - // The analytic inverse is - // | A B C |^T - // | D E F | - // | G H I | / determinant - // - // Which is - // | A D G | - // | B E H | - // | C F I | / determinant - // - // Where: - // A = (ei - fh), B = (fg - di), C = (dh - eg) - // D = (ch - bi), E = (ai - cg), F = (bg - ah) - // G = (bf - ce), H = (cd - af), I = (ae - bd) - // - // and the determinant is a*A + b*B + c*C (The rule of Sarrus) - // - // Importantly, our matrices are column-major! - - MATRIX inverted{}; - - const T a = x[0][0]; - const T b = x[1][0]; - const T c = x[2][0]; - const T d = x[0][1]; - const T e = x[1][1]; - const T f = x[2][1]; - const T g = x[0][2]; - const T h = x[1][2]; - const T i = x[2][2]; - - // Do the full analytic inverse - const T A = e * i - f * h; - const T B = f * g - d * i; - const T C = d * h - e * g; - inverted[0][0] = A; // A - inverted[0][1] = B; // B - inverted[0][2] = C; // C - inverted[1][0] = c * h - b * i; // D - inverted[1][1] = a * i - c * g; // E - inverted[1][2] = b * g - a * h; // F - inverted[2][0] = b * f - c * e; // G - inverted[2][1] = c * d - a * f; // H - inverted[2][2] = a * e - b * d; // I - - const T det(a * A + b * B + c * C); - for (size_t col = 0; col < 3; ++col) { - for (size_t row = 0; row < 3; ++row) { - inverted[col][row] /= det; - } - } - - return inverted; -} - - -//------------------------------------------------------------------------------ -// Determinant and cofactor - -// this is just a dummy matrix helper -template -class Matrix { - T m[ORDER][ORDER]; -public: - constexpr auto operator[](size_t i) const noexcept { return m[i]; } - - constexpr auto& operator[](size_t i) noexcept { return m[i]; } - - static constexpr Matrix submatrix(Matrix in, size_t row, size_t col) noexcept { - size_t colCount = 0, rowCount = 0; - Matrix dest{}; - for (size_t i = 0; i < ORDER; i++) { - if (i != row) { - colCount = 0; - for (size_t j = 0; j < ORDER; j++) { - if (j != col) { - dest[rowCount][colCount] = in[i][j]; - colCount++; - } - } - rowCount++; - } - } - return dest; - } -}; - -template -struct Determinant { - static constexpr T determinant(Matrix in) { - T det = {}; - for (size_t i = 0; i < O; i++) { - T m = Determinant::determinant(Matrix::submatrix(in, 0, i)); - T factor = (i % 2 == 1) ? T(-1) : T(1); - det += factor * in[0][i] * m; - } - return det; - } -}; - -template -struct Determinant { - static constexpr T determinant(Matrix in) { - return - in[0][0] * in[1][1] * in[2][2] + - in[1][0] * in[2][1] * in[0][2] + - in[2][0] * in[0][1] * in[1][2] - - in[2][0] * in[1][1] * in[0][2] - - in[1][0] * in[0][1] * in[2][2] - - in[0][0] * in[2][1] * in[1][2]; - } -}; - -template -struct Determinant { - static constexpr T determinant(Matrix in) { - return in[0][0] * in[1][1] - in[0][1] * in[1][0]; - } -}; - -template -struct Determinant { - static constexpr T determinant(Matrix in) { return in[0][0]; } -}; - -template -constexpr MATRIX MATH_PURE cofactor(const MATRIX& m) { - typedef typename MATRIX::value_type T; - - MATRIX out; - constexpr size_t order = MATRIX::NUM_COLS; - - Matrix in{}; - for (size_t i = 0; i < order; i++) { - for (size_t j = 0; j < order; j++) { - in[i][j] = m[i][j]; - } - } - - for (size_t i = 0; i < order; i++) { - for (size_t j = 0; j < order; j++) { - T factor = ((i + j) % 2 == 1) ? T(-1) : T(1); - out[i][j] = Determinant::determinant( - Matrix::submatrix(in, i, j)) * factor; - } - } - return out; -} - -template -constexpr MATRIX MATH_PURE fastCofactor2(const MATRIX& m) { - typedef typename MATRIX::value_type T; - - // Assuming the input matrix is: - // | a b | - // | c d | - // - // The cofactor are - // | d -c | - // | -b a | - // - // Importantly, our matrices are column-major! - - MATRIX cof{}; - - const T a = m[0][0]; - const T c = m[0][1]; - const T b = m[1][0]; - const T d = m[1][1]; - - cof[0][0] = d; - cof[0][1] = -b; - cof[1][0] = -c; - cof[1][1] = a; - return cof; -} - -template -constexpr MATRIX MATH_PURE fastCofactor3(const MATRIX& m) { - typedef typename MATRIX::value_type T; - - // Assuming the input matrix is: - // | a b c | - // | d e f | - // | g h i | - // - // The cofactor are - // | A B C | - // | D E F | - // | G H I | - - // Where: - // A = (ei - fh), B = (fg - di), C = (dh - eg) - // D = (ch - bi), E = (ai - cg), F = (bg - ah) - // G = (bf - ce), H = (cd - af), I = (ae - bd) - - // Importantly, our matrices are column-major! - - MATRIX cof{}; - - const T a = m[0][0]; - const T b = m[1][0]; - const T c = m[2][0]; - const T d = m[0][1]; - const T e = m[1][1]; - const T f = m[2][1]; - const T g = m[0][2]; - const T h = m[1][2]; - const T i = m[2][2]; - - cof[0][0] = e * i - f * h; // A - cof[0][1] = c * h - b * i; // D - cof[0][2] = b * f - c * e; // G - cof[1][0] = f * g - d * i; // B - cof[1][1] = a * i - c * g; // E - cof[1][2] = c * d - a * f; // H - cof[2][0] = d * h - e * g; // C - cof[2][1] = b * g - a * h; // F - cof[2][2] = a * e - b * d; // I - - return cof; -} - - -/** - * Cofactor function which switches on the matrix size. - */ -template> -inline constexpr MATRIX MATH_PURE cof(const MATRIX& matrix) { - return (MATRIX::NUM_ROWS == 2) ? fastCofactor2(matrix) : - ((MATRIX::NUM_ROWS == 3) ? fastCofactor3(matrix) : - cofactor(matrix)); -} - -/** - * Determinant of a matrix - */ -template> -inline constexpr typename MATRIX::value_type MATH_PURE det(const MATRIX& matrix) { - typedef typename MATRIX::value_type T; - constexpr unsigned int N = MATRIX::NUM_ROWS; - Matrix in{}; - for (size_t i = 0; i < N; i++) { - for (size_t j = 0; j < N; j++) { - in[i][j] = matrix[i][j]; - } - } - return Determinant::determinant(in); -} - -/** - * Inversion function which switches on the matrix size. - * @warning This function assumes the matrix is invertible. The result is - * undefined if it is not. It is the responsibility of the caller to - * make sure the matrix is not singular. - */ -template> -inline constexpr MATRIX MATH_PURE inverse(const MATRIX& matrix) { - return (MATRIX::NUM_ROWS == 2) ? fastInverse2(matrix) : - ((MATRIX::NUM_ROWS == 3) ? fastInverse3(matrix) : - gaussJordanInverse(matrix)); -} - -template> -constexpr MATRIX_R MATH_PURE multiply(MATRIX_A lhs, MATRIX_B rhs) { - // pre-requisite: - // lhs : D columns, R rows - // rhs : C columns, D rows - // res : C columns, R rows - MATRIX_R res{}; - for (size_t col = 0; col < MATRIX_R::NUM_COLS; ++col) { - res[col] = lhs * rhs[col]; - } - return res; -} - -template> -inline constexpr MATRIX MATH_PURE transpose(MATRIX m) { - // for now we only handle square matrix transpose - MATRIX result{}; - for (size_t col = 0; col < MATRIX::NUM_COLS; ++col) { - for (size_t row = 0; row < MATRIX::NUM_ROWS; ++row) { - result[col][row] = m[row][col]; - } - } - return result; -} - -template> -inline constexpr typename MATRIX::value_type MATH_PURE trace(MATRIX m) { - typename MATRIX::value_type result{}; - for (size_t col = 0; col < MATRIX::NUM_COLS; ++col) { - result += m[col][col]; - } - return result; -} - -template> -inline constexpr typename MATRIX::col_type MATH_PURE diag(MATRIX m) { - typename MATRIX::col_type result{}; - for (size_t col = 0; col < MATRIX::NUM_COLS; ++col) { - result[col] = m[col][col]; - } - return result; -} - -//------------------------------------------------------------------------------ -// This is taken from the Imath MatrixAlgo code, and is identical to Eigen. -template -TQuaternion extractQuat(const MATRIX& mat) { - typedef typename MATRIX::value_type T; - - TQuaternion quat(TQuaternion::NO_INIT); - - // Compute the trace to see if it is positive or not. - const T trace = mat[0][0] + mat[1][1] + mat[2][2]; - - // check the sign of the trace - if (MATH_LIKELY(trace > 0)) { - // trace is positive - T s = std::sqrt(trace + 1); - quat.w = T(0.5) * s; - s = T(0.5) / s; - quat.x = (mat[1][2] - mat[2][1]) * s; - quat.y = (mat[2][0] - mat[0][2]) * s; - quat.z = (mat[0][1] - mat[1][0]) * s; - } else { - // trace is negative - - // Find the index of the greatest diagonal - size_t i = 0; - if (mat[1][1] > mat[0][0]) { i = 1; } - if (mat[2][2] > mat[i][i]) { i = 2; } - - // Get the next indices: (n+1)%3 - static constexpr size_t next_ijk[3] = { 1, 2, 0 }; - size_t j = next_ijk[i]; - size_t k = next_ijk[j]; - T s = std::sqrt((mat[i][i] - (mat[j][j] + mat[k][k])) + 1); - quat[i] = T(0.5) * s; - if (s != 0) { - s = T(0.5) / s; - } - quat.w = (mat[j][k] - mat[k][j]) * s; - quat[j] = (mat[i][j] + mat[j][i]) * s; - quat[k] = (mat[i][k] + mat[k][i]) * s; - } - return quat; -} - -} // namespace matrix - -// ------------------------------------------------------------------------------------- - -/* - * TMatProductOperators implements basic arithmetic and basic compound assignments - * operators on a vector of type BASE. - * - * BASE only needs to implement operator[] and size(). - * By simply inheriting from TMatProductOperators BASE will automatically - * get all the functionality here. - */ - -template class BASE, typename T, - template class VEC> -class TMatProductOperators { -public: - // matrix *= matrix - template - constexpr BASE& operator*=(const BASE& rhs) { - BASE& lhs(static_cast< BASE& >(*this)); - lhs = matrix::multiply>(lhs, rhs); - return lhs; - } - - // matrix *= scalar - template> - constexpr BASE& operator*=(U v) { - BASE& lhs(static_cast< BASE& >(*this)); - for (size_t col = 0; col < BASE::NUM_COLS; ++col) { - lhs[col] *= v; - } - return lhs; - } - - // matrix /= scalar - template> - constexpr BASE& operator/=(U v) { - BASE& lhs(static_cast< BASE& >(*this)); - for (size_t col = 0; col < BASE::NUM_COLS; ++col) { - lhs[col] /= v; - } - return lhs; - } - -private: - /* - * NOTE: the functions below ARE NOT member methods. They are friend functions - * with they definition inlined with their declaration. This makes these - * template functions available to the compiler when (and only when) this class - * is instantiated, at which point they're only templated on the 2nd parameter - * (the first one, BASE being known). - */ - - // matrix * matrix - template - friend inline constexpr BASE> MATH_PURE - operator*(BASE lhs, BASE rhs) { - return matrix::multiply>>(lhs, rhs); - } - - // matrix * vector - template - friend inline constexpr typename BASE>::col_type MATH_PURE - operator*(const BASE& lhs, const VEC& rhs) { - typename BASE>::col_type result{}; - for (size_t col = 0; col < BASE::NUM_COLS; ++col) { - result += lhs[col] * rhs[col]; - } - return result; - } - - // row-vector * matrix - template - friend inline constexpr typename BASE>::row_type MATH_PURE - operator*(const VEC& lhs, const BASE& rhs) { - typename BASE>::row_type result{}; - for (size_t col = 0; col < BASE::NUM_COLS; ++col) { - result[col] = dot(lhs, rhs[col]); - } - return result; - } - - // matrix * scalar - template> - friend inline constexpr BASE> MATH_PURE - operator*(const BASE& lhs, U rhs) { - BASE> result{}; - for (size_t col = 0; col < BASE::NUM_COLS; ++col) { - result[col] = lhs[col] * rhs; - } - return result; - } - - // scalar * matrix - template> - friend inline constexpr BASE> MATH_PURE - operator*(U rhs, const BASE& lhs) { - return lhs * rhs; - } - - // matrix / scalar - template> - friend inline constexpr BASE> MATH_PURE - operator/(const BASE& lhs, U rhs) { - BASE> result{}; - for (size_t col = 0; col < BASE::NUM_COLS; ++col) { - result[col] = lhs[col] / rhs; - } - return result; - } -}; - -/* - * TMatSquareFunctions implements functions on a matrix of type BASE. - * - * BASE only needs to implement: - * - operator[] - * - col_type - * - row_type - * - COL_SIZE - * - ROW_SIZE - * - * By simply inheriting from TMatSquareFunctions BASE will automatically - * get all the functionality here. - */ - -template class BASE, typename T> -class TMatSquareFunctions { -private: - /* - * NOTE: the functions below ARE NOT member methods. They are friend functions - * with they definition inlined with their declaration. This makes these - * template functions available to the compiler when (and only when) this class - * is instantiated, at which point they're only templated on the 2nd parameter - * (the first one, BASE being known). - */ - friend inline constexpr BASE MATH_PURE inverse(const BASE& matrix) { - return matrix::inverse(matrix); - } - - friend inline constexpr BASE MATH_PURE cof(const BASE& matrix) { - return matrix::cof(matrix); - } - - friend inline constexpr BASE MATH_PURE transpose(BASE m) { - return matrix::transpose(m); - } - - friend inline constexpr T MATH_PURE trace(BASE m) { - return matrix::trace(m); - } - - friend inline constexpr T MATH_PURE det(const BASE& m) { - return matrix::det(m); - } - - // unclear why we have to use 'auto' here. 'typename BASE::col_type' produces - // error: no type named 'col_type' in 'filament::math::details::TMat44' - friend inline constexpr auto MATH_PURE diag(const BASE& m) { - return matrix::diag(m); - } -}; - -template class BASE, typename T> -class TMatHelpers { -public: - constexpr inline size_t getColumnSize() const { return BASE::COL_SIZE; } - constexpr inline size_t getRowSize() const { return BASE::ROW_SIZE; } - constexpr inline size_t getColumnCount() const { return BASE::NUM_COLS; } - constexpr inline size_t getRowCount() const { return BASE::NUM_ROWS; } - constexpr inline size_t size() const { return BASE::ROW_SIZE; } // for TVec*<> - - // array access - constexpr T const* asArray() const { - return &static_cast const &>(*this)[0][0]; - } - - // element access - inline constexpr T const& operator()(size_t row, size_t col) const { - return static_cast const &>(*this)[col][row]; - } - - inline T& operator()(size_t row, size_t col) { - return static_cast&>(*this)[col][row]; - } - -private: - constexpr friend inline BASE MATH_PURE abs(BASE m) { - for (size_t col = 0; col < BASE::NUM_COLS; ++col) { - m[col] = abs(m[col]); - } - return m; - } -}; - -// functions for 3x3 and 4x4 matrices -template class BASE, typename T> -class TMatTransform { -public: - inline constexpr TMatTransform() { - static_assert(BASE::NUM_ROWS == 3 || BASE::NUM_ROWS == 4, "3x3 or 4x4 matrices only"); - } - - template> - static BASE rotation(A radian, VEC about) { - BASE r; - T c = std::cos(radian); - T s = std::sin(radian); - if (about[0] == 1 && about[1] == 0 && about[2] == 0) { - r[1][1] = c; r[2][2] = c; - r[1][2] = s; r[2][1] = -s; - } else if (about[0] == 0 && about[1] == 1 && about[2] == 0) { - r[0][0] = c; r[2][2] = c; - r[2][0] = s; r[0][2] = -s; - } else if (about[0] == 0 && about[1] == 0 && about[2] == 1) { - r[0][0] = c; r[1][1] = c; - r[0][1] = s; r[1][0] = -s; - } else { - VEC nabout = normalize(about); - typename VEC::value_type x = nabout[0]; - typename VEC::value_type y = nabout[1]; - typename VEC::value_type z = nabout[2]; - T nc = 1 - c; - T xy = x * y; - T yz = y * z; - T zx = z * x; - T xs = x * s; - T ys = y * s; - T zs = z * s; - r[0][0] = x*x*nc + c; r[1][0] = xy*nc - zs; r[2][0] = zx*nc + ys; - r[0][1] = xy*nc + zs; r[1][1] = y*y*nc + c; r[2][1] = yz*nc - xs; - r[0][2] = zx*nc - ys; r[1][2] = yz*nc + xs; r[2][2] = z*z*nc + c; - - // Clamp results to -1, 1. - for (size_t col = 0; col < 3; ++col) { - for (size_t row = 0; row < 3; ++row) { - r[col][row] = std::min(std::max(r[col][row], T(-1)), T(1)); - } - } - } - return r; - } - - /** - * Create a matrix from euler angles using YPR around YXZ respectively - * @param yaw about Y axis - * @param pitch about X axis - * @param roll about Z axis - */ - template> - static BASE eulerYXZ(Y yaw, P pitch, R roll) { - return eulerZYX(roll, pitch, yaw); - } - - /** - * Create a matrix from euler angles using YPR around ZYX respectively - * @param roll about X axis - * @param pitch about Y axis - * @param yaw about Z axis - * - * The euler angles are applied in ZYX order. i.e: a vector is first rotated - * about X (roll) then Y (pitch) and then Z (yaw). - */ - template> - static BASE eulerZYX(Y yaw, P pitch, R roll) { - BASE r; - T cy = std::cos(yaw); - T sy = std::sin(yaw); - T cp = std::cos(pitch); - T sp = std::sin(pitch); - T cr = std::cos(roll); - T sr = std::sin(roll); - T cc = cr * cy; - T cs = cr * sy; - T sc = sr * cy; - T ss = sr * sy; - r[0][0] = cp * cy; - r[0][1] = cp * sy; - r[0][2] = -sp; - r[1][0] = sp * sc - cs; - r[1][1] = sp * ss + cc; - r[1][2] = cp * sr; - r[2][0] = sp * cc + ss; - r[2][1] = sp * cs - sc; - r[2][2] = cp * cr; - - // Clamp results to -1, 1. - for (size_t col = 0; col < 3; ++col) { - for (size_t row = 0; row < 3; ++row) { - r[col][row] = std::min(std::max(r[col][row], T(-1)), T(1)); - } - } - return r; - } - - TQuaternion toQuaternion() const { - return matrix::extractQuat(static_cast&>(*this)); - } -}; - -// ------------------------------------------------------------------------------------- -} // namespace details -} // namespace math -} // namespace filament - -#endif // TNT_MATH_TMATHELPERS_H diff --git a/windows/include/filament/math/TQuatHelpers.h b/windows/include/filament/math/TQuatHelpers.h deleted file mode 100644 index 81e06a09..00000000 --- a/windows/include/filament/math/TQuatHelpers.h +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright 2013 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. - */ - -#ifndef TNT_MATH_TQUATHELPERS_H -#define TNT_MATH_TQUATHELPERS_H - -#include -#include -#include - -#include -#include -#include - -namespace filament { -namespace math { -namespace details { -// ------------------------------------------------------------------------------------- - -/* - * No user serviceable parts here. - * - * Don't use this file directly, instead include math/quat.h - */ - - -/* - * TQuatProductOperators implements basic arithmetic and basic compound assignment - * operators on a quaternion of type BASE. - * - * BASE only needs to implement operator[] and size(). - * By simply inheriting from TQuatProductOperators BASE will automatically - * get all the functionality here. - */ - -template class QUATERNION, typename T> -class TQuatProductOperators { -public: - /* compound assignment from a another quaternion of the same size but different - * element type. - */ - template - constexpr QUATERNION& operator*=(const QUATERNION& r) { - QUATERNION& q = static_cast&>(*this); - q = q * r; - return q; - } - - /* compound assignment products by a scalar - */ - constexpr QUATERNION& operator*=(T v) { - QUATERNION& lhs = static_cast&>(*this); - for (size_t i = 0; i < QUATERNION::size(); i++) { - lhs[i] *= v; - } - return lhs; - } - - constexpr QUATERNION& operator/=(T v) { - QUATERNION& lhs = static_cast&>(*this); - for (size_t i = 0; i < QUATERNION::size(); i++) { - lhs[i] /= v; - } - return lhs; - } - - /* - * NOTE: the functions below ARE NOT member methods. They are friend functions - * with they definition inlined with their declaration. This makes these - * template functions available to the compiler when (and only when) this class - * is instantiated, at which point they're only templated on the 2nd parameter - * (the first one, BASE being known). - */ - - /* The operators below handle operation between quaternion of the same size - * but of a different element type. - */ - template - friend inline - constexpr QUATERNION MATH_PURE operator*(const QUATERNION& q, const QUATERNION& r) { - // could be written as: - // return QUATERNION( - // q.w*r.w - dot(q.xyz, r.xyz), - // q.w*r.xyz + r.w*q.xyz + cross(q.xyz, r.xyz)); - - return QUATERNION( - q.w * r.w - q.x * r.x - q.y * r.y - q.z * r.z, - q.w * r.x + q.x * r.w + q.y * r.z - q.z * r.y, - q.w * r.y - q.x * r.z + q.y * r.w + q.z * r.x, - q.w * r.z + q.x * r.y - q.y * r.x + q.z * r.w); - } - - template - friend inline - constexpr TVec3 MATH_PURE operator*(const QUATERNION& q, const TVec3& v) { - // note: if q is known to be a unit quaternion, then this simplifies to: - // TVec3 t = 2 * cross(q.xyz, v) - // return v + (q.w * t) + cross(q.xyz, t) - return imaginary(q * QUATERNION(v, 0) * inverse(q)); - } - - - /* For quaternions, we use explicit "by a scalar" products because it's much faster - * than going (implicitly) through the quaternion multiplication. - * For reference: we could use the code below instead, but it would be a lot slower. - * friend inline - * constexpr BASE MATH_PURE operator *(const BASE& q, const BASE& r) { - * return BASE( - * q.w*r.w - q.x*r.x - q.y*r.y - q.z*r.z, - * q.w*r.x + q.x*r.w + q.y*r.z - q.z*r.y, - * q.w*r.y - q.x*r.z + q.y*r.w + q.z*r.x, - * q.w*r.z + q.x*r.y - q.y*r.x + q.z*r.w); - * - */ - friend inline - constexpr QUATERNION MATH_PURE operator*(QUATERNION q, T scalar) { - // don't pass q by reference because we need a copy anyways - return q *= scalar; - } - - friend inline - constexpr QUATERNION MATH_PURE operator*(T scalar, QUATERNION q) { - // don't pass q by reference because we need a copy anyways - return q *= scalar; - } - - friend inline - constexpr QUATERNION MATH_PURE operator/(QUATERNION q, T scalar) { - // don't pass q by reference because we need a copy anyways - return q /= scalar; - } -}; - - -/* - * TQuatFunctions implements functions on a quaternion of type BASE. - * - * BASE only needs to implement operator[] and size(). - * By simply inheriting from TQuatFunctions BASE will automatically - * get all the functionality here. - */ -template class QUATERNION, typename T> -class TQuatFunctions { -public: - /* - * NOTE: the functions below ARE NOT member methods. They are friend functions - * with they definition inlined with their declaration. This makes these - * template functions available to the compiler when (and only when) this class - * is instantiated, at which point they're only templated on the 2nd parameter - * (the first one, BASE being known). - */ - - template - friend inline - constexpr T MATH_PURE dot(const QUATERNION& p, const QUATERNION& q) { - return p.x * q.x + - p.y * q.y + - p.z * q.z + - p.w * q.w; - } - - friend inline - T MATH_PURE norm(const QUATERNION& q) { - return std::sqrt(dot(q, q)); - } - - friend inline - T MATH_PURE length(const QUATERNION& q) { - return norm(q); - } - - friend inline - constexpr T MATH_PURE length2(const QUATERNION& q) { - return dot(q, q); - } - - friend inline - QUATERNION MATH_PURE normalize(const QUATERNION& q) { - return length(q) ? q / length(q) : QUATERNION(static_cast(1)); - } - - friend inline - constexpr QUATERNION MATH_PURE conj(const QUATERNION& q) { - return QUATERNION(q.w, -q.x, -q.y, -q.z); - } - - friend inline - constexpr QUATERNION MATH_PURE inverse(const QUATERNION& q) { - return conj(q) * (1 / dot(q, q)); - } - - friend inline - constexpr T MATH_PURE real(const QUATERNION& q) { - return q.w; - } - - friend inline - constexpr TVec3 MATH_PURE imaginary(const QUATERNION& q) { - return q.xyz; - } - - friend inline - constexpr QUATERNION MATH_PURE unreal(const QUATERNION& q) { - return QUATERNION(q.xyz, 0); - } - - friend inline - constexpr QUATERNION MATH_PURE cross(const QUATERNION& p, const QUATERNION& q) { - return unreal(p * q); - } - - friend inline - QUATERNION MATH_PURE exp(const QUATERNION& q) { - const T nq(norm(q.xyz)); - return std::exp(q.w) * QUATERNION((sin(nq) / nq) * q.xyz, cos(nq)); - } - - friend inline - QUATERNION MATH_PURE log(const QUATERNION& q) { - const T nq(norm(q)); - return QUATERNION((std::acos(q.w / nq) / norm(q.xyz)) * q.xyz, std::log(nq)); - } - - friend inline - QUATERNION MATH_PURE pow(const QUATERNION& q, T a) { - // could also be computed as: exp(a*log(q)); - const T nq(norm(q)); - const T theta(a * std::acos(q.w / nq)); - return std::pow(nq, a) * QUATERNION(normalize(q.xyz) * std::sin(theta), std::cos(theta)); - } - - friend inline - QUATERNION MATH_PURE slerp(const QUATERNION& p, const QUATERNION& q, T t) { - // could also be computed as: pow(q * inverse(p), t) * p; - const T d = dot(p, q); - const T absd = std::abs(d); - static constexpr T value_eps = T(10) * std::numeric_limits::epsilon(); - // Prevent blowing up when slerping between two quaternions that are very near each other. - if ((T(1) - absd) < value_eps) { - return normalize(lerp(d < 0 ? -p : p, q, t)); - } - const T npq = std::sqrt(dot(p, p) * dot(q, q)); // ||p|| * ||q|| - const T a = std::acos(filament::math::clamp(absd / npq, T(-1), T(1))); - const T a0 = a * (1 - t); - const T a1 = a * t; - const T sina = sin(a); - if (sina < value_eps) { - return normalize(lerp(p, q, t)); - } - const T isina = 1 / sina; - const T s0 = std::sin(a0) * isina; - const T s1 = std::sin(a1) * isina; - // ensure we're taking the "short" side - return normalize(s0 * p + ((d < 0) ? (-s1) : (s1)) * q); - } - - friend inline - constexpr QUATERNION MATH_PURE lerp(const QUATERNION& p, const QUATERNION& q, T t) { - return ((1 - t) * p) + (t * q); - } - - friend inline - constexpr QUATERNION MATH_PURE nlerp(const QUATERNION& p, const QUATERNION& q, T t) { - return normalize(lerp(p, q, t)); - } - - friend inline - constexpr QUATERNION MATH_PURE positive(const QUATERNION& q) { - return q.w < 0 ? -q : q; - } -}; - -// ------------------------------------------------------------------------------------- -} // namespace details -} // namespace math -} // namespace filament - -#endif // TNT_MATH_TQUATHELPERS_H diff --git a/windows/include/filament/math/TVecHelpers.h b/windows/include/filament/math/TVecHelpers.h deleted file mode 100644 index a43c2a47..00000000 --- a/windows/include/filament/math/TVecHelpers.h +++ /dev/null @@ -1,623 +0,0 @@ -/* - * Copyright 2013 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. - */ - -#ifndef TNT_MATH_TVECHELPERS_H -#define TNT_MATH_TVECHELPERS_H - -#include - -#include // for std:: namespace - -#include -#include - -namespace filament::math::details { - -template -inline constexpr U min(U a, U b) noexcept { - return a < b ? a : b; -} - -template -inline constexpr U max(U a, U b) noexcept { - return a > b ? a : b; -} - -template -struct arithmetic_result { - using type = decltype(std::declval() + std::declval()); -}; - -template -using arithmetic_result_t = typename arithmetic_result::type; - -template -using enable_if_arithmetic_t = std::enable_if_t< - is_arithmetic::value && - is_arithmetic::value && - is_arithmetic::value && - is_arithmetic::value>; - -/* - * No user serviceable parts here. - * - * Don't use this file directly, instead include math/vec{2|3|4}.h - */ - -/* - * TVec{Add|Product}Operators implements basic arithmetic and basic compound assignments - * operators on a vector of type BASE. - * - * BASE only needs to implement operator[] and size(). - * By simply inheriting from TVec{Add|Product}Operators BASE will automatically - * get all the functionality here. - */ - -template class VECTOR, typename T> -class TVecAddOperators { -public: - /* compound assignment from a another vector of the same size but different - * element type. - */ - template - constexpr VECTOR& operator+=(const VECTOR& v) { - VECTOR& lhs = static_cast&>(*this); - for (size_t i = 0; i < lhs.size(); i++) { - lhs[i] += v[i]; - } - return lhs; - } - - template> - constexpr VECTOR& operator+=(U v) { - return operator+=(VECTOR(v)); - } - - template - constexpr VECTOR& operator-=(const VECTOR& v) { - VECTOR& lhs = static_cast&>(*this); - for (size_t i = 0; i < lhs.size(); i++) { - lhs[i] -= v[i]; - } - return lhs; - } - - template> - constexpr VECTOR& operator-=(U v) { - return operator-=(VECTOR(v)); - } - -private: - /* - * NOTE: the functions below ARE NOT member methods. They are friend functions - * with they definition inlined with their declaration. This makes these - * template functions available to the compiler when (and only when) this class - * is instantiated, at which point they're only templated on the 2nd parameter - * (the first one, BASE being known). - */ - - template - friend inline constexpr - VECTOR> MATH_PURE operator+(const VECTOR& lv, const VECTOR& rv) { - VECTOR> res(lv); - res += rv; - return res; - } - - template> - friend inline constexpr - VECTOR> MATH_PURE operator+(const VECTOR& lv, U rv) { - return lv + VECTOR(rv); - } - - template> - friend inline constexpr - VECTOR> MATH_PURE operator+(U lv, const VECTOR& rv) { - return VECTOR(lv) + rv; - } - - template - friend inline constexpr - VECTOR> MATH_PURE operator-(const VECTOR& lv, const VECTOR& rv) { - VECTOR> res(lv); - res -= rv; - return res; - } - - template> - friend inline constexpr - VECTOR> MATH_PURE operator-(const VECTOR& lv, U rv) { - return lv - VECTOR(rv); - } - - template> - friend inline constexpr - VECTOR> MATH_PURE operator-(U lv, const VECTOR& rv) { - return VECTOR(lv) - rv; - } -}; - -template class VECTOR, typename T> -class TVecProductOperators { -public: - /* compound assignment from a another vector of the same size but different - * element type. - */ - template - constexpr VECTOR& operator*=(const VECTOR& v) { - VECTOR& lhs = static_cast&>(*this); - for (size_t i = 0; i < lhs.size(); i++) { - lhs[i] *= v[i]; - } - return lhs; - } - - template> - constexpr VECTOR& operator*=(U v) { - return operator*=(VECTOR(v)); - } - - template - constexpr VECTOR& operator/=(const VECTOR& v) { - VECTOR& lhs = static_cast&>(*this); - for (size_t i = 0; i < lhs.size(); i++) { - lhs[i] /= v[i]; - } - return lhs; - } - - template> - constexpr VECTOR& operator/=(U v) { - return operator/=(VECTOR(v)); - } - -private: - /* - * NOTE: the functions below ARE NOT member methods. They are friend functions - * with they definition inlined with their declaration. This makes these - * template functions available to the compiler when (and only when) this class - * is instantiated, at which point they're only templated on the 2nd parameter - * (the first one, BASE being known). - */ - - template - friend inline constexpr - VECTOR> MATH_PURE operator*(const VECTOR& lv, const VECTOR& rv) { - VECTOR> res(lv); - res *= rv; - return res; - } - - template> - friend inline constexpr - VECTOR> MATH_PURE operator*(const VECTOR& lv, U rv) { - return lv * VECTOR(rv); - } - - template> - friend inline constexpr - VECTOR> MATH_PURE operator*(U lv, const VECTOR& rv) { - return VECTOR(lv) * rv; - } - - template - friend inline constexpr - VECTOR> MATH_PURE operator/(const VECTOR& lv, const VECTOR& rv) { - VECTOR> res(lv); - res /= rv; - return res; - } - - template> - friend inline constexpr - VECTOR> MATH_PURE operator/(const VECTOR& lv, U rv) { - return lv / VECTOR(rv); - } - - template> - friend inline constexpr - VECTOR> MATH_PURE operator/(U lv, const VECTOR& rv) { - return VECTOR(lv) / rv; - } -}; - -/* - * TVecUnaryOperators implements unary operators on a vector of type BASE. - * - * BASE only needs to implement operator[] and size(). - * By simply inheriting from TVecUnaryOperators BASE will automatically - * get all the functionality here. - * - * These operators are implemented as friend functions of TVecUnaryOperators - */ -template class VECTOR, typename T> -class TVecUnaryOperators { -public: - constexpr VECTOR operator-() const { - VECTOR r{}; - VECTOR const& rv(static_cast const&>(*this)); - for (size_t i = 0; i < r.size(); i++) { - r[i] = -rv[i]; - } - return r; - } -}; - -/* - * TVecComparisonOperators implements relational/comparison operators - * on a vector of type BASE. - * - * BASE only needs to implement operator[] and size(). - * By simply inheriting from TVecComparisonOperators BASE will automatically - * get all the functionality here. - */ -template class VECTOR, typename T> -class TVecComparisonOperators { -private: - /* - * NOTE: the functions below ARE NOT member methods. They are friend functions - * with they definition inlined with their declaration. This makes these - * template functions available to the compiler when (and only when) this class - * is instantiated, at which point they're only templated on the 2nd parameter - * (the first one, BASE being known). - */ - template - friend inline constexpr - bool MATH_PURE operator==(const VECTOR& lv, const VECTOR& rv) { - for (size_t i = 0; i < lv.size(); i++) { - if (lv[i] != rv[i]) { - return false; - } - } - return true; - } - - template - friend inline constexpr - bool MATH_PURE operator!=(const VECTOR& lv, const VECTOR& rv) { - return !operator==(lv, rv); - } - - template - friend inline constexpr - VECTOR MATH_PURE equal(const VECTOR& lv, const VECTOR& rv) { - VECTOR r{}; - for (size_t i = 0; i < lv.size(); i++) { - r[i] = lv[i] == rv[i]; - } - return r; - } - - template - friend inline constexpr - VECTOR MATH_PURE notEqual(const VECTOR& lv, const VECTOR& rv) { - VECTOR r{}; - for (size_t i = 0; i < lv.size(); i++) { - r[i] = lv[i] != rv[i]; - } - return r; - } - - template - friend inline constexpr - VECTOR MATH_PURE lessThan(const VECTOR& lv, const VECTOR& rv) { - VECTOR r{}; - for (size_t i = 0; i < lv.size(); i++) { - r[i] = lv[i] < rv[i]; - } - return r; - } - - template - friend inline constexpr - VECTOR MATH_PURE lessThanEqual(const VECTOR& lv, const VECTOR& rv) { - VECTOR r{}; - for (size_t i = 0; i < lv.size(); i++) { - r[i] = lv[i] <= rv[i]; - } - return r; - } - - template - friend inline constexpr - VECTOR MATH_PURE greaterThan(const VECTOR& lv, const VECTOR& rv) { - VECTOR r; - for (size_t i = 0; i < lv.size(); i++) { - r[i] = lv[i] > rv[i]; - } - return r; - } - - template - friend inline - VECTOR MATH_PURE greaterThanEqual(const VECTOR& lv, const VECTOR& rv) { - VECTOR r{}; - for (size_t i = 0; i < lv.size(); i++) { - r[i] = lv[i] >= rv[i]; - } - return r; - } -}; - -/* - * TVecFunctions implements functions on a vector of type BASE. - * - * BASE only needs to implement operator[] and size(). - * By simply inheriting from TVecFunctions BASE will automatically - * get all the functionality here. - */ -template class VECTOR, typename T> -class TVecFunctions { -private: - /* - * NOTE: the functions below ARE NOT member methods. They are friend functions - * with they definition inlined with their declaration. This makes these - * template functions available to the compiler when (and only when) this class - * is instantiated, at which point they're only templated on the 2nd parameter - * (the first one, BASE being known). - */ - template - friend constexpr inline - arithmetic_result_t MATH_PURE dot(const VECTOR& lv, const VECTOR& rv) { - arithmetic_result_t r{}; - for (size_t i = 0; i < lv.size(); i++) { - r += lv[i] * rv[i]; - } - return r; - } - - friend inline T MATH_PURE norm(const VECTOR& lv) { - return std::sqrt(dot(lv, lv)); - } - - friend inline T MATH_PURE length(const VECTOR& lv) { - return norm(lv); - } - - friend inline constexpr T MATH_PURE norm2(const VECTOR& lv) { - return dot(lv, lv); - } - - friend inline constexpr T MATH_PURE length2(const VECTOR& lv) { - return norm2(lv); - } - - template - friend inline constexpr - arithmetic_result_t MATH_PURE distance(const VECTOR& lv, const VECTOR& rv) { - return length(rv - lv); - } - - template - friend inline constexpr - arithmetic_result_t MATH_PURE distance2(const VECTOR& lv, const VECTOR& rv) { - return length2(rv - lv); - } - - friend inline VECTOR MATH_PURE normalize(const VECTOR& lv) { - return lv * (T(1) / length(lv)); - } - - friend inline VECTOR MATH_PURE rcp(VECTOR v) { - return T(1) / v; - } - - friend inline constexpr VECTOR MATH_PURE abs(VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = v[i] < 0 ? -v[i] : v[i]; - } - return v; - } - - friend inline VECTOR MATH_PURE floor(VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = std::floor(v[i]); - } - return v; - } - - friend inline VECTOR MATH_PURE ceil(VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = std::ceil(v[i]); - } - return v; - } - - friend inline VECTOR MATH_PURE round(VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = std::round(v[i]); - } - return v; - } - - friend inline VECTOR MATH_PURE inversesqrt(VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = T(1) / std::sqrt(v[i]); - } - return v; - } - - friend inline VECTOR MATH_PURE sqrt(VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = std::sqrt(v[i]); - } - return v; - } - - friend inline VECTOR MATH_PURE cbrt(VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = std::cbrt(v[i]); - } - return v; - } - - friend inline VECTOR MATH_PURE exp(VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = std::exp(v[i]); - } - return v; - } - - friend inline VECTOR MATH_PURE sign(VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = std::copysign(T(1), v[i]); - } - return v; - } - - friend inline VECTOR MATH_PURE pow(VECTOR v, T p) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = std::pow(v[i], p); - } - return v; - } - - friend inline VECTOR MATH_PURE pow(T v, VECTOR p) { - for (size_t i = 0; i < p.size(); i++) { - p[i] = std::pow(v, p[i]); - } - return p; - } - - friend inline VECTOR MATH_PURE pow(VECTOR v, VECTOR p) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = std::pow(v[i], p[i]); - } - return v; - } - - friend inline VECTOR MATH_PURE log(VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = std::log(v[i]); - } - return v; - } - - friend inline VECTOR MATH_PURE log10(VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = std::log10(v[i]); - } - return v; - } - - friend inline VECTOR MATH_PURE log2(VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = std::log2(v[i]); - } - return v; - } - - friend inline constexpr VECTOR MATH_PURE saturate(const VECTOR& lv) { - return clamp(lv, T(0), T(1)); - } - - friend inline constexpr VECTOR MATH_PURE clamp(VECTOR v, T min, T max) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = details::min(max, details::max(min, v[i])); - } - return v; - } - - friend inline constexpr VECTOR MATH_PURE clamp(VECTOR v, VECTOR min, VECTOR max) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = details::min(max[i], details::max(min[i], v[i])); - } - return v; - } - - friend inline constexpr VECTOR MATH_PURE fma(const VECTOR& lv, const VECTOR& rv, - VECTOR a) { - for (size_t i = 0; i < lv.size(); i++) { - a[i] += (lv[i] * rv[i]); - } - return a; - } - - friend inline constexpr VECTOR MATH_PURE min(const VECTOR& u, VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = details::min(u[i], v[i]); - } - return v; - } - - friend inline constexpr VECTOR MATH_PURE max(const VECTOR& u, VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = details::max(u[i], v[i]); - } - return v; - } - - friend inline constexpr T MATH_PURE max(const VECTOR& v) { - T r(v[0]); - for (size_t i = 1; i < v.size(); i++) { - r = max(r, v[i]); - } - return r; - } - - friend inline constexpr T MATH_PURE min(const VECTOR& v) { - T r(v[0]); - for (size_t i = 1; i < v.size(); i++) { - r = min(r, v[i]); - } - return r; - } - - friend inline constexpr VECTOR MATH_PURE mix(const VECTOR& u, VECTOR v, T a) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = u[i] * (T(1) - a) + v[i] * a; - } - return v; - } - - friend inline constexpr VECTOR MATH_PURE smoothstep(T edge0, T edge1, VECTOR v) { - VECTOR t = saturate((v - edge0) / (edge1 - edge0)); - return t * t * (T(3) - T(2) * t); - } - - friend inline constexpr VECTOR MATH_PURE step(T edge, VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = v[i] < edge ? T(0) : T(1); - } - return v; - } - - friend inline constexpr VECTOR MATH_PURE step(VECTOR edge, VECTOR v) { - for (size_t i = 0; i < v.size(); i++) { - v[i] = v[i] < edge[i] ? T(0) : T(1); - } - return v; - } - - friend inline constexpr bool MATH_PURE any(const VECTOR& v) { - for (size_t i = 0; i < v.size(); i++) { - if (v[i] != T(0)) return true; - } - return false; - } - - friend inline constexpr bool MATH_PURE all(const VECTOR& v) { - bool result = true; - for (size_t i = 0; i < v.size(); i++) { - result &= (v[i] != T(0)); - } - return result; - } -}; - -} // namespace filament::math::details - -#endif // TNT_MATH_TVECHELPERS_H diff --git a/windows/include/filament/math/compiler.h b/windows/include/filament/math/compiler.h deleted file mode 100644 index 634e2077..00000000 --- a/windows/include/filament/math/compiler.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_MATH_COMPILER_H -#define TNT_MATH_COMPILER_H - -#include - -#if defined (WIN32) - -#ifdef max -#undef max -#endif - -#ifdef min -#undef min -#endif - -#ifdef far -#undef far -#endif - -#ifdef near -#undef near -#endif - -#endif - -// compatibility with non-clang compilers... -#ifndef __has_attribute -#define __has_attribute(x) 0 -#endif -#ifndef __has_builtin -#define __has_builtin(x) 0 -#endif - -#if __has_builtin(__builtin_expect) -# ifdef __cplusplus -# define MATH_LIKELY( exp ) (__builtin_expect( !!(exp), true )) -# define MATH_UNLIKELY( exp ) (__builtin_expect( !!(exp), false )) -# else -# define MATH_LIKELY( exp ) (__builtin_expect( !!(exp), 1 )) -# define MATH_UNLIKELY( exp ) (__builtin_expect( !!(exp), 0 )) -# endif -#else -# define MATH_LIKELY( exp ) (exp) -# define MATH_UNLIKELY( exp ) (exp) -#endif - -#if __has_attribute(unused) -# define MATH_UNUSED __attribute__((unused)) -#else -# define MATH_UNUSED -#endif - -#if __has_attribute(pure) -# define MATH_PURE __attribute__((pure)) -#else -# define MATH_PURE -#endif - -#ifdef _MSC_VER -# define MATH_EMPTY_BASES __declspec(empty_bases) - -// MSVC does not support loop unrolling hints -# define MATH_NOUNROLL - -// Sadly, MSVC does not support __builtin_constant_p -# ifndef MAKE_CONSTEXPR -# define MAKE_CONSTEXPR(e) (e) -# endif - -// About value initialization, the C++ standard says: -// if T is a class type with a default constructor that is neither user-provided nor deleted -// (that is, it may be a class with an implicitly-defined or defaulted default constructor), -// the object is zero-initialized and then it is default-initialized -// if it has a non-trivial default constructor; -// Unfortunately, MSVC always calls the default constructor, even if it is trivial, which -// breaks constexpr-ness. To workaround this, we're always zero-initializing TVecN<> -# define MATH_CONSTEXPR_INIT {} -# define MATH_DEFAULT_CTOR {} -# define MATH_DEFAULT_CTOR_CONSTEXPR constexpr -# define CONSTEXPR_IF_NOT_MSVC // when declared constexpr, msvc fails with "failure was caused by cast of object of dynamic type" - -#else // _MSC_VER - -# define MATH_EMPTY_BASES -// C++11 allows pragmas to be specified as part of defines using the _Pragma syntax. -# define MATH_NOUNROLL _Pragma("nounroll") - -# ifndef MAKE_CONSTEXPR -# define MAKE_CONSTEXPR(e) __builtin_constant_p(e) ? (e) : (e) -# endif - -# define MATH_CONSTEXPR_INIT -# define MATH_DEFAULT_CTOR = default; -# define MATH_DEFAULT_CTOR_CONSTEXPR -# define CONSTEXPR_IF_NOT_MSVC constexpr - -#endif // _MSC_VER - -namespace filament::math { - -// MSVC 2019 16.4 doesn't seem to like it when we specialize std::is_arithmetic for -// filament::math::half, so we're forced to create our own is_arithmetic here and specialize it -// inside of half.h. -template -struct is_arithmetic : std::integral_constant::value || std::is_floating_point::value> { -}; - -} // filament::math - -#endif // TNT_MATH_COMPILER_H diff --git a/windows/include/filament/math/fast.h b/windows/include/filament/math/fast.h deleted file mode 100644 index 85b990d2..00000000 --- a/windows/include/filament/math/fast.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ - -#ifndef TNT_MATH_FAST_H -#define TNT_MATH_FAST_H - -#include -#include - -#include -#include - -#include - -#ifdef __ARM_NEON -#include -#endif - -namespace filament { -namespace math { -namespace fast { - -// fast cos(x), ~8 cycles (vs. 66 cycles on ARM) -// can be vectorized -// x between -pi and pi -template::value>> -constexpr T MATH_PURE cos(T x) noexcept { - x *= T(F_1_PI / 2); - x -= T(0.25) + std::floor(x + T(0.25)); - x *= T(16.0) * std::abs(x) - T(8.0); - x += T(0.225) * x * (std::abs(x) - T(1.0)); - return x; -} - -// fast sin(x), ~8 cycles (vs. 66 cycles on ARM) -// can be vectorized -// x between -pi and pi -template::value>> -constexpr T MATH_PURE sin(T x) noexcept { - return filament::math::fast::cos(x - T(F_PI_2)); -} - -constexpr inline float MATH_PURE ilog2(float x) noexcept { - union { - float val; - int32_t x; - } u = { x }; - return float(((u.x >> 23) & 0xff) - 127); -} - -constexpr inline float MATH_PURE log2(float x) noexcept { - union { - float val; - int32_t x; - } u = { x }; - float ilog2 = float(((u.x >> 23) & 0xff) - 128); - u.x = (u.x & 0x007fffff) | 0x3f800000; - return ilog2 + (-0.34484843f * u.val + 2.02466578f) * u.val - 0.67487759f; -} - -// fast 1/sqrt(), on ARMv8 this is 5 cycles vs. 7 cycles, so maybe not worth it. -// we keep this mostly for reference and benchmarking. -inline float MATH_PURE isqrt(float x) noexcept { -#if defined(__ARM_NEON) && defined(__aarch64__) - float y = vrsqrtes_f32(x); - return y * vrsqrtss_f32(x, y * y); -#else - return 1 / std::sqrt(x); -#endif -} - -inline double MATH_PURE isqrt(double x) noexcept { -#if defined(__ARM_NEON) && defined(__aarch64__) - double y = vrsqrted_f64(x); - return y * vrsqrtsd_f64(x, y * y); -#else - return 1 / std::sqrt(x); -#endif -} - -inline int signbit(float x) noexcept { -#if __has_builtin(__builtin_signbitf) - // Note: on Android NDK, signbit() is a function call -- not what we want. - return __builtin_signbitf(x); -#else - return std::signbit(x); -#endif -} - -/* - * constexpr exp(), pow(), factorial() - */ - -constexpr double pow(double x, unsigned int y) noexcept { - return y == 0 ? 1.0 : x * pow(x, y - 1); -} - -constexpr unsigned int factorial(unsigned int x) noexcept { - return x == 0 ? 1 : x * factorial(x - 1); -} - -constexpr double exp(double x) noexcept { - return 1.0 + x + pow(x, 2) / factorial(2) + pow(x, 3) / factorial(3) - + pow(x, 4) / factorial(4) + pow(x, 5) / factorial(5) - + pow(x, 6) / factorial(6) + pow(x, 7) / factorial(7) - + pow(x, 8) / factorial(8) + pow(x, 9) / factorial(9); -} - -constexpr float exp(float x) noexcept { - return float(exp(double(x))); -} - -/* - * unsigned saturated arithmetic - */ - -#if defined(__ARM_NEON) && defined(__aarch64__) -inline uint8_t MATH_PURE qadd(uint8_t a, uint8_t b) noexcept { return vuqaddb_s8(a, b); } -inline uint16_t MATH_PURE qadd(uint16_t a, uint16_t b) noexcept { return vuqaddh_s16(a, b); } -inline uint32_t MATH_PURE qadd(uint32_t a, uint32_t b) noexcept { return vuqadds_s32(a, b); } - -inline uint8_t MATH_PURE qsub(uint8_t a, uint8_t b) noexcept { return vqsubb_s8(a, b); } -inline uint16_t MATH_PURE qsub(uint16_t a, uint16_t b) noexcept { return vqsubh_s16(a, b); } -inline uint32_t MATH_PURE qsub(uint32_t a, uint32_t b) noexcept { return vqsubs_s32(a, b); } -#else - -template::value || - std::is_same::value || - std::is_same::value>> -inline T MATH_PURE qadd(T a, T b) noexcept { - T r = a + b; - return r | -T(r < a); -} - -template::value || - std::is_same::value || - std::is_same::value>> -inline T MATH_PURE qsub(T a, T b) noexcept { - T r = a - b; - return r & -T(r <= a); -} - -#endif - -template -inline T MATH_PURE qinc(T a) noexcept { - return qadd(a, T(1)); -} - -template -inline T MATH_PURE qdec(T a) noexcept { - return qsub(a, T(1)); -} - - -} // namespace fast -} // namespace math -} // namespace filament - -#endif // TNT_MATH_FAST_H diff --git a/windows/include/filament/math/half.h b/windows/include/filament/math/half.h deleted file mode 100644 index 779bdbe4..00000000 --- a/windows/include/filament/math/half.h +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ - -#ifndef TNT_MATH_HALF_H -#define TNT_MATH_HALF_H - -#include - -#include -#include - -#include -#include - -namespace filament { -namespace math { - -template -class fp { - static_assert(S + E + M <= 16, "we only support 16-bits max custom floats"); - - using TYPE = uint16_t; // this should be dynamic - - static constexpr unsigned S_SHIFT = E + M; - static constexpr unsigned E_SHIFT = M; - static constexpr unsigned M_SHIFT = 0; - static constexpr unsigned S_MASK = ((1u << S) - 1u) << S_SHIFT; - static constexpr unsigned E_MASK = ((1u << E) - 1u) << E_SHIFT; - static constexpr unsigned M_MASK = ((1u << M) - 1u) << M_SHIFT; - - struct fp32 { - explicit constexpr fp32(float f) noexcept : fp(f) { } // NOLINT - explicit constexpr fp32(uint32_t b) noexcept : bits(b) { } // NOLINT - constexpr void setS(unsigned int s) noexcept { - bits = uint32_t((bits & 0x7FFFFFFFu) | (s << 31u)); - } - constexpr unsigned int getS() const noexcept { return bits >> 31u; } - constexpr unsigned int getE() const noexcept { return (bits >> 23u) & 0xFFu; } - constexpr unsigned int getM() const noexcept { return bits & 0x7FFFFFu; } - union { - uint32_t bits; - float fp; - }; - }; - -public: - static constexpr fp fromf(float f) noexcept { - fp out; - if (S == 0 && f < 0.0f) { - return out; - } - - fp32 in(f); - unsigned int sign = in.getS(); - in.setS(0); - if (MATH_UNLIKELY(in.getE() == 0xFF)) { // inf or nan - out.setE((1u << E) - 1u); - out.setM(in.getM() ? (1u << (M - 1u)) : 0); - } else { - constexpr fp32 infinity(((1u << E) - 1u) << 23u); // fp infinity in fp32 position - constexpr fp32 magic(((1u << (E - 1u)) - 1u) << 23u); // exponent offset - in.bits &= ~((1u << (22 - M)) - 1u); // erase extra mantissa bits - in.bits += 1u << (22 - M); // rounding - in.fp *= magic.fp; // add exponent offset - in.bits = in.bits < infinity.bits ? in.bits : infinity.bits; - out.bits = uint16_t(in.bits >> (23 - M)); - } - out.setS(sign); - return out; - } - - static constexpr float tof(fp in) noexcept { - constexpr fp32 magic ((0xFE - ((1u << (E - 1u)) - 1u)) << 23u); - constexpr fp32 infnan((0x80 + ((1u << (E - 1u)) - 1u)) << 23u); - fp32 out((in.bits & ((1u << (E + M)) - 1u)) << (23u - M)); - out.fp *= magic.fp; - if (out.fp >= infnan.fp) { - out.bits |= 0xFFu << 23u; - } - out.bits |= (in.bits & S_MASK) << (31u - S_SHIFT); - return out.fp; - } - - TYPE bits{}; - static constexpr size_t getBitCount() noexcept { return S + E + M; } - constexpr fp() noexcept = default; - explicit constexpr fp(TYPE bits) noexcept : bits(bits) { } - constexpr void setS(unsigned int s) noexcept { bits = TYPE((bits & ~S_MASK) | (s << S_SHIFT)); } - constexpr void setE(unsigned int s) noexcept { bits = TYPE((bits & ~E_MASK) | (s << E_SHIFT)); } - constexpr void setM(unsigned int s) noexcept { bits = TYPE((bits & ~M_MASK) | (s << M_SHIFT)); } - constexpr unsigned int getS() const noexcept { return (bits & S_MASK) >> S_SHIFT; } - constexpr unsigned int getE() const noexcept { return (bits & E_MASK) >> E_SHIFT; } - constexpr unsigned int getM() const noexcept { return (bits & M_MASK) >> M_SHIFT; } -}; - -/* - * half-float - * - * 1 5 10 - * +-+------+------------+ - * |s|eee.ee|mm.mmmm.mmmm| - * +-+------+------------+ - * - * minimum (denormal) value: 2^-24 = 5.96e-8 - * minimum (normal) value: 2^-14 = 6.10e-5 - * maximum value: (2 - 2^-10) * 2^15 = 65504 - * - * Integers between 0 and 2048 can be represented exactly - */ - -#ifdef __ARM_NEON - -using half = __fp16; - -inline constexpr uint16_t getBits(half const& h) noexcept { - return MAKE_CONSTEXPR(reinterpret_cast(h)); -} - -inline constexpr half makeHalf(uint16_t bits) noexcept { - return MAKE_CONSTEXPR(reinterpret_cast(bits)); -} - -#else - -class half { - using fp16 = fp<1, 5, 10>; - -public: - half() = default; - constexpr half(float v) noexcept : mBits(fp16::fromf(v)) { } // NOLINT - constexpr operator float() const noexcept { return fp16::tof(mBits); } // NOLINT - -private: - // these are friends, not members (and they're not "private") - friend constexpr uint16_t getBits(half const& h) noexcept { return h.mBits.bits; } - friend constexpr inline half makeHalf(uint16_t bits) noexcept; - - enum Binary { binary }; - explicit constexpr half(Binary, uint16_t bits) noexcept : mBits(bits) { } - - fp16 mBits; -}; - -constexpr inline half makeHalf(uint16_t bits) noexcept { - return half(half::binary, bits); -} - -#endif // __ARM_NEON - -inline constexpr half operator "" _h(long double v) { - return half( static_cast(v) ); -} - -template<> struct is_arithmetic : public std::true_type {}; - -} // namespace math -} // namespace filament - -namespace std { - -template<> struct is_floating_point : public std::true_type {}; - -// note: this shouldn't be needed (is_floating_point<> is enough) but some version of msvc need it -// This stopped working with MSVC 2019 16.4, so we specialize our own version of is_arithmetic in -// the math::filament namespace (see above). -template<> struct is_arithmetic : public std::true_type {}; - -template<> -class numeric_limits { -public: - typedef filament::math::half type; - - static constexpr const bool is_specialized = true; - static constexpr const bool is_signed = true; - static constexpr const bool is_integer = false; - static constexpr const bool is_exact = false; - static constexpr const bool has_infinity = true; - static constexpr const bool has_quiet_NaN = true; - static constexpr const bool has_signaling_NaN = false; - static constexpr const float_denorm_style has_denorm = denorm_absent; - static constexpr const bool has_denorm_loss = true; - static constexpr const bool is_iec559 = false; - static constexpr const bool is_bounded = true; - static constexpr const bool is_modulo = false; - static constexpr const bool traps = false; - static constexpr const bool tinyness_before = false; - static constexpr const float_round_style round_style = round_indeterminate; - - static constexpr const int digits = 11; - static constexpr const int digits10 = 3; - static constexpr const int max_digits10 = 5; - static constexpr const int radix = 2; - static constexpr const int min_exponent = -13; - static constexpr const int min_exponent10 = -4; - static constexpr const int max_exponent = 16; - static constexpr const int max_exponent10 = 4; - - inline static constexpr type round_error() noexcept { return filament::math::makeHalf(0x3800); } - inline static constexpr type min() noexcept { return filament::math::makeHalf(0x0400); } - inline static constexpr type max() noexcept { return filament::math::makeHalf(0x7bff); } - inline static constexpr type lowest() noexcept { return filament::math::makeHalf(0xfbff); } - inline static constexpr type epsilon() noexcept { return filament::math::makeHalf(0x1400); } - inline static constexpr type infinity() noexcept { return filament::math::makeHalf(0x7c00); } - inline static constexpr type quiet_NaN() noexcept { return filament::math::makeHalf(0x7fff); } - inline static constexpr type denorm_min() noexcept { return filament::math::makeHalf(0x0001); } - inline static constexpr type signaling_NaN() noexcept { return filament::math::makeHalf(0x7dff); } -}; - -} // namespace std - -#endif // TNT_MATH_HALF_H diff --git a/windows/include/filament/math/mat2.h b/windows/include/filament/math/mat2.h deleted file mode 100644 index 551fe445..00000000 --- a/windows/include/filament/math/mat2.h +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Copyright 2013 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. - */ - -#ifndef TNT_MATH_MAT2_H -#define TNT_MATH_MAT2_H - -#include -#include -#include - -#include -#include - -namespace filament { -namespace math { -// ------------------------------------------------------------------------------------- -namespace details { - -/** - * A 2x2 column-major matrix class. - * - * Conceptually a 2x2 matrix is a an array of 2 column vec2: - * - * mat2 m = - * \f$ - * \left( - * \begin{array}{cc} - * m[0] & m[1] \\ - * \end{array} - * \right) - * \f$ - * = - * \f$ - * \left( - * \begin{array}{cc} - * m[0][0] & m[1][0] \\ - * m[0][1] & m[1][1] \\ - * \end{array} - * \right) - * \f$ - * = - * \f$ - * \left( - * \begin{array}{cc} - * m(0,0) & m(0,1) \\ - * m(1,0) & m(1,1) \\ - * \end{array} - * \right) - * \f$ - * - * m[n] is the \f$ n^{th} \f$ column of the matrix and is a vec2. - * - */ -template -class MATH_EMPTY_BASES TMat22 : - public TVecUnaryOperators, - public TVecComparisonOperators, - public TVecAddOperators, - public TMatProductOperators, - public TMatSquareFunctions, - public TMatHelpers { -public: - enum no_init { - NO_INIT - }; - typedef T value_type; - typedef T& reference; - typedef T const& const_reference; - typedef size_t size_type; - typedef TVec2 col_type; - typedef TVec2 row_type; - - static constexpr size_t COL_SIZE = col_type::SIZE; // size of a column (i.e.: number of rows) - static constexpr size_t ROW_SIZE = row_type::SIZE; // size of a row (i.e.: number of columns) - static constexpr size_t NUM_ROWS = COL_SIZE; - static constexpr size_t NUM_COLS = ROW_SIZE; - -private: - /* - * <-- N columns --> - * - * a[0][0] a[1][0] a[2][0] ... a[N][0] ^ - * a[0][1] a[1][1] a[2][1] ... a[N][1] | - * a[0][2] a[1][2] a[2][2] ... a[N][2] M rows - * ... | - * a[0][M] a[1][M] a[2][M] ... a[N][M] v - * - * COL_SIZE = M - * ROW_SIZE = N - * m[0] = [ a[0][0] a[0][1] a[0][2] ... a[0][M] ] - */ - - col_type m_value[NUM_COLS]; - -public: - // array access - inline constexpr col_type const& operator[](size_t column) const noexcept { - assert(column < NUM_COLS); - return m_value[column]; - } - - inline constexpr col_type& operator[](size_t column) noexcept { - assert(column < NUM_COLS); - return m_value[column]; - } - - /** - * constructors - */ - - /** - * leaves object uninitialized. use with caution. - */ - constexpr explicit TMat22(no_init) noexcept {} - - - /** - * initialize to identity. - * - * \f$ - * \left( - * \begin{array}{cc} - * 1 & 0 \\ - * 0 & 1 \\ - * \end{array} - * \right) - * \f$ - */ - constexpr TMat22() noexcept ; - - /** - * initialize to Identity*scalar. - * - * \f$ - * \left( - * \begin{array}{cc} - * v & 0 \\ - * 0 & v \\ - * \end{array} - * \right) - * \f$ - */ - template - constexpr explicit TMat22(U v) noexcept; - - /** - * sets the diagonal to a vector. - * - * \f$ - * \left( - * \begin{array}{cc} - * v[0] & 0 \\ - * 0 & v[1] \\ - * \end{array} - * \right) - * \f$ - */ - template - constexpr explicit TMat22(const TVec2& v) noexcept; - - /** - * construct from another matrix of the same size - */ - template - constexpr explicit TMat22(const TMat22& rhs) noexcept; - - /** - * construct from 2 column vectors. - * - * \f$ - * \left( - * \begin{array}{cc} - * v0 & v1 \\ - * \end{array} - * \right) - * \f$ - */ - template - constexpr TMat22(const TVec2& v0, const TVec2& v1) noexcept; - - /** construct from 4 elements in column-major form. - * - * \f$ - * \left( - * \begin{array}{cc} - * m[0][0] & m[1][0] \\ - * m[0][1] & m[1][1] \\ - * \end{array} - * \right) - * \f$ - */ - template< - typename A, typename B, - typename C, typename D> - constexpr explicit TMat22(A m00, B m01, C m10, D m11) noexcept ; - - - struct row_major_init { - template - constexpr explicit row_major_init(A m00, B m01, C m10, D m11) noexcept - : m(m00, m10, m01, m11) {} - - private: - friend TMat22; - TMat22 m; - }; - - constexpr explicit TMat22(row_major_init c) noexcept : TMat22(std::move(c.m)) {} - - /** - * Rotate by radians in the 2D plane - */ - static TMat22 rotate(T radian) noexcept { - TMat22 r(TMat22::NO_INIT); - T c = std::cos(radian); - T s = std::sin(radian); - r[0][0] = c; - r[1][1] = c; - r[0][1] = s; - r[1][0] = -s; - return r; - } - - // returns false if the two matrices are different. May return false if they're the - // same, with some elements only differing by +0 or -0. Behaviour is undefined with NaNs. - static constexpr bool fuzzyEqual(TMat22 l, TMat22 r) noexcept { - uint64_t const* const li = reinterpret_cast(&l); - uint64_t const* const ri = reinterpret_cast(&r); - uint64_t result = 0; - // For some reason clang is not able to vectoize this loop when the number of iteration - // is known and constant (!?!?!). Still this is better than operator==. -#if defined(__clang__) -#pragma clang loop vectorize_width(2) -#endif - for (size_t i = 0; i < sizeof(TMat22) / sizeof(uint64_t); i++) { - result |= li[i] ^ ri[i]; - } - return result != 0; - } - - template - static constexpr TMat22 translation(const TVec2& t) noexcept { - TMat22 r; - r[2] = t; - return r; - } - - template - static constexpr TMat22 scaling(const TVec2& s) noexcept { - return TMat22{ s }; - } - - template - static constexpr TMat22 scaling(A s) noexcept { - return TMat22{ TVec2{ s, s }}; - } -}; - -// ---------------------------------------------------------------------------------------- -// Constructors -// ---------------------------------------------------------------------------------------- - -// Since the matrix code could become pretty big quickly, we don't inline most -// operations. - -template -constexpr TMat22::TMat22() noexcept - : m_value{ col_type(1, 0), col_type(0, 1) } { -} - -template -template -constexpr TMat22::TMat22(U v) noexcept - : m_value{ col_type(v, 0), col_type(0, v) } { -} - -template -template -constexpr TMat22::TMat22(const TVec2& v) noexcept - : m_value{ col_type(v[0], 0), col_type(0, v[1]) } { -} - -// construct from 4 scalars. Note that the arrangement -// of values in the constructor is the transpose of the matrix -// notation. -template -template -constexpr TMat22::TMat22(A m00, B m01, C m10, D m11) noexcept - : m_value{ col_type(m00, m01), col_type(m10, m11) } { -} - -template -template -constexpr TMat22::TMat22(const TMat22& rhs) noexcept { - for (size_t col = 0; col < NUM_COLS; ++col) { - m_value[col] = col_type(rhs[col]); - } -} - -// Construct from 2 column vectors. -template -template -constexpr TMat22::TMat22(const TVec2& v0, const TVec2& v1) noexcept - : m_value{ v0, v1 } { -} - -} // namespace details - -// ---------------------------------------------------------------------------------------- - -typedef details::TMat22 mat2; -typedef details::TMat22 mat2f; - -// ---------------------------------------------------------------------------------------- -} // namespace math -} // namespace filament - -namespace std { -template -constexpr void swap(filament::math::details::TMat22& lhs, - filament::math::details::TMat22& rhs) noexcept { - // This generates much better code than the default implementation - // It's unclear why, I believe this is due to an optimization bug in the clang. - // - // filament::math::details::TMat22 t(lhs); - // lhs = rhs; - // rhs = t; - // - // clang always copy lhs on the stack, even if it's never using it (it's using the - // copy it has in registers). - - const T t00 = lhs[0][0]; - const T t01 = lhs[0][1]; - const T t10 = lhs[1][0]; - const T t11 = lhs[1][1]; - - lhs[0][0] = rhs[0][0]; - lhs[0][1] = rhs[0][1]; - lhs[1][0] = rhs[1][0]; - lhs[1][1] = rhs[1][1]; - - rhs[0][0] = t00; - rhs[0][1] = t01; - rhs[1][0] = t10; - rhs[1][1] = t11; -} -} - -#endif // TNT_MATH_MAT2_H diff --git a/windows/include/filament/math/mat3.h b/windows/include/filament/math/mat3.h deleted file mode 100644 index d7b673a3..00000000 --- a/windows/include/filament/math/mat3.h +++ /dev/null @@ -1,490 +0,0 @@ -/* - * Copyright 2013 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. - */ - -#ifndef TNT_MATH_MAT3_H -#define TNT_MATH_MAT3_H - -#include -#include -#include -#include - -#include -#include -#include - -namespace filament { -namespace math { -// ------------------------------------------------------------------------------------- -namespace details { - -/** - * A 3x3 column-major matrix class. - * - * Conceptually a 3x3 matrix is a an array of 3 column vec3: - * - * mat3 m = - * \f$ - * \left( - * \begin{array}{ccc} - * m[0] & m[1] & m[2] \\ - * \end{array} - * \right) - * \f$ - * = - * \f$ - * \left( - * \begin{array}{ccc} - * m[0][0] & m[1][0] & m[2][0] \\ - * m[0][1] & m[1][1] & m[2][1] \\ - * m[0][2] & m[1][2] & m[2][2] \\ - * \end{array} - * \right) - * \f$ - * = - * \f$ - * \left( - * \begin{array}{ccc} - * m(0,0) & m(0,1) & m(0,2) \\ - * m(1,0) & m(1,1) & m(1,2) \\ - * m(2,0) & m(2,1) & m(2,2) \\ - * \end{array} - * \right) - * \f$ - * - * m[n] is the \f$ n^{th} \f$ column of the matrix and is a vec3. - * - */ -template -class MATH_EMPTY_BASES TMat33 : - public TVecUnaryOperators, - public TVecComparisonOperators, - public TVecAddOperators, - public TMatProductOperators, - public TMatSquareFunctions, - public TMatTransform, - public TMatHelpers { -public: - enum no_init { - NO_INIT - }; - typedef T value_type; - typedef T& reference; - typedef T const& const_reference; - typedef size_t size_type; - typedef TVec3 col_type; - typedef TVec3 row_type; - - static constexpr size_t COL_SIZE = col_type::SIZE; // size of a column (i.e.: number of rows) - static constexpr size_t ROW_SIZE = row_type::SIZE; // size of a row (i.e.: number of columns) - static constexpr size_t NUM_ROWS = COL_SIZE; - static constexpr size_t NUM_COLS = ROW_SIZE; - -private: - /* - * <-- N columns --> - * - * a[0][0] a[1][0] a[2][0] ... a[N][0] ^ - * a[0][1] a[1][1] a[2][1] ... a[N][1] | - * a[0][2] a[1][2] a[2][2] ... a[N][2] M rows - * ... | - * a[0][M] a[1][M] a[2][M] ... a[N][M] v - * - * COL_SIZE = M - * ROW_SIZE = N - * m[0] = [ a[0][0] a[0][1] a[0][2] ... a[0][M] ] - */ - - col_type m_value[NUM_COLS]; - -public: - // array access - inline constexpr col_type const& operator[](size_t column) const noexcept { - assert(column < NUM_COLS); - return m_value[column]; - } - - inline constexpr col_type& operator[](size_t column) noexcept { - assert(column < NUM_COLS); - return m_value[column]; - } - - /** - * constructors - */ - - /** - * leaves object uninitialized. use with caution. - */ - constexpr explicit TMat33(no_init) noexcept {} - - - /** - * initialize to identity. - * - * \f$ - * \left( - * \begin{array}{ccc} - * 1 & 0 & 0 \\ - * 0 & 1 & 0 \\ - * 0 & 0 & 1 \\ - * \end{array} - * \right) - * \f$ - */ - constexpr TMat33() noexcept; - - /** - * initialize to Identity*scalar. - * - * \f$ - * \left( - * \begin{array}{ccc} - * v & 0 & 0 \\ - * 0 & v & 0 \\ - * 0 & 0 & v \\ - * \end{array} - * \right) - * \f$ - */ - template - constexpr explicit TMat33(U v) noexcept; - - /** - * sets the diagonal to a vector. - * - * \f$ - * \left( - * \begin{array}{ccc} - * v[0] & 0 & 0 \\ - * 0 & v[1] & 0 \\ - * 0 & 0 & v[2] \\ - * \end{array} - * \right) - * \f$ - */ - template - constexpr explicit TMat33(const TVec3& v) noexcept; - - /** - * construct from another matrix of the same size - */ - template - constexpr explicit TMat33(const TMat33& rhs) noexcept; - - /** - * construct from 3 column vectors. - * - * \f$ - * \left( - * \begin{array}{ccc} - * v0 & v1 & v2 \\ - * \end{array} - * \right) - * \f$ - */ - template - constexpr TMat33(const TVec3& v0, const TVec3& v1, const TVec3& v2) noexcept; - - /** construct from 9 elements in column-major form. - * - * \f$ - * \left( - * \begin{array}{ccc} - * m[0][0] & m[1][0] & m[2][0] \\ - * m[0][1] & m[1][1] & m[2][1] \\ - * m[0][2] & m[1][2] & m[2][2] \\ - * \end{array} - * \right) - * \f$ - */ - template< - typename A, typename B, typename C, - typename D, typename E, typename F, - typename G, typename H, typename I> - constexpr explicit TMat33(A m00, B m01, C m02, - D m10, E m11, F m12, - G m20, H m21, I m22) noexcept; - - - struct row_major_init { - template< - typename A, typename B, typename C, - typename D, typename E, typename F, - typename G, typename H, typename I> - constexpr explicit row_major_init(A m00, B m01, C m02, - D m10, E m11, F m12, - G m20, H m21, I m22) noexcept - : m(m00, m10, m20, - m01, m11, m21, - m02, m12, m22) {} - - private: - friend TMat33; - TMat33 m; - }; - - constexpr explicit TMat33(row_major_init c) noexcept : TMat33(std::move(c.m)) {} - - /** - * construct from a quaternion - */ - template - constexpr explicit TMat33(const TQuaternion& q) noexcept; - - /** - * orthogonalize only works on matrices of size 3x3 - */ - friend inline - constexpr TMat33 orthogonalize(const TMat33& m) noexcept { - TMat33 ret(TMat33::NO_INIT); - ret[0] = normalize(m[0]); - ret[2] = normalize(cross(ret[0], m[1])); - ret[1] = normalize(cross(ret[2], ret[0])); - return ret; - } - - /** - * Returns a matrix suitable for transforming normals - * - * Note that the inverse-transpose of a matrix is equal to its cofactor matrix divided by its - * determinant: - * - * transpose(inverse(M)) = cof(M) / det(M) - * - * The cofactor matrix is faster to compute than the inverse-transpose, and it can be argued - * that it is a more correct way of transforming normals anyway. Some references from Dale - * Weiler, Nathan Reed, Inigo Quilez, and Eric Lengyel: - * - * - https://github.com/graphitemaster/normals_revisited - * - http://www.reedbeta.com/blog/normals-inverse-transpose-part-1/ - * - https://www.shadertoy.com/view/3s33zj - * - FGED Volume 1, section 1.7.5 "Inverses of Small Matrices" - * - FGED Volume 1, section 3.2.2 "Transforming Normal Vectors" - * - * In "Transforming Normal Vectors", Lengyel notes that there are two types of transformed - * normals: one that uses the transposed adjugate (aka cofactor matrix) and one that uses the - * transposed inverse. He goes on to say that this difference is inconsequential, except when - * mirroring is involved. - * - * @param m the transform applied to vertices - * @return a matrix to apply to normals - * - * @warning normals transformed by this matrix must be normalized - */ - static constexpr TMat33 getTransformForNormals(const TMat33& m) noexcept { - return matrix::cof(m); - } - - /** - * Packs the tangent frame represented by the specified matrix into a quaternion. - * Reflection is preserved by encoding it as the sign of the w component in the - * resulting quaternion. Since -0 cannot always be represented on the GPU, this - * function computes a bias to ensure values are always either positive or negative, - * never 0. The bias is computed based on the specified storageSize, which defaults - * to 2 bytes, making the resulting quaternion suitable for storage into an SNORM16 - * vector. - */ - static constexpr TQuaternion packTangentFrame( - const TMat33& m, size_t storageSize = sizeof(int16_t)) noexcept; - - template - static constexpr TMat33 translation(const TVec3& t) noexcept { - TMat33 r; - r[2] = t; - return r; - } - - template - static constexpr TMat33 scaling(const TVec3& s) noexcept { - return TMat33{ s }; - } - - template - static constexpr TMat33 scaling(A s) noexcept { - return TMat33{ TVec3{ s }}; - } -}; - -// ---------------------------------------------------------------------------------------- -// Constructors -// ---------------------------------------------------------------------------------------- - -// Since the matrix code could become pretty big quickly, we don't inline most -// operations. - -template -constexpr TMat33::TMat33() noexcept - : m_value{ - col_type(1, 0, 0), - col_type(0, 1, 0), - col_type(0, 0, 1) } { -} - -template -template -constexpr TMat33::TMat33(U v) noexcept - : m_value{ - col_type(v, 0, 0), - col_type(0, v, 0), - col_type(0, 0, v) } { -} - -template -template -constexpr TMat33::TMat33(const TVec3& v) noexcept - : m_value{ - col_type(v[0], 0, 0), - col_type(0, v[1], 0), - col_type(0, 0, v[2]) } { -} - -// construct from 16 scalars. Note that the arrangement -// of values in the constructor is the transpose of the matrix -// notation. -template -template< - typename A, typename B, typename C, - typename D, typename E, typename F, - typename G, typename H, typename I> -constexpr TMat33::TMat33(A m00, B m01, C m02, - D m10, E m11, F m12, - G m20, H m21, I m22) noexcept - : m_value{ - col_type(m00, m01, m02), - col_type(m10, m11, m12), - col_type(m20, m21, m22) } { -} - -template -template -constexpr TMat33::TMat33(const TMat33& rhs) noexcept { - for (size_t col = 0; col < NUM_COLS; ++col) { - m_value[col] = col_type(rhs[col]); - } -} - -// Construct from 3 column vectors. -template -template -constexpr TMat33::TMat33(const TVec3& v0, const TVec3& v1, const TVec3& v2) noexcept - : m_value{ v0, v1, v2 } { -} - -template -template -constexpr TMat33::TMat33(const TQuaternion& q) noexcept : m_value{} { - const U n = q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w; - const U s = n > 0 ? 2 / n : 0; - const U x = s * q.x; - const U y = s * q.y; - const U z = s * q.z; - const U xx = x * q.x; - const U xy = x * q.y; - const U xz = x * q.z; - const U xw = x * q.w; - const U yy = y * q.y; - const U yz = y * q.z; - const U yw = y * q.w; - const U zz = z * q.z; - const U zw = z * q.w; - m_value[0] = col_type(1 - yy - zz, xy + zw, xz - yw); // NOLINT - m_value[1] = col_type(xy - zw, 1 - xx - zz, yz + xw); // NOLINT - m_value[2] = col_type(xz + yw, yz - xw, 1 - xx - yy); // NOLINT -} - -//------------------------------------------------------------------------------ -template -constexpr TQuaternion TMat33::packTangentFrame(const TMat33& m, size_t storageSize) noexcept { - TQuaternion q = TMat33{ m[0], cross(m[2], m[0]), m[2] }.toQuaternion(); - q = positive(normalize(q)); - - // Ensure w is never 0.0 - // Bias is 2^(nb_bits - 1) - 1 - const T bias = T(1.0) / T((1 << (storageSize * CHAR_BIT - 1)) - 1); - if (q.w < bias) { - q.w = bias; - - const T factor = (T)(std::sqrt(1.0 - (double)bias * (double)bias)); - q.xyz *= factor; - } - - // If there's a reflection ((n x t) . b <= 0), make sure w is negative - if (dot(cross(m[0], m[2]), m[1]) < T(0)) { - q = -q; - } - - return q; -} - -} // namespace details - -// ---------------------------------------------------------------------------------------- - -typedef details::TMat33 mat3; -typedef details::TMat33 mat3f; - -// ---------------------------------------------------------------------------------------- -} // namespace math -} // namespace filament - -namespace std { -template -constexpr void swap(filament::math::details::TMat33& lhs, - filament::math::details::TMat33& rhs) noexcept { - // This generates much better code than the default implementation - // It's unclear why, I believe this is due to an optimization bug in the clang. - // - // filament::math::details::TMat33 t(lhs); - // lhs = rhs; - // rhs = t; - // - // clang always copy lhs on the stack, even if it's never using it (it's using the - // copy it has in registers). - - const T t00 = lhs[0][0]; - const T t01 = lhs[0][1]; - const T t02 = lhs[0][2]; - const T t10 = lhs[1][0]; - const T t11 = lhs[1][1]; - const T t12 = lhs[1][2]; - const T t20 = lhs[2][0]; - const T t21 = lhs[2][1]; - const T t22 = lhs[2][2]; - - lhs[0][0] = rhs[0][0]; - lhs[0][1] = rhs[0][1]; - lhs[0][2] = rhs[0][2]; - lhs[1][0] = rhs[1][0]; - lhs[1][1] = rhs[1][1]; - lhs[1][2] = rhs[1][2]; - lhs[2][0] = rhs[2][0]; - lhs[2][1] = rhs[2][1]; - lhs[2][2] = rhs[2][2]; - - rhs[0][0] = t00; - rhs[0][1] = t01; - rhs[0][2] = t02; - rhs[1][0] = t10; - rhs[1][1] = t11; - rhs[1][2] = t12; - rhs[2][0] = t20; - rhs[2][1] = t21; - rhs[2][2] = t22; -} -} - -#endif // TNT_MATH_MAT3_H diff --git a/windows/include/filament/math/mat4.h b/windows/include/filament/math/mat4.h deleted file mode 100644 index fa5301ad..00000000 --- a/windows/include/filament/math/mat4.h +++ /dev/null @@ -1,682 +0,0 @@ -/* - * Copyright 2013 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. - */ - -#ifndef TNT_MATH_MAT4_H -#define TNT_MATH_MAT4_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace filament { -namespace math { -// ------------------------------------------------------------------------------------- -namespace details { - -template -class TQuaternion; - -/** - * A 4x4 column-major matrix class. - * - * Conceptually a 4x4 matrix is a an array of 4 column double4: - * - * mat4 m = - * \f$ - * \left( - * \begin{array}{cccc} - * m[0] & m[1] & m[2] & m[3] \\ - * \end{array} - * \right) - * \f$ - * = - * \f$ - * \left( - * \begin{array}{cccc} - * m[0][0] & m[1][0] & m[2][0] & m[3][0] \\ - * m[0][1] & m[1][1] & m[2][1] & m[3][1] \\ - * m[0][2] & m[1][2] & m[2][2] & m[3][2] \\ - * m[0][3] & m[1][3] & m[2][3] & m[3][3] \\ - * \end{array} - * \right) - * \f$ - * = - * \f$ - * \left( - * \begin{array}{cccc} - * m(0,0) & m(0,1) & m(0,2) & m(0,3) \\ - * m(1,0) & m(1,1) & m(1,2) & m(1,3) \\ - * m(2,0) & m(2,1) & m(2,2) & m(2,3) \\ - * m(3,0) & m(3,1) & m(3,2) & m(3,3) \\ - * \end{array} - * \right) - * \f$ - * - * m[n] is the \f$ n^{th} \f$ column of the matrix and is a double4. - * - */ -template -class MATH_EMPTY_BASES TMat44 : - public TVecUnaryOperators, - public TVecComparisonOperators, - public TVecAddOperators, - public TMatProductOperators, - public TMatSquareFunctions, - public TMatTransform, - public TMatHelpers { -public: - enum no_init { - NO_INIT - }; - typedef T value_type; - typedef T& reference; - typedef T const& const_reference; - typedef size_t size_type; - typedef TVec4 col_type; - typedef TVec4 row_type; - - static constexpr size_t COL_SIZE = col_type::SIZE; // size of a column (i.e.: number of rows) - static constexpr size_t ROW_SIZE = row_type::SIZE; // size of a row (i.e.: number of columns) - static constexpr size_t NUM_ROWS = COL_SIZE; - static constexpr size_t NUM_COLS = ROW_SIZE; - -private: - /* - * <-- N columns --> - * - * a[0][0] a[1][0] a[2][0] ... a[N][0] ^ - * a[0][1] a[1][1] a[2][1] ... a[N][1] | - * a[0][2] a[1][2] a[2][2] ... a[N][2] M rows - * ... | - * a[0][M] a[1][M] a[2][M] ... a[N][M] v - * - * COL_SIZE = M - * ROW_SIZE = N - * m[0] = [ a[0][0] a[0][1] a[0][2] ... a[0][M] ] - */ - - col_type m_value[NUM_COLS]; - -public: - // array access - inline constexpr col_type const& operator[](size_t column) const noexcept { - assert(column < NUM_COLS); - return m_value[column]; - } - - inline constexpr col_type& operator[](size_t column) noexcept { - assert(column < NUM_COLS); - return m_value[column]; - } - - /* - * constructors - */ - - // leaves object uninitialized. use with caution. - constexpr explicit TMat44(no_init) noexcept {} - - /** initialize to identity. - * - * \f$ - * \left( - * \begin{array}{cccc} - * 1 & 0 & 0 & 0 \\ - * 0 & 1 & 0 & 0 \\ - * 0 & 0 & 1 & 0 \\ - * 0 & 0 & 0 & 1 \\ - * \end{array} - * \right) - * \f$ - */ - constexpr TMat44() noexcept; - - /** initialize to Identity*scalar. - * - * \f$ - * \left( - * \begin{array}{cccc} - * v & 0 & 0 & 0 \\ - * 0 & v & 0 & 0 \\ - * 0 & 0 & v & 0 \\ - * 0 & 0 & 0 & v \\ - * \end{array} - * \right) - * \f$ - */ - template - constexpr explicit TMat44(U v) noexcept; - - /** sets the diagonal to a vector. - * - * \f$ - * \left( - * \begin{array}{cccc} - * v[0] & 0 & 0 & 0 \\ - * 0 & v[1] & 0 & 0 \\ - * 0 & 0 & v[2] & 0 \\ - * 0 & 0 & 0 & v[3] \\ - * \end{array} - * \right) - * \f$ - */ - template - constexpr explicit TMat44(const TVec4& v) noexcept; - - // construct from another matrix of the same size - template - constexpr explicit TMat44(const TMat44& rhs) noexcept; - - /** construct from 4 column vectors. - * - * \f$ - * \left( - * \begin{array}{cccc} - * v0 & v1 & v2 & v3 \\ - * \end{array} - * \right) - * \f$ - */ - template - constexpr TMat44(const TVec4& v0, const TVec4& v1, const TVec4& v2, - const TVec4& v3) noexcept; - - /** construct from 16 elements in column-major form. - * - * \f$ - * \left( - * \begin{array}{cccc} - * m[0][0] & m[1][0] & m[2][0] & m[3][0] \\ - * m[0][1] & m[1][1] & m[2][1] & m[3][1] \\ - * m[0][2] & m[1][2] & m[2][2] & m[3][2] \\ - * m[0][3] & m[1][3] & m[2][3] & m[3][3] \\ - * \end{array} - * \right) - * \f$ - */ - template< - typename A, typename B, typename C, typename D, - typename E, typename F, typename G, typename H, - typename I, typename J, typename K, typename L, - typename M, typename N, typename O, typename P> - constexpr explicit TMat44(A m00, B m01, C m02, D m03, - E m10, F m11, G m12, H m13, - I m20, J m21, K m22, L m23, - M m30, N m31, O m32, P m33) noexcept; - - - struct row_major_init { - template< - typename A, typename B, typename C, typename D, - typename E, typename F, typename G, typename H, - typename I, typename J, typename K, typename L, - typename M, typename N, typename O, typename P> - constexpr explicit row_major_init(A m00, B m01, C m02, D m03, - E m10, F m11, G m12, H m13, - I m20, J m21, K m22, L m23, - M m30, N m31, O m32, P m33) noexcept - : m(m00, m10, m20, m30, - m01, m11, m21, m31, - m02, m12, m22, m32, - m03, m13, m23, m33) {} - - private: - friend TMat44; - TMat44 m; - }; - - constexpr explicit TMat44(row_major_init c) noexcept : TMat44(std::move(c.m)) {} - - /** - * construct from a quaternion - */ - template - constexpr explicit TMat44(const TQuaternion& q) noexcept; - - /** - * construct from a 3x3 matrix - */ - template - constexpr explicit TMat44(const TMat33& matrix) noexcept; - - /** - * construct from a 3x3 matrix and 3d translation - */ - template - constexpr TMat44(const TMat33& matrix, const TVec3& translation) noexcept; - - /** - * construct from a 3x3 matrix and 4d last column. - */ - template - constexpr TMat44(const TMat33& matrix, const TVec4& column3) noexcept; - - /* - * helpers - */ - - // returns false if the two matrices are different. May return false if they're the - // same, with some elements only differing by +0 or -0. Behaviour is undefined with NaNs. - static constexpr bool fuzzyEqual(TMat44 const& l, TMat44 const& r) noexcept { - uint64_t const* const li = reinterpret_cast(&l); - uint64_t const* const ri = reinterpret_cast(&r); - uint64_t result = 0; - // For some reason clang is not able to vectorize this loop when the number of iteration - // is known and constant (!?!?!). Still this is better than operator==. - for (size_t i = 0; i < sizeof(TMat44) / sizeof(uint64_t); i++) { - result |= li[i] ^ ri[i]; - } - return result != 0; - } - - static constexpr TMat44 ortho(T left, T right, T bottom, T top, T near, T far) noexcept; - - static constexpr TMat44 frustum(T left, T right, T bottom, T top, T near, T far) noexcept; - - enum class Fov { - HORIZONTAL, - VERTICAL - }; - static TMat44 perspective(T fov, T aspect, T near, T far, Fov direction = Fov::VERTICAL) noexcept; - - template - static TMat44 lookAt(const TVec3& eye, const TVec3& center, const TVec3& up) noexcept; - - template - static constexpr TVec3 project(const TMat44& projectionMatrix, TVec3 vertice) noexcept{ - TVec4 r = projectionMatrix * TVec4{ vertice, 1 }; - return TVec3{ r[0], r[1], r[2] } * (1 / r[3]); - } - - template - static constexpr TVec4 project(const TMat44& projectionMatrix, TVec4 vertice) noexcept{ - vertice = projectionMatrix * vertice; - return { TVec3{ vertice[0], vertice[1], vertice[2] } * (1 / vertice[3]), 1 }; - } - - /** - * Constructs a 3x3 matrix from the upper-left corner of this 4x4 matrix - */ - inline constexpr TMat33 upperLeft() const noexcept { - const TVec3 v0 = { m_value[0][0], m_value[0][1], m_value[0][2] }; - const TVec3 v1 = { m_value[1][0], m_value[1][1], m_value[1][2] }; - const TVec3 v2 = { m_value[2][0], m_value[2][1], m_value[2][2] }; - return TMat33(v0, v1, v2); - } - - template - static constexpr TMat44 translation(const TVec3& t) noexcept { - TMat44 r; - r[3] = TVec4{ t, 1 }; - return r; - } - - template - static constexpr TMat44 scaling(const TVec3& s) noexcept { - return TMat44{ TVec4{ s, 1 }}; - } - - template - static constexpr TMat44 scaling(A s) noexcept { - return TMat44{ TVec4{ s, s, s, 1 }}; - } -}; - -// ---------------------------------------------------------------------------------------- -// Constructors -// ---------------------------------------------------------------------------------------- - -// Since the matrix code could become pretty big quickly, we don't inline most -// operations. - -template -constexpr TMat44::TMat44() noexcept - : m_value{ - col_type(1, 0, 0, 0), - col_type(0, 1, 0, 0), - col_type(0, 0, 1, 0), - col_type(0, 0, 0, 1) } { -} - -template -template -constexpr TMat44::TMat44(U v) noexcept - : m_value{ - col_type(v, 0, 0, 0), - col_type(0, v, 0, 0), - col_type(0, 0, v, 0), - col_type(0, 0, 0, v) } { -} - -template -template -constexpr TMat44::TMat44(const TVec4& v) noexcept - : m_value{ - col_type(v[0], 0, 0, 0), - col_type(0, v[1], 0, 0), - col_type(0, 0, v[2], 0), - col_type(0, 0, 0, v[3]) } { -} - - -// construct from 16 scalars -template -template< - typename A, typename B, typename C, typename D, - typename E, typename F, typename G, typename H, - typename I, typename J, typename K, typename L, - typename M, typename N, typename O, typename P> -constexpr TMat44::TMat44(A m00, B m01, C m02, D m03, - E m10, F m11, G m12, H m13, - I m20, J m21, K m22, L m23, - M m30, N m31, O m32, P m33) noexcept - : m_value{ - col_type(m00, m01, m02, m03), - col_type(m10, m11, m12, m13), - col_type(m20, m21, m22, m23), - col_type(m30, m31, m32, m33) } { -} - -template -template -constexpr TMat44::TMat44(const TMat44& rhs) noexcept { - for (size_t col = 0; col < NUM_COLS; ++col) { - m_value[col] = col_type(rhs[col]); - } -} - -// Construct from 4 column vectors. -template -template -constexpr TMat44::TMat44(const TVec4& v0, const TVec4& v1, - const TVec4& v2, const TVec4& v3) noexcept - : m_value{ v0, v1, v2, v3 } { -} - -template -template -constexpr TMat44::TMat44(const TQuaternion& q) noexcept : m_value{} { - const U n = q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w; - const U s = n > 0 ? 2 / n : 0; - const U x = s * q.x; - const U y = s * q.y; - const U z = s * q.z; - const U xx = x * q.x; - const U xy = x * q.y; - const U xz = x * q.z; - const U xw = x * q.w; - const U yy = y * q.y; - const U yz = y * q.z; - const U yw = y * q.w; - const U zz = z * q.z; - const U zw = z * q.w; - m_value[0] = col_type(1 - yy - zz, xy + zw, xz - yw, 0); - m_value[1] = col_type(xy - zw, 1 - xx - zz, yz + xw, 0); // NOLINT - m_value[2] = col_type(xz + yw, yz - xw, 1 - xx - yy, 0); // NOLINT - m_value[3] = col_type(0, 0, 0, 1); // NOLINT -} - -template -template -constexpr TMat44::TMat44(const TMat33& m) noexcept - : m_value{ - col_type(m[0][0], m[0][1], m[0][2], 0), - col_type(m[1][0], m[1][1], m[1][2], 0), - col_type(m[2][0], m[2][1], m[2][2], 0), - col_type(0, 0, 0, 1) } // NOLINT -{ -} - -template -template -constexpr TMat44::TMat44(const TMat33& m, const TVec3& v) noexcept - : m_value{ - col_type(m[0][0], m[0][1], m[0][2], 0), - col_type(m[1][0], m[1][1], m[1][2], 0), - col_type(m[2][0], m[2][1], m[2][2], 0), - col_type(v[0], v[1], v[2], 1) } // NOLINT -{ -} - -template -template -constexpr TMat44::TMat44(const TMat33& m, const TVec4& v) noexcept - : m_value{ - col_type(m[0][0], m[0][1], m[0][2], 0), - col_type(m[1][0], m[1][1], m[1][2], 0), - col_type(m[2][0], m[2][1], m[2][2], 0), - col_type(v[0], v[1], v[2], v[3]) } // NOLINT -{ -} - - -// ---------------------------------------------------------------------------------------- -// Helpers -// ---------------------------------------------------------------------------------------- - -template -constexpr TMat44 TMat44::ortho(T left, T right, T bottom, T top, T near, T far) noexcept { - TMat44 m; - m[0][0] = 2 / (right - left); - m[1][1] = 2 / (top - bottom); - m[2][2] = -2 / (far - near); - m[3][0] = -(right + left) / (right - left); - m[3][1] = -(top + bottom) / (top - bottom); - m[3][2] = -(far + near) / (far - near); - return m; -} - -template -constexpr TMat44 TMat44::frustum(T left, T right, T bottom, T top, T near, T far) noexcept { - TMat44 m; - m[0][0] = (2 * near) / (right - left); - // 0 - // 0 - // 0 - - // 0 - m[1][1] = (2 * near) / (top - bottom); - // 0 - // 0 - - m[2][0] = (right + left) / (right - left); - m[2][1] = (top + bottom) / (top - bottom); - m[2][2] = -(far + near) / (far - near); - m[2][3] = -1; - - // 0 - // 0 - m[3][2] = -(2 * far * near) / (far - near); - m[3][3] = 0; - return m; -} - -template -TMat44 TMat44::perspective(T fov, T aspect, T near, T far, TMat44::Fov direction) noexcept { - T h, w; - - if (direction == TMat44::Fov::VERTICAL) { - h = std::tan(fov * F_PI / 360.0f) * near; - w = h * aspect; - } else { - w = std::tan(fov * F_PI / 360.0f) * near; - h = w / aspect; - } - return frustum(-w, w, -h, h, near, far); -} - -/* - * Returns a matrix representing the pose of a virtual camera looking towards -Z in its - * local Y-up coordinate system. "eye" is where the camera is located, "center" is the point it's - * looking at and "up" defines where the Y axis of the camera's local coordinate system is. - */ -template -template -TMat44 TMat44::lookAt(const TVec3& eye, const TVec3& center, - const TVec3& up) noexcept { - TVec3 z_axis(normalize(center - eye)); - TVec3 norm_up(normalize(up)); - if (std::abs(dot(z_axis, norm_up)) > T(0.999)) { - // Fix up vector if we're degenerate (looking straight up, basically) - norm_up = { norm_up.z, norm_up.x, norm_up.y }; - } - TVec3 x_axis(normalize(cross(z_axis, norm_up))); - TVec3 y_axis(cross(x_axis, z_axis)); - return TMat44( - TVec4(x_axis, 0), - TVec4(y_axis, 0), - TVec4(-z_axis, 0), - TVec4(eye, 1)); -} - -// ---------------------------------------------------------------------------------------- -// Arithmetic operators outside of class -// ---------------------------------------------------------------------------------------- - -// mat44 * vec3, result is vec3( mat44 * {vec3, 1} ) -template -constexpr typename TMat44::col_type MATH_PURE operator*(const TMat44& lhs, - const TVec3& rhs) noexcept { - return lhs * TVec4{ rhs, 1 }; -} - -} // namespace details - -// ---------------------------------------------------------------------------------------- - -typedef details::TMat44 mat4; -typedef details::TMat44 mat4f; - -// mat4 * float4, with double precision intermediates -constexpr float4 highPrecisionMultiply(mat4f const& lhs, float4 const& rhs) noexcept { - double4 result{}; - result += lhs[0] * rhs[0]; - result += lhs[1] * rhs[1]; - result += lhs[2] * rhs[2]; - result += lhs[3] * rhs[3]; - return float4{ result }; -} - -// mat4 * mat4, with double precision intermediates -constexpr mat4f highPrecisionMultiply(mat4f const& lhs, mat4f const& rhs) noexcept { - return { - highPrecisionMultiply(lhs, rhs[0]), - highPrecisionMultiply(lhs, rhs[1]), - highPrecisionMultiply(lhs, rhs[2]), - highPrecisionMultiply(lhs, rhs[3]) - }; -} - -// mat4 * float4, with double precision intermediates -constexpr double4 highPrecisionMultiplyd(mat4f const& lhs, float4 const& rhs) noexcept { - double4 result{}; - result += lhs[0] * rhs[0]; - result += lhs[1] * rhs[1]; - result += lhs[2] * rhs[2]; - result += lhs[3] * rhs[3]; - return result; -} - -// mat4 * mat4, with double precision intermediates -constexpr mat4 highPrecisionMultiplyd(mat4f const& lhs, mat4f const& rhs) noexcept { - return { - highPrecisionMultiplyd(lhs, rhs[0]), - highPrecisionMultiplyd(lhs, rhs[1]), - highPrecisionMultiplyd(lhs, rhs[2]), - highPrecisionMultiplyd(lhs, rhs[3]) - }; -} - -// ---------------------------------------------------------------------------------------- -} // namespace math -} // namespace filament - -namespace std { -template -constexpr void swap(filament::math::details::TMat44& lhs, - filament::math::details::TMat44& rhs) noexcept { - // This generates much better code than the default implementation - // It's unclear why, I believe this is due to an optimization bug in the clang. - // - // filament::math::details::TMat44 t(lhs); - // lhs = rhs; - // rhs = t; - // - // clang always copy lhs on the stack, even if it's never using it (it's using the - // copy it has in registers). - - const T t00 = lhs[0][0]; - const T t01 = lhs[0][1]; - const T t02 = lhs[0][2]; - const T t03 = lhs[0][3]; - const T t10 = lhs[1][0]; - const T t11 = lhs[1][1]; - const T t12 = lhs[1][2]; - const T t13 = lhs[1][3]; - const T t20 = lhs[2][0]; - const T t21 = lhs[2][1]; - const T t22 = lhs[2][2]; - const T t23 = lhs[2][3]; - const T t30 = lhs[3][0]; - const T t31 = lhs[3][1]; - const T t32 = lhs[3][2]; - const T t33 = lhs[3][3]; - - lhs[0][0] = rhs[0][0]; - lhs[0][1] = rhs[0][1]; - lhs[0][2] = rhs[0][2]; - lhs[0][3] = rhs[0][3]; - lhs[1][0] = rhs[1][0]; - lhs[1][1] = rhs[1][1]; - lhs[1][2] = rhs[1][2]; - lhs[1][3] = rhs[1][3]; - lhs[2][0] = rhs[2][0]; - lhs[2][1] = rhs[2][1]; - lhs[2][2] = rhs[2][2]; - lhs[2][3] = rhs[2][3]; - lhs[3][0] = rhs[3][0]; - lhs[3][1] = rhs[3][1]; - lhs[3][2] = rhs[3][2]; - lhs[3][3] = rhs[3][3]; - - rhs[0][0] = t00; - rhs[0][1] = t01; - rhs[0][2] = t02; - rhs[0][3] = t03; - rhs[1][0] = t10; - rhs[1][1] = t11; - rhs[1][2] = t12; - rhs[1][3] = t13; - rhs[2][0] = t20; - rhs[2][1] = t21; - rhs[2][2] = t22; - rhs[2][3] = t23; - rhs[3][0] = t30; - rhs[3][1] = t31; - rhs[3][2] = t32; - rhs[3][3] = t33; -} -} - -#endif // TNT_MATH_MAT4_H diff --git a/windows/include/filament/math/mathfwd.h b/windows/include/filament/math/mathfwd.h deleted file mode 100644 index c5eecfab..00000000 --- a/windows/include/filament/math/mathfwd.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -#ifndef TNT_MATH_MATHFWD_H -#define TNT_MATH_MATHFWD_H - -#ifdef _MSC_VER - -// MSVC cannot compute the size of math types correctly when this file is included before the -// actual implementations. -// See github.com/google/filament/issues/2190. -#include -#include -#include -#include -#include -#include - -#else - -#include - -namespace filament { -namespace math { -namespace details { - -template class TVec2; -template class TVec3; -template class TVec4; - -template class TMat22; -template class TMat33; -template class TMat44; - -} // namespace details - -using double2 = details::TVec2; -using float2 = details::TVec2; -using int2 = details::TVec2; -using uint2 = details::TVec2; -using short2 = details::TVec2; -using ushort2 = details::TVec2; -using byte2 = details::TVec2; -using ubyte2 = details::TVec2; -using bool2 = details::TVec2; - -using double3 = details::TVec3; -using float3 = details::TVec3; -using int3 = details::TVec3; -using uint3 = details::TVec3; -using short3 = details::TVec3; -using ushort3 = details::TVec3; -using byte3 = details::TVec3; -using ubyte3 = details::TVec3; -using bool3 = details::TVec3; - -using double4 = details::TVec4; -using float4 = details::TVec4; -using int4 = details::TVec4; -using uint4 = details::TVec4; -using short4 = details::TVec4; -using ushort4 = details::TVec4; -using byte4 = details::TVec4; -using ubyte4 = details::TVec4; -using bool4 = details::TVec4; - -using mat2 = details::TMat22; -using mat2f = details::TMat22; - -using mat3 = details::TMat33; -using mat3f = details::TMat33; - -using mat4 = details::TMat44; -using mat4f = details::TMat44; - -} // namespace math -} // namespace filament - -#endif // _MSC_VER - -#endif // TNT_MATH_MATHFWD_H diff --git a/windows/include/filament/math/norm.h b/windows/include/filament/math/norm.h deleted file mode 100644 index d4d99ba8..00000000 --- a/windows/include/filament/math/norm.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ - -#ifndef TNT_MATH_NORM_H -#define TNT_MATH_NORM_H - -#include -#include - -#include -#include - -namespace filament { -namespace math { - -inline uint16_t packUnorm16(float v) noexcept { - return static_cast(std::round(clamp(v, 0.0f, 1.0f) * 65535.0f)); -} - -inline ushort4 packUnorm16(float4 v) noexcept { - return ushort4{ packUnorm16(v.x), packUnorm16(v.y), packUnorm16(v.z), packUnorm16(v.w) }; -} - -inline int16_t packSnorm16(float v) noexcept { - return static_cast(std::round(clamp(v, -1.0f, 1.0f) * 32767.0f)); -} - -inline short2 packSnorm16(float2 v) noexcept { - return short2{ packSnorm16(v.x), packSnorm16(v.y) }; -} - -inline short4 packSnorm16(float4 v) noexcept { - return short4{ packSnorm16(v.x), packSnorm16(v.y), packSnorm16(v.z), packSnorm16(v.w) }; -} - -inline float unpackUnorm16(uint16_t v) noexcept { - return v / 65535.0f; -} - -inline float4 unpackUnorm16(ushort4 v) noexcept { - return float4{ unpackUnorm16(v.x), unpackUnorm16(v.y), unpackUnorm16(v.z), unpackUnorm16(v.w) }; -} - -inline float unpackSnorm16(int16_t v) noexcept { - return clamp(v / 32767.0f, -1.0f, 1.0f); -} - -inline float4 unpackSnorm16(short4 v) noexcept { - return float4{ unpackSnorm16(v.x), unpackSnorm16(v.y), unpackSnorm16(v.z), unpackSnorm16(v.w) }; -} - -inline uint8_t packUnorm8(float v) noexcept { - return static_cast(std::round(clamp(v, 0.0f, 1.0f) * 255.0)); -} - -inline ubyte4 packUnorm8(float4 v) noexcept { - return ubyte4{ packUnorm8(v.x), packUnorm8(v.y), packUnorm8(v.z), packUnorm8(v.w) }; -} - -inline int8_t packSnorm8(float v) noexcept { - return static_cast(std::round(clamp(v, -1.0f, 1.0f) * 127.0)); -} - -inline byte4 packSnorm8(float4 v) noexcept { - return byte4{ packSnorm8(v.x), packSnorm8(v.y), packSnorm8(v.z), packSnorm8(v.w) }; -} - -inline float unpackUnorm8(uint8_t v) noexcept { - return v / 255.0f; -} - -inline float4 unpackUnorm8(ubyte4 v) noexcept { - return float4{ unpackUnorm8(v.x), unpackUnorm8(v.y), unpackUnorm8(v.z), unpackUnorm8(v.w) }; -} - -inline float unpackSnorm8(int8_t v) noexcept { - return clamp(v / 127.0f, -1.0f, 1.0f); -} - -inline float4 unpackSnorm8(byte4 v) noexcept { - return float4{ unpackSnorm8(v.x), unpackSnorm8(v.y), unpackSnorm8(v.z), unpackSnorm8(v.w) }; -} - -} // namespace math -} // namespace filament - -#endif // TNT_MATH_NORM_H diff --git a/windows/include/filament/math/quat.h b/windows/include/filament/math/quat.h deleted file mode 100644 index 91e1ab6d..00000000 --- a/windows/include/filament/math/quat.h +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (C) 2013 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. - */ - -#ifndef TNT_MATH_QUAT_H -#define TNT_MATH_QUAT_H - -#include -#include -#include -#include -#include - -#include -#include - -namespace filament { -namespace math { -// ------------------------------------------------------------------------------------- - -namespace details { - -template -class MATH_EMPTY_BASES TQuaternion : - public TVecAddOperators, - public TVecUnaryOperators, - public TVecComparisonOperators, - public TQuatProductOperators, - public TQuatFunctions { -public: - enum no_init { - NO_INIT - }; - typedef T value_type; - typedef T& reference; - typedef T const& const_reference; - typedef size_t size_type; - - /* - * quaternion internals stored as: - * - * q = w + xi + yj + zk - * - * q[0] = x; - * q[1] = y; - * q[2] = z; - * q[3] = w; - * - */ - union { - struct { T x, y, z, w; }; - TVec4 xyzw; - TVec3 xyz; - TVec2 xy; - }; - - enum { SIZE = 4 }; - inline constexpr static size_type size() { return SIZE; } - - // array access - inline constexpr T const& operator[](size_t i) const { - // only possible in C++0x14 with constexpr - assert(i < SIZE); - return (&x)[i]; - } - - inline constexpr T& operator[](size_t i) { - assert(i < SIZE); - return (&x)[i]; - } - - // ----------------------------------------------------------------------- - // we want the compiler generated versions for these... - TQuaternion(const TQuaternion&) = default; - ~TQuaternion() = default; - TQuaternion& operator=(const TQuaternion&) = default; - - // constructors - - // leaves object uninitialized. use with caution. - explicit constexpr TQuaternion(no_init) {} - - // default constructor. sets all values to zero. - constexpr TQuaternion() : x(0), y(0), z(0), w(0) {} - - // handles implicit conversion to a quat. must not be explicit. - template> - constexpr TQuaternion(A w) : x(0), y(0), z(0), w(w) {} - - // initialize from 4 values to w + xi + yj + zk - template> - constexpr TQuaternion(A w, B x, C y, D z) : x(x), y(y), z(z), w(w) {} - - // initialize from a vec3 + a value to : v.xi + v.yj + v.zk + w - template> - constexpr TQuaternion(const TVec3& v, B w) : x(v.x), y(v.y), z(v.z), w(w) {} - - // initialize from a vec4 - template> - constexpr explicit TQuaternion(const TVec4& v) : x(v.x), y(v.y), z(v.z), w(v.w) {} - - // initialize from a quaternion of a different type - template> - constexpr explicit TQuaternion(const TQuaternion& v) : x(v.x), y(v.y), z(v.z), w(v.w) {} - - // conjugate operator - constexpr TQuaternion operator~() const { - return conj(*this); - } - - // constructs a quaternion from an axis and angle - template> - constexpr static TQuaternion MATH_PURE fromAxisAngle(const TVec3& axis, B angle) { - return TQuaternion(std::sin(angle * 0.5) * normalize(axis), std::cos(angle * 0.5)); - } - - // constructs a quaternion from orig to dest. - // it returns the shortest arc and `from` and `to` must be normalized. - template> - constexpr static TQuaternion MATH_PURE fromDirectedRotation(const TVec3& from, const TVec3& to) { - // see the implementation of glm/gtx/quaternion.hpp - T cosTheta = dot(from, to); - TVec3 rotationAxis; - - if (cosTheta >= T(1) - std::numeric_limits::epsilon()) { - // orig and dest point in the same direction - return TQuaternion(1, 0, 0, 0); - } - - if (cosTheta < T(-1) + std::numeric_limits::epsilon()) { - // special case when vectors in opposite directions : - // there is no "ideal" rotation axis - // So guess one; any will do as long as it's perpendicular to start - // This implementation favors a rotation around the Up axis (Y), - // since it's often what you want to do. - rotationAxis = cross(TVec3(0, 0, 1), from); - - if (length2(rotationAxis) < std::numeric_limits::epsilon()) { - // bad luck, they were parallel, try again! - rotationAxis = cross(TVec3(1, 0, 0), from); - } - - rotationAxis = normalize(rotationAxis); - return fromAxisAngle(rotationAxis, F_PI); - } - - // implementation from Stan Melax's Game Programming Gems 1 article - rotationAxis = cross(from, to); - - const T s = std::sqrt((T(1) + cosTheta) * T(2)); - return TQuaternion(s * T(0.5), - rotationAxis.x / s, rotationAxis.y / s, rotationAxis.z / s); - } -}; - -} // namespace details - -// ---------------------------------------------------------------------------------------- - -typedef details::TQuaternion quat; -typedef details::TQuaternion quatf; -typedef details::TQuaternion quath; - -constexpr inline quat operator "" _i(long double v) { - return quat(0.0, double(v), 0.0, 0.0); -} - -constexpr inline quat operator "" _j(long double v) { - return quat(0.0, 0.0, double(v), 0.0); -} - -constexpr inline quat operator "" _k(long double v) { - return quat(0.0, 0.0, 0.0, double(v)); -} - -constexpr inline quat operator "" _i(unsigned long long v) { - return quat(0.0, double(v), 0.0, 0.0); -} - -constexpr inline quat operator "" _j(unsigned long long v) { - return quat(0.0, 0.0, double(v), 0.0); -} - -constexpr inline quat operator "" _k(unsigned long long v) { - return quat(0.0, 0.0, 0.0, double(v)); -} - -// ---------------------------------------------------------------------------------------- -} // namespace math -} // namespace filament - -#endif // TNT_MATH_QUAT_H diff --git a/windows/include/filament/math/scalar.h b/windows/include/filament/math/scalar.h deleted file mode 100644 index 1de77d24..00000000 --- a/windows/include/filament/math/scalar.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ - -#ifndef TNT_MATH_SCALAR_H -#define TNT_MATH_SCALAR_H - -#include -#include - -namespace filament { -namespace math { - -constexpr const double F_E = 2.71828182845904523536028747135266250; -constexpr const double F_LOG2E = 1.44269504088896340735992468100189214; -constexpr const double F_LOG10E = 0.434294481903251827651128918916605082; -constexpr const double F_LN2 = 0.693147180559945309417232121458176568; -constexpr const double F_LN10 = 2.30258509299404568401799145468436421; -constexpr const double F_PI = 3.14159265358979323846264338327950288; -constexpr const double F_PI_2 = 1.57079632679489661923132169163975144; -constexpr const double F_PI_4 = 0.785398163397448309615660845819875721; -constexpr const double F_1_PI = 0.318309886183790671537767526745028724; -constexpr const double F_2_PI = 0.636619772367581343075535053490057448; -constexpr const double F_2_SQRTPI = 1.12837916709551257389615890312154517; -constexpr const double F_SQRT2 = 1.41421356237309504880168872420969808; -constexpr const double F_SQRT1_2 = 0.707106781186547524400844362104849039; -constexpr const double F_TAU = 2.0 * F_PI; - -namespace d { -constexpr const double E = F_E; -constexpr const double LOG2E = F_LOG2E; -constexpr const double LOG10E = F_LOG10E; -constexpr const double LN2 = F_LN2; -constexpr const double LN10 = F_LN10; -constexpr const double PI = F_PI; -constexpr const double PI_2 = F_PI_2; -constexpr const double PI_4 = F_PI_4; -constexpr const double ONE_OVER_PI = F_1_PI; -constexpr const double TWO_OVER_PI = F_2_PI; -constexpr const double TWO_OVER_SQRTPI = F_2_SQRTPI; -constexpr const double SQRT2 = F_SQRT2; -constexpr const double SQRT1_2 = F_SQRT1_2; -constexpr const double TAU = F_TAU; -constexpr const double DEG_TO_RAD = F_PI / 180.0; -constexpr const double RAD_TO_DEG = 180.0 / F_PI; -} // namespace d - -namespace f { -constexpr const float E = (float)d::E; -constexpr const float LOG2E = (float)d::LOG2E; -constexpr const float LOG10E = (float)d::LOG10E; -constexpr const float LN2 = (float)d::LN2; -constexpr const float LN10 = (float)d::LN10; -constexpr const float PI = (float)d::PI; -constexpr const float PI_2 = (float)d::PI_2; -constexpr const float PI_4 = (float)d::PI_4; -constexpr const float ONE_OVER_PI = (float)d::ONE_OVER_PI; -constexpr const float TWO_OVER_PI = (float)d::TWO_OVER_PI; -constexpr const float TWO_OVER_SQRTPI = (float)d::TWO_OVER_SQRTPI; -constexpr const float SQRT2 = (float)d::SQRT2; -constexpr const float SQRT1_2 = (float)d::SQRT1_2; -constexpr const float TAU = (float)d::TAU; -constexpr const float DEG_TO_RAD = (float)d::DEG_TO_RAD; -constexpr const float RAD_TO_DEG = (float)d::RAD_TO_DEG; -} // namespace f - -template -inline constexpr T MATH_PURE min(T a, T b) noexcept { - return a < b ? a : b; -} - -template -inline constexpr T MATH_PURE max(T a, T b) noexcept { - return a > b ? a : b; -} - -template -inline constexpr T MATH_PURE clamp(T v, T min, T max) noexcept { - assert(min <= max); - return T(math::min(max, math::max(min, v))); -} - -template -inline constexpr T MATH_PURE saturate(T v) noexcept { - return clamp(v, T(0), T(1)); -} - -template -inline constexpr T MATH_PURE mix(T x, T y, T a) noexcept { - return x * (T(1) - a) + y * a; -} - -template -inline constexpr T MATH_PURE lerp(T x, T y, T a) noexcept { - return mix(x, y, a); -} - -template -inline constexpr T MATH_PURE smoothstep(T e0, T e1, T x) noexcept { - T t = clamp((x - e0) / (e1 - e0), T(0), T(1)); - return t * t * (T(3) - T(2) * t); -} - -template -inline constexpr T sign(T x) noexcept { - return x < T(0) ? T(-1) : T(1); -} - -} // namespace math -} // namespace filament - -#endif // TNT_MATH_SCALAR_H diff --git a/windows/include/filament/math/vec2.h b/windows/include/filament/math/vec2.h deleted file mode 100644 index 16c11858..00000000 --- a/windows/include/filament/math/vec2.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2013 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. - */ - -#ifndef TNT_MATH_VEC2_H -#define TNT_MATH_VEC2_H - -#include -#include - -#include - -#include -#include -#include - -namespace filament { -namespace math { -// ------------------------------------------------------------------------------------- - -namespace details { - -template -class MATH_EMPTY_BASES TVec2 : - public TVecProductOperators, - public TVecAddOperators, - public TVecUnaryOperators, - public TVecComparisonOperators, - public TVecFunctions { -public: - typedef T value_type; - typedef T& reference; - typedef T const& const_reference; - typedef size_t size_type; - static constexpr size_t SIZE = 2; - - union { - T v[SIZE] MATH_CONSTEXPR_INIT; - struct { T x, y; }; - struct { T s, t; }; - struct { T r, g; }; - }; - - inline constexpr size_type size() const { return SIZE; } - - // array access - inline constexpr T const& operator[](size_t i) const noexcept { - assert(i < SIZE); - return v[i]; - } - - inline constexpr T& operator[](size_t i) noexcept { - assert(i < SIZE); - return v[i]; - } - - // constructors - - // default constructor - MATH_DEFAULT_CTOR_CONSTEXPR TVec2() MATH_DEFAULT_CTOR - - // handles implicit conversion to a tvec4. must not be explicit. - template> - constexpr TVec2(A v) noexcept : v{ T(v), T(v) } {} - - template> - constexpr TVec2(A x, B y) noexcept : v{ T(x), T(y) } {} - - template> - constexpr TVec2(const TVec2& v) noexcept : v{ T(v[0]), T(v[1]) } {} - - // cross product works only on vectors of size 2 or 3 - template - friend inline constexpr - arithmetic_result_t cross(const TVec2& u, const TVec2& v) noexcept { - return u[0] * v[1] - u[1] * v[0]; - } -}; - -} // namespace details - -// ---------------------------------------------------------------------------------------- - -template> -using vec2 = details::TVec2; - -using double2 = vec2; -using float2 = vec2; -using half2 = vec2; -using int2 = vec2; -using uint2 = vec2; -using short2 = vec2; -using ushort2 = vec2; -using byte2 = vec2; -using ubyte2 = vec2; -using bool2 = vec2; - -// ---------------------------------------------------------------------------------------- -} // namespace math -} // namespace filament - -#endif // TNT_MATH_VEC2_H diff --git a/windows/include/filament/math/vec3.h b/windows/include/filament/math/vec3.h deleted file mode 100644 index fc856ede..00000000 --- a/windows/include/filament/math/vec3.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2013 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. - */ - -#ifndef TNT_MATH_VEC3_H -#define TNT_MATH_VEC3_H - -#include -#include - -#include -#include - -namespace filament { -namespace math { -// ------------------------------------------------------------------------------------- - -namespace details { - -template -class MATH_EMPTY_BASES TVec3 : - public TVecProductOperators, - public TVecAddOperators, - public TVecUnaryOperators, - public TVecComparisonOperators, - public TVecFunctions { -public: - typedef T value_type; - typedef T& reference; - typedef T const& const_reference; - typedef size_t size_type; - static constexpr size_t SIZE = 3; - - union { - T v[SIZE] MATH_CONSTEXPR_INIT; - TVec2 xy; - TVec2 st; - TVec2 rg; - struct { - union { - T x; - T s; - T r; - }; - union { - struct { T y, z; }; - struct { T t, p; }; - struct { T g, b; }; - TVec2 yz; - TVec2 tp; - TVec2 gb; - }; - }; - }; - - inline constexpr size_type size() const { return SIZE; } - - // array access - inline constexpr T const& operator[](size_t i) const noexcept { - assert(i < SIZE); - return v[i]; - } - - inline constexpr T& operator[](size_t i) noexcept { - assert(i < SIZE); - return v[i]; - } - - // constructors - - // default constructor - MATH_DEFAULT_CTOR_CONSTEXPR TVec3() noexcept MATH_DEFAULT_CTOR - - // handles implicit conversion to a tvec3. must not be explicit. - template> - constexpr TVec3(A v) noexcept : v{ T(v), T(v), T(v) } {} - - template> - constexpr TVec3(A x, B y, C z) noexcept : v{ T(x), T(y), T(z) } {} - - template> - constexpr TVec3(const TVec2& v, B z) noexcept : v{ T(v[0]), T(v[1]), T(z) } {} - - template> - constexpr TVec3(const TVec3& v) noexcept : v{ T(v[0]), T(v[1]), T(v[2]) } {} - - // cross product works only on vectors of size 3 - template - friend inline constexpr - TVec3> cross(const TVec3& u, const TVec3& v) noexcept { - return { - u[1] * v[2] - u[2] * v[1], - u[2] * v[0] - u[0] * v[2], - u[0] * v[1] - u[1] * v[0] }; - } -}; - -} // namespace details - -// ---------------------------------------------------------------------------------------- - -template> -using vec3 = details::TVec3; - -using double3 = vec3; -using float3 = vec3; -using half3 = vec3; -using int3 = vec3; -using uint3 = vec3; -using short3 = vec3; -using ushort3 = vec3; -using byte3 = vec3; -using ubyte3 = vec3; -using bool3 = vec3; - -// ---------------------------------------------------------------------------------------- -} // namespace math -} // namespace filament - -#endif // TNT_MATH_VEC3_H diff --git a/windows/include/filament/math/vec4.h b/windows/include/filament/math/vec4.h deleted file mode 100644 index 77877d5d..00000000 --- a/windows/include/filament/math/vec4.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2013 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. - */ - -#ifndef TNT_MATH_VEC4_H -#define TNT_MATH_VEC4_H - -#include -#include - -#include -#include - - -namespace filament { -namespace math { -// ------------------------------------------------------------------------------------- - -namespace details { - -template -class MATH_EMPTY_BASES TVec4 : - public TVecProductOperators, - public TVecAddOperators, - public TVecUnaryOperators, - public TVecComparisonOperators, - public TVecFunctions { -public: - typedef T value_type; - typedef T& reference; - typedef T const& const_reference; - typedef size_t size_type; - static constexpr size_t SIZE = 4; - - union { - T v[SIZE] MATH_CONSTEXPR_INIT; - TVec2 xy, st, rg; - TVec3 xyz, stp, rgb; - struct { - union { T x, s, r; }; - union { - TVec2 yz, tp, gb; - TVec3 yzw, tpq, gba; - struct { - union { T y, t, g; }; - union { - TVec2 zw, pq, ba; - struct { T z, w; }; - struct { T p, q; }; - struct { T b, a; }; - }; - }; - }; - }; - }; - - inline constexpr size_type size() const { return SIZE; } - - // array access - inline constexpr T const& operator[](size_t i) const noexcept { - assert(i < SIZE); - return v[i]; - } - - inline constexpr T& operator[](size_t i) noexcept { - assert(i < SIZE); - return v[i]; - } - - // constructors - - // default constructor - MATH_DEFAULT_CTOR_CONSTEXPR TVec4() noexcept MATH_DEFAULT_CTOR - - // handles implicit conversion to a tvec4. must not be explicit. - template> - constexpr TVec4(A v) noexcept : v{ T(v), T(v), T(v), T(v) } {} - - template> - constexpr TVec4(A x, B y, C z, D w) noexcept : v{ T(x), T(y), T(z), T(w) } {} - - template> - constexpr TVec4(const TVec2& v, B z, C w) noexcept : v{ T(v[0]), T(v[1]), T(z), T(w) } {} - - template> - constexpr TVec4(const TVec2& v, const TVec2& w) noexcept : v{ - T(v[0]), T(v[1]), T(w[0]), T(w[1]) } {} - - template> - constexpr TVec4(const TVec3& v, B w) noexcept : v{ T(v[0]), T(v[1]), T(v[2]), T(w) } {} - - template> - constexpr TVec4(const TVec4& v) noexcept : v{ T(v[0]), T(v[1]), T(v[2]), T(v[3]) } {} -}; - -} // namespace details - -// ---------------------------------------------------------------------------------------- - -template> -using vec4 = details::TVec4; - -using double4 = vec4; -using float4 = vec4; -using half4 = vec4; -using int4 = vec4; -using uint4 = vec4; -using short4 = vec4; -using ushort4 = vec4; -using byte4 = vec4; -using ubyte4 = vec4; -using bool4 = vec4; - - -// ---------------------------------------------------------------------------------------- -} // namespace math -} // namespace filament - -#endif // TNT_MATH_VEC4_H diff --git a/windows/include/filament/mathio/ostream.h b/windows/include/filament/mathio/ostream.h deleted file mode 100644 index 5628e7c8..00000000 --- a/windows/include/filament/mathio/ostream.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -#include -#include - -#if __has_attribute(visibility) -# define MATHIO_PUBLIC __attribute__((visibility("default"))) -#else -# define MATHIO_PUBLIC -#endif - -namespace filament::math::details { - -template class TQuaternion; - -template -MATHIO_PUBLIC -std::ostream& operator<<(std::ostream& out, const TVec2& v) noexcept; - -template -MATHIO_PUBLIC -std::ostream& operator<<(std::ostream& out, const TVec3& v) noexcept; - -template -MATHIO_PUBLIC -std::ostream& operator<<(std::ostream& out, const TVec4& v) noexcept; - -template -MATHIO_PUBLIC -std::ostream& operator<<(std::ostream& out, const TMat22& v) noexcept; - -template -MATHIO_PUBLIC -std::ostream& operator<<(std::ostream& out, const TMat33& v) noexcept; - -template -MATHIO_PUBLIC -std::ostream& operator<<(std::ostream& out, const TMat44& v) noexcept; - -template -MATHIO_PUBLIC -std::ostream& operator<<(std::ostream& out, const TQuaternion& v) noexcept; - -} // namespace filament::math::details diff --git a/windows/include/filament/mikktspace/mikktspace.h b/windows/include/filament/mikktspace/mikktspace.h deleted file mode 100644 index 52c44a71..00000000 --- a/windows/include/filament/mikktspace/mikktspace.h +++ /dev/null @@ -1,145 +0,0 @@ -/** \file mikktspace/mikktspace.h - * \ingroup mikktspace - */ -/** - * Copyright (C) 2011 by Morten S. Mikkelsen - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#ifndef __MIKKTSPACE_H__ -#define __MIKKTSPACE_H__ - - -#ifdef __cplusplus -extern "C" { -#endif - -/* Author: Morten S. Mikkelsen - * Version: 1.0 - * - * The files mikktspace.h and mikktspace.c are designed to be - * stand-alone files and it is important that they are kept this way. - * Not having dependencies on structures/classes/libraries specific - * to the program, in which they are used, allows them to be copied - * and used as is into any tool, program or plugin. - * The code is designed to consistently generate the same - * tangent spaces, for a given mesh, in any tool in which it is used. - * This is done by performing an internal welding step and subsequently an order-independent evaluation - * of tangent space for meshes consisting of triangles and quads. - * This means faces can be received in any order and the same is true for - * the order of vertices of each face. The generated result will not be affected - * by such reordering. Additionally, whether degenerate (vertices or texture coordinates) - * primitives are present or not will not affect the generated results either. - * Once tangent space calculation is done the vertices of degenerate primitives will simply - * inherit tangent space from neighboring non degenerate primitives. - * The analysis behind this implementation can be found in my master's thesis - * which is available for download --> http://image.diku.dk/projects/media/morten.mikkelsen.08.pdf - * Note that though the tangent spaces at the vertices are generated in an order-independent way, - * by this implementation, the interpolated tangent space is still affected by which diagonal is - * chosen to split each quad. A sensible solution is to have your tools pipeline always - * split quads by the shortest diagonal. This choice is order-independent and works with mirroring. - * If these have the same length then compare the diagonals defined by the texture coordinates. - * XNormal which is a tool for baking normal maps allows you to write your own tangent space plugin - * and also quad triangulator plugin. - */ - - -typedef int tbool; -typedef struct SMikkTSpaceContext SMikkTSpaceContext; - -typedef struct { - // Returns the number of faces (triangles/quads) on the mesh to be processed. - int (*m_getNumFaces)(const SMikkTSpaceContext * pContext); - - // Returns the number of vertices on face number iFace - // iFace is a number in the range {0, 1, ..., getNumFaces()-1} - int (*m_getNumVerticesOfFace)(const SMikkTSpaceContext * pContext, const int iFace); - - // returns the position/normal/texcoord of the referenced face of vertex number iVert. - // iVert is in the range {0,1,2} for triangles and {0,1,2,3} for quads. - void (*m_getPosition)(const SMikkTSpaceContext * pContext, float fvPosOut[], const int iFace, const int iVert); - void (*m_getNormal)(const SMikkTSpaceContext * pContext, float fvNormOut[], const int iFace, const int iVert); - void (*m_getTexCoord)(const SMikkTSpaceContext * pContext, float fvTexcOut[], const int iFace, const int iVert); - - // either (or both) of the two setTSpace callbacks can be set. - // The call-back m_setTSpaceBasic() is sufficient for basic normal mapping. - - // This function is used to return the tangent and fSign to the application. - // fvTangent is a unit length vector. - // For normal maps it is sufficient to use the following simplified version of the bitangent which is generated at pixel/vertex level. - // bitangent = fSign * cross(vN, tangent); - // Note that the results are returned unindexed. It is possible to generate a new index list - // But averaging/overwriting tangent spaces by using an already existing index list WILL produce INCRORRECT results. - // DO NOT! use an already existing index list. - void (*m_setTSpaceBasic)(const SMikkTSpaceContext * pContext, const float fvTangent[], const float fSign, const int iFace, const int iVert); - - // This function is used to return tangent space results to the application. - // fvTangent and fvBiTangent are unit length vectors and fMagS and fMagT are their - // true magnitudes which can be used for relief mapping effects. - // fvBiTangent is the "real" bitangent and thus may not be perpendicular to fvTangent. - // However, both are perpendicular to the vertex normal. - // For normal maps it is sufficient to use the following simplified version of the bitangent which is generated at pixel/vertex level. - // fSign = bIsOrientationPreserving ? 1.0f : (-1.0f); - // bitangent = fSign * cross(vN, tangent); - // Note that the results are returned unindexed. It is possible to generate a new index list - // But averaging/overwriting tangent spaces by using an already existing index list WILL produce INCRORRECT results. - // DO NOT! use an already existing index list. - void (*m_setTSpace)(const SMikkTSpaceContext * pContext, const float fvTangent[], const float fvBiTangent[], const float fMagS, const float fMagT, - const tbool bIsOrientationPreserving, const int iFace, const int iVert); -} SMikkTSpaceInterface; - -struct SMikkTSpaceContext -{ - SMikkTSpaceInterface * m_pInterface; // initialized with callback functions - void * m_pUserData; // pointer to client side mesh data etc. (passed as the first parameter with every interface call) -}; - -// these are both thread safe! -tbool genTangSpaceDefault(const SMikkTSpaceContext * pContext); // Default (recommended) fAngularThreshold is 180 degrees (which means threshold disabled) -tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThreshold); - - -// To avoid visual errors (distortions/unwanted hard edges in lighting), when using sampled normal maps, the -// normal map sampler must use the exact inverse of the pixel shader transformation. -// The most efficient transformation we can possibly do in the pixel shader is -// achieved by using, directly, the "unnormalized" interpolated tangent, bitangent and vertex normal: vT, vB and vN. -// pixel shader (fast transform out) -// vNout = normalize( vNt.x * vT + vNt.y * vB + vNt.z * vN ); -// where vNt is the tangent space normal. The normal map sampler must likewise use the -// interpolated and "unnormalized" tangent, bitangent and vertex normal to be compliant with the pixel shader. -// sampler does (exact inverse of pixel shader): -// float3 row0 = cross(vB, vN); -// float3 row1 = cross(vN, vT); -// float3 row2 = cross(vT, vB); -// float fSign = dot(vT, row0)<0 ? -1 : 1; -// vNt = normalize( fSign * float3(dot(vNout,row0), dot(vNout,row1), dot(vNout,row2)) ); -// where vNout is the sampled normal in some chosen 3D space. -// -// Should you choose to reconstruct the bitangent in the pixel shader instead -// of the vertex shader, as explained earlier, then be sure to do this in the normal map sampler also. -// Finally, beware of quad triangulations. If the normal map sampler doesn't use the same triangulation of -// quads as your renderer then problems will occur since the interpolated tangent spaces will differ -// eventhough the vertex level tangent spaces match. This can be solved either by triangulating before -// sampling/exporting or by using the order-independent choice of diagonal for splitting quads suggested earlier. -// However, this must be used both by the sampler and your tools/rendering pipeline. - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/windows/include/filament/tsl/robin_growth_policy.h b/windows/include/filament/tsl/robin_growth_policy.h deleted file mode 100644 index daf6bf56..00000000 --- a/windows/include/filament/tsl/robin_growth_policy.h +++ /dev/null @@ -1,290 +0,0 @@ -/** - * MIT License - * - * Copyright (c) 2017 Tessil - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef TSL_ROBIN_GROWTH_POLICY_H -#define TSL_ROBIN_GROWTH_POLICY_H - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __EXCEPTIONS -# define THROW(_e, _m) throw _e(_m) -#else -# include -# ifndef NDEBUG -# define THROW(_e, _m) do { fprintf(stderr, _m); std::terminate(); } while(0) -# else -# define THROW(_e, _m) std::terminate() -# endif -#endif - -#ifndef __has_builtin -#define __has_builtin(x) 0 -#endif - -#if __has_builtin(__builtin_expect) -# define TSL_LIKELY( exp ) (__builtin_expect( !!(exp), true )) -#else -# define TSL_LIKELY( exp ) (exp) -#endif - -namespace tsl { -namespace rh { - -/** - * Grow the hash table by a factor of GrowthFactor keeping the bucket count to a power of two. It allows - * the table to use a mask operation instead of a modulo operation to map a hash to a bucket. - * - * GrowthFactor must be a power of two >= 2. - */ -template -class power_of_two_growth_policy { -public: - /** - * Called on the hash table creation and on rehash. The number of buckets for the table is passed in parameter. - * This number is a minimum, the policy may update this value with a higher value if needed (but not lower). - */ - power_of_two_growth_policy(std::size_t& min_bucket_count_in_out) { - if(min_bucket_count_in_out > max_bucket_count()) { - THROW(std::length_error, "The hash table exceeds its maxmimum size."); - } - - static_assert(MIN_BUCKETS_SIZE > 0, "MIN_BUCKETS_SIZE must be > 0."); - const std::size_t min_bucket_count = MIN_BUCKETS_SIZE; - - min_bucket_count_in_out = std::max(min_bucket_count, min_bucket_count_in_out); - min_bucket_count_in_out = round_up_to_power_of_two(min_bucket_count_in_out); - m_mask = min_bucket_count_in_out - 1; - } - - /** - * Return the bucket [0, bucket_count()) to which the hash belongs. - */ - std::size_t bucket_for_hash(std::size_t hash) const noexcept { - return hash & m_mask; - } - - /** - * Return the bucket count to use when the bucket array grows on rehash. - */ - std::size_t next_bucket_count() const { - if((m_mask + 1) > max_bucket_count() / GrowthFactor) { - THROW(std::length_error, "The hash table exceeds its maxmimum size."); - } - - return (m_mask + 1) * GrowthFactor; - } - - /** - * Return the maximum number of buckets supported by the policy. - */ - std::size_t max_bucket_count() const { - // Largest power of two. - return (std::numeric_limits::max() / 2) + 1; - } - -private: - static std::size_t round_up_to_power_of_two(std::size_t value) { - if(is_power_of_two(value)) { - return value; - } - - if(value == 0) { - return 1; - } - - --value; - for(std::size_t i = 1; i < sizeof(std::size_t) * CHAR_BIT; i *= 2) { - value |= value >> i; - } - - return value + 1; - } - - static constexpr bool is_power_of_two(std::size_t value) { - return value != 0 && (value & (value - 1)) == 0; - } - -protected: - static const std::size_t MIN_BUCKETS_SIZE = 2; - static_assert(is_power_of_two(GrowthFactor) && GrowthFactor >= 2, "GrowthFactor must be a power of two >= 2."); - - std::size_t m_mask; -}; - - -/** - * Grow the hash table by GrowthFactor::num / GrowthFactor::den and use a modulo to map a hash - * to a bucket. Slower but it can be usefull if you want a slower growth. - */ -template> -class mod_growth_policy { -public: - mod_growth_policy(std::size_t& min_bucket_count_in_out) { - if(min_bucket_count_in_out > max_bucket_count()) { - THROW(std::length_error, "The hash table exceeds its maxmimum size."); - } - - static_assert(MIN_BUCKETS_SIZE > 0, "MIN_BUCKETS_SIZE must be > 0."); - const std::size_t min_bucket_count = MIN_BUCKETS_SIZE; - - min_bucket_count_in_out = std::max(min_bucket_count, min_bucket_count_in_out); - m_bucket_count = min_bucket_count_in_out; - } - - std::size_t bucket_for_hash(std::size_t hash) const noexcept { - return hash % m_bucket_count; - } - - std::size_t next_bucket_count() const { - if(m_bucket_count == max_bucket_count()) { - THROW(std::length_error, "The hash table exceeds its maxmimum size."); - } - - const double next_bucket_count = std::ceil(double(m_bucket_count) * REHASH_SIZE_MULTIPLICATION_FACTOR); - if(!std::isnormal(next_bucket_count)) { - THROW(std::length_error, "The hash table exceeds its maxmimum size."); - } - - if(next_bucket_count > double(max_bucket_count())) { - return max_bucket_count(); - } - else { - return std::size_t(next_bucket_count); - } - } - - std::size_t max_bucket_count() const { - return MAX_BUCKET_COUNT; - } - -private: - static const std::size_t MIN_BUCKETS_SIZE = 2; - static constexpr double REHASH_SIZE_MULTIPLICATION_FACTOR = 1.0 * GrowthFactor::num / GrowthFactor::den; - static const std::size_t MAX_BUCKET_COUNT = - std::size_t(double( - std::numeric_limits::max() / REHASH_SIZE_MULTIPLICATION_FACTOR - )); - - static_assert(REHASH_SIZE_MULTIPLICATION_FACTOR >= 1.1, "Growth factor should be >= 1.1."); - - std::size_t m_bucket_count; -}; - - - -namespace detail { - -static constexpr const std::array PRIMES = {{ - 5ul, 17ul, 29ul, 37ul, 53ul, 67ul, 79ul, 97ul, 131ul, 193ul, 257ul, 389ul, 521ul, 769ul, 1031ul, 1543ul, 2053ul, - 3079ul, 6151ul, 12289ul, 24593ul, 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, 1572869ul, 3145739ul, - 6291469ul, 12582917ul, 25165843ul, 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul, - 1610612741ul, 3221225473ul, 4294967291ul -}}; - -template -static constexpr std::size_t mod(std::size_t hash) { return hash % PRIMES[IPrime]; } - -// MOD_PRIME[iprime](hash) returns hash % PRIMES[iprime]. This table allows for faster modulo as the -// compiler can optimize the modulo code better with a constant known at the compilation. -static constexpr const std::array MOD_PRIME = {{ - &mod<0>, &mod<1>, &mod<2>, &mod<3>, &mod<4>, &mod<5>, &mod<6>, &mod<7>, &mod<8>, &mod<9>, &mod<10>, - &mod<11>, &mod<12>, &mod<13>, &mod<14>, &mod<15>, &mod<16>, &mod<17>, &mod<18>, &mod<19>, &mod<20>, - &mod<21>, &mod<22>, &mod<23>, &mod<24>, &mod<25>, &mod<26>, &mod<27>, &mod<28>, &mod<29>, &mod<30>, - &mod<31>, &mod<32>, &mod<33>, &mod<34>, &mod<35>, &mod<36>, &mod<37> , &mod<38> -}}; - -} - -/** - * Grow the hash table by using prime numbers as bucket count. Slower than tsl::rh::power_of_two_growth_policy in - * general but will probably distribute the values around better in the buckets with a poor hash function. - * - * To allow the compiler to optimize the modulo operation, a lookup table is used with constant primes numbers. - * - * With a switch the code would look like: - * \code - * switch(iprime) { // iprime is the current prime of the hash table - * case 0: hash % 5ul; - * break; - * case 1: hash % 17ul; - * break; - * case 2: hash % 29ul; - * break; - * ... - * } - * \endcode - * - * Due to the constant variable in the modulo the compiler is able to optimize the operation - * by a series of multiplications, substractions and shifts. - * - * The 'hash % 5' could become something like 'hash - (hash * 0xCCCCCCCD) >> 34) * 5' in a 64 bits environement. - */ -class prime_growth_policy { -public: - prime_growth_policy(std::size_t& min_bucket_count_in_out) { - auto it_prime = std::lower_bound(detail::PRIMES.begin(), - detail::PRIMES.end(), min_bucket_count_in_out); - if(it_prime == detail::PRIMES.end()) { - THROW(std::length_error, "The hash table exceeds its maxmimum size."); - } - - m_iprime = static_cast(std::distance(detail::PRIMES.begin(), it_prime)); - min_bucket_count_in_out = *it_prime; - } - - std::size_t bucket_for_hash(std::size_t hash) const noexcept { - return detail::MOD_PRIME[m_iprime](hash); - } - - std::size_t next_bucket_count() const { - if(m_iprime + 1 >= detail::PRIMES.size()) { - THROW(std::length_error, "The hash table exceeds its maxmimum size."); - } - - return detail::PRIMES[m_iprime + 1]; - } - - std::size_t max_bucket_count() const { - return detail::PRIMES.back(); - } - -private: - unsigned int m_iprime; - - static_assert(std::numeric_limits::max() >= detail::PRIMES.size(), - "The type of m_iprime is not big enough."); -}; - -} -} - -#endif diff --git a/windows/include/filament/tsl/robin_hash.h b/windows/include/filament/tsl/robin_hash.h deleted file mode 100644 index 0f94a07a..00000000 --- a/windows/include/filament/tsl/robin_hash.h +++ /dev/null @@ -1,1252 +0,0 @@ -/** - * MIT License - * - * Copyright (c) 2017 Tessil - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef TSL_ROBIN_HASH_H -#define TSL_ROBIN_HASH_H - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "robin_growth_policy.h" - - - -#ifndef tsl_assert - #ifdef TSL_DEBUG - #define tsl_assert(expr) assert(expr) - #else - #define tsl_assert(expr) (static_cast(0)) - #endif -#endif - - - -namespace tsl { - -namespace detail_robin_hash { - -template -struct make_void { - using type = void; -}; - -template -struct has_is_transparent: std::false_type { -}; - -template -struct has_is_transparent::type>: std::true_type { -}; - -template -struct is_power_of_two_policy: std::false_type { -}; - -template -struct is_power_of_two_policy>: std::true_type { -}; - - - -using truncated_hash_type = std::uint_least32_t; - -/** - * Helper class that store a truncated hash if StoreHash is true and nothing otherwise. - */ -template -class bucket_entry_hash { -public: - bool bucket_hash_equal(std::size_t /*hash*/) const noexcept { - return true; - } - - truncated_hash_type truncated_hash() const noexcept { - return 0; - } - -protected: - void set_hash(truncated_hash_type /*hash*/) noexcept { - } -}; - -template<> -class bucket_entry_hash { -public: - bool bucket_hash_equal(std::size_t hash) const noexcept { - return m_hash == truncated_hash_type(hash); - } - - truncated_hash_type truncated_hash() const noexcept { - return m_hash; - } - -protected: - void set_hash(truncated_hash_type hash) noexcept { - m_hash = truncated_hash_type(hash); - } - -private: - truncated_hash_type m_hash; -}; - - -/** - * Each bucket entry has: - * - A value of type `ValueType`. - * - An integer to store how far the value of the bucket, if any, is from its ideal bucket - * (ex: if the current bucket 5 has the value 'foo' and `hash('foo') % nb_buckets` == 3, - * `dist_from_ideal_bucket()` will return 2 as the current value of the bucket is two - * buckets away from its ideal bucket) - * If there is no value in the bucket (i.e. `empty()` is true) `dist_from_ideal_bucket()` will be < 0. - * - A marker which tells us if the bucket is the last bucket of the bucket array (useful for the - * iterator of the hash table). - * - If `StoreHash` is true, 32 bits of the hash of the value, if any, are also stored in the bucket. - * If the size of the hash is more than 32 bits, it is truncated. We don't store the full hash - * as storing the hash is a potential opportunity to use the unused space due to the alignement - * of the bucket_entry structure. We can thus potentially store the hash without any extra space - * (which would not be possible with 64 bits of the hash). - */ -template -class bucket_entry: public bucket_entry_hash { - using bucket_hash = bucket_entry_hash; - -public: - using value_type = ValueType; - using distance_type = std::int_least16_t; - - - bucket_entry() noexcept: bucket_hash(), m_dist_from_ideal_bucket(EMPTY_MARKER_DIST_FROM_IDEAL_BUCKET), - m_last_bucket(false) - { - tsl_assert(empty()); - } - - bucket_entry(const bucket_entry& other) noexcept(std::is_nothrow_copy_constructible::value): - bucket_hash(other), - m_dist_from_ideal_bucket(EMPTY_MARKER_DIST_FROM_IDEAL_BUCKET), - m_last_bucket(other.m_last_bucket) - { - if(!other.empty()) { - ::new (static_cast(std::addressof(m_value))) value_type(other.value()); - m_dist_from_ideal_bucket = other.m_dist_from_ideal_bucket; - } - } - - /** - * Never really used, but still necessary as we must call resize on an empty `std::vector`. - * and we need to support move-only types. See robin_hash constructor for details. - */ - bucket_entry(bucket_entry&& other) noexcept(std::is_nothrow_move_constructible::value): - bucket_hash(std::move(other)), - m_dist_from_ideal_bucket(EMPTY_MARKER_DIST_FROM_IDEAL_BUCKET), - m_last_bucket(other.m_last_bucket) - { - if(!other.empty()) { - ::new (static_cast(std::addressof(m_value))) value_type(std::move(other.value())); - m_dist_from_ideal_bucket = other.m_dist_from_ideal_bucket; - } - } - - bucket_entry& operator=(const bucket_entry& other) - noexcept(std::is_nothrow_copy_constructible::value) - { - if(this != &other) { - clear(); - - bucket_hash::operator=(other); - if(!other.empty()) { - ::new (static_cast(std::addressof(m_value))) value_type(other.value()); - } - - m_dist_from_ideal_bucket = other.m_dist_from_ideal_bucket; - m_last_bucket = other.m_last_bucket; - } - - return *this; - } - - bucket_entry& operator=(bucket_entry&& ) = delete; - - ~bucket_entry() noexcept { - clear(); - } - - void clear() noexcept { - if(!empty()) { - destroy_value(); - m_dist_from_ideal_bucket = EMPTY_MARKER_DIST_FROM_IDEAL_BUCKET; - } - } - - bool empty() const noexcept { - return m_dist_from_ideal_bucket == EMPTY_MARKER_DIST_FROM_IDEAL_BUCKET; - } - - value_type& value() noexcept { - tsl_assert(!empty()); - return *reinterpret_cast(std::addressof(m_value)); - } - - const value_type& value() const noexcept { - tsl_assert(!empty()); - return *reinterpret_cast(std::addressof(m_value)); - } - - distance_type dist_from_ideal_bucket() const noexcept { - return m_dist_from_ideal_bucket; - } - - bool last_bucket() const noexcept { - return m_last_bucket; - } - - void set_as_last_bucket() noexcept { - m_last_bucket = true; - } - - template - void set_value_of_empty_bucket(distance_type dist_from_ideal_bucket, - truncated_hash_type hash, Args&&... value_type_args) - { - tsl_assert(dist_from_ideal_bucket >= 0); - tsl_assert(empty()); - - ::new (static_cast(std::addressof(m_value))) value_type(std::forward(value_type_args)...); - this->set_hash(hash); - m_dist_from_ideal_bucket = dist_from_ideal_bucket; - - tsl_assert(!empty()); - } - - void swap_with_value_in_bucket(distance_type& dist_from_ideal_bucket, - truncated_hash_type& hash, value_type& value) - { - tsl_assert(!empty()); - - using std::swap; - swap(value, this->value()); - swap(dist_from_ideal_bucket, m_dist_from_ideal_bucket); - - // Avoid warning of unused variable if StoreHash is false - (void) hash; - if(StoreHash) { - const truncated_hash_type tmp_hash = this->truncated_hash(); - this->set_hash(hash); - hash = tmp_hash; - } - } - - static truncated_hash_type truncate_hash(std::size_t hash) noexcept { - return truncated_hash_type(hash); - } - -private: - void destroy_value() noexcept { - tsl_assert(!empty()); - value().~value_type(); - } - -private: - using storage = typename std::aligned_storage::type; - - static const distance_type EMPTY_MARKER_DIST_FROM_IDEAL_BUCKET = -1; - - distance_type m_dist_from_ideal_bucket; - bool m_last_bucket; - storage m_value; -}; - - - -/** - * Internal common class used by `robin_map` and `robin_set`. - * - * ValueType is what will be stored by `robin_hash` (usually `std::pair` for map and `Key` for set). - * - * `KeySelect` should be a `FunctionObject` which takes a `ValueType` in parameter and returns a - * reference to the key. - * - * `ValueSelect` should be a `FunctionObject` which takes a `ValueType` in parameter and returns a - * reference to the value. `ValueSelect` should be void if there is no value (in a set for example). - * - * The strong exception guarantee only holds if the expression - * `std::is_nothrow_swappable::value && std::is_nothrow_move_constructible::value` is true. - * - * Behaviour is undefined if the destructor of `ValueType` throws. - */ -template -class robin_hash: private Hash, private KeyEqual, private GrowthPolicy { -private: - template - using has_mapped_type = typename std::integral_constant::value>; - - -public: - template - class robin_iterator; - - using key_type = typename KeySelect::key_type; - using value_type = ValueType; - using size_type = std::size_t; - using difference_type = std::ptrdiff_t; - using hasher = Hash; - using key_equal = KeyEqual; - using allocator_type = Allocator; - using reference = value_type&; - using const_reference = const value_type&; - using pointer = value_type*; - using const_pointer = const value_type*; - using iterator = robin_iterator; - using const_iterator = robin_iterator; - - -private: - /** - * Either store the hash because we are asked by the `StoreHash` template parameter - * or store the hash because it doesn't cost us anything in size and can be used to speed up rehash. - */ - static constexpr bool STORE_HASH = StoreHash || - ( - (sizeof(tsl::detail_robin_hash::bucket_entry) == - sizeof(tsl::detail_robin_hash::bucket_entry)) - && - (sizeof(std::size_t) == sizeof(truncated_hash_type) || - is_power_of_two_policy::value) - && - // Don't store the hash for primitive types with default hash. - (!std::is_arithmetic::value || - !std::is_same>::value) - ); - - /** - * Only use the stored hash on lookup if we are explictly asked. We are not sure how slow - * the KeyEqual operation is. An extra comparison may slow things down with a fast KeyEqual. - */ - static constexpr bool USE_STORED_HASH_ON_LOOKUP = StoreHash; - - /** - * We can only use the hash on rehash if the size of the hash type is the same as the stored one or - * if we use a power of two modulo. In the case of the power of two modulo, we just mask - * the least significant bytes, we just have to check that the truncated_hash_type didn't truncated - * more bytes. - */ - -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunknown-pragmas" -#pragma clang diagnostic ignored "-Wunknown-warning-option" -#pragma clang diagnostic ignored "-Wtautological-constant-compare" -#endif - - static bool USE_STORED_HASH_ON_REHASH(size_type bucket_count) { - (void) bucket_count; - if(STORE_HASH && sizeof(std::size_t) == sizeof(truncated_hash_type)) { - return true; - } - else if(STORE_HASH && is_power_of_two_policy::value) { - tsl_assert(bucket_count > 0); - return (bucket_count - 1) <= std::numeric_limits::max(); - } - else { - return false; - } - } - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - - using bucket_entry = tsl::detail_robin_hash::bucket_entry; - using distance_type = typename bucket_entry::distance_type; - - using buckets_allocator = typename std::allocator_traits::template rebind_alloc; - using buckets_container_type = std::vector; - - -public: - /** - * The 'operator*()' and 'operator->()' methods return a const reference and const pointer respectively to the - * stored value type. - * - * In case of a map, to get a mutable reference to the value associated to a key (the '.second' in the - * stored pair), you have to call 'value()'. - * - * The main reason for this is that if we returned a `std::pair&` instead - * of a `const std::pair&`, the user may modify the key which will put the map in a undefined state. - */ - template - class robin_iterator { - friend class robin_hash; - - private: - using iterator_bucket = typename std::conditional::type; - - - robin_iterator(iterator_bucket it) noexcept: m_iterator(it) { - } - - public: - using iterator_category = std::forward_iterator_tag; - using value_type = const typename robin_hash::value_type; - using difference_type = std::ptrdiff_t; - using reference = value_type&; - using pointer = value_type*; - - - robin_iterator() noexcept { - } - - robin_iterator(const robin_iterator& other) noexcept: m_iterator(other.m_iterator) { - } - - const typename robin_hash::key_type& key() const { - return KeySelect()(m_iterator->value()); - } - - template::value && IsConst>::type* = nullptr> - const typename U::value_type& value() const { - return U()(m_iterator->value()); - } - - template::value && !IsConst>::type* = nullptr> - typename U::value_type& value() { - return U()(m_iterator->value()); - } - - reference operator*() const { - return m_iterator->value(); - } - - pointer operator->() const { - return std::addressof(m_iterator->value()); - } - - robin_iterator& operator++() { - while(true) { - if(m_iterator->last_bucket()) { - ++m_iterator; - return *this; - } - - ++m_iterator; - if(!m_iterator->empty()) { - return *this; - } - } - } - - robin_iterator operator++(int) { - robin_iterator tmp(*this); - ++*this; - - return tmp; - } - - friend bool operator==(const robin_iterator& lhs, const robin_iterator& rhs) { - return lhs.m_iterator == rhs.m_iterator; - } - - friend bool operator!=(const robin_iterator& lhs, const robin_iterator& rhs) { - return !(lhs == rhs); - } - - private: - iterator_bucket m_iterator; - }; - - -public: - robin_hash(size_type bucket_count, - const Hash& hash, - const KeyEqual& equal, - const Allocator& alloc, - float max_load_factor): Hash(hash), KeyEqual(equal), - // We need a non-zero bucket_count - GrowthPolicy(bucket_count == 0?++bucket_count:bucket_count), - m_buckets(alloc), - m_bucket_count(bucket_count), - m_nb_elements(0), - m_grow_on_next_insert(false) - { - if(bucket_count > max_bucket_count()) { - THROW(std::length_error, "The map exceeds its maxmimum size."); - } - - /* - * We can't use the `vector(size_type count, const Allocator& alloc)` constructor - * as it's only available in C++14 and we need to support C++11. We thus must resize after using - * the `vector(const Allocator& alloc)` constructor. - * - * We can't use `vector(size_type count, const T& value, const Allocator& alloc)` as it requires the - * value T to be copyable. - */ - m_buckets.resize(m_bucket_count); - - tsl_assert(!m_buckets.empty()); - m_buckets.back().set_as_last_bucket(); - - - this->max_load_factor(max_load_factor); - } - - robin_hash(const robin_hash& other) = default; - - robin_hash(robin_hash&& other) noexcept(std::is_nothrow_move_constructible::value && - std::is_nothrow_move_constructible::value && - std::is_nothrow_move_constructible::value && - std::is_nothrow_move_constructible::value) - : Hash(std::move(static_cast(other))), - KeyEqual(std::move(static_cast(other))), - GrowthPolicy(std::move(static_cast(other))), - m_buckets(std::move(other.m_buckets)), - m_bucket_count(other.m_bucket_count), - m_nb_elements(other.m_nb_elements), - m_load_threshold(other.m_load_threshold), - m_max_load_factor(other.m_max_load_factor), - m_grow_on_next_insert(other.m_grow_on_next_insert) - { - other.clear(); - } - - robin_hash& operator=(const robin_hash& other) = default; - - robin_hash& operator=(robin_hash&& other) { - other.swap(*this); - other.clear(); - - return *this; - } - - allocator_type get_allocator() const { - return m_buckets.get_allocator(); - } - - - /* - * Iterators - */ - iterator begin() noexcept { - auto begin = m_buckets.begin(); - while(begin != m_buckets.end() && begin->empty()) { - ++begin; - } - - return iterator(begin); - } - - const_iterator begin() const noexcept { - return cbegin(); - } - - const_iterator cbegin() const noexcept { - auto begin = m_buckets.cbegin(); - while(begin != m_buckets.cend() && begin->empty()) { - ++begin; - } - - return const_iterator(begin); - } - - iterator end() noexcept { - return iterator(m_buckets.end()); - } - - const_iterator end() const noexcept { - return cend(); - } - - const_iterator cend() const noexcept { - return const_iterator(m_buckets.cend()); - } - - - /* - * Capacity - */ - bool empty() const noexcept { - return m_nb_elements == 0; - } - - size_type size() const noexcept { - return m_nb_elements; - } - - size_type max_size() const noexcept { - return m_buckets.max_size(); - } - - /* - * Modifiers - */ - void clear() noexcept { - for(auto& bucket: m_buckets) { - bucket.clear(); - } - - m_nb_elements = 0; - m_grow_on_next_insert = false; - } - - - - template - std::pair insert(P&& value) { - return insert_impl(KeySelect()(value), std::forward

(value)); - } - - template - iterator insert(const_iterator hint, P&& value) { - if(hint != cend() && compare_keys(KeySelect()(*hint), KeySelect()(value))) { - return mutable_iterator(hint); - } - - return insert(std::forward

(value)).first; - } - - template - void insert(InputIt first, InputIt last) { - if(std::is_base_of::iterator_category>::value) - { - const auto nb_elements_insert = std::distance(first, last); - const size_type nb_free_buckets = m_load_threshold - size(); - tsl_assert(m_load_threshold >= size()); - - if(nb_elements_insert > 0 && nb_free_buckets < size_type(nb_elements_insert)) { - reserve(size() + size_type(nb_elements_insert)); - } - } - - for(; first != last; ++first) { - insert(*first); - } - } - - - - template - std::pair insert_or_assign(K&& key, M&& obj) { - auto it = try_emplace(std::forward(key), std::forward(obj)); - if(!it.second) { - it.first.value() = std::forward(obj); - } - - return it; - } - - template - iterator insert_or_assign(const_iterator hint, K&& key, M&& obj) { - if(hint != cend() && compare_keys(KeySelect()(*hint), key)) { - auto it = mutable_iterator(hint); - it.value() = std::forward(obj); - - return it; - } - - return insert_or_assign(std::forward(key), std::forward(obj)).first; - } - - - template - std::pair emplace(Args&&... args) { - return insert(value_type(std::forward(args)...)); - } - - template - iterator emplace_hint(const_iterator hint, Args&&... args) { - return insert(hint, value_type(std::forward(args)...)); - } - - - - template - std::pair try_emplace(K&& key, Args&&... args) { - return insert_impl(key, std::piecewise_construct, - std::forward_as_tuple(std::forward(key)), - std::forward_as_tuple(std::forward(args)...)); - } - - template - iterator try_emplace(const_iterator hint, K&& key, Args&&... args) { - if(hint != cend() && compare_keys(KeySelect()(*hint), key)) { - return mutable_iterator(hint); - } - - return try_emplace(std::forward(key), std::forward(args)...).first; - } - - /** - * Here to avoid `template size_type erase(const K& key)` being used when - * we use a iterator instead of a const_iterator. - */ - iterator erase(iterator pos) { - erase_from_bucket(pos); - - /** - * Erase bucket used a backward shift after clearing the bucket. - * Check if there is a new value in the bucket, if not get the next non-empty. - */ - if(pos.m_iterator->empty()) { - ++pos; - } - - return pos; - } - - iterator erase(const_iterator pos) { - return erase(mutable_iterator(pos)); - } - - iterator erase(const_iterator first, const_iterator last) { - if(first == last) { - return mutable_iterator(first); - } - - auto first_mutable = mutable_iterator(first); - auto last_mutable = mutable_iterator(last); - for(auto it = first_mutable.m_iterator; it != last_mutable.m_iterator; ++it) { - if(!it->empty()) { - it->clear(); - m_nb_elements--; - } - } - - if(last_mutable == end()) { - return end(); - } - - - /* - * Backward shift on the values which come after the deleted values. - * We try to move the values closer to their ideal bucket. - */ - std::size_t icloser_bucket = std::size_t(std::distance(m_buckets.begin(), first_mutable.m_iterator)); - std::size_t ito_move_closer_value = std::size_t(std::distance(m_buckets.begin(), last_mutable.m_iterator)); - tsl_assert(ito_move_closer_value > icloser_bucket); - - const std::size_t ireturn_bucket = ito_move_closer_value - - std::min(ito_move_closer_value - icloser_bucket, - std::size_t(m_buckets[ito_move_closer_value].dist_from_ideal_bucket())); - - while(ito_move_closer_value < m_buckets.size() && m_buckets[ito_move_closer_value].dist_from_ideal_bucket() > 0) { - icloser_bucket = ito_move_closer_value - - std::min(ito_move_closer_value - icloser_bucket, - std::size_t(m_buckets[ito_move_closer_value].dist_from_ideal_bucket())); - - - tsl_assert(m_buckets[icloser_bucket].empty()); - const distance_type new_distance = distance_type(m_buckets[ito_move_closer_value].dist_from_ideal_bucket() - - (ito_move_closer_value - icloser_bucket)); - m_buckets[icloser_bucket].set_value_of_empty_bucket(new_distance, - m_buckets[ito_move_closer_value].truncated_hash(), - std::move(m_buckets[ito_move_closer_value].value())); - m_buckets[ito_move_closer_value].clear(); - - - ++icloser_bucket; - ++ito_move_closer_value; - } - - - return iterator(m_buckets.begin() + ireturn_bucket); - } - - - template - size_type erase(const K& key) { - return erase(key, hash_key(key)); - } - - template - size_type erase(const K& key, std::size_t hash) { - auto it = find(key, hash); - if(it != end()) { - erase_from_bucket(it); - - return 1; - } - else { - return 0; - } - } - - - - - - void swap(robin_hash& other) { - using std::swap; - - swap(static_cast(*this), static_cast(other)); - swap(static_cast(*this), static_cast(other)); - swap(static_cast(*this), static_cast(other)); - swap(m_buckets, other.m_buckets); - swap(m_bucket_count, other.m_bucket_count); - swap(m_nb_elements, other.m_nb_elements); - swap(m_load_threshold, other.m_load_threshold); - swap(m_max_load_factor, other.m_max_load_factor); - swap(m_grow_on_next_insert, other.m_grow_on_next_insert); - } - - - /* - * Lookup - */ - template::value>::type* = nullptr> - typename U::value_type& at(const K& key) { - return at(key, hash_key(key)); - } - - template::value>::type* = nullptr> - typename U::value_type& at(const K& key, std::size_t hash) { - return const_cast(static_cast(this)->at(key, hash)); - } - - - template::value>::type* = nullptr> - const typename U::value_type& at(const K& key) const { - return at(key, hash_key(key)); - } - - template::value>::type* = nullptr> - const typename U::value_type& at(const K& key, std::size_t hash) const { - auto it = find(key, hash); - if(it != cend()) { - return it.value(); - } - else { - THROW(std::out_of_range, "Couldn't find key."); - } - } - - template::value>::type* = nullptr> - typename U::value_type& operator[](K&& key) { - return try_emplace(std::forward(key)).first.value(); - } - - - template - size_type count(const K& key) const { - return count(key, hash_key(key)); - } - - template - size_type count(const K& key, std::size_t hash) const { - if(find(key, hash) != cend()) { - return 1; - } - else { - return 0; - } - } - - - template - iterator find(const K& key) { - return find_impl(key, hash_key(key)); - } - - template - iterator find(const K& key, std::size_t hash) { - return find_impl(key, hash); - } - - - template - const_iterator find(const K& key) const { - return find_impl(key, hash_key(key)); - } - - template - const_iterator find(const K& key, std::size_t hash) const { - return find_impl(key, hash); - } - - - template - std::pair equal_range(const K& key) { - return equal_range(key, hash_key(key)); - } - - template - std::pair equal_range(const K& key, std::size_t hash) { - iterator it = find(key, hash); - return std::make_pair(it, (it == end())?it:std::next(it)); - } - - - template - std::pair equal_range(const K& key) const { - return equal_range(key, hash_key(key)); - } - - template - std::pair equal_range(const K& key, std::size_t hash) const { - const_iterator it = find(key, hash); - return std::make_pair(it, (it == cend())?it:std::next(it)); - } - - /* - * Bucket interface - */ - size_type bucket_count() const { - return m_bucket_count; - } - - size_type max_bucket_count() const { - return std::min(GrowthPolicy::max_bucket_count(), m_buckets.max_size()); - } - - /* - * Hash policy - */ - float load_factor() const { - return float(m_nb_elements)/float(bucket_count()); - } - - float max_load_factor() const { - return m_max_load_factor; - } - - void max_load_factor(float ml) { - m_max_load_factor = std::max(0.1f, std::min(ml, 0.95f)); - m_load_threshold = size_type(float(bucket_count())*m_max_load_factor); - } - - void rehash(size_type count) { - count = std::max(count, size_type(std::ceil(float(size())/max_load_factor()))); - rehash_impl(count); - } - - void reserve(size_type count) { - rehash(size_type(std::ceil(float(count)/max_load_factor()))); - } - - /* - * Observers - */ - hasher hash_function() const { - return static_cast(*this); - } - - key_equal key_eq() const { - return static_cast(*this); - } - - - /* - * Other - */ - iterator mutable_iterator(const_iterator pos) { - return iterator(m_buckets.begin() + std::distance(m_buckets.cbegin(), pos.m_iterator)); - } - -private: - template - std::size_t hash_key(const K& key) const { - return Hash::operator()(key); - } - - template - bool compare_keys(const K1& key1, const K2& key2) const { - return KeyEqual::operator()(key1, key2); - } - - std::size_t bucket_for_hash(std::size_t hash) const { - return GrowthPolicy::bucket_for_hash(hash); - } - - template::value>::type* = nullptr> - std::size_t next_bucket(std::size_t index) const noexcept { - tsl_assert(index < bucket_count()); - - return (index + 1) & this->m_mask; - } - - template::value>::type* = nullptr> - std::size_t next_bucket(std::size_t index) const noexcept { - tsl_assert(index < bucket_count()); - - index++; - return (index != bucket_count())?index:0; - } - - - - template - iterator find_impl(const K& key, std::size_t hash) { - return mutable_iterator(static_cast(this)->find(key, hash)); - } - - template - const_iterator find_impl(const K& key, std::size_t hash) const { - std::size_t ibucket = bucket_for_hash(hash); - distance_type dist_from_ideal_bucket = 0; - - while(dist_from_ideal_bucket <= m_buckets[ibucket].dist_from_ideal_bucket()) { - if (TSL_LIKELY((!USE_STORED_HASH_ON_LOOKUP || m_buckets[ibucket].bucket_hash_equal(hash)) && - compare_keys(KeySelect()(m_buckets[ibucket].value()), key))) - { - return const_iterator(m_buckets.begin() + ibucket); - } - - ibucket = next_bucket(ibucket); - dist_from_ideal_bucket++; - } - - return cend(); - } - - void erase_from_bucket(iterator pos) { - pos.m_iterator->clear(); - m_nb_elements--; - - /** - * Backward shift, swap the empty bucket, previous_ibucket, with the values on its right, ibucket, - * until we cross another empty bucket or if the other bucket has a distance_from_ideal_bucket == 0. - * - * We try to move the values closer to their ideal bucket. - */ - std::size_t previous_ibucket = std::size_t(std::distance(m_buckets.begin(), pos.m_iterator)); - std::size_t ibucket = next_bucket(previous_ibucket); - - while(m_buckets[ibucket].dist_from_ideal_bucket() > 0) { - tsl_assert(m_buckets[previous_ibucket].empty()); - - const distance_type new_distance = distance_type(m_buckets[ibucket].dist_from_ideal_bucket() - 1); - m_buckets[previous_ibucket].set_value_of_empty_bucket(new_distance, m_buckets[ibucket].truncated_hash(), - std::move(m_buckets[ibucket].value())); - m_buckets[ibucket].clear(); - - previous_ibucket = ibucket; - ibucket = next_bucket(ibucket); - } - } - - template - std::pair insert_impl(const K& key, Args&&... value_type_args) { - const std::size_t hash = hash_key(key); - - std::size_t ibucket = bucket_for_hash(hash); - distance_type dist_from_ideal_bucket = 0; - - while(dist_from_ideal_bucket <= m_buckets[ibucket].dist_from_ideal_bucket()) { - if((!USE_STORED_HASH_ON_LOOKUP || m_buckets[ibucket].bucket_hash_equal(hash)) && - compare_keys(KeySelect()(m_buckets[ibucket].value()), key)) - { - return std::make_pair(iterator(m_buckets.begin() + ibucket), false); - } - - ibucket = next_bucket(ibucket); - dist_from_ideal_bucket++; - } - - if(grow_on_high_load()) { - ibucket = bucket_for_hash(hash); - dist_from_ideal_bucket = 0; - - while(dist_from_ideal_bucket <= m_buckets[ibucket].dist_from_ideal_bucket()) { - ibucket = next_bucket(ibucket); - dist_from_ideal_bucket++; - } - } - - - if(m_buckets[ibucket].empty()) { - m_buckets[ibucket].set_value_of_empty_bucket(dist_from_ideal_bucket, bucket_entry::truncate_hash(hash), - std::forward(value_type_args)...); - } - else { - insert_value(ibucket, dist_from_ideal_bucket, bucket_entry::truncate_hash(hash), - std::forward(value_type_args)...); - } - - - m_nb_elements++; - /* - * The value will be inserted in ibucket in any case, either because it was - * empty or by stealing the bucket (robin hood). - */ - return std::make_pair(iterator(m_buckets.begin() + ibucket), true); - } - - - template - void insert_value(std::size_t ibucket, distance_type dist_from_ideal_bucket, - truncated_hash_type hash, Args&&... value_type_args) - { - value_type value(std::forward(value_type_args)...); - insert_value_impl(ibucket, dist_from_ideal_bucket, hash, value); - } - - // fix issue #6 (see https://github.com/Tessil/robin-map/commit/965dacd191502d310f053cc00551ea8fc2f6c7f0) - void insert_value(std::size_t ibucket, distance_type dist_from_ideal_bucket, - truncated_hash_type hash, value_type&& value) - { - insert_value_impl(ibucket, dist_from_ideal_bucket, hash, value); - } - - /* - * We don't use `value_type&& value` as last argument due to a bug in MSVC when `value_type` is a pointer, - * The compiler is not able to see the difference between `std::string*` and `std::string*&&` resulting in - * compile error. - * - * The `value` will be in a moved state at the end of the function. - */ - void insert_value_impl(std::size_t ibucket, distance_type dist_from_ideal_bucket, - truncated_hash_type hash, value_type& value) - { - m_buckets[ibucket].swap_with_value_in_bucket(dist_from_ideal_bucket, hash, value); - ibucket = next_bucket(ibucket); - dist_from_ideal_bucket++; - - while(!m_buckets[ibucket].empty()) { - if(dist_from_ideal_bucket > m_buckets[ibucket].dist_from_ideal_bucket()) { - if(dist_from_ideal_bucket >= REHASH_ON_HIGH_NB_PROBES__NPROBES && - load_factor() >= REHASH_ON_HIGH_NB_PROBES__MIN_LOAD_FACTOR) - { - /** - * The number of probes is really high, rehash the map on the next insert. - * Difficult to do now as rehash may throw. - */ - m_grow_on_next_insert = true; - } - - m_buckets[ibucket].swap_with_value_in_bucket(dist_from_ideal_bucket, hash, value); - } - - ibucket = next_bucket(ibucket); - dist_from_ideal_bucket++; - } - - m_buckets[ibucket].set_value_of_empty_bucket(dist_from_ideal_bucket, hash, std::move(value)); - } - - - void rehash_impl(size_type count) { - robin_hash new_table(count, static_cast(*this), static_cast(*this), - get_allocator(), m_max_load_factor); - - const bool use_stored_hash = USE_STORED_HASH_ON_REHASH(new_table.bucket_count()); - for(auto& bucket: m_buckets) { - if(bucket.empty()) { - continue; - } - - const std::size_t hash = use_stored_hash?bucket.truncated_hash(): - new_table.hash_key(KeySelect()(bucket.value())); - - new_table.insert_value_on_rehash(new_table.bucket_for_hash(hash), 0, - bucket_entry::truncate_hash(hash), std::move(bucket.value())); - } - - new_table.m_nb_elements = m_nb_elements; - new_table.swap(*this); - } - - void insert_value_on_rehash(std::size_t ibucket, distance_type dist_from_ideal_bucket, - truncated_hash_type hash, value_type&& value) - { - while(true) { - if(dist_from_ideal_bucket > m_buckets[ibucket].dist_from_ideal_bucket()) { - if(m_buckets[ibucket].empty()) { - m_buckets[ibucket].set_value_of_empty_bucket(dist_from_ideal_bucket, hash, std::move(value)); - return; - } - else { - m_buckets[ibucket].swap_with_value_in_bucket(dist_from_ideal_bucket, hash, value); - } - } - - dist_from_ideal_bucket++; - ibucket = next_bucket(ibucket); - } - } - - - - /** - * Return true if the map has been rehashed. - */ - bool grow_on_high_load() { - if(m_grow_on_next_insert || size() >= m_load_threshold) { - rehash_impl(GrowthPolicy::next_bucket_count()); - m_grow_on_next_insert = false; - - return true; - } - - return false; - } - - -public: - static const size_type DEFAULT_INIT_BUCKETS_SIZE = 16; - static constexpr float DEFAULT_MAX_LOAD_FACTOR = 0.5f; - -private: - static const distance_type REHASH_ON_HIGH_NB_PROBES__NPROBES = 128; - static constexpr float REHASH_ON_HIGH_NB_PROBES__MIN_LOAD_FACTOR = 0.15f; - -private: - buckets_container_type m_buckets; - - /** - * Used a lot in find, avoid the call to m_buckets.size() which is a bit slower. - */ - size_type m_bucket_count; - - size_type m_nb_elements; - - size_type m_load_threshold; - float m_max_load_factor; - - bool m_grow_on_next_insert; -}; - -} - -} - -#endif diff --git a/windows/include/filament/tsl/robin_map.h b/windows/include/filament/tsl/robin_map.h deleted file mode 100644 index 5958e70f..00000000 --- a/windows/include/filament/tsl/robin_map.h +++ /dev/null @@ -1,668 +0,0 @@ -/** - * MIT License - * - * Copyright (c) 2017 Tessil - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef TSL_ROBIN_MAP_H -#define TSL_ROBIN_MAP_H - - -#include -#include -#include -#include -#include -#include -#include "robin_hash.h" - - -namespace tsl { - - -/** - * Implementation of a hash map using open-adressing and the robin hood hashing algorithm with backward shift deletion. - * - * For operations modifying the hash map (insert, erase, rehash, ...), the strong exception guarantee - * is only guaranteed when the expression `std::is_nothrow_swappable>::value && - * std::is_nothrow_move_constructible>::value` is true, otherwise if an exception - * is thrown during the swap or the move, the hash map may end up in a undefined state. Per the standard - * a `Key` or `T` with a noexcept copy constructor and no move constructor also satisfies the - * `std::is_nothrow_move_constructible>::value` criterion (and will thus guarantee the - * strong exception for the map). - * - * When `StoreHash` is true, 32 bits of the hash are stored alongside the values. It can improve - * the performance during lookups if the `KeyEqual` function takes time (if it engenders a cache-miss for example) - * as we then compare the stored hashes before comparing the keys. When `tsl::rh::power_of_two_growth_policy` is used - * as `GrowthPolicy`, it may also speed-up the rehash process as we can avoid to recalculate the hash. - * When it is detected that storing the hash will not incur any memory penality due to alignement (i.e. - * `sizeof(tsl::detail_robin_hash::bucket_entry) == - * sizeof(tsl::detail_robin_hash::bucket_entry)`) and `tsl::rh::power_of_two_growth_policy` is - * used, the hash will be stored even if `StoreHash` is false so that we can speed-up the rehash (but it will - * not be used on lookups unless `StoreHash` is true). - * - * `GrowthPolicy` defines how the map grows and consequently how a hash value is mapped to a bucket. - * By default the map uses `tsl::rh::power_of_two_growth_policy`. This policy keeps the number of buckets - * to a power of two and uses a mask to map the hash to a bucket instead of the slow modulo. - * Other growth policies are available and you may define your own growth policy, - * check `tsl::rh::power_of_two_growth_policy` for the interface. - * - * If the destructor of `Key` or `T` throws an exception, the behaviour of the class is undefined. - * - * Iterators invalidation: - * - clear, operator=, reserve, rehash: always invalidate the iterators. - * - insert, emplace, emplace_hint, operator[]: if there is an effective insert, invalidate the iterators. - * - erase: always invalidate the iterators. - */ -template, - class KeyEqual = std::equal_to, - class Allocator = std::allocator>, - bool StoreHash = false, - class GrowthPolicy = tsl::rh::power_of_two_growth_policy<2>> -class robin_map { -private: - template - using has_is_transparent = tsl::detail_robin_hash::has_is_transparent; - - class KeySelect { - public: - using key_type = Key; - - const key_type& operator()(const std::pair& key_value) const noexcept { - return key_value.first; - } - - key_type& operator()(std::pair& key_value) noexcept { - return key_value.first; - } - }; - - class ValueSelect { - public: - using value_type = T; - - const value_type& operator()(const std::pair& key_value) const noexcept { - return key_value.second; - } - - value_type& operator()(std::pair& key_value) noexcept { - return key_value.second; - } - }; - - using ht = detail_robin_hash::robin_hash, KeySelect, ValueSelect, - Hash, KeyEqual, Allocator, StoreHash, GrowthPolicy>; - -public: - using key_type = typename ht::key_type; - using mapped_type = T; - using value_type = typename ht::value_type; - using size_type = typename ht::size_type; - using difference_type = typename ht::difference_type; - using hasher = typename ht::hasher; - using key_equal = typename ht::key_equal; - using allocator_type = typename ht::allocator_type; - using reference = typename ht::reference; - using const_reference = typename ht::const_reference; - using pointer = typename ht::pointer; - using const_pointer = typename ht::const_pointer; - using iterator = typename ht::iterator; - using const_iterator = typename ht::const_iterator; - - -public: - /* - * Constructors - */ - robin_map(): robin_map(ht::DEFAULT_INIT_BUCKETS_SIZE) { - } - - explicit robin_map(size_type bucket_count, - const Hash& hash = Hash(), - const KeyEqual& equal = KeyEqual(), - const Allocator& alloc = Allocator()): - m_ht(bucket_count, hash, equal, alloc, ht::DEFAULT_MAX_LOAD_FACTOR) - { - } - - robin_map(size_type bucket_count, - const Allocator& alloc): robin_map(bucket_count, Hash(), KeyEqual(), alloc) - { - } - - robin_map(size_type bucket_count, - const Hash& hash, - const Allocator& alloc): robin_map(bucket_count, hash, KeyEqual(), alloc) - { - } - - explicit robin_map(const Allocator& alloc): robin_map(ht::DEFAULT_INIT_BUCKETS_SIZE, alloc) { - } - - template - robin_map(InputIt first, InputIt last, - size_type bucket_count = ht::DEFAULT_INIT_BUCKETS_SIZE, - const Hash& hash = Hash(), - const KeyEqual& equal = KeyEqual(), - const Allocator& alloc = Allocator()): robin_map(bucket_count, hash, equal, alloc) - { - insert(first, last); - } - - template - robin_map(InputIt first, InputIt last, - size_type bucket_count, - const Allocator& alloc): robin_map(first, last, bucket_count, Hash(), KeyEqual(), alloc) - { - } - - template - robin_map(InputIt first, InputIt last, - size_type bucket_count, - const Hash& hash, - const Allocator& alloc): robin_map(first, last, bucket_count, hash, KeyEqual(), alloc) - { - } - - robin_map(std::initializer_list init, - size_type bucket_count = ht::DEFAULT_INIT_BUCKETS_SIZE, - const Hash& hash = Hash(), - const KeyEqual& equal = KeyEqual(), - const Allocator& alloc = Allocator()): - robin_map(init.begin(), init.end(), bucket_count, hash, equal, alloc) - { - } - - robin_map(std::initializer_list init, - size_type bucket_count, - const Allocator& alloc): - robin_map(init.begin(), init.end(), bucket_count, Hash(), KeyEqual(), alloc) - { - } - - robin_map(std::initializer_list init, - size_type bucket_count, - const Hash& hash, - const Allocator& alloc): - robin_map(init.begin(), init.end(), bucket_count, hash, KeyEqual(), alloc) - { - } - - robin_map& operator=(std::initializer_list ilist) { - m_ht.clear(); - - m_ht.reserve(ilist.size()); - m_ht.insert(ilist.begin(), ilist.end()); - - return *this; - } - - allocator_type get_allocator() const { return m_ht.get_allocator(); } - - - /* - * Iterators - */ - iterator begin() noexcept { return m_ht.begin(); } - const_iterator begin() const noexcept { return m_ht.begin(); } - const_iterator cbegin() const noexcept { return m_ht.cbegin(); } - - iterator end() noexcept { return m_ht.end(); } - const_iterator end() const noexcept { return m_ht.end(); } - const_iterator cend() const noexcept { return m_ht.cend(); } - - - /* - * Capacity - */ - bool empty() const noexcept { return m_ht.empty(); } - size_type size() const noexcept { return m_ht.size(); } - size_type max_size() const noexcept { return m_ht.max_size(); } - - /* - * Modifiers - */ - void clear() noexcept { m_ht.clear(); } - - - - std::pair insert(const value_type& value) { - return m_ht.insert(value); - } - - template::value>::type* = nullptr> - std::pair insert(P&& value) { - return m_ht.emplace(std::forward

(value)); - } - - std::pair insert(value_type&& value) { - return m_ht.insert(std::move(value)); - } - - - iterator insert(const_iterator hint, const value_type& value) { - return m_ht.insert(hint, value); - } - - template::value>::type* = nullptr> - iterator insert(const_iterator hint, P&& value) { - return m_ht.emplace_hint(hint, std::forward

(value)); - } - - iterator insert(const_iterator hint, value_type&& value) { - return m_ht.insert(hint, std::move(value)); - } - - - template - void insert(InputIt first, InputIt last) { - m_ht.insert(first, last); - } - - void insert(std::initializer_list ilist) { - m_ht.insert(ilist.begin(), ilist.end()); - } - - - - - template - std::pair insert_or_assign(const key_type& k, M&& obj) { - return m_ht.insert_or_assign(k, std::forward(obj)); - } - - template - std::pair insert_or_assign(key_type&& k, M&& obj) { - return m_ht.insert_or_assign(std::move(k), std::forward(obj)); - } - - template - iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj) { - return m_ht.insert_or_assign(hint, k, std::forward(obj)); - } - - template - iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj) { - return m_ht.insert_or_assign(hint, std::move(k), std::forward(obj)); - } - - - - /** - * Due to the way elements are stored, emplace will need to move or copy the key-value once. - * The method is equivalent to insert(value_type(std::forward(args)...)); - * - * Mainly here for compatibility with the std::unordered_map interface. - */ - template - std::pair emplace(Args&&... args) { - return m_ht.emplace(std::forward(args)...); - } - - - - /** - * Due to the way elements are stored, emplace_hint will need to move or copy the key-value once. - * The method is equivalent to insert(hint, value_type(std::forward(args)...)); - * - * Mainly here for compatibility with the std::unordered_map interface. - */ - template - iterator emplace_hint(const_iterator hint, Args&&... args) { - return m_ht.emplace_hint(hint, std::forward(args)...); - } - - - - - template - std::pair try_emplace(const key_type& k, Args&&... args) { - return m_ht.try_emplace(k, std::forward(args)...); - } - - template - std::pair try_emplace(key_type&& k, Args&&... args) { - return m_ht.try_emplace(std::move(k), std::forward(args)...); - } - - template - iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args) { - return m_ht.try_emplace(hint, k, std::forward(args)...); - } - - template - iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args) { - return m_ht.try_emplace(hint, std::move(k), std::forward(args)...); - } - - - - - iterator erase(iterator pos) { return m_ht.erase(pos); } - iterator erase(const_iterator pos) { return m_ht.erase(pos); } - iterator erase(const_iterator first, const_iterator last) { return m_ht.erase(first, last); } - size_type erase(const key_type& key) { return m_ht.erase(key); } - - /** - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash. - */ - size_type erase(const key_type& key, std::size_t precalculated_hash) { - return m_ht.erase(key, precalculated_hash); - } - - /** - * This overload only participates in the overload resolution if the typedef KeyEqual::is_transparent exists. - * If so, K must be hashable and comparable to Key. - */ - template::value>::type* = nullptr> - size_type erase(const K& key) { return m_ht.erase(key); } - - /** - * @copydoc erase(const K& key) - * - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash. - */ - template::value>::type* = nullptr> - size_type erase(const K& key, std::size_t precalculated_hash) { - return m_ht.erase(key, precalculated_hash); - } - - - - void swap(robin_map& other) { other.m_ht.swap(m_ht); } - - - - /* - * Lookup - */ - T& at(const Key& key) { return m_ht.at(key); } - - /** - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - T& at(const Key& key, std::size_t precalculated_hash) { return m_ht.at(key, precalculated_hash); } - - - const T& at(const Key& key) const { return m_ht.at(key); } - - /** - * @copydoc at(const Key& key, std::size_t precalculated_hash) - */ - const T& at(const Key& key, std::size_t precalculated_hash) const { return m_ht.at(key, precalculated_hash); } - - - /** - * This overload only participates in the overload resolution if the typedef KeyEqual::is_transparent exists. - * If so, K must be hashable and comparable to Key. - */ - template::value>::type* = nullptr> - T& at(const K& key) { return m_ht.at(key); } - - /** - * @copydoc at(const K& key) - * - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - template::value>::type* = nullptr> - T& at(const K& key, std::size_t precalculated_hash) { return m_ht.at(key, precalculated_hash); } - - - /** - * @copydoc at(const K& key) - */ - template::value>::type* = nullptr> - const T& at(const K& key) const { return m_ht.at(key); } - - /** - * @copydoc at(const K& key, std::size_t precalculated_hash) - */ - template::value>::type* = nullptr> - const T& at(const K& key, std::size_t precalculated_hash) const { return m_ht.at(key, precalculated_hash); } - - - - - T& operator[](const Key& key) { return m_ht[key]; } - T& operator[](Key&& key) { return m_ht[std::move(key)]; } - - - - - size_type count(const Key& key) const { return m_ht.count(key); } - - /** - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - size_type count(const Key& key, std::size_t precalculated_hash) const { - return m_ht.count(key, precalculated_hash); - } - - /** - * This overload only participates in the overload resolution if the typedef KeyEqual::is_transparent exists. - * If so, K must be hashable and comparable to Key. - */ - template::value>::type* = nullptr> - size_type count(const K& key) const { return m_ht.count(key); } - - /** - * @copydoc count(const K& key) const - * - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - template::value>::type* = nullptr> - size_type count(const K& key, std::size_t precalculated_hash) const { return m_ht.count(key, precalculated_hash); } - - - - - iterator find(const Key& key) { return m_ht.find(key); } - - /** - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - iterator find(const Key& key, std::size_t precalculated_hash) { return m_ht.find(key, precalculated_hash); } - - const_iterator find(const Key& key) const { return m_ht.find(key); } - - /** - * @copydoc find(const Key& key, std::size_t precalculated_hash) - */ - const_iterator find(const Key& key, std::size_t precalculated_hash) const { - return m_ht.find(key, precalculated_hash); - } - - /** - * This overload only participates in the overload resolution if the typedef KeyEqual::is_transparent exists. - * If so, K must be hashable and comparable to Key. - */ - template::value>::type* = nullptr> - iterator find(const K& key) { return m_ht.find(key); } - - /** - * @copydoc find(const K& key) - * - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - template::value>::type* = nullptr> - iterator find(const K& key, std::size_t precalculated_hash) { return m_ht.find(key, precalculated_hash); } - - /** - * @copydoc find(const K& key) - */ - template::value>::type* = nullptr> - const_iterator find(const K& key) const { return m_ht.find(key); } - - /** - * @copydoc find(const K& key) - * - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - template::value>::type* = nullptr> - const_iterator find(const K& key, std::size_t precalculated_hash) const { - return m_ht.find(key, precalculated_hash); - } - - - - - std::pair equal_range(const Key& key) { return m_ht.equal_range(key); } - - /** - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - std::pair equal_range(const Key& key, std::size_t precalculated_hash) { - return m_ht.equal_range(key, precalculated_hash); - } - - std::pair equal_range(const Key& key) const { return m_ht.equal_range(key); } - - /** - * @copydoc equal_range(const Key& key, std::size_t precalculated_hash) - */ - std::pair equal_range(const Key& key, std::size_t precalculated_hash) const { - return m_ht.equal_range(key, precalculated_hash); - } - - /** - * This overload only participates in the overload resolution if the typedef KeyEqual::is_transparent exists. - * If so, K must be hashable and comparable to Key. - */ - template::value>::type* = nullptr> - std::pair equal_range(const K& key) { return m_ht.equal_range(key); } - - - /** - * @copydoc equal_range(const K& key) - * - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - template::value>::type* = nullptr> - std::pair equal_range(const K& key, std::size_t precalculated_hash) { - return m_ht.equal_range(key, precalculated_hash); - } - - /** - * @copydoc equal_range(const K& key) - */ - template::value>::type* = nullptr> - std::pair equal_range(const K& key) const { return m_ht.equal_range(key); } - - /** - * @copydoc equal_range(const K& key, std::size_t precalculated_hash) - */ - template::value>::type* = nullptr> - std::pair equal_range(const K& key, std::size_t precalculated_hash) const { - return m_ht.equal_range(key, precalculated_hash); - } - - - - - /* - * Bucket interface - */ - size_type bucket_count() const { return m_ht.bucket_count(); } - size_type max_bucket_count() const { return m_ht.max_bucket_count(); } - - - /* - * Hash policy - */ - float load_factor() const { return m_ht.load_factor(); } - float max_load_factor() const { return m_ht.max_load_factor(); } - void max_load_factor(float ml) { m_ht.max_load_factor(ml); } - - void rehash(size_type count) { m_ht.rehash(count); } - void reserve(size_type count) { m_ht.reserve(count); } - - - /* - * Observers - */ - hasher hash_function() const { return m_ht.hash_function(); } - key_equal key_eq() const { return m_ht.key_eq(); } - - /* - * Other - */ - - /** - * Convert a const_iterator to an iterator. - */ - iterator mutable_iterator(const_iterator pos) { - return m_ht.mutable_iterator(pos); - } - - friend bool operator==(const robin_map& lhs, const robin_map& rhs) { - if(lhs.size() != rhs.size()) { - return false; - } - - for(const auto& element_lhs: lhs) { - const auto it_element_rhs = rhs.find(element_lhs.first); - if(it_element_rhs == rhs.cend() || element_lhs.second != it_element_rhs->second) { - return false; - } - } - - return true; - } - - friend bool operator!=(const robin_map& lhs, const robin_map& rhs) { - return !operator==(lhs, rhs); - } - - friend void swap(robin_map& lhs, robin_map& rhs) { - lhs.swap(rhs); - } - -private: - ht m_ht; -}; - - -/** - * Same as `tsl::robin_map`. - */ -template, - class KeyEqual = std::equal_to, - class Allocator = std::allocator>, - bool StoreHash = false> -using robin_pg_map = robin_map; - -} // end namespace tsl - -#endif diff --git a/windows/include/filament/tsl/robin_set.h b/windows/include/filament/tsl/robin_set.h deleted file mode 100644 index 4e4667e2..00000000 --- a/windows/include/filament/tsl/robin_set.h +++ /dev/null @@ -1,535 +0,0 @@ -/** - * MIT License - * - * Copyright (c) 2017 Tessil - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef TSL_ROBIN_SET_H -#define TSL_ROBIN_SET_H - - -#include -#include -#include -#include -#include -#include -#include "robin_hash.h" - - -namespace tsl { - - -/** - * Implementation of a hash set using open-adressing and the robin hood hashing algorithm with backward shift deletion. - * - * For operations modifying the hash set (insert, erase, rehash, ...), the strong exception guarantee - * is only guaranteed when the expression `std::is_nothrow_swappable::value && - * std::is_nothrow_move_constructible::value` is true, otherwise if an exception - * is thrown during the swap or the move, the hash set may end up in a undefined state. Per the standard - * a `Key` with a noexcept copy constructor and no move constructor also satisfies the - * `std::is_nothrow_move_constructible::value` criterion (and will thus guarantee the - * strong exception for the set). - * - * When `StoreHash` is true, 32 bits of the hash are stored alongside the values. It can improve - * the performance during lookups if the `KeyEqual` function takes time (or engenders a cache-miss for example) - * as we then compare the stored hashes before comparing the keys. When `tsl::rh::power_of_two_growth_policy` is used - * as `GrowthPolicy`, it may also speed-up the rehash process as we can avoid to recalculate the hash. - * When it is detected that storing the hash will not incur any memory penality due to alignement (i.e. - * `sizeof(tsl::detail_robin_hash::bucket_entry) == - * sizeof(tsl::detail_robin_hash::bucket_entry)`) and `tsl::rh::power_of_two_growth_policy` is - * used, the hash will be stored even if `StoreHash` is false so that we can speed-up the rehash (but it will - * not be used on lookups unless `StoreHash` is true). - * - * `GrowthPolicy` defines how the set grows and consequently how a hash value is mapped to a bucket. - * By default the set uses `tsl::rh::power_of_two_growth_policy`. This policy keeps the number of buckets - * to a power of two and uses a mask to set the hash to a bucket instead of the slow modulo. - * Other growth policies are available and you may define your own growth policy, - * check `tsl::rh::power_of_two_growth_policy` for the interface. - * - * If the destructor of `Key` throws an exception, the behaviour of the class is undefined. - * - * Iterators invalidation: - * - clear, operator=, reserve, rehash: always invalidate the iterators. - * - insert, emplace, emplace_hint, operator[]: if there is an effective insert, invalidate the iterators. - * - erase: always invalidate the iterators. - */ -template, - class KeyEqual = std::equal_to, - class Allocator = std::allocator, - bool StoreHash = false, - class GrowthPolicy = tsl::rh::power_of_two_growth_policy<2>> -class robin_set { -private: - template - using has_is_transparent = tsl::detail_robin_hash::has_is_transparent; - - class KeySelect { - public: - using key_type = Key; - - const key_type& operator()(const Key& key) const noexcept { - return key; - } - - key_type& operator()(Key& key) noexcept { - return key; - } - }; - - using ht = detail_robin_hash::robin_hash; - -public: - using key_type = typename ht::key_type; - using value_type = typename ht::value_type; - using size_type = typename ht::size_type; - using difference_type = typename ht::difference_type; - using hasher = typename ht::hasher; - using key_equal = typename ht::key_equal; - using allocator_type = typename ht::allocator_type; - using reference = typename ht::reference; - using const_reference = typename ht::const_reference; - using pointer = typename ht::pointer; - using const_pointer = typename ht::const_pointer; - using iterator = typename ht::iterator; - using const_iterator = typename ht::const_iterator; - - - /* - * Constructors - */ - robin_set(): robin_set(ht::DEFAULT_INIT_BUCKETS_SIZE) { - } - - explicit robin_set(size_type bucket_count, - const Hash& hash = Hash(), - const KeyEqual& equal = KeyEqual(), - const Allocator& alloc = Allocator()): - m_ht(bucket_count, hash, equal, alloc, ht::DEFAULT_MAX_LOAD_FACTOR) - { - } - - robin_set(size_type bucket_count, - const Allocator& alloc): robin_set(bucket_count, Hash(), KeyEqual(), alloc) - { - } - - robin_set(size_type bucket_count, - const Hash& hash, - const Allocator& alloc): robin_set(bucket_count, hash, KeyEqual(), alloc) - { - } - - explicit robin_set(const Allocator& alloc): robin_set(ht::DEFAULT_INIT_BUCKETS_SIZE, alloc) { - } - - template - robin_set(InputIt first, InputIt last, - size_type bucket_count = ht::DEFAULT_INIT_BUCKETS_SIZE, - const Hash& hash = Hash(), - const KeyEqual& equal = KeyEqual(), - const Allocator& alloc = Allocator()): robin_set(bucket_count, hash, equal, alloc) - { - insert(first, last); - } - - template - robin_set(InputIt first, InputIt last, - size_type bucket_count, - const Allocator& alloc): robin_set(first, last, bucket_count, Hash(), KeyEqual(), alloc) - { - } - - template - robin_set(InputIt first, InputIt last, - size_type bucket_count, - const Hash& hash, - const Allocator& alloc): robin_set(first, last, bucket_count, hash, KeyEqual(), alloc) - { - } - - robin_set(std::initializer_list init, - size_type bucket_count = ht::DEFAULT_INIT_BUCKETS_SIZE, - const Hash& hash = Hash(), - const KeyEqual& equal = KeyEqual(), - const Allocator& alloc = Allocator()): - robin_set(init.begin(), init.end(), bucket_count, hash, equal, alloc) - { - } - - robin_set(std::initializer_list init, - size_type bucket_count, - const Allocator& alloc): - robin_set(init.begin(), init.end(), bucket_count, Hash(), KeyEqual(), alloc) - { - } - - robin_set(std::initializer_list init, - size_type bucket_count, - const Hash& hash, - const Allocator& alloc): - robin_set(init.begin(), init.end(), bucket_count, hash, KeyEqual(), alloc) - { - } - - - robin_set& operator=(std::initializer_list ilist) { - m_ht.clear(); - - m_ht.reserve(ilist.size()); - m_ht.insert(ilist.begin(), ilist.end()); - - return *this; - } - - allocator_type get_allocator() const { return m_ht.get_allocator(); } - - - /* - * Iterators - */ - iterator begin() noexcept { return m_ht.begin(); } - const_iterator begin() const noexcept { return m_ht.begin(); } - const_iterator cbegin() const noexcept { return m_ht.cbegin(); } - - iterator end() noexcept { return m_ht.end(); } - const_iterator end() const noexcept { return m_ht.end(); } - const_iterator cend() const noexcept { return m_ht.cend(); } - - - /* - * Capacity - */ - bool empty() const noexcept { return m_ht.empty(); } - size_type size() const noexcept { return m_ht.size(); } - size_type max_size() const noexcept { return m_ht.max_size(); } - - /* - * Modifiers - */ - void clear() noexcept { m_ht.clear(); } - - - - - std::pair insert(const value_type& value) { - return m_ht.insert(value); - } - - std::pair insert(value_type&& value) { - return m_ht.insert(std::move(value)); - } - - iterator insert(const_iterator hint, const value_type& value) { - return m_ht.insert(hint, value); - } - - iterator insert(const_iterator hint, value_type&& value) { - return m_ht.insert(hint, std::move(value)); - } - - template - void insert(InputIt first, InputIt last) { - m_ht.insert(first, last); - } - - void insert(std::initializer_list ilist) { - m_ht.insert(ilist.begin(), ilist.end()); - } - - - - - /** - * Due to the way elements are stored, emplace will need to move or copy the key-value once. - * The method is equivalent to insert(value_type(std::forward(args)...)); - * - * Mainly here for compatibility with the std::unordered_map interface. - */ - template - std::pair emplace(Args&&... args) { - return m_ht.emplace(std::forward(args)...); - } - - - - /** - * Due to the way elements are stored, emplace_hint will need to move or copy the key-value once. - * The method is equivalent to insert(hint, value_type(std::forward(args)...)); - * - * Mainly here for compatibility with the std::unordered_map interface. - */ - template - iterator emplace_hint(const_iterator hint, Args&&... args) { - return m_ht.emplace_hint(hint, std::forward(args)...); - } - - - - iterator erase(iterator pos) { return m_ht.erase(pos); } - iterator erase(const_iterator pos) { return m_ht.erase(pos); } - iterator erase(const_iterator first, const_iterator last) { return m_ht.erase(first, last); } - size_type erase(const key_type& key) { return m_ht.erase(key); } - - /** - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash. - */ - size_type erase(const key_type& key, std::size_t precalculated_hash) { - return m_ht.erase(key, precalculated_hash); - } - - /** - * This overload only participates in the overload resolution if the typedef KeyEqual::is_transparent exists. - * If so, K must be hashable and comparable to Key. - */ - template::value>::type* = nullptr> - size_type erase(const K& key) { return m_ht.erase(key); } - - /** - * @copydoc erase(const K& key) - * - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash. - */ - template::value>::type* = nullptr> - size_type erase(const K& key, std::size_t precalculated_hash) { - return m_ht.erase(key, precalculated_hash); - } - - - - void swap(robin_set& other) { other.m_ht.swap(m_ht); } - - - - /* - * Lookup - */ - size_type count(const Key& key) const { return m_ht.count(key); } - - /** - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - size_type count(const Key& key, std::size_t precalculated_hash) const { return m_ht.count(key, precalculated_hash); } - - /** - * This overload only participates in the overload resolution if the typedef KeyEqual::is_transparent exists. - * If so, K must be hashable and comparable to Key. - */ - template::value>::type* = nullptr> - size_type count(const K& key) const { return m_ht.count(key); } - - /** - * @copydoc count(const K& key) const - * - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - template::value>::type* = nullptr> - size_type count(const K& key, std::size_t precalculated_hash) const { return m_ht.count(key, precalculated_hash); } - - - - - iterator find(const Key& key) { return m_ht.find(key); } - - /** - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - iterator find(const Key& key, std::size_t precalculated_hash) { return m_ht.find(key, precalculated_hash); } - - const_iterator find(const Key& key) const { return m_ht.find(key); } - - /** - * @copydoc find(const Key& key, std::size_t precalculated_hash) - */ - const_iterator find(const Key& key, std::size_t precalculated_hash) const { return m_ht.find(key, precalculated_hash); } - - /** - * This overload only participates in the overload resolution if the typedef KeyEqual::is_transparent exists. - * If so, K must be hashable and comparable to Key. - */ - template::value>::type* = nullptr> - iterator find(const K& key) { return m_ht.find(key); } - - /** - * @copydoc find(const K& key) - * - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - template::value>::type* = nullptr> - iterator find(const K& key, std::size_t precalculated_hash) { return m_ht.find(key, precalculated_hash); } - - /** - * @copydoc find(const K& key) - */ - template::value>::type* = nullptr> - const_iterator find(const K& key) const { return m_ht.find(key); } - - /** - * @copydoc find(const K& key) - * - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - template::value>::type* = nullptr> - const_iterator find(const K& key, std::size_t precalculated_hash) const { return m_ht.find(key, precalculated_hash); } - - - - - std::pair equal_range(const Key& key) { return m_ht.equal_range(key); } - - /** - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - std::pair equal_range(const Key& key, std::size_t precalculated_hash) { - return m_ht.equal_range(key, precalculated_hash); - } - - std::pair equal_range(const Key& key) const { return m_ht.equal_range(key); } - - /** - * @copydoc equal_range(const Key& key, std::size_t precalculated_hash) - */ - std::pair equal_range(const Key& key, std::size_t precalculated_hash) const { - return m_ht.equal_range(key, precalculated_hash); - } - - /** - * This overload only participates in the overload resolution if the typedef KeyEqual::is_transparent exists. - * If so, K must be hashable and comparable to Key. - */ - template::value>::type* = nullptr> - std::pair equal_range(const K& key) { return m_ht.equal_range(key); } - - /** - * @copydoc equal_range(const K& key) - * - * Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same - * as hash_function()(key). Usefull to speed-up the lookup if you already have the hash. - */ - template::value>::type* = nullptr> - std::pair equal_range(const K& key, std::size_t precalculated_hash) { - return m_ht.equal_range(key, precalculated_hash); - } - - /** - * @copydoc equal_range(const K& key) - */ - template::value>::type* = nullptr> - std::pair equal_range(const K& key) const { return m_ht.equal_range(key); } - - /** - * @copydoc equal_range(const K& key, std::size_t precalculated_hash) - */ - template::value>::type* = nullptr> - std::pair equal_range(const K& key, std::size_t precalculated_hash) const { - return m_ht.equal_range(key, precalculated_hash); - } - - - - - /* - * Bucket interface - */ - size_type bucket_count() const { return m_ht.bucket_count(); } - size_type max_bucket_count() const { return m_ht.max_bucket_count(); } - - - /* - * Hash policy - */ - float load_factor() const { return m_ht.load_factor(); } - float max_load_factor() const { return m_ht.max_load_factor(); } - void max_load_factor(float ml) { m_ht.max_load_factor(ml); } - - void rehash(size_type count) { m_ht.rehash(count); } - void reserve(size_type count) { m_ht.reserve(count); } - - - /* - * Observers - */ - hasher hash_function() const { return m_ht.hash_function(); } - key_equal key_eq() const { return m_ht.key_eq(); } - - - /* - * Other - */ - - /** - * Convert a const_iterator to an iterator. - */ - iterator mutable_iterator(const_iterator pos) { - return m_ht.mutable_iterator(pos); - } - - friend bool operator==(const robin_set& lhs, const robin_set& rhs) { - if(lhs.size() != rhs.size()) { - return false; - } - - for(const auto& element_lhs: lhs) { - const auto it_element_rhs = rhs.find(element_lhs); - if(it_element_rhs == rhs.cend()) { - return false; - } - } - - return true; - } - - friend bool operator!=(const robin_set& lhs, const robin_set& rhs) { - return !operator==(lhs, rhs); - } - - friend void swap(robin_set& lhs, robin_set& rhs) { - lhs.swap(rhs); - } - -private: - ht m_ht; -}; - - -/** - * Same as `tsl::robin_set`. - */ -template, - class KeyEqual = std::equal_to, - class Allocator = std::allocator, - bool StoreHash = false> -using robin_pg_set = robin_set; - -} // end namespace tsl - -#endif - diff --git a/windows/include/filament/uberz/ArchiveEnums.h b/windows/include/filament/uberz/ArchiveEnums.h deleted file mode 100644 index b2741be9..00000000 --- a/windows/include/filament/uberz/ArchiveEnums.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -#ifndef UBERZ_ARCHIVE_ENUMS_H -#define UBERZ_ARCHIVE_ENUMS_H - -#include - -namespace filament::uberz { - - enum class ArchiveFeature : uint64_t { - UNSUPPORTED, - OPTIONAL, - REQUIRED, - }; - -} // namespace filament::uberz - -#endif // UBERZ_ARCHIVE_ENUMS_H diff --git a/windows/include/filament/uberz/ReadableArchive.h b/windows/include/filament/uberz/ReadableArchive.h deleted file mode 100644 index 5d78cb26..00000000 --- a/windows/include/filament/uberz/ReadableArchive.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -#ifndef UBERZ_READABLE_ARCHIVE_H -#define UBERZ_READABLE_ARCHIVE_H - -#include - -#include - -#include - -namespace filament::uberz { - -// ArchiveSpec is a parse-free binary format. The client simply casts a word-aligned content blob -// into a ReadableArchive struct pointer, then calls the following function to convert all the -// offset fields into pointers. -void convertOffsetsToPointers(struct ReadableArchive* archive); - -UTILS_WARNING_PUSH -UTILS_WARNING_ENABLE_PADDED - -// Precompiled set of materials bundled with a list of features flags that each material supports. -// This is the readable counterpart to WriteableArchive. -// Used by gltfio; users do not need to access this class directly. -struct ReadableArchive { - uint32_t magic; - uint32_t version; - uint64_t specsCount; - union { - struct ArchiveSpec* specs; - uint64_t specsOffset; - }; -}; - -static constexpr Shading INVALID_SHADING_MODEL = (Shading) 0xff; -static constexpr BlendingMode INVALID_BLENDING = (BlendingMode) 0xff; - -struct ArchiveSpec { - Shading shadingModel; - BlendingMode blendingMode; - uint16_t flagsCount; - uint32_t packageByteCount; - union { - struct ArchiveFlag* flags; - uint64_t flagsOffset; - }; - union { - uint8_t* package; - uint64_t packageOffset; - }; -}; - -struct ArchiveFlag { - union { - const char* name; - uint64_t nameOffset; - }; - ArchiveFeature value; -}; - -UTILS_WARNING_POP - -} // namespace filament::uberz - -#endif // UBERZ_READABLE_ARCHIVE_H diff --git a/windows/include/filament/uberz/WritableArchive.h b/windows/include/filament/uberz/WritableArchive.h deleted file mode 100644 index e511d95f..00000000 --- a/windows/include/filament/uberz/WritableArchive.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -#ifndef UBERZ_WRITABLE_ARCHIVE_H -#define UBERZ_WRITABLE_ARCHIVE_H - -#include - -#include -#include -#include - -#include - -#include - -namespace filament::uberz { - -// Precompiled set of materials bundled with a list of features flags that each material supports. -// This is the writeable counterpart to ReadableArchive. -// Users do not need to access this class directly, they should go through gltfio. -class WritableArchive { -public: - WritableArchive(size_t materialCount) : mMaterials(uint32_t(materialCount)) { - assert(materialCount <= UINT_MAX); - } - - void addMaterial(const char* name, const uint8_t* package, size_t packageSize); - void addSpecLine(std::string_view line); - utils::FixedCapacityVector serialize() const; - - // Low-level alternatives to addSpecLine that do not involve parsing: - void setShadingModel(Shading sm); - void setBlendingModel(BlendingMode bm); - void setFeatureFlag(const char* key, ArchiveFeature value); - -private: - size_t mLineNumber = 1; - ssize_t mMaterialIndex = -1; - - struct Material { - utils::CString name; - utils::FixedCapacityVector package; - Shading shadingModel; - BlendingMode blendingMode; - tsl::robin_map flags; - }; - - utils::FixedCapacityVector mMaterials; -}; - -} // namespace filament::uberz - -#endif // UBERZ_WRITABLE_ARCHIVE_H diff --git a/windows/include/filament/utils/Allocator.h b/windows/include/filament/utils/Allocator.h deleted file mode 100644 index 82d1d1cc..00000000 --- a/windows/include/filament/utils/Allocator.h +++ /dev/null @@ -1,840 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_UTILS_ALLOCATOR_H -#define TNT_UTILS_ALLOCATOR_H - - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -namespace utils { - -namespace pointermath { - -template -static inline P* add(P* a, T b) noexcept { - return (P*)(uintptr_t(a) + uintptr_t(b)); -} - -template -static inline P* align(P* p, size_t alignment) noexcept { - // alignment must be a power-of-two - assert(alignment && !(alignment & alignment-1)); - return (P*)((uintptr_t(p) + alignment - 1) & ~(alignment - 1)); -} - -template -static inline P* align(P* p, size_t alignment, size_t offset) noexcept { - P* const r = align(add(p, offset), alignment); - assert(r >= add(p, offset)); - return r; -} - -} - -/* ------------------------------------------------------------------------------------------------ - * LinearAllocator - * - * + Allocates blocks linearly - * + Cannot free individual blocks - * + Can free top of memory back up to a specified point - * + Doesn't call destructors - * ------------------------------------------------------------------------------------------------ - */ - -class LinearAllocator { -public: - // use memory area provided - LinearAllocator(void* begin, void* end) noexcept; - - template - explicit LinearAllocator(const AREA& area) : LinearAllocator(area.begin(), area.end()) { } - - // Allocators can't be copied - LinearAllocator(const LinearAllocator& rhs) = delete; - LinearAllocator& operator=(const LinearAllocator& rhs) = delete; - - // Allocators can be moved - LinearAllocator(LinearAllocator&& rhs) noexcept; - LinearAllocator& operator=(LinearAllocator&& rhs) noexcept; - - ~LinearAllocator() noexcept = default; - - // our allocator concept - void* alloc(size_t size, size_t alignment = alignof(std::max_align_t), size_t extra = 0) UTILS_RESTRICT { - // branch-less allocation - void* const p = pointermath::align(current(), alignment, extra); - void* const c = pointermath::add(p, size); - bool success = c <= end(); - set_current(success ? c : current()); - return success ? p : nullptr; - } - - // API specific to this allocator - - void *getCurrent() UTILS_RESTRICT noexcept { - return current(); - } - - // free memory back to the specified point - void rewind(void* p) UTILS_RESTRICT noexcept { - assert(p>=mBegin && p - explicit HeapAllocator(const AREA&) { } - - // our allocator concept - void* alloc(size_t size, size_t alignment = alignof(std::max_align_t), size_t extra = 0) { - // this allocator doesn't support 'extra' - assert(extra == 0); - return aligned_alloc(size, alignment); - } - - void free(void* p) noexcept { - aligned_free(p); - } - - void free(void* p, size_t) noexcept { - this->free(p); - } - - ~HeapAllocator() noexcept = default; - - void swap(HeapAllocator&) noexcept { } -}; - -// ------------------------------------------------------------------------------------------------ - -class FreeList { -public: - FreeList() noexcept = default; - FreeList(void* begin, void* end, size_t elementSize, size_t alignment, size_t extra) noexcept; - FreeList(const FreeList& rhs) = delete; - FreeList& operator=(const FreeList& rhs) = delete; - FreeList(FreeList&& rhs) noexcept = default; - FreeList& operator=(FreeList&& rhs) noexcept = default; - - void* pop() noexcept { - Node* const head = mHead; - mHead = head ? head->next : nullptr; - // this could indicate a use after free - assert(!mHead || mHead >= mBegin && mHead < mEnd); - return head; - } - - void push(void* p) noexcept { - assert(p); - assert(p >= mBegin && p < mEnd); - // TODO: assert this is one of our pointer (i.e.: it's address match one of ours) - Node* const head = static_cast(p); - head->next = mHead; - mHead = head; - } - - void *getFirst() noexcept { - return mHead; - } - -private: - struct Node { - Node* next; - }; - - static Node* init(void* begin, void* end, - size_t elementSize, size_t alignment, size_t extra) noexcept; - - Node* mHead = nullptr; - -#ifndef NDEBUG - // These are needed only for debugging... - void* mBegin = nullptr; - void* mEnd = nullptr; -#endif -}; - -class AtomicFreeList { -public: - AtomicFreeList() noexcept = default; - AtomicFreeList(void* begin, void* end, - size_t elementSize, size_t alignment, size_t extra) noexcept; - AtomicFreeList(const FreeList& rhs) = delete; - AtomicFreeList& operator=(const FreeList& rhs) = delete; - - void* pop() noexcept { - Node* const storage = mStorage; - - HeadPtr currentHead = mHead.load(); - while (currentHead.offset >= 0) { - // The value of "next" we load here might already contain application data if another - // thread raced ahead of us. But in that case, the computed "newHead" will be discarded - // since compare_exchange_weak fails. Then this thread will loop with the updated - // value of currentHead, and try again. - Node* const next = storage[currentHead.offset].next.load(std::memory_order_relaxed); - const HeadPtr newHead{ next ? int32_t(next - storage) : -1, currentHead.tag + 1 }; - // In the rare case that the other thread that raced ahead of us already returned the - // same mHead we just loaded, but it now has a different "next" value, the tag field will not - // match, and compare_exchange_weak will fail and prevent that particular race condition. - if (mHead.compare_exchange_weak(currentHead, newHead)) { - // This assert needs to occur after we have validated that there was no race condition - // Otherwise, next might already contain application data, if another thread - // raced ahead of us after we loaded mHead, but before we loaded mHead->next. - assert(!next || next >= storage); - break; - } - } - void* p = (currentHead.offset >= 0) ? (storage + currentHead.offset) : nullptr; - assert(!p || p >= storage); - return p; - } - - void push(void* p) noexcept { - Node* const storage = mStorage; - assert(p && p >= storage); - Node* const node = static_cast(p); - HeadPtr currentHead = mHead.load(); - HeadPtr newHead = { int32_t(node - storage), currentHead.tag + 1 }; - do { - newHead.tag = currentHead.tag + 1; - Node* const n = (currentHead.offset >= 0) ? (storage + currentHead.offset) : nullptr; - node->next.store(n, std::memory_order_relaxed); - } while(!mHead.compare_exchange_weak(currentHead, newHead)); - } - - void* getFirst() noexcept { - return mStorage + mHead.load(std::memory_order_relaxed).offset; - } - -private: - struct Node { - // This should be a regular (non-atomic) pointer, but this causes TSAN to complain - // about a data-race that exists but is benin. We always use this atomic<> in - // relaxed mode. - // The data race TSAN complains about is when a pop() is interrupted by a - // pop() + push() just after mHead->next is read -- it appears as though it is written - // without synchronization (by the push), however in that case, the pop's CAS will fail - // and things will auto-correct. - // - // Pop() | - // | | - // read head->next | - // | pop() - // | | - // | read head->next - // | CAS, tag++ - // | | - // | push() - // | | - // [TSAN: data-race here] write head->next - // | CAS, tag++ - // CAS fails - // | - // read head->next - // | - // CAS, tag++ - // - std::atomic next; - }; - - // This struct is using a 32-bit offset into the arena rather than - // a direct pointer, because together with the 32-bit tag, it needs to - // fit into 8 bytes. If it was any larger, it would not be possible to - // access it atomically. - struct alignas(8) HeadPtr { - int32_t offset; - uint32_t tag; - }; - - std::atomic mHead{}; - - Node* mStorage = nullptr; -}; - -// ------------------------------------------------------------------------------------------------ - -template < - size_t ELEMENT_SIZE, - size_t ALIGNMENT = alignof(std::max_align_t), - size_t OFFSET = 0, - typename FREELIST = FreeList> -class PoolAllocator { - static_assert(ELEMENT_SIZE >= sizeof(void*), "ELEMENT_SIZE must accommodate at least a pointer"); -public: - // our allocator concept - void* alloc(size_t size = ELEMENT_SIZE, - size_t alignment = ALIGNMENT, size_t offset = OFFSET) noexcept { - assert(size <= ELEMENT_SIZE); - assert(alignment <= ALIGNMENT); - assert(offset == OFFSET); - return mFreeList.pop(); - } - - void free(void* p, size_t = ELEMENT_SIZE) noexcept { - mFreeList.push(p); - } - - constexpr size_t getSize() const noexcept { return ELEMENT_SIZE; } - - PoolAllocator(void* begin, void* end) noexcept - : mFreeList(begin, end, ELEMENT_SIZE, ALIGNMENT, OFFSET) { - } - - template - explicit PoolAllocator(const AREA& area) noexcept - : PoolAllocator(area.begin(), area.end()) { - } - - // Allocators can't be copied - PoolAllocator(const PoolAllocator& rhs) = delete; - PoolAllocator& operator=(const PoolAllocator& rhs) = delete; - - // Allocators can be moved - PoolAllocator(PoolAllocator&& rhs) = default; - PoolAllocator& operator=(PoolAllocator&& rhs) = default; - - PoolAllocator() noexcept = default; - ~PoolAllocator() noexcept = default; - - // API specific to this allocator - - void *getCurrent() noexcept { - return mFreeList.getFirst(); - } - -private: - FREELIST mFreeList; -}; - -#define UTILS_MAX(a,b) ((a) > (b) ? (a) : (b)) - -template -using ObjectPoolAllocator = PoolAllocator; - -template -using ThreadSafeObjectPoolAllocator = PoolAllocator; - - -// ------------------------------------------------------------------------------------------------ -// Areas -// ------------------------------------------------------------------------------------------------ - -namespace AreaPolicy { - -class StaticArea { -public: - StaticArea() noexcept = default; - - StaticArea(void* b, void* e) noexcept - : mBegin(b), mEnd(e) { - } - - ~StaticArea() noexcept = default; - - StaticArea(const StaticArea& rhs) = default; - StaticArea& operator=(const StaticArea& rhs) = default; - StaticArea(StaticArea&& rhs) noexcept = default; - StaticArea& operator=(StaticArea&& rhs) noexcept = default; - - void* data() const noexcept { return mBegin; } - void* begin() const noexcept { return mBegin; } - void* end() const noexcept { return mEnd; } - size_t size() const noexcept { return uintptr_t(mEnd) - uintptr_t(mBegin); } - - friend void swap(StaticArea& lhs, StaticArea& rhs) noexcept { - using std::swap; - swap(lhs.mBegin, rhs.mBegin); - swap(lhs.mEnd, rhs.mEnd); - } - -private: - void* mBegin = nullptr; - void* mEnd = nullptr; -}; - -class HeapArea { -public: - HeapArea() noexcept = default; - - explicit HeapArea(size_t size) { - if (size) { - // TODO: policy committing memory - mBegin = malloc(size); - mEnd = pointermath::add(mBegin, size); - } - } - - ~HeapArea() noexcept { - // TODO: policy for returning memory to system - free(mBegin); - } - - HeapArea(const HeapArea& rhs) = delete; - HeapArea& operator=(const HeapArea& rhs) = delete; - HeapArea(HeapArea&& rhs) noexcept = delete; - HeapArea& operator=(HeapArea&& rhs) noexcept = delete; - - void* data() const noexcept { return mBegin; } - void* begin() const noexcept { return mBegin; } - void* end() const noexcept { return mEnd; } - size_t size() const noexcept { return uintptr_t(mEnd) - uintptr_t(mBegin); } - - friend void swap(HeapArea& lhs, HeapArea& rhs) noexcept { - using std::swap; - swap(lhs.mBegin, rhs.mBegin); - swap(lhs.mEnd, rhs.mEnd); - } - -private: - void* mBegin = nullptr; - void* mEnd = nullptr; -}; - -class NullArea { -public: - void* data() const noexcept { return nullptr; } - size_t size() const noexcept { return 0; } -}; - -} // namespace AreaPolicy - -// ------------------------------------------------------------------------------------------------ -// Policies -// ------------------------------------------------------------------------------------------------ - -namespace LockingPolicy { - -struct NoLock { - void lock() noexcept { } - void unlock() noexcept { } -}; - -using SpinLock = utils::SpinLock; -using Mutex = utils::Mutex; - -} // namespace LockingPolicy - - -namespace TrackingPolicy { - -// default no-op tracker -struct Untracked { - Untracked() noexcept = default; - Untracked(const char* name, void* base, size_t size) noexcept { - (void)name, void(base), (void)size; - } - void onAlloc(void* p, size_t size, size_t alignment, size_t extra) noexcept { - (void)p, (void)size, (void)alignment, (void)extra; - } - void onFree(void* p, size_t = 0) noexcept { (void)p; } - void onReset() noexcept { } - void onRewind(void* addr) noexcept { (void)addr; } -}; - -// This just track the max memory usage and logs it in the destructor -struct HighWatermark { - HighWatermark() noexcept = default; - HighWatermark(const char* name, void* base, size_t size) noexcept - : mName(name), mBase(base), mSize(uint32_t(size)) { } - ~HighWatermark() noexcept; - void onAlloc(void* p, size_t size, size_t alignment, size_t extra) noexcept; - void onFree(void* p, size_t size) noexcept; - void onReset() noexcept; - void onRewind(void const* addr) noexcept; - uint32_t getHighWatermark() const noexcept { return mHighWaterMark; } -protected: - const char* mName = nullptr; - void* mBase = nullptr; - uint32_t mSize = 0; - uint32_t mCurrent = 0; - uint32_t mHighWaterMark = 0; -}; - -// This just fills buffers with known values to help catch uninitialized access and use after free. -struct Debug { - Debug() noexcept = default; - Debug(const char* name, void* base, size_t size) noexcept - : mName(name), mBase(base), mSize(uint32_t(size)) { } - void onAlloc(void* p, size_t size, size_t alignment, size_t extra) noexcept; - void onFree(void* p, size_t size) noexcept; - void onReset() noexcept; - void onRewind(void* addr) noexcept; -protected: - const char* mName = nullptr; - void* mBase = nullptr; - uint32_t mSize = 0; -}; - -struct DebugAndHighWatermark : protected HighWatermark, protected Debug { - DebugAndHighWatermark() noexcept = default; - DebugAndHighWatermark(const char* name, void* base, size_t size) noexcept - : HighWatermark(name, base, size), Debug(name, base, size) { } - void onAlloc(void* p, size_t size, size_t alignment, size_t extra) noexcept { - HighWatermark::onAlloc(p, size, alignment, extra); - Debug::onAlloc(p, size, alignment, extra); - } - void onFree(void* p, size_t size) noexcept { - HighWatermark::onFree(p, size); - Debug::onFree(p, size); - } - void onReset() noexcept { - HighWatermark::onReset(); - Debug::onReset(); - } - void onRewind(void* addr) noexcept { - HighWatermark::onRewind(addr); - Debug::onRewind(addr); - } -}; - -} // namespace TrackingPolicy - -// ------------------------------------------------------------------------------------------------ -// Arenas -// ------------------------------------------------------------------------------------------------ - -template -class Arena { -public: - - Arena() = default; - - // construct an arena with a name and forward argument to its allocator - template - Arena(const char* name, size_t size, ARGS&& ... args) - : mArenaName(name), - mArea(size), - mAllocator(mArea, std::forward(args) ... ), - mListener(name, mArea.data(), mArea.size()) { - } - - template - Arena(const char* name, AreaPolicy&& area, ARGS&& ... args) - : mArenaName(name), - mArea(std::forward(area)), - mAllocator(mArea, std::forward(args) ... ), - mListener(name, mArea.data(), mArea.size()) { - } - - // allocate memory from arena with given size and alignment - // (acceptable size/alignment may depend on the allocator provided) - void* alloc(size_t size, size_t alignment = alignof(std::max_align_t), size_t extra = 0) noexcept { - std::lock_guard guard(mLock); - void* p = mAllocator.alloc(size, alignment, extra); - mListener.onAlloc(p, size, alignment, extra); - return p; - } - - // Allocate an array of trivially destructible objects - // for safety, we disable the object-based alloc method if the object type is not - // trivially destructible, since free() won't call the destructor and this is allocating - // an array. - template ::value>::type> - T* alloc(size_t count, size_t alignment = alignof(T), size_t extra = 0) noexcept { - return (T*)alloc(count * sizeof(T), alignment, extra); - } - - // return memory pointed by p to the arena - // (actual behaviour may depend on allocator provided) - void free(void* p) noexcept { - if (p) { - std::lock_guard guard(mLock); - mListener.onFree(p); - mAllocator.free(p); - } - } - - // some allocators require the size of the allocation for free - void free(void* p, size_t size) noexcept { - if (p) { - std::lock_guard guard(mLock); - mListener.onFree(p, size); - mAllocator.free(p, size); - } - } - - // some allocators don't have a free() call, but a single reset() or rewind() instead - void reset() noexcept { - std::lock_guard guard(mLock); - mListener.onReset(); - mAllocator.reset(); - } - - void* getCurrent() noexcept { return mAllocator.getCurrent(); } - - void rewind(void *addr) noexcept { - std::lock_guard guard(mLock); - mListener.onRewind(addr); - mAllocator.rewind(addr); - } - - // Allocate and construct an object - template - T* make(ARGS&& ... args) noexcept { - void* const p = this->alloc(sizeof(T), ALIGN); - return p ? new(p) T(std::forward(args)...) : nullptr; - } - - // destroys an object created with make() above, and frees associated memory - template - void destroy(T* p) noexcept { - if (p) { - p->~T(); - this->free((void*)p, sizeof(T)); - } - } - - char const* getName() const noexcept { return mArenaName; } - - AllocatorPolicy& getAllocator() noexcept { return mAllocator; } - AllocatorPolicy const& getAllocator() const noexcept { return mAllocator; } - - TrackingPolicy& getListener() noexcept { return mListener; } - TrackingPolicy const& getListener() const noexcept { return mListener; } - - AreaPolicy& getArea() noexcept { return mArea; } - AreaPolicy const& getArea() const noexcept { return mArea; } - - void setListener(TrackingPolicy listener) noexcept { - std::swap(mListener, listener); - } - - template - void emplaceListener(ARGS&& ... args) noexcept { - mListener.~TrackingPolicy(); - new (&mListener) TrackingPolicy(std::forward(args)...); - } - - // An arena can't be copied - Arena(Arena const& rhs) noexcept = delete; - Arena& operator=(Arena const& rhs) noexcept = delete; - - friend void swap(Arena& lhs, Arena& rhs) noexcept { - using std::swap; - swap(lhs.mArea, rhs.mArea); - swap(lhs.mAllocator, rhs.mAllocator); - swap(lhs.mLock, rhs.mLock); - swap(lhs.mListener, rhs.mListener); - swap(lhs.mArenaName, rhs.mArenaName); - } - -private: - char const* mArenaName = nullptr; - AreaPolicy mArea; - // note: we should use something like compressed_pair for the members below - AllocatorPolicy mAllocator; - LockingPolicy mLock; - TrackingPolicy mListener; -}; - -// ------------------------------------------------------------------------------------------------ - -template -using HeapArena = Arena; - -// ------------------------------------------------------------------------------------------------ - -// This doesn't implement our allocator concept, because it's too risky to use this as an allocator -// in particular, doing ArenaScope. -template -class ArenaScope { - - struct Finalizer { - void (*finalizer)(void* p) = nullptr; - Finalizer* next = nullptr; - }; - - template - static void destruct(void* p) noexcept { - static_cast(p)->~T(); - } - -public: - explicit ArenaScope(ARENA& allocator) - : mArena(allocator), mRewind(allocator.getCurrent()) { - } - - ArenaScope& operator=(const ArenaScope& rhs) = delete; - ArenaScope(ArenaScope&& rhs) noexcept = delete; - ArenaScope& operator=(ArenaScope&& rhs) noexcept = delete; - - ~ArenaScope() { - // run the finalizer chain - Finalizer* head = mFinalizerHead; - while (head) { - void* p = pointermath::add(head, sizeof(Finalizer)); - head->finalizer(p); - head = head->next; - } - // ArenaScope works only with Arena that implements rewind() - mArena.rewind(mRewind); - } - - template - T* make(ARGS&& ... args) noexcept { - T* o = nullptr; - if (std::is_trivially_destructible::value) { - o = mArena.template make(std::forward(args)...); - } else { - void* const p = (Finalizer*)mArena.alloc(sizeof(T), ALIGN, sizeof(Finalizer)); - if (p != nullptr) { - Finalizer* const f = static_cast(p) - 1; - // constructor must be called before adding the dtor to the list - // so that the ctor can allocate objects in a nested scope and have the - // finalizers called in reverse order. - o = new(p) T(std::forward(args)...); - f->finalizer = &destruct; - f->next = mFinalizerHead; - mFinalizerHead = f; - } - } - return o; - } - - void* allocate(size_t size, size_t alignment = 1) noexcept { - return mArena.template alloc(size, alignment, 0); - } - - template - T* allocate(size_t size, size_t alignment = alignof(T), size_t extra = 0) noexcept { - return mArena.template alloc(size, alignment, extra); - } - - // use with caution - ARENA& getAllocator() noexcept { return mArena; } - -private: - ARENA& mArena; - void* mRewind = nullptr; - Finalizer* mFinalizerHead = nullptr; -}; - - -template -class STLAllocator { -public: - using value_type = TYPE; - using pointer = TYPE*; - using const_pointer = const TYPE*; - using reference = TYPE&; - using const_reference = const TYPE&; - using size_type = std::size_t; - using difference_type = std::ptrdiff_t; - using propagate_on_container_move_assignment = std::true_type; - using is_always_equal = std::true_type; - - template - struct rebind { using other = STLAllocator; }; - -public: - // we don't make this explicit, so that we can initialize a vector using a STLAllocator - // from an Arena, avoiding to have to repeat the vector type. - STLAllocator(ARENA& arena) : mArena(arena) { } // NOLINT(google-explicit-constructor) - - template - explicit STLAllocator(STLAllocator const& rhs) : mArena(rhs.mArena) { } - - TYPE* allocate(std::size_t n) { - auto p = static_cast(mArena.alloc(n * sizeof(TYPE), alignof(TYPE))); - assert_invariant(p); - return p; - } - - void deallocate(TYPE* p, std::size_t n) { - mArena.free(p, n * sizeof(TYPE)); - } - - // these should be out-of-class friends, but this doesn't seem to work with some compilers - // which complain about multiple definition each time a STLAllocator<> is instantiated. - template - bool operator==(const STLAllocator& rhs) const noexcept { - return std::addressof(mArena) == std::addressof(rhs.mArena); - } - - template - bool operator!=(const STLAllocator& rhs) const noexcept { - return !operator==(rhs); - } - -private: - template - friend class STLAllocator; - - ARENA& mArena; -}; - -} // namespace utils - -#endif // TNT_UTILS_ALLOCATOR_H diff --git a/windows/include/filament/utils/BitmaskEnum.h b/windows/include/filament/utils/BitmaskEnum.h deleted file mode 100644 index 1efa3941..00000000 --- a/windows/include/filament/utils/BitmaskEnum.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef TNT_UTILS_BITMASKENUM_H -#define TNT_UTILS_BITMASKENUM_H - -#include - -#include // for std::false_type - -#include -#include -#include - -namespace utils { - -template -struct EnableBitMaskOperators : public std::false_type { }; - -template -struct EnableIntegerOperators : public std::false_type { }; - -namespace Enum { - -template -size_t count(); - -} // namespace enum -} // namespace utils - -// ------------------------------------------------------------------------------------------------ - -template::value && utils::EnableIntegerOperators::value, int> = 0> -inline constexpr int operator+(Enum value) noexcept { - return int(value); -} - -template::value && utils::EnableIntegerOperators::value, int> = 0> -inline constexpr bool operator==(Enum lhs, size_t rhs) noexcept { - using underlying_t = std::underlying_type_t; - return underlying_t(lhs) == rhs; -} - -template::value && utils::EnableIntegerOperators::value, int> = 0> -inline constexpr bool operator==(size_t lhs, Enum rhs) noexcept { - return rhs == lhs; -} - -template::value && utils::EnableIntegerOperators::value, int> = 0> -inline constexpr bool operator!=(Enum lhs, size_t rhs) noexcept { - return !(rhs == lhs); -} - -template::value && utils::EnableIntegerOperators::value, int> = 0> -inline constexpr bool operator!=(size_t lhs, Enum rhs) noexcept { - return rhs != lhs; -} - -// ------------------------------------------------------------------------------------------------ - -template::value && utils::EnableBitMaskOperators::value, int> = 0> -inline constexpr bool operator!(Enum rhs) noexcept { - using underlying = std::underlying_type_t; - return underlying(rhs) == 0; -} - -template::value && utils::EnableBitMaskOperators::value, int> = 0> -inline constexpr Enum operator~(Enum rhs) noexcept { - using underlying = std::underlying_type_t; - return Enum(~underlying(rhs)); -} - -template::value && utils::EnableBitMaskOperators::value, int> = 0> -inline constexpr Enum operator|(Enum lhs, Enum rhs) noexcept { - using underlying = std::underlying_type_t; - return Enum(underlying(lhs) | underlying(rhs)); -} - -template::value && utils::EnableBitMaskOperators::value, int> = 0> -inline constexpr Enum operator&(Enum lhs, Enum rhs) noexcept { - using underlying = std::underlying_type_t; - return Enum(underlying(lhs) & underlying(rhs)); -} - -template::value && utils::EnableBitMaskOperators::value, int> = 0> -inline constexpr Enum operator^(Enum lhs, Enum rhs) noexcept { - using underlying = std::underlying_type_t; - return Enum(underlying(lhs) ^ underlying(rhs)); -} - -template::value && utils::EnableBitMaskOperators::value, int> = 0> -inline constexpr Enum operator|=(Enum& lhs, Enum rhs) noexcept { - return lhs = lhs | rhs; -} - -template::value && utils::EnableBitMaskOperators::value, int> = 0> -inline constexpr Enum operator&=(Enum& lhs, Enum rhs) noexcept { - return lhs = lhs & rhs; -} - -template::value && utils::EnableBitMaskOperators::value, int> = 0> -inline constexpr Enum operator^=(Enum& lhs, Enum rhs) noexcept { - return lhs = lhs ^ rhs; -} - -template::value && utils::EnableBitMaskOperators::value, int> = 0> -inline constexpr bool none(Enum lhs) noexcept { - return !lhs; -} - -template::value && utils::EnableBitMaskOperators::value, int> = 0> -inline constexpr bool any(Enum lhs) noexcept { - return !none(lhs); -} - - -#endif // TNT_UTILS_BITMASKENUM_H diff --git a/windows/include/filament/utils/CString.h b/windows/include/filament/utils/CString.h deleted file mode 100644 index 46a823b4..00000000 --- a/windows/include/filament/utils/CString.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_UTILS_CSTRING_H -#define TNT_UTILS_CSTRING_H - -// NOTE: this header should not include STL headers - -#include - -#include -#include -#include -#include -#include - -namespace utils { - -//! \privatesection -struct hashCStrings { - typedef const char* argument_type; - typedef size_t result_type; - result_type operator()(argument_type cstr) const noexcept { - size_t hash = 5381; - while (int c = *cstr++) { - hash = (hash * 33u) ^ size_t(c); - } - return hash; - } -}; - -template -using StringLiteral = const char[N]; - - -// ------------------------------------------------------------------------------------------------ - -class UTILS_PUBLIC CString { -public: - using value_type = char; - using size_type = uint32_t; - using difference_type = int32_t; - using reference = value_type&; - using const_reference = const value_type&; - using pointer = value_type*; - using const_pointer = const value_type*; - using iterator = value_type*; - using const_iterator = const value_type*; - - CString() noexcept {} // NOLINT(modernize-use-equals-default), Ubuntu compiler bug - - // Allocates memory and appends a null. This constructor can be used to hold arbitrary data - // inside the string (i.e. it can contain nulls or non-ASCII encodings). - CString(const char* cstr, size_t length); - - // Allocates memory for a string of size length plus space for the null terminating character. - // Also initializes the memory to 0. This constructor can be used to hold arbitrary data - // inside the string. - explicit CString(size_t length); - - // Allocates memory and copies traditional C string content. Unlike the above constructor, this - // does not allow embedded nulls. This is explicit because this operation is costly. - explicit CString(const char* cstr); - - template - CString(StringLiteral const& other) noexcept // NOLINT(google-explicit-constructor) - : CString(other, N - 1) { - } - - CString(const CString& rhs); - - CString(CString&& rhs) noexcept { - this->swap(rhs); - } - - - CString& operator=(const CString& rhs); - - CString& operator=(CString&& rhs) noexcept { - this->swap(rhs); - return *this; - } - - ~CString() noexcept { - if (mData) { - free(mData - 1); - } - } - - void swap(CString& other) noexcept { - // don't use std::swap(), we don't want an STL dependency in this file - auto *temp = mCStr; - mCStr = other.mCStr; - other.mCStr = temp; - } - - const_pointer c_str() const noexcept { return mCStr; } - pointer c_str() noexcept { return mCStr; } - const_pointer c_str_safe() const noexcept { return mData ? c_str() : ""; } - const_pointer data() const noexcept { return c_str(); } - pointer data() noexcept { return c_str(); } - size_type size() const noexcept { return mData ? mData[-1].length : 0; } - size_type length() const noexcept { return size(); } - bool empty() const noexcept { return size() == 0; } - - iterator begin() noexcept { return mCStr; } - iterator end() noexcept { return begin() + length(); } - const_iterator begin() const noexcept { return data(); } - const_iterator end() const noexcept { return begin() + length(); } - const_iterator cbegin() const noexcept { return begin(); } - const_iterator cend() const noexcept { return end(); } - - CString& replace(size_type pos, size_type len, const CString& str) noexcept; - CString& insert(size_type pos, const CString& str) noexcept { return replace(pos, 0, str); } - - const_reference operator[](size_type pos) const noexcept { - assert(pos < size()); - return begin()[pos]; - } - - reference operator[](size_type pos) noexcept { - assert(pos < size()); - return begin()[pos]; - } - - const_reference at(size_type pos) const noexcept { - assert(pos < size()); - return begin()[pos]; - } - - reference at(size_type pos) noexcept { - assert(pos < size()); - return begin()[pos]; - } - - reference front() noexcept { - assert(size()); - return begin()[0]; - } - - const_reference front() const noexcept { - assert(size()); - return begin()[0]; - } - - reference back() noexcept { - assert(size()); - return begin()[size() - 1]; - } - - const_reference back() const noexcept { - assert(size()); - return begin()[size() - 1]; - } - - // placement new declared as "throw" to avoid the compiler's null-check - inline void* operator new(size_t, void* ptr) { - assert(ptr); - return ptr; - } - - struct Hasher : private hashCStrings { - typedef CString argument_type; - typedef size_t result_type; - result_type operator()(const argument_type& s) const noexcept { - return hashCStrings::operator()(s.c_str()); - } - }; - -private: - struct Data { - size_type length; - }; - - // mCStr points to the C-string or nullptr. if non-null, mCStr is preceded by the string's size - union { - value_type *mCStr = nullptr; - Data* mData; // Data is stored at mData[-1] - }; - - int compare(const CString& rhs) const noexcept { - size_type lhs_size = size(); - size_type rhs_size = rhs.size(); - if (lhs_size < rhs_size) return -1; - if (lhs_size > rhs_size) return 1; - return strncmp(data(), rhs.data(), size()); - } - - friend bool operator==(CString const& lhs, CString const& rhs) noexcept { - return (lhs.data() == rhs.data()) || - ((lhs.size() == rhs.size()) && !strncmp(lhs.data(), rhs.data(), lhs.size())); - } - friend bool operator!=(CString const& lhs, CString const& rhs) noexcept { - return !(lhs == rhs); - } - friend bool operator<(CString const& lhs, CString const& rhs) noexcept { - return lhs.compare(rhs) < 0; - } - friend bool operator>(CString const& lhs, CString const& rhs) noexcept { - return lhs.compare(rhs) > 0; - } - friend bool operator>=(CString const& lhs, CString const& rhs) noexcept { - return !(lhs < rhs); - } - friend bool operator<=(CString const& lhs, CString const& rhs) noexcept { - return !(lhs > rhs); - } -}; - -// implement this for your type for automatic conversion to CString. Failing to do so leads -// to a compile-time failure. -template -CString to_string(T value) noexcept; - -} // namespace utils - -#endif // TNT_UTILS_CSTRING_H diff --git a/windows/include/filament/utils/CallStack.h b/windows/include/filament/utils/CallStack.h deleted file mode 100644 index 291a748c..00000000 --- a/windows/include/filament/utils/CallStack.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef UTILS_CALLSTACK_H -#define UTILS_CALLSTACK_H - -#include -#include -#include - -#include -#include - -namespace utils { - -/** - * CallStack captures the current's thread call stack. - */ -class CallStack { -public: - /** - * Creates an empty call stack - * @see CallStack::capture() - */ - CallStack() = default; - CallStack(const CallStack&) = default; - ~CallStack() = default; - - /** - * A convenience method to create and capture the stack trace in one go. - * @param ignore number frames to ignore at the top of the stack. - * @return A CallStack object - */ - static CallStack unwind(size_t ignore = 0) noexcept; - - /** - * Capture the current thread's stack and replaces the existing one if any. - * @param ignore number frames to ignore at the top of the stack. - */ - void update(size_t ignore = 0) noexcept; - - /** - * Get the number of stack frames this object has recorded. - * @return How many stack frames are accessible through operator[] - */ - size_t getFrameCount() const noexcept; - - /** - * Return the program-counter of each stack frame captured - * @param index of the frame between 0 and getFrameCount()-1 - * @return the program-counter of the stack-frame recorded at index \p index - * @throw std::out_of_range if the index is out of range - */ - intptr_t operator [](size_t index) const; - - /** Demangles a C++ type name */ - static utils::CString demangleTypeName(const char* mangled); - - template - static utils::CString typeName() { -#if UTILS_HAS_RTTI - return demangleTypeName(typeid(T).name()); -#else - return CString(""); -#endif - } - - /** - * Outputs a CallStack into a stream. - * This will print, when possible, the demangled names of functions corresponding to the - * program-counter recorded. - */ - friend utils::io::ostream& operator <<(utils::io::ostream& stream, const CallStack& callstack); - - bool operator <(const CallStack& rhs) const; - - inline bool operator >(const CallStack& rhs) const { - return rhs < *this; - } - - inline bool operator !=(const CallStack& rhs) const { - return *this < rhs || rhs < *this; - } - - inline bool operator >=(const CallStack& rhs) const { - return !operator <(rhs); - } - - inline bool operator <=(const CallStack& rhs) const { - return !operator >(rhs); - } - - inline bool operator ==(const CallStack& rhs) const { - return !operator !=(rhs); - } - -private: - void update_gcc(size_t ignore) noexcept; - - static utils::CString demangle(const char* mangled); - - static constexpr size_t NUM_FRAMES = 20; - - struct StackFrameInfo { - intptr_t pc; - }; - - size_t m_frame_count = 0; - StackFrameInfo m_stack[NUM_FRAMES]; -}; - -} // namespace utils - -#endif // UTILS_CALLSTACK_H diff --git a/windows/include/filament/utils/Entity.h b/windows/include/filament/utils/Entity.h deleted file mode 100644 index 58fdf606..00000000 --- a/windows/include/filament/utils/Entity.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_UTILS_ENTITY_H -#define TNT_UTILS_ENTITY_H - -#include - -#include -#include - -namespace utils { - -class UTILS_PUBLIC Entity { -public: - // this can be used to create an array of to-be-filled entities (see create()) - Entity() noexcept { } // NOLINT(modernize-use-equals-default), Ubuntu compiler bug - - // Entities can be copied - Entity(const Entity& e) noexcept = default; - Entity(Entity&& e) noexcept = default; - Entity& operator=(const Entity& e) noexcept = default; - Entity& operator=(Entity&& e) noexcept = default; - - // Entities can be compared - bool operator==(Entity e) const { return e.mIdentity == mIdentity; } - bool operator!=(Entity e) const { return e.mIdentity != mIdentity; } - - // Entities can be sorted - bool operator<(Entity e) const { return e.mIdentity < mIdentity; } - - bool isNull() const noexcept { - return mIdentity == 0; - } - - // an id that can be used for debugging/printing - uint32_t getId() const noexcept { - return mIdentity; - } - - explicit operator bool() const noexcept { return !isNull(); } - - void clear() noexcept { mIdentity = 0; } - - // Exports an entity to an int32_t which can be used "as is" in the Java programing language. - static int32_t smuggle(Entity entity) noexcept { - return int32_t(entity.getId()); - } - - // Imports an entity from an int32_t generated by smuggle() above. - static Entity import(int32_t identity) noexcept { - return Entity{ Type(identity) }; - } - - struct Hasher { - typedef Entity argument_type; - typedef size_t result_type; - result_type operator()(argument_type const& e) const { - return e.getId(); - } - }; - -private: - friend class EntityManager; - friend class EntityManagerImpl; - using Type = uint32_t; - - explicit Entity(Type identity) noexcept : mIdentity(identity) { } - - Type mIdentity = 0; -}; - -} // namespace utils - -#endif // TNT_UTILS_ENTITY_H diff --git a/windows/include/filament/utils/Invocable.h b/windows/include/filament/utils/Invocable.h deleted file mode 100644 index 49b43071..00000000 --- a/windows/include/filament/utils/Invocable.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -#ifndef TNT_UTILS_INVOKABLE_H -#define TNT_UTILS_INVOKABLE_H - -#include -#include - -#include - -namespace utils { - -/* - * Invocable is a move-only general purpose function wrapper. Instances can - * store and invoke lambda expressions and other function objects. - * - * It is similar to std::function, with the following differences: - * - Invocable is move only. - * - Invocable can capture move only types. - * - No conversion between 'compatible' functions. - * - No small buffer optimization - */ - -// Helper for enabling methods if Fn matches the function signature -// requirements of the Invocable type. -#if __cplusplus >= 201703L -// only available on C++17 and up -template -using EnableIfFnMatchesInvocable = - std::enable_if_t && - std::is_same_v>, int>; -#else -template -using EnableIfFnMatchesInvocable = std::enable_if_t; -#endif - -template -class Invocable; - -template -class Invocable { -public: - // Creates an Invocable that does not contain a functor. - // Will evaluate to false. - Invocable() = default; - - ~Invocable() noexcept; - - // Creates an Invocable from the functor passed in. - template = 0> - Invocable(Fn&& fn) noexcept; // NOLINT(google-explicit-constructor) - - Invocable(const Invocable&) = delete; - Invocable(Invocable&& rhs) noexcept; - - Invocable& operator=(const Invocable&) = delete; - Invocable& operator=(Invocable&& rhs) noexcept; - - // Invokes the invocable with the args passed in. - // If the Invocable is empty, this will assert. - template - R operator()(OperatorArgs&& ... args); - template - R operator()(OperatorArgs&& ... args) const; - - // Evaluates to true if Invocable contains a functor, false otherwise. - explicit operator bool() const noexcept; - -private: - void* mInvocable = nullptr; - void (*mDeleter)(void*) = nullptr; - R (* mInvoker)(void*, Args...) = nullptr; -}; - -template -template> -Invocable::Invocable(Fn&& fn) noexcept - : mInvocable(new Fn(std::forward>(fn))), - mDeleter(+[](void* erased_invocable) { - auto typed_invocable = static_cast(erased_invocable); - delete typed_invocable; - }), - mInvoker(+[](void* erased_invocable, Args... args) -> R { - auto typed_invocable = static_cast(erased_invocable); - return (*typed_invocable)(std::forward(args)...); - }) -{ -} - -template -Invocable::~Invocable() noexcept { - if (mDeleter) { - mDeleter(mInvocable); - } -} - -template -Invocable::Invocable(Invocable&& rhs) noexcept - : mInvocable(rhs.mInvocable), - mDeleter(rhs.mDeleter), - mInvoker(rhs.mInvoker) { - rhs.mInvocable = nullptr; - rhs.mDeleter = nullptr; - rhs.mInvoker = nullptr; -} - -template -Invocable& Invocable::operator=(Invocable&& rhs) noexcept { - if (this != &rhs) { - std::swap(mInvocable, rhs.mInvocable); - std::swap(mDeleter, rhs.mDeleter); - std::swap(mInvoker, rhs.mInvoker); - } - return *this; -} - -template -template -R Invocable::operator()(OperatorArgs&& ... args) { - assert(mInvoker && mInvocable); - return mInvoker(mInvocable, std::forward(args)...); -} - -template -template -R Invocable::operator()(OperatorArgs&& ... args) const { - assert(mInvoker && mInvocable); - return mInvoker(mInvocable, std::forward(args)...); -} - -template -Invocable::operator bool() const noexcept { - return mInvoker != nullptr && mInvocable != nullptr; -} - -} // namespace utils - -#endif // TNT_UTILS_INVOKABLE_H diff --git a/windows/include/filament/utils/Log.h b/windows/include/filament/utils/Log.h deleted file mode 100644 index 77886426..00000000 --- a/windows/include/filament/utils/Log.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_UTILS_LOG_H -#define TNT_UTILS_LOG_H - -#include -#include - -namespace utils { - -struct UTILS_PUBLIC Loggers { - // DEBUG level logging stream - io::ostream& d; - - // ERROR level logging stream - io::ostream& e; - - // WARNING level logging stream - io::ostream& w; - - // INFORMATION level logging stream - io::ostream& i; - - // VERBOSE level logging stream - io::ostream& v; -}; - -extern UTILS_PUBLIC Loggers const slog; - -} // namespace utils - -#endif // TNT_UTILS_LOG_H diff --git a/windows/include/filament/utils/Mutex.h b/windows/include/filament/utils/Mutex.h deleted file mode 100644 index 1de6257f..00000000 --- a/windows/include/filament/utils/Mutex.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ - -#ifndef TNT_UTILS_MUTEX_H -#define TNT_UTILS_MUTEX_H - -#if defined(__ANDROID__) -#include -#else -#include -#endif - -#endif // TNT_UTILS_MUTEX_H diff --git a/windows/include/filament/utils/Path.h b/windows/include/filament/utils/Path.h deleted file mode 100644 index 66836e46..00000000 --- a/windows/include/filament/utils/Path.h +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_UTILS_PATH_H -#define TNT_UTILS_PATH_H - -#include - -#include -#include -#include - -namespace utils { - -/** - * An abstract representation of file and directory paths. - */ -class UTILS_PUBLIC Path { -public: - /** - * Creates a new empty path. - */ - Path() = default; - ~Path() = default; - - /** - * Creates a new path with the specified pathname. - * - * @param pathname a non-null pathname string - */ - Path(const char* pathname); - - /** - * Creates a new path with the specified pathname. - * - * @param pathname a pathname string view - */ - Path(std::string_view pathname); - - /** - * Creates a new path with the specified pathname. - * - * @param pathname a pathname string - */ - Path(const std::string& pathname); - - /** - * Tests whether the file or directory denoted by this abstract - * pathname exists. - * - * @return true if the file or directory denoted by this - * abstract pathname exists, false otherwise - */ - bool exists() const; - - /** - * Tests whether this abstract pathname represents a regular file. - * This method can only return true if the path exists. - * - * @return true if this pathname represents an existing file, - * false if the path doesn't exist or represents something - * else (directory, symlink, etc.) - */ - bool isFile() const; - - /** - * Tests whether this abstract pathname represents a directory. - * This method can only return true if the path exists. - * - * @return true if this pathname represents an existing directory, - * false if the path doesn't exist or represents a file - */ - bool isDirectory() const; - - /** - * Tests whether this path is empty. An empty path does not - * exist. - * - * @return true if the underlying abstract pathname is empty, - * false otherwise - */ - bool isEmpty() const { return m_path.empty(); } - - const char* c_str() const { return m_path.c_str(); } - - /** - * Replaces the abstract pathname of this object with the - * specified pathname. - * - * @param pathname a pathname string - */ - void setPath(const std::string& pathname) { - m_path = getCanonicalPath(pathname); - } - - /** - * @return the canonical pathname this path represents - */ - const std::string& getPath() const { return m_path; } - - /** - * Returns the parent of this path as Path. - * @return a new path containing the parent of this path - */ - Path getParent() const; - - /** - * Returns ancestor path where "0" is the immediate parent. - * @return a new path containing the ancestor of this path - */ - Path getAncestor(int n) const; - - /** - * Returns the name of the file or directory represented by - * this abstract pathname. - * - * @return the name of the file or directory represented by - * this abstract pathname, or an empty string if - * this path is empty - */ - std::string getName() const; - - /** - * Returns the name of the file or directory represented by - * this abstract pathname without its extension. - * - * @return the name of the file or directory represented by - * this abstract pathname, or an empty string if - * this path is empty - */ - std::string getNameWithoutExtension() const; - - /** - * Returns the file extension (after the ".") if one is present. - * Returns the empty string if no filename is present or if the - * path is a directory. - * - * @return the file extension (if one is present and - * this is not a directory), else the empty string. - */ - std::string getExtension() const; - - /** - * Returns the absolute representation of this path. - * If this path's pathname starts with a leading '/', - * the returned path is equal to this path. Otherwise, - * this path's pathname is concatenated with the current - * working directory and the result is returned. - * - * @return a new path containing the absolute representation - * of this path - */ - Path getAbsolutePath() const; - - /** - * @return true if this abstract pathname is not empty - * and starts with a leading '/', false otherwise - */ - bool isAbsolute() const; - - /** - * Splits this object's abstract pathname in a vector of file - * and directory name. If the underlying abstract pathname - * starts with a '/', the returned vector's first element - * will be the string "/". - * - * @return a vector of strings, empty if this path is empty - */ - std::vector split() const; - - /** - * Concatenates the specified path with this path in a new - * path object. - * - * @note if the pathname to concatenate with starts with - * a leading '/' then that pathname is returned without - * being concatenated to this object's pathname. - * - * @param path the path to concatenate with - * - * @return the concatenation of the two paths - */ - Path concat(const Path& path) const; - - /** - * Concatenates the specified path with this path and - * stores the result in this path. - * - * @note if the pathname to concatenate with starts with - * a leading '/' then that pathname replaces this object's - * pathname. - * - * @param path the path to concatenate with - */ - void concatToSelf(const Path& path); - - operator std::string const&() const { return m_path; } - - Path operator+(const Path& rhs) const { return concat(rhs); } - Path& operator+=(const Path& rhs) { - concatToSelf(rhs); - return *this; - } - - bool operator==(const Path& rhs) const { return m_path == rhs.m_path; } - bool operator!=(const Path& rhs) const { return m_path != rhs.m_path; } - - bool operator<(const Path& rhs) const { return m_path < rhs.m_path; } - bool operator>(const Path& rhs) const { return m_path > rhs.m_path; } - - friend std::ostream& operator<<(std::ostream& os, const Path& path); - - /** - * Returns a canonical copy of the specified pathname by removing - * unnecessary path segments such as ".", ".." and "/". - * - * @param pathname a pathname string - * - * @return the canonical representation of the specified pathname - */ - static std::string getCanonicalPath(const std::string& pathname); - - /** - * This method is equivalent to calling root.concat(leaf). - */ - static Path concat(const std::string& root, const std::string& leaf); - - /** - * @return a path representing the current working directory - */ - static Path getCurrentDirectory(); - - /** - * @return a path representing the current executable - */ - static Path getCurrentExecutable(); - - /** - * @return a path representing a directory where temporary files can be stored - */ - static Path getTemporaryDirectory(); - - /** - * Creates a directory denoted by the given path. - * This is not recursive and doesn't create intermediate directories. - * - * @return True if directory was successfully created. - * When false, errno should have details on actual error. - */ - bool mkdir() const; - - /** - * Creates a directory denoted by the given path. - * This is recursive and parent directories will be created if they do not - * exist. - * - * @return True if directory was successfully created or already exists. - * When false, errno should have details on actual error. - */ - bool mkdirRecursive() const; - - /** - * Deletes this file. - * - * @return True if file was successfully deleted. - * When false, errno should have details on actual error. - */ - bool unlinkFile(); - - /** - * Lists the contents of this directory, skipping hidden files. - * - * @return A vector of paths of the contents of the directory. If the path points to a file, - * nonexistent directory, or empty directory, an empty vector is returned. - */ - std::vector listContents() const; - -private: - std::string m_path; -}; - -} // namespace utils - -#endif // TNT_UTILS_PATH_H diff --git a/windows/include/filament/utils/PrivateImplementation-impl.h b/windows/include/filament/utils/PrivateImplementation-impl.h deleted file mode 100644 index 3488b5ae..00000000 --- a/windows/include/filament/utils/PrivateImplementation-impl.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -#ifndef UTILS_PRIVATEIMPLEMENTATION_IMPL_H -#define UTILS_PRIVATEIMPLEMENTATION_IMPL_H - -/* - * This looks like a header file, but really it acts as a .cpp, because it's used to - * explicitly instantiate the methods of PrivateImplementation<> - */ - -#include - -#include - -namespace utils { - -template -PrivateImplementation::PrivateImplementation() noexcept - : mImpl(new T) { -} - -template -template -PrivateImplementation::PrivateImplementation(ARGS&& ... args) noexcept - : mImpl(new T(std::forward(args)...)) { -} - -template -PrivateImplementation::~PrivateImplementation() noexcept { - delete mImpl; -} - -#ifndef UTILS_PRIVATE_IMPLEMENTATION_NON_COPYABLE - -template -PrivateImplementation::PrivateImplementation(PrivateImplementation const& rhs) noexcept - : mImpl(new T(*rhs.mImpl)) { -} - -template -PrivateImplementation& PrivateImplementation::operator=(PrivateImplementation const& rhs) noexcept { - if (this != &rhs) { - *mImpl = *rhs.mImpl; - } - return *this; -} - -#endif - -} // namespace utils - -#endif // UTILS_PRIVATEIMPLEMENTATION_IMPL_H diff --git a/windows/include/filament/utils/PrivateImplementation.h b/windows/include/filament/utils/PrivateImplementation.h deleted file mode 100644 index 7cb510fa..00000000 --- a/windows/include/filament/utils/PrivateImplementation.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2022 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. - */ - -#ifndef UTILS_PRIVATEIMPLEMENTATION_H -#define UTILS_PRIVATEIMPLEMENTATION_H - -#include - -#include - -namespace utils { - -/** - * \privatesection - * PrivateImplementation is used to hide the implementation details of a class and ensure a higher - * level of backward binary compatibility. - * The actual implementation is in src/PrivateImplementation-impl.h" - */ -template -class PrivateImplementation { -public: - // none of these methods must be implemented inline because it's important that their - // implementation be hidden from the public headers. - template - explicit PrivateImplementation(ARGS&& ...) noexcept; - PrivateImplementation() noexcept; - ~PrivateImplementation() noexcept; - PrivateImplementation(PrivateImplementation const& rhs) noexcept; - PrivateImplementation& operator = (PrivateImplementation const& rhs) noexcept; - - // move ctor and copy operator can be implemented inline and don't need to be exported - PrivateImplementation(PrivateImplementation&& rhs) noexcept : mImpl(rhs.mImpl) { rhs.mImpl = nullptr; } - PrivateImplementation& operator = (PrivateImplementation&& rhs) noexcept { - auto temp = mImpl; - mImpl = rhs.mImpl; - rhs.mImpl = temp; - return *this; - } - -protected: - T* mImpl = nullptr; - inline T* operator->() noexcept { return mImpl; } - inline T const* operator->() const noexcept { return mImpl; } -}; - -} // namespace utils - -#endif // UTILS_PRIVATEIMPLEMENTATION_H diff --git a/windows/include/filament/utils/SingleInstanceComponentManager.h b/windows/include/filament/utils/SingleInstanceComponentManager.h deleted file mode 100644 index c03ec5f1..00000000 --- a/windows/include/filament/utils/SingleInstanceComponentManager.h +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_UTILS_SINGLEINSTANCECOMPONENTMANAGER_H -#define TNT_UTILS_SINGLEINSTANCECOMPONENTMANAGER_H - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -namespace utils { - -class EntityManager; - -/* - * Helper class to create single instance component managers. - * - * This handles the component's storage as a structure-of-arrays, as well - * as the garbage collection. - * - * This is intended to be used as base class for a real component manager. When doing so, - * and the real component manager is a public API, make sure to forward the public methods - * to the implementation. - * - */ -template -class UTILS_PUBLIC SingleInstanceComponentManager { -private: - - // this is just to avoid using std::default_random_engine, since we're in a public header. - class default_random_engine { - uint32_t mState = 1u; // must be 0 < seed < 0x7fffffff - public: - inline uint32_t operator()() noexcept { - return mState = uint32_t((uint64_t(mState) * 48271u) % 0x7fffffffu); - } - }; - -protected: - static constexpr size_t ENTITY_INDEX = sizeof ... (Elements); - - -public: - using SoA = StructureOfArrays; - - using Structure = typename SoA::Structure; - - using Instance = EntityInstanceBase::Type; - - SingleInstanceComponentManager() noexcept { - // We always start with a dummy entry because index=0 is reserved. The component - // at index = 0, is guaranteed to be default-initialized. - // Sub-classes can use this to their advantage. - mData.push_back(Structure{}); - } - - SingleInstanceComponentManager(SingleInstanceComponentManager&&) noexcept {/* = default */} - SingleInstanceComponentManager& operator=(SingleInstanceComponentManager&&) noexcept {/* = default */} - ~SingleInstanceComponentManager() noexcept = default; - - // not copyable - SingleInstanceComponentManager(SingleInstanceComponentManager const& rhs) = delete; - SingleInstanceComponentManager& operator=(SingleInstanceComponentManager const& rhs) = delete; - - - // returns true if the given Entity has a component of this Manager - bool hasComponent(Entity e) const noexcept { - return getInstance(e) != 0; - } - - // Get instance of this Entity to be used to retrieve components - UTILS_NOINLINE - Instance getInstance(Entity e) const noexcept { - auto const& map = mInstanceMap; - // find() generates quite a bit of code - auto pos = map.find(e); - return pos != map.end() ? pos->second : 0; - } - - // returns the number of components (i.e. size of each arrays) - size_t getComponentCount() const noexcept { - // The array as an extra dummy component at index 0, so the visible count is 1 less. - return mData.size() - 1; - } - - bool empty() const noexcept { - return getComponentCount() == 0; - } - - // returns a pointer to the Entity array. This is basically the list - // of entities this component manager handles. - // The pointer becomes invalid when adding or removing a component. - Entity const* getEntities() const noexcept { - return begin(); - } - - Entity getEntity(Instance i) const noexcept { - return elementAt(i); - } - - // Add a component to the given Entity. If the entity already has a component from this - // manager, this function is a no-op. - // This invalidates all pointers components. - inline Instance addComponent(Entity e); - - // Removes a component from the given entity. - // This invalidates all pointers components. - inline Instance removeComponent(Entity e); - - // trigger one round of garbage collection. this is intended to be called on a regular - // basis. This gc gives up after it cannot randomly free 'ratio' component in a row. - void gc(const EntityManager& em, size_t ratio = 4) noexcept { - gc(em, ratio, [this](Entity e) { - removeComponent(e); - }); - } - - // return the first instance - Instance begin() const noexcept { return 1u; } - - // return the past-the-last instance - Instance end() const noexcept { return Instance(begin() + getComponentCount()); } - - // return a pointer to the first element of the ElementIndex'th array - template - typename SoA::template TypeAt* begin() noexcept { - return mData.template data() + 1; - } - - template - typename SoA::template TypeAt const* begin() const noexcept { - return mData.template data() + 1; - } - - // return a pointer to the past-the-end element of the ElementIndex'th array - template - typename SoA::template TypeAt* end() noexcept { - return begin() + getComponentCount(); - } - - template - typename SoA::template TypeAt const* end() const noexcept { - return begin() + getComponentCount(); - } - - // return a Slice<> - template - Slice> slice() noexcept { - return { begin(), end() }; - } - - template - Slice> slice() const noexcept { - return { begin(), end() }; - } - - // return a reference to the index'th element of the ElementIndex'th array - template - typename SoA::template TypeAt& elementAt(Instance index) noexcept { - assert(index); - return data()[index]; - } - - template - typename SoA::template TypeAt const& elementAt(Instance index) const noexcept { - assert(index); - return data()[index]; - } - - // returns a pointer to the RAW ARRAY of components including the first dummy component - // Use with caution. - template - typename SoA::template TypeAt const* raw_array() const noexcept { - return data(); - } - - // We need our own version of Field because mData is private - template - struct Field : public SoA::template Field { - Field(SingleInstanceComponentManager& soa, EntityInstanceBase::Type i) noexcept - : SoA::template Field{ soa.mData, i } { - } - using SoA::template Field::operator =; - }; - -protected: - template - typename SoA::template TypeAt* data() noexcept { - return mData.template data(); - } - - template - typename SoA::template TypeAt const* data() const noexcept { - return mData.template data(); - } - - // swap only internals - void swap(Instance i, Instance j) noexcept { - assert(i); - assert(j); - if (i && j) { - // update the index map - auto& map = mInstanceMap; - Entity& ei = elementAt(i); - Entity& ej = elementAt(j); - std::swap(ei, ej); - if (ei) { - map[ei] = i; - } - if (ej) { - map[ej] = j; - } - } - } - - template - void gc(const EntityManager& em, size_t ratio, - REMOVE removeComponent) noexcept { - Entity const* entities = getEntities(); - size_t count = getComponentCount(); - size_t aliveInARow = 0; - default_random_engine& rng = mRng; - UTILS_NOUNROLL - while (count && aliveInARow < ratio) { - // note: using the modulo favorizes lower number - size_t i = rng() % count; - if (UTILS_LIKELY(em.isAlive(entities[i]))) { - ++aliveInARow; - continue; - } - aliveInARow = 0; - count--; - removeComponent(entities[i]); - } - } - -protected: - SoA mData; - -private: - // maps an entity to an instance index - tsl::robin_map mInstanceMap; - default_random_engine mRng; -}; - -// Keep these outside of the class because CLion has trouble parsing them -template -typename SingleInstanceComponentManager::Instance -SingleInstanceComponentManager::addComponent(Entity e) { - Instance ci = 0; - if (!e.isNull()) { - if (!hasComponent(e)) { - // this is like a push_back(e); - mData.push_back(Structure{}).template back() = e; - // index 0 is used when the component doesn't exist - ci = Instance(mData.size() - 1); - mInstanceMap[e] = ci; - } else { - // if the entity already has this component, just return its instance - ci = mInstanceMap[e]; - } - } - assert(ci != 0); - return ci; -} - -// Keep these outside of the class because CLion has trouble parsing them -template -typename SingleInstanceComponentManager::Instance -SingleInstanceComponentManager::removeComponent(Entity e) { - auto& map = mInstanceMap; - auto pos = map.find(e); - if (UTILS_LIKELY(pos != map.end())) { - size_t index = pos->second; - assert(index != 0); - size_t last = mData.size() - 1; - if (last != index) { - // move the last item to where we removed this component, as to keep - // the array tightly packed. - mData.forEach([index, last](auto* p) { - p[index] = std::move(p[last]); - }); - - Entity lastEntity = mData.template elementAt(index); - map[lastEntity] = index; - } - mData.pop_back(); - map.erase(pos); - return last; - } - return 0; -} - - -} // namespace filament - -#endif // TNT_UTILS_SINGLEINSTANCECOMPONENTMANAGER_H diff --git a/windows/include/filament/utils/Slice.h b/windows/include/filament/utils/Slice.h deleted file mode 100644 index 444a3b27..00000000 --- a/windows/include/filament/utils/Slice.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_UTILS_SLICE_H -#define TNT_UTILS_SLICE_H - -#include - -#include - -#include -#include - -namespace utils { - -/* - * A fixed-size slice of a container - */ -template -class Slice { -public: - using iterator = T*; - using const_iterator = T const*; - using value_type = T; - using reference = T&; - using const_reference = T const&; - using pointer = T*; - using const_pointer = T const*; - using size_type = size_t; - - Slice() noexcept = default; - - Slice(const_iterator begin, const_iterator end) noexcept - : mBegin(const_cast(begin)), - mEnd(const_cast(end)) { - } - - Slice(const_pointer begin, size_type count) noexcept - : mBegin(const_cast(begin)), - mEnd(mBegin + count) { - } - - Slice(Slice const& rhs) noexcept = default; - Slice(Slice&& rhs) noexcept = default; - Slice& operator=(Slice const& rhs) noexcept = default; - Slice& operator=(Slice&& rhs) noexcept = default; - - void set(pointer begin, size_type count) UTILS_RESTRICT noexcept { - mBegin = begin; - mEnd = begin + count; - } - - void set(iterator begin, iterator end) UTILS_RESTRICT noexcept { - mBegin = begin; - mEnd = end; - } - - void swap(Slice& rhs) UTILS_RESTRICT noexcept { - std::swap(mBegin, rhs.mBegin); - std::swap(mEnd, rhs.mEnd); - } - - void clear() UTILS_RESTRICT noexcept { - mBegin = nullptr; - mEnd = nullptr; - } - - // size - size_t size() const UTILS_RESTRICT noexcept { return mEnd - mBegin; } - size_t sizeInBytes() const UTILS_RESTRICT noexcept { return size() * sizeof(T); } - bool empty() const UTILS_RESTRICT noexcept { return size() == 0; } - - // iterators - iterator begin() UTILS_RESTRICT noexcept { return mBegin; } - const_iterator begin() const UTILS_RESTRICT noexcept { return mBegin; } - const_iterator cbegin() const UTILS_RESTRICT noexcept { return this->begin(); } - iterator end() UTILS_RESTRICT noexcept { return mEnd; } - const_iterator end() const UTILS_RESTRICT noexcept { return mEnd; } - const_iterator cend() const UTILS_RESTRICT noexcept { return this->end(); } - - // data access - reference operator[](size_t n) UTILS_RESTRICT noexcept { - assert(n < size()); - return mBegin[n]; - } - - const_reference operator[](size_t n) const UTILS_RESTRICT noexcept { - assert(n < size()); - return mBegin[n]; - } - - reference at(size_t n) UTILS_RESTRICT noexcept { - return operator[](n); - } - - const_reference at(size_t n) const UTILS_RESTRICT noexcept { - return operator[](n); - } - - reference front() UTILS_RESTRICT noexcept { - assert(!empty()); - return *mBegin; - } - - const_reference front() const UTILS_RESTRICT noexcept { - assert(!empty()); - return *mBegin; - } - - reference back() UTILS_RESTRICT noexcept { - assert(!empty()); - return *(this->end() - 1); - } - - const_reference back() const UTILS_RESTRICT noexcept { - assert(!empty()); - return *(this->end() - 1); - } - - pointer data() UTILS_RESTRICT noexcept { - return this->begin(); - } - - const_pointer data() const UTILS_RESTRICT noexcept { - return this->begin(); - } - -protected: - iterator mBegin = nullptr; - iterator mEnd = nullptr; -}; - -} // namespace utils - -#endif // TNT_UTILS_SLICE_H diff --git a/windows/include/filament/utils/SpinLock.h b/windows/include/filament/utils/SpinLock.h deleted file mode 100644 index e7ce00af..00000000 --- a/windows/include/filament/utils/SpinLock.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2019 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. - */ - -#ifndef TNT_UTILS_SPINLOCK_H -#define TNT_UTILS_SPINLOCK_H - -#include - -#include - -#include -#include - -#include -#include - -namespace utils { -namespace details { - -class SpinLock { - std::atomic_flag mLock = ATOMIC_FLAG_INIT; - -public: - void lock() noexcept { - UTILS_PREFETCHW(&mLock); -#ifdef __ARM_ACLE - // we signal an event on this CPU, so that the first yield() will be a no-op, - // and falls through the test_and_set(). This is more efficient than a while { } - // construct. - UTILS_SIGNAL_EVENT(); - do { - yield(); - } while (mLock.test_and_set(std::memory_order_acquire)); -#else - goto start; - do { - yield(); -start: ; - } while (mLock.test_and_set(std::memory_order_acquire)); -#endif - } - - void unlock() noexcept { - mLock.clear(std::memory_order_release); -#ifdef __ARM_ARCH_7A__ - // on ARMv7a SEL is needed - UTILS_SIGNAL_EVENT(); - // as well as a memory barrier is needed - __dsb(0xA); // ISHST = 0xA (b1010) -#else - // on ARMv8 we could avoid the call to SE, but we'd need to write the - // test_and_set() above by hand, so the WFE only happens without a STRX first. - UTILS_BROADCAST_EVENT(); -#endif - } - -private: - inline void yield() noexcept { - // on x86 call pause instruction, on ARM call WFE - UTILS_WAIT_FOR_EVENT(); - } -}; -} // namespace details - -#if UTILS_HAS_SANITIZE_THREAD -// Active spins with atomics slow down execution too much under ThreadSanitizer. -using SpinLock = Mutex; -#elif defined(__ARM_ARCH_7A__) -// We've had problems with "wfe" on some ARM-V7 devices, causing spurious SIGILL -using SpinLock = Mutex; -#else -using SpinLock = details::SpinLock; -#endif - -} // namespace utils - -#endif // TNT_UTILS_SPINLOCK_H diff --git a/windows/include/filament/utils/algorithm.h b/windows/include/filament/utils/algorithm.h deleted file mode 100644 index d92555cc..00000000 --- a/windows/include/filament/utils/algorithm.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (C) 2017 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. - */ - -#ifndef TNT_UTILS_ALGORITHM_H -#define TNT_UTILS_ALGORITHM_H - -#include - -#include // for std::enable_if - -#include -#include - -namespace utils { - -namespace details { - -template -constexpr inline T popcount(T v) noexcept { - static_assert(sizeof(T) * CHAR_BIT <= 128, "details::popcount() only support up to 128 bits"); - constexpr T ONES = ~T(0); - v = v - ((v >> 1u) & ONES / 3); - v = (v & ONES / 15 * 3) + ((v >> 2u) & ONES / 15 * 3); - v = (v + (v >> 4u)) & ONES / 255 * 15; - return (T) (v * (ONES / 255)) >> (sizeof(T) - 1) * CHAR_BIT; -} - -template::value>> -constexpr inline T clz(T x) noexcept { - static_assert(sizeof(T) * CHAR_BIT <= 128, "details::clz() only support up to 128 bits"); - x |= (x >> 1u); - x |= (x >> 2u); - x |= (x >> 4u); - x |= (x >> 8u); - x |= (x >> 16u); - if constexpr (sizeof(T) * CHAR_BIT >= 64) { // just to silence compiler warning - x |= (x >> 32u); - } - if constexpr (sizeof(T) * CHAR_BIT >= 128) { // just to silence compiler warning - x |= (x >> 64u); - } - return T(sizeof(T) * CHAR_BIT) - details::popcount(x); -} - -template::value>> -constexpr inline T ctz(T x) noexcept { - static_assert(sizeof(T) * CHAR_BIT <= 64, "details::ctz() only support up to 64 bits"); - T c = sizeof(T) * CHAR_BIT; -#if defined(_MSC_VER) - // equivalent to x & -x, but MSVC yield a warning for using unary minus operator on unsigned types - x &= (~x + 1); -#else - // equivalent to x & (~x + 1), but some compilers generate a better sequence on ARM - x &= -x; -#endif - if (x) c--; - if (sizeof(T) * CHAR_BIT >= 64) { - if (x & T(0x00000000FFFFFFFF)) c -= 32; - } - if (x & T(0x0000FFFF0000FFFF)) c -= 16; - if (x & T(0x00FF00FF00FF00FF)) c -= 8; - if (x & T(0x0F0F0F0F0F0F0F0F)) c -= 4; - if (x & T(0x3333333333333333)) c -= 2; - if (x & T(0x5555555555555555)) c -= 1; - return c; -} - -} // namespace details - -constexpr inline UTILS_PUBLIC UTILS_PURE -unsigned int UTILS_ALWAYS_INLINE clz(unsigned int x) noexcept { -#if __has_builtin(__builtin_clz) - return __builtin_clz(x); -#else - return details::clz(x); -#endif -} - -constexpr inline UTILS_PUBLIC UTILS_PURE -unsigned long UTILS_ALWAYS_INLINE clz(unsigned long x) noexcept { -#if __has_builtin(__builtin_clzl) - return __builtin_clzl(x); -#else - return details::clz(x); -#endif -} - -constexpr inline UTILS_PUBLIC UTILS_PURE -unsigned long long UTILS_ALWAYS_INLINE clz(unsigned long long x) noexcept { -#if __has_builtin(__builtin_clzll) - return __builtin_clzll(x); -#else - return details::clz(x); -#endif -} - -constexpr inline UTILS_PUBLIC UTILS_PURE -unsigned int UTILS_ALWAYS_INLINE ctz(unsigned int x) noexcept { -#if __has_builtin(__builtin_ctz) - return __builtin_ctz(x); -#else - return details::ctz(x); -#endif -} - -constexpr inline UTILS_PUBLIC UTILS_PURE -unsigned long UTILS_ALWAYS_INLINE ctz(unsigned long x) noexcept { -#if __has_builtin(__builtin_ctzl) - return __builtin_ctzl(x); -#else - return details::ctz(x); -#endif -} - -constexpr inline UTILS_PUBLIC UTILS_PURE -unsigned long long UTILS_ALWAYS_INLINE ctz(unsigned long long x) noexcept { -#if __has_builtin(__builtin_ctzll) - return __builtin_ctzll(x); -#else - return details::ctz(x); -#endif -} - -constexpr inline UTILS_PUBLIC UTILS_PURE -unsigned int UTILS_ALWAYS_INLINE popcount(unsigned int x) noexcept { -#if __has_builtin(__builtin_popcount) - return __builtin_popcount(x); -#else - return details::popcount(x); -#endif -} - -constexpr inline UTILS_PUBLIC UTILS_PURE -unsigned long UTILS_ALWAYS_INLINE popcount(unsigned long x) noexcept { -#if __has_builtin(__builtin_popcountl) - return __builtin_popcountl(x); -#else - return details::popcount(x); -#endif -} - -constexpr inline UTILS_PUBLIC UTILS_PURE -unsigned long long UTILS_ALWAYS_INLINE popcount(unsigned long long x) noexcept { -#if __has_builtin(__builtin_popcountll) - return __builtin_popcountll(x); -#else - return details::popcount(x); -#endif -} - -constexpr inline UTILS_PUBLIC UTILS_PURE -uint8_t UTILS_ALWAYS_INLINE popcount(uint8_t x) noexcept { - return (uint8_t)popcount((unsigned int)x); -} - -template::value && std::is_unsigned::value>> -constexpr inline UTILS_PUBLIC UTILS_PURE -T log2i(T x) noexcept { - return (sizeof(x) * 8 - 1u) - clz(x); -} - -template -inline UTILS_PUBLIC -RandomAccessIterator partition_point( - RandomAccessIterator first, RandomAccessIterator last, COMPARE pred, - bool assume_power_of_two = false) { - size_t len = last - first; - - if (!assume_power_of_two) { - // handle non power-of-two sized arrays. If it's POT, the next line is a no-op - // and gets optimized out if the size is known at compile time. - len = 1u << (31 - clz(uint32_t(len))); // next power of two length / 2 - size_t difference = (last - first) - len; - first += !difference || pred(first[len]) ? difference : 0; - } - - while (len) { - // The number of repetitions here doesn't affect the result. We manually unroll the loop - // twice, to guarantee we have at least two iterations without branches (for the case - // where the size is not known at compile time - first += pred(first[len>>=1u]) ? len : 0; - first += pred(first[len>>=1u]) ? len : 0; - } - first += pred(*first); - return first; -} - -template -typename std::enable_if_t< - (sizeof(To) == sizeof(From)) && - std::is_trivially_copyable::value, - To> -// constexpr support needs compiler magic -bit_cast(const From &src) noexcept { - return reinterpret_cast(src); -} - -} // namespace utils - -#endif // TNT_UTILS_ALGORITHM_H diff --git a/windows/include/filament/utils/bitset.h b/windows/include/filament/utils/bitset.h deleted file mode 100644 index 281e5dfc..00000000 --- a/windows/include/filament/utils/bitset.h +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_UTILS_BITSET_H -#define TNT_UTILS_BITSET_H - -#include -#include -#include - -#include -#include -#include - -#include // for std::fill -#include -#include - -#if defined(__ARM_NEON) -# if defined(__ARM_ACLE) && defined(__aarch64__) -# include -# define TNT_UTILS_BITSET_USE_NEON 1 -# endif -#endif - -namespace utils { - -/* - * This bitset<> class is different from std::bitset<> in that it allows us to control - * the exact storage size. This is useful for small bitset (e.g. < 64, on 64-bits machines). - * It also allows for lexicographical compares (i.e. sorting). - */ - -template::value && - std::is_unsigned::value>::type> -class UTILS_PUBLIC bitset { - T storage[N]; - -public: - static constexpr T BITS_PER_WORD = sizeof(T) * 8; - static constexpr T BIT_COUNT = BITS_PER_WORD * N; - static constexpr T WORLD_COUNT = N; - using container_type = T; - - bitset() noexcept { - std::fill(std::begin(storage), std::end(storage), 0); - } - - T getBitsAt(size_t n) const noexcept { - assert_invariant(n - void forEachSetBit(F exec) const noexcept { - for (size_t i = 0; i < N; i++) { - T v = storage[i]; - while (v) { - T k = utils::ctz(v); - v &= ~(T(1) << k); - exec(size_t(k + BITS_PER_WORD * i)); - } - } - } - - size_t size() const noexcept { return N * BITS_PER_WORD; } - - bool test(size_t bit) const noexcept { return operator[](bit); } - - void set(size_t b) noexcept { - assert_invariant(b / BITS_PER_WORD < N); - storage[b / BITS_PER_WORD] |= T(1) << (b % BITS_PER_WORD); - } - - void set(size_t b, bool value) noexcept { - assert_invariant(b / BITS_PER_WORD < N); - storage[b / BITS_PER_WORD] &= ~(T(1) << (b % BITS_PER_WORD)); - storage[b / BITS_PER_WORD] |= T(value) << (b % BITS_PER_WORD); - } - - void unset(size_t b) noexcept { - assert_invariant(b / BITS_PER_WORD < N); - storage[b / BITS_PER_WORD] &= ~(T(1) << (b % BITS_PER_WORD)); - } - - void flip(size_t b) noexcept { - assert_invariant(b / BITS_PER_WORD < N); - storage[b / BITS_PER_WORD] ^= T(1) << (b % BITS_PER_WORD); - } - - - void reset() noexcept { - std::fill(std::begin(storage), std::end(storage), 0); - } - - bool operator[](size_t b) const noexcept { - assert_invariant(b / BITS_PER_WORD < N); - return bool(storage[b / BITS_PER_WORD] & (T(1) << (b % BITS_PER_WORD))); - } - - size_t count() const noexcept { -#if defined(TNT_UTILS_BITSET_USE_NEON) - if (BIT_COUNT % 128 == 0 && BIT_COUNT / 128 < 31) { - // Use NEON for bitset multiple of 128 bits. - // The intermediate computation can't handle more than 31*128 bits because - // intermediate counts must be 8 bits. - uint8x16_t const* const p = (uint8x16_t const*) storage; - uint8x16_t counts = vcntq_u8(p[0]); - for (size_t i = 1; i < BIT_COUNT / 128; ++i) { - counts += vcntq_u8(p[i]); - } - return vaddlvq_u8(counts); - } else -#endif - { - T r = utils::popcount(storage[0]); - for (size_t i = 1; i < N; ++i) { - r += utils::popcount(storage[i]); - } - return r; - } - } - - bool any() const noexcept { -#if defined(TNT_UTILS_BITSET_USE_NEON) - if (BIT_COUNT % 128 == 0) { - uint64x2_t const* const p = (uint64x2_t const*) storage; - uint64x2_t r = p[0]; - for (size_t i = 1; i < BIT_COUNT / 128; ++i) { - r |= p[i]; - } - return bool(r[0] | r[1]); - } else -#endif - { - T r = storage[0]; - for (size_t i = 1; i < N; ++i) { - r |= storage[i]; - } - return bool(r); - } - } - - bool none() const noexcept { - return !any(); - } - - bool all() const noexcept { -#if defined(TNT_UTILS_BITSET_USE_NEON) - if (BIT_COUNT % 128 == 0) { - uint64x2_t const* const p = (uint64x2_t const*) storage; - uint64x2_t r = p[0]; - for (size_t i = 1; i < BIT_COUNT / 128; ++i) { - r &= p[i]; - } - return T(~(r[0] & r[1])) == T(0); - } else -#endif - { - T r = storage[0]; - for (size_t i = 1; i < N; ++i) { - r &= storage[i]; - } - return T(~r) == T(0); - } - } - - bool operator!=(const bitset& b) const noexcept { -#if defined(TNT_UTILS_BITSET_USE_NEON) - if (BIT_COUNT % 128 == 0) { - bitset temp(*this ^ b); - uint64x2_t const* const p = (uint64x2_t const*) temp.storage; - uint64x2_t r = p[0]; - for (size_t i = 1; i < BIT_COUNT / 128; ++i) { - r |= p[i]; - } - return bool(r[0] | r[1]); - } else -#endif - { - T r = storage[0] ^ b.storage[0]; - for (size_t i = 1; i < N; ++i) { - r |= storage[i] ^ b.storage[i]; - } - return bool(r); - } - } - - bool operator==(const bitset& b) const noexcept { - return !operator!=(b); - } - - bitset& operator&=(const bitset& b) noexcept { -#if defined(TNT_UTILS_BITSET_USE_NEON) - if (BIT_COUNT % 128 == 0) { - uint8x16_t* const p = (uint8x16_t*) storage; - uint8x16_t const* const q = (uint8x16_t const*) b.storage; - for (size_t i = 0; i < BIT_COUNT / 128; ++i) { - p[i] &= q[i]; - } - } else -#endif - { - for (size_t i = 0; i < N; ++i) { - storage[i] &= b.storage[i]; - } - } - return *this; - } - - bitset& operator|=(const bitset& b) noexcept { -#if defined(TNT_UTILS_BITSET_USE_NEON) - if (BIT_COUNT % 128 == 0) { - uint8x16_t* const p = (uint8x16_t*) storage; - uint8x16_t const* const q = (uint8x16_t const*) b.storage; - for (size_t i = 0; i < BIT_COUNT / 128; ++i) { - p[i] |= q[i]; - } - } else -#endif - { - for (size_t i = 0; i < N; ++i) { - storage[i] |= b.storage[i]; - } - } - return *this; - } - - bitset& operator^=(const bitset& b) noexcept { -#if defined(TNT_UTILS_BITSET_USE_NEON) - if (BIT_COUNT % 128 == 0) { - uint8x16_t* const p = (uint8x16_t*) storage; - uint8x16_t const* const q = (uint8x16_t const*) b.storage; - for (size_t i = 0; i < BIT_COUNT / 128; ++i) { - p[i] ^= q[i]; - } - } else -#endif - { - for (size_t i = 0; i < N; ++i) { - storage[i] ^= b.storage[i]; - } - } - return *this; - } - - bitset operator~() const noexcept { - bitset r; -#if defined(TNT_UTILS_BITSET_USE_NEON) - if (BIT_COUNT % 128 == 0) { - uint8x16_t* const p = (uint8x16_t*) r.storage; - uint8x16_t const* const q = (uint8x16_t const*) storage; - for (size_t i = 0; i < BIT_COUNT / 128; ++i) { - p[i] = ~q[i]; - } - } else -#endif - { - for (size_t i = 0; i < N; ++i) { - r.storage[i] = ~storage[i]; - } - } - return r; - } - -private: - friend bool operator<(bitset const& lhs, bitset const& rhs) noexcept { - return std::lexicographical_compare( - std::begin(lhs.storage), std::end(lhs.storage), - std::begin(rhs.storage), std::end(rhs.storage) - ); - } - - friend bitset operator&(const bitset& lhs, const bitset& rhs) noexcept { - return bitset(lhs) &= rhs; - } - - friend bitset operator|(const bitset& lhs, const bitset& rhs) noexcept { - return bitset(lhs) |= rhs; - } - - friend bitset operator^(const bitset& lhs, const bitset& rhs) noexcept { - return bitset(lhs) ^= rhs; - } -}; - -using bitset8 = bitset; -using bitset32 = bitset; -using bitset64 = bitset; -using bitset128 = bitset; -using bitset256 = bitset; - -static_assert(sizeof(bitset8) == 1, "bitset8 isn't 8 bits!"); -static_assert(sizeof(bitset32) == 4, "bitset32 isn't 32 bits!"); -static_assert(sizeof(bitset64) == 8, "bitset64 isn't 64 bits!"); -static_assert(sizeof(bitset128) == 16, "bitset128 isn't 128 bits!"); -static_assert(sizeof(bitset256) == 32, "bitset256 isn't 256 bits!"); - -} // namespace utils - -#endif // TNT_UTILS_BITSET_H diff --git a/windows/include/filament/utils/compiler.h b/windows/include/filament/utils/compiler.h deleted file mode 100644 index 7d62a389..00000000 --- a/windows/include/filament/utils/compiler.h +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -#ifndef TNT_UTILS_COMPILER_H -#define TNT_UTILS_COMPILER_H - -// compatibility with non-clang compilers... -#ifndef __has_attribute -#define __has_attribute(x) 0 -#endif - -#ifndef __has_feature -#define __has_feature(x) 0 -#endif - -#ifndef __has_builtin -#define __has_builtin(x) 0 -#endif - -#if __has_attribute(visibility) -# define UTILS_PUBLIC __attribute__((visibility("default"))) -#else -# define UTILS_PUBLIC -#endif - -#if __has_attribute(deprecated) -# define UTILS_DEPRECATED [[deprecated]] -#else -# define UTILS_DEPRECATED -#endif - -#if __has_attribute(packed) -# define UTILS_PACKED __attribute__((packed)) -#else -# define UTILS_PACKED -#endif - -#if __has_attribute(noreturn) -# define UTILS_NORETURN __attribute__((noreturn)) -#else -# define UTILS_NORETURN -#endif - -#if __has_attribute(fallthrough) -# define UTILS_FALLTHROUGH [[fallthrough]] -#else -# define UTILS_FALLTHROUGH -#endif - -#if __has_attribute(visibility) -# ifndef TNT_DEV -# define UTILS_PRIVATE __attribute__((visibility("hidden"))) -# else -# define UTILS_PRIVATE -# endif -#else -# define UTILS_PRIVATE -#endif - -#define UTILS_NO_SANITIZE_THREAD -#if __has_feature(thread_sanitizer) -#undef UTILS_NO_SANITIZE_THREAD -#define UTILS_NO_SANITIZE_THREAD __attribute__((no_sanitize("thread"))) -#endif - -#define UTILS_HAS_SANITIZE_THREAD 0 -#if __has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__) -#undef UTILS_HAS_SANITIZE_THREAD -#define UTILS_HAS_SANITIZE_THREAD 1 -#endif - -#define UTILS_HAS_SANITIZE_MEMORY 0 -#if __has_feature(memory_sanitizer) -#undef UTILS_HAS_SANITIZE_MEMORY -#define UTILS_HAS_SANITIZE_MEMORY 1 -#endif - -/* - * helps the compiler's optimizer predicting branches - */ -#if __has_builtin(__builtin_expect) -# ifdef __cplusplus -# define UTILS_LIKELY( exp ) (__builtin_expect( !!(exp), true )) -# define UTILS_UNLIKELY( exp ) (__builtin_expect( !!(exp), false )) -# else -# define UTILS_LIKELY( exp ) (__builtin_expect( !!(exp), 1 )) -# define UTILS_UNLIKELY( exp ) (__builtin_expect( !!(exp), 0 )) -# endif -#else -# define UTILS_LIKELY( exp ) (!!(exp)) -# define UTILS_UNLIKELY( exp ) (!!(exp)) -#endif - -#if __has_builtin(__builtin_prefetch) -# define UTILS_PREFETCH( exp ) (__builtin_prefetch(exp)) -#else -# define UTILS_PREFETCH( exp ) -#endif - -#if __has_builtin(__builtin_assume) -# define UTILS_ASSUME( exp ) (__builtin_assume(exp)) -#else -# define UTILS_ASSUME( exp ) -#endif - -#if (defined(__i386__) || defined(__x86_64__)) -# define UTILS_HAS_HYPER_THREADING 1 // on x86 we assume we have hyper-threading. -#else -# define UTILS_HAS_HYPER_THREADING 0 -#endif - -#if defined(FILAMENT_SINGLE_THREADED) -# define UTILS_HAS_THREADING 0 -#elif defined(__EMSCRIPTEN__) -# if defined(__EMSCRIPTEN_PTHREADS__) && defined(FILAMENT_WASM_THREADS) -# define UTILS_HAS_THREADING 1 -# else -# define UTILS_HAS_THREADING 0 -# endif -#else -# define UTILS_HAS_THREADING 1 -#endif - -#if __has_attribute(noinline) -#define UTILS_NOINLINE __attribute__((noinline)) -#else -#define UTILS_NOINLINE -#endif - -#if __has_attribute(always_inline) -#define UTILS_ALWAYS_INLINE __attribute__((always_inline)) -#else -#define UTILS_ALWAYS_INLINE -#endif - -#if __has_attribute(pure) -#define UTILS_PURE __attribute__((pure)) -#else -#define UTILS_PURE -#endif - -#if __has_attribute(maybe_unused) || (defined(_MSC_VER) && _MSC_VER >= 1911) -#define UTILS_UNUSED [[maybe_unused]] -#define UTILS_UNUSED_IN_RELEASE [[maybe_unused]] -#elif __has_attribute(unused) -#define UTILS_UNUSED __attribute__((unused)) -#define UTILS_UNUSED_IN_RELEASE __attribute__((unused)) -#else -#define UTILS_UNUSED -#define UTILS_UNUSED_IN_RELEASE -#endif - -#if defined(_MSC_VER) && _MSC_VER >= 1900 -# define UTILS_RESTRICT __restrict -#elif (defined(__clang__) || defined(__GNUC__)) -# define UTILS_RESTRICT __restrict__ -#else -# define UTILS_RESTRICT -#endif - -#if defined(_MSC_VER) && _MSC_VER >= 1900 -# define UTILS_HAS_FEATURE_CXX_THREAD_LOCAL 1 -#elif __has_feature(cxx_thread_local) -# define UTILS_HAS_FEATURE_CXX_THREAD_LOCAL 1 -#else -# define UTILS_HAS_FEATURE_CXX_THREAD_LOCAL 0 -#endif - -#if defined(_MSC_VER) -// MSVC does not support loop unrolling hints -# define UTILS_UNROLL -# define UTILS_NOUNROLL -#else -// C++11 allows pragmas to be specified as part of defines using the _Pragma syntax. -# define UTILS_UNROLL _Pragma("unroll") -# define UTILS_NOUNROLL _Pragma("nounroll") -#endif - -#if __has_feature(cxx_rtti) || defined(_CPPRTTI) -# define UTILS_HAS_RTTI 1 -#else -# define UTILS_HAS_RTTI 0 -#endif - -#ifdef __ARM_ACLE -# include -# define UTILS_WAIT_FOR_INTERRUPT() __wfi() -# define UTILS_WAIT_FOR_EVENT() __wfe() -# define UTILS_BROADCAST_EVENT() __sev() -# define UTILS_SIGNAL_EVENT() __sevl() -# define UTILS_PAUSE() __yield() -# define UTILS_PREFETCHW(addr) __pldx(1, 0, 0, addr) -#else // !__ARM_ACLE -# if (defined(__i386__) || defined(__x86_64__)) -# define UTILS_X86_PAUSE {__asm__ __volatile__( "rep; nop" : : : "memory" );} -# define UTILS_WAIT_FOR_INTERRUPT() UTILS_X86_PAUSE -# define UTILS_WAIT_FOR_EVENT() UTILS_X86_PAUSE -# define UTILS_BROADCAST_EVENT() -# define UTILS_SIGNAL_EVENT() -# define UTILS_PAUSE() UTILS_X86_PAUSE -# define UTILS_PREFETCHW(addr) UTILS_PREFETCH(addr) -# else // !x86 -# define UTILS_WAIT_FOR_INTERRUPT() -# define UTILS_WAIT_FOR_EVENT() -# define UTILS_BROADCAST_EVENT() -# define UTILS_SIGNAL_EVENT() -# define UTILS_PAUSE() -# define UTILS_PREFETCHW(addr) UTILS_PREFETCH(addr) -# endif // x86 -#endif // __ARM_ACLE - - -// ssize_t is a POSIX type. -#if defined(WIN32) || defined(_WIN32) -#include -typedef SSIZE_T ssize_t; -#endif - -#ifdef _MSC_VER -# define UTILS_EMPTY_BASES __declspec(empty_bases) -#else -# define UTILS_EMPTY_BASES -#endif - -#if defined(WIN32) || defined(_WIN32) - #define IMPORTSYMB __declspec(dllimport) -#else - #define IMPORTSYMB -#endif - -#if defined(_MSC_VER) && !defined(__PRETTY_FUNCTION__) -# define __PRETTY_FUNCTION__ __FUNCSIG__ -#endif - - -#if defined(_MSC_VER) -# define UTILS_WARNING_PUSH _Pragma("warning( push )") -# define UTILS_WARNING_POP _Pragma("warning( pop )") -# define UTILS_WARNING_ENABLE_PADDED _Pragma("warning(1: 4324)") -#elif defined(__clang__) -# define UTILS_WARNING_PUSH _Pragma("clang diagnostic push") -# define UTILS_WARNING_POP _Pragma("clang diagnostic pop") -# define UTILS_WARNING_ENABLE_PADDED _Pragma("clang diagnostic warning \"-Wpadded\"") -#else -# define UTILS_WARNING_PUSH -# define UTILS_WARNING_POP -# define UTILS_WARNING_ENABLE_PADDED -#endif - -#endif // TNT_UTILS_COMPILER_H diff --git a/windows/include/filament/utils/compressed_pair.h b/windows/include/filament/utils/compressed_pair.h deleted file mode 100644 index 62bf2de4..00000000 --- a/windows/include/filament/utils/compressed_pair.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#ifndef TNT_UTILS_COMPRESSED_PAIR_H -#define TNT_UTILS_COMPRESSED_PAIR_H - -#include -#include - -namespace utils { - -template -struct dependent_type : public T { -}; - -template, bool> = true> -struct compressed_pair : private T1, private T2 { - - template, Dummy>::value && - dependent_type, Dummy>::value>> - compressed_pair() : T1(), T2() {} - - template - compressed_pair(U1&& other1, U2&& other2) - : T1(std::forward(other1)), - T2(std::forward(other2)) {} - - T1& first() noexcept { - return static_cast(*this); - } - - T2& second() noexcept { - return static_cast(*this); - } - - T1 const& first() const noexcept { - return static_cast(*this); - } - - T2 const& second() const noexcept { - return static_cast(*this); - } - - void swap(compressed_pair& other) noexcept { - using std::swap; - swap(first(), other.first()); - swap(second(), other.second()); - } -}; - -} // namespace utils - -#endif // TNT_UTILS_COMPRESSED_PAIR_H diff --git a/windows/include/filament/utils/debug.h b/windows/include/filament/utils/debug.h deleted file mode 100644 index 4c118725..00000000 --- a/windows/include/filament/utils/debug.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#ifndef TNT_UTILS_DEBUG_H -#define TNT_UTILS_DEBUG_H - -#include - -namespace utils { -void panic(const char *func, const char * file, int line, const char *assertion) noexcept; -} // namespace filament - -#ifdef NDEBUG -# define assert_invariant(e) ((void)0) -#else -# define assert_invariant(e) \ - (UTILS_LIKELY(e) ? ((void)0) : utils::panic(__func__, __FILE__, __LINE__, #e)) -#endif // NDEBUG - -#endif // TNT_UTILS_DEBUG_H diff --git a/windows/include/filament/utils/generic/Mutex.h b/windows/include/filament/utils/generic/Mutex.h deleted file mode 100644 index d5976d04..00000000 --- a/windows/include/filament/utils/generic/Mutex.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ - -#ifndef TNT_UTILS_GENERIC_MUTEX_H -#define TNT_UTILS_GENERIC_MUTEX_H - -#include - -namespace utils { - -using Mutex = std::mutex; - -} // namespace utils - -#endif // TNT_UTILS_GENERIC_MUTEX_H diff --git a/windows/include/filament/utils/memalign.h b/windows/include/filament/utils/memalign.h deleted file mode 100644 index 4c048bff..00000000 --- a/windows/include/filament/utils/memalign.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (C) 2018 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. - */ - -#ifndef TNT_UTILS_MEMALIGN_H -#define TNT_UTILS_MEMALIGN_H - -#include - -#include -#include -#include - -#if defined(WIN32) -#include -#endif - -namespace utils { - -inline void* aligned_alloc(size_t size, size_t align) noexcept { - // 'align' must be a power of two and a multiple of sizeof(void*) - align = (align < sizeof(void*)) ? sizeof(void*) : align; - assert(align && !(align & align - 1)); - assert((align % sizeof(void*)) == 0); - - void* p = nullptr; - -#if defined(WIN32) - p = ::_aligned_malloc(size, align); -#else - ::posix_memalign(&p, align, size); -#endif - return p; -} - -inline void aligned_free(void* p) noexcept { -#if defined(WIN32) - ::_aligned_free(p); -#else - ::free(p); -#endif -} - -/* - * This allocator can be used with std::vector for instance to ensure all items are aligned - * to their alignof(). e.g. - * - * template - * using aligned_vector = std::vector>; - * - * aligned_vector foos; - * - */ -template -class STLAlignedAllocator { - static_assert(!(alignof(TYPE) & (alignof(TYPE) - 1)), "alignof(T) must be a power of two"); - -public: - using value_type = TYPE; - using pointer = TYPE*; - using const_pointer = const TYPE*; - using reference = TYPE&; - using const_reference = const TYPE&; - using size_type = std::size_t; - using difference_type = std::ptrdiff_t; - using propagate_on_container_move_assignment = std::true_type; - using is_always_equal = std::true_type; - - template - struct rebind { using other = STLAlignedAllocator; }; - - inline STLAlignedAllocator() noexcept = default; - - template - inline explicit STLAlignedAllocator(const STLAlignedAllocator&) noexcept {} - - inline ~STLAlignedAllocator() noexcept = default; - - inline pointer allocate(size_type n) noexcept { - return (pointer)aligned_alloc(n * sizeof(value_type), alignof(TYPE)); - } - - inline void deallocate(pointer p, size_type) { - aligned_free(p); - } - - // stateless allocators are always equal - template - bool operator==(const STLAlignedAllocator&) const noexcept { - return true; - } - - template - bool operator!=(const STLAlignedAllocator&) const noexcept { - return false; - } -}; - -} // namespace utils - -#endif // TNT_UTILS_MEMALIGN_H diff --git a/windows/include/filament/utils/unwindows.h b/windows/include/filament/utils/unwindows.h deleted file mode 100644 index 328ba4dd..00000000 --- a/windows/include/filament/utils/unwindows.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2018 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. - */ - -#if defined (WIN32) - -#ifdef max -#undef max -#endif - -#ifdef min -#undef min -#endif - -#ifdef far -#undef far -#endif - -#ifdef near -#undef near -#endif - -#ifdef ERROR -#undef ERROR -#endif - -#ifdef OPAQUE -#undef OPAQUE -#endif - -#ifdef TRANSPARENT -#undef TRANSPARENT -#endif - -#ifdef PURE -#undef PURE -#endif - -#endif diff --git a/windows/include/filament/viewer/AutomationEngine.h b/windows/include/filament/viewer/AutomationEngine.h deleted file mode 100644 index 8747f59d..00000000 --- a/windows/include/filament/viewer/AutomationEngine.h +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -#ifndef VIEWER_AUTOMATION_ENGINE_H -#define VIEWER_AUTOMATION_ENGINE_H - -#include - -namespace filament { - -class ColorGrading; -class Engine; -class LightManager; -class MaterialInstance; -class Renderer; -class View; - -namespace viewer { - -/** - * The AutomationEngine makes it easy to push a bag of settings values to Filament. - * It can also be used to iterate through settings permutations for testing purposes. - * - * When creating an automation engine for testing purposes, clients give it an immutable reference - * to an AutomationSpec. It is always in one of two states: running or idle. The running state can - * be entered immediately (startRunning) or by requesting batch mode (startBatchMode). - * - * When executing a test, clients should call tick() after each frame is rendered, which gives - * automation an opportunity to push settings to Filament, increment the current test index (if - * enough time has elapsed), and request an asynchronous screenshot. - * - * The time to sleep between tests is configurable and can be set to zero. Automation also waits a - * specified minimum number of frames between tests. - * - * Batch mode is meant for non-interactive applications. In batch mode, automation defers applying - * the first test case until the client unblocks it via signalBatchMode(). This is useful when - * waiting for a large model file to become fully loaded. Batch mode also offers a query - * (shouldClose) that is triggered after the last test has been invoked. - */ -class UTILS_PUBLIC AutomationEngine { -public: - /** - * Allows users to toggle screenshots, change the sleep duration between tests, etc. - */ - struct Options { - /** - * Minimum time that automation waits between applying a settings object and advancing - * to the next test case. Specified in seconds. - */ - float sleepDuration = 0.2f; - - /** - * Similar to sleepDuration, but expressed as a frame count. Both the minimum sleep time - * and the minimum frame count must be elapsed before automation advances to the next test. - */ - int minFrameCount = 2; - - /** - * If true, test progress is dumped to the utils Log (info priority). - */ - bool verbose = true; - - /** - * If true, the tick function writes out a screenshot before advancing to the next test. - */ - bool exportScreenshots = false; - - /** - * If true, the tick function writes out a settings JSON file before advancing. - */ - bool exportSettings = false; - }; - - /** - * Collection of Filament objects that can be modified by the automation engine. - */ - struct ViewerContent { - View* view; - Renderer* renderer; - MaterialInstance* const* materials; - size_t materialCount; - LightManager* lightManager; - Scene* scene; - IndirectLight* indirectLight; - utils::Entity sunlight; - utils::Entity* assetLights; - size_t assetLightCount; - }; - - /** - * Creates an automation engine and places it in an idle state. - * - * @param spec Specifies a set of settings permutations (owned by the client). - * @param settings Client-owned settings object. This not only supplies the initial - * state, it also receives changes during tick(). This is useful when - * building automation into an application that has a settings UI. - * - * @see setOptions - * @see startRunning - */ - AutomationEngine(const AutomationSpec* spec, Settings* settings) : - mSpec(spec), mSettings(settings) {} - - /** - * Shortcut constructor that creates an automation engine from a JSON string. - * - * This constructor can be used if the user does not need to monitor how the settings - * change over time and does not need ownership over the AutomationSpec. - * - * An example of a JSON spec can be found by searching the repo for DEFAULT_AUTOMATION. - * This is documented using a JSON schema (look for viewer/schemas/automation.json). - * - * @param jsonSpec Valid JSON string that conforms to the automation schema. - * @param size Number of characters in the JSON string. - * @return Automation engine or null if unable to read the JSON. - */ - static AutomationEngine* createFromJSON(const char* jsonSpec, size_t size); - - /** - * Creates an automation engine for the sole purpose of pushing settings, or for executing - * the default test sequence. - * - * To see how the default test sequence is generated, search for DEFAULT_AUTOMATION. - */ - static AutomationEngine* createDefault(); - - /** - * Activates the automation test. During the subsequent call to tick(), the first test is - * applied and automation enters the running state. - */ - void startRunning(); - - /** - * Activates the automation test, but enters a paused state until the user calls - * signalBatchMode(). - */ - void startBatchMode(); - - /** - * Notifies the automation engine that time has passed, a new frame has been rendered. - * - * This is when settings get applied, screenshots are (optionally) exported, and the internal - * test counter is potentially incremented. - * - * @param content Contains the Filament View, Materials, and Renderer that get modified. - * @param deltaTime The amount of time that has passed since the previous tick in seconds. - */ - void tick(Engine* engine, const ViewerContent& content, float deltaTime); - - /** - * Mutates a set of client-owned Filament objects according to a JSON string. - * - * This method is an alternative to tick(). It allows clients to use the automation engine as a - * remote control, as opposed to iterating through a predetermined test sequence. - * - * This updates the stashed Settings object, then pushes those settings to the given - * Filament objects. Clients can optionally call getColorGrading() after calling this method. - * - * @param json Contains the JSON string with a set of changes that need to be pushed. - * @param jsonLength Number of characters in the json string. - * @param content Contains a set of Filament objects that you want to mutate. - */ - void applySettings(Engine* engine, const char* json, size_t jsonLength, const ViewerContent& content); - - /** - * Gets a color grading object that corresponds to the latest settings. - * - * This method either returns a cached instance, or it destroys the cached instance and creates - * a new one. - */ - ColorGrading* getColorGrading(Engine* engine); - - /** - * Gets the current viewer options. - * - * NOTE: Focal length here might be different from the user-specified value, due to DoF options. - */ - ViewerOptions getViewerOptions() const; - - /** - * Signals that batch mode can begin. Call this after all meshes and textures finish loading. - */ - void signalBatchMode() { mBatchModeAllowed = true; } - - /** - * Cancels an in-progress automation session. - */ - void stopRunning() { mIsRunning = false; } - - /** - * Signals that the application is closing, so all pending screenshots should be cancelled. - */ - void terminate(); - - /** - * Configures the automation engine for users who wish to set up a custom sleep time - * between tests, etc. - */ - void setOptions(Options options) { mOptions = options; } - - /** - * Returns true if automation is in batch mode and all tests have finished. - */ - bool shouldClose() const { return mShouldClose; } - - /** - * Convenience function that writes out a JSON file to disk containing all settings. - * - * @param Settings State vector to serialize. - * @param filename Desired JSON filename. - */ - static void exportSettings(const Settings& settings, const char* filename); - - Options getOptions() const { return mOptions; } - bool isRunning() const { return mIsRunning; } - size_t currentTest() const { return mCurrentTest; } - size_t testCount() const { return mSpec->size(); } - bool isBatchModeEnabled() const { return mBatchModeEnabled; } - const char* getStatusMessage() const; - ~AutomationEngine(); - -private: - AutomationSpec const * const mSpec; - Settings * const mSettings; - Options mOptions; - - Engine* mColorGradingEngine = nullptr; - ColorGrading* mColorGrading = nullptr; - ColorGradingSettings mColorGradingSettings = {}; - - size_t mCurrentTest; - float mElapsedTime; - int mElapsedFrames; - bool mIsRunning = false; - bool mBatchModeEnabled = false; - bool mRequestStart = false; - bool mShouldClose = false; - bool mBatchModeAllowed = false; - bool mTerminated = false; - bool mOwnsSettings = false; - -public: - // For internal use from a screenshot callback. - void requestClose() { mShouldClose = true; } - bool isTerminated() const { return mTerminated; } -}; - -} // namespace viewer -} // namespace filament - -#endif // VIEWER_AUTOMATION_ENGINE_H diff --git a/windows/include/filament/viewer/AutomationSpec.h b/windows/include/filament/viewer/AutomationSpec.h deleted file mode 100644 index 49e16854..00000000 --- a/windows/include/filament/viewer/AutomationSpec.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -#ifndef VIEWER_AUTOMATION_SPEC_H -#define VIEWER_AUTOMATION_SPEC_H - -#include - -#include - -namespace filament { -namespace viewer { - -/** - * Immutable list of Settings objects generated from a JSON spec. - * - * Each top-level item in the JSON spec is an object with "name", "base" and "permute". - * The "base" object specifies a single set of changes to apply to default settings. - * The optional "permute" object specifies a cross product of changes to apply to the base. - * - * The following example generates a total of 5 test cases. - * [{ - * "name": "simple", - * "base": { - * "view.dof.cocScale": 1.0, - * "view.bloom.strength": 0.5 - * }, - * "permute": { - * "view.bloom.enabled": [false, true], - * "view.dof.enabled": [false, true] - * } - * }, - * { - * "name": "ppoff", - * "base": { - * "view.postProcessingEnabled": false - * } - * }] - */ -class UTILS_PUBLIC AutomationSpec { -public: - - // Parses a JSON spec, then generates a list of Settings objects. - // Returns null on failure (see utils log for warnings and errors). - // Clients should release memory using "delete". - static AutomationSpec* generate(const char* jsonSpec, size_t size); - - // Generates a list of Settings objects using an embedded JSON spec. - static AutomationSpec* generateDefaultTestCases(); - - // Returns the number of generated Settings objects. - size_t size() const; - - // Gets a generated Settings object and copies it out. - // Returns false if the given index is out of bounds. - bool get(size_t index, Settings* out) const; - - // Returns the name of the JSON group for a given Settings object. - char const* getName(size_t index) const; - - // Frees all Settings objects and name strings. - ~AutomationSpec(); - -private: - struct Impl; - AutomationSpec(Impl*); - Impl* mImpl; -}; - -} // namespace viewer -} // namespace filament - -#endif // VIEWER_AUTOMATION_SPEC_H diff --git a/windows/include/filament/viewer/RemoteServer.h b/windows/include/filament/viewer/RemoteServer.h deleted file mode 100644 index 6272b872..00000000 --- a/windows/include/filament/viewer/RemoteServer.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#ifndef VIEWER_REMOTE_SERVER_H -#define VIEWER_REMOTE_SERVER_H - -#include - -#include - -#include -#include - -class CivetServer; - -namespace filament { -namespace viewer { - -class MessageSender; -class MessageReceiver; - -/** - * Encapsulates a message sent from the web client. - * - * All instances of ReceivedMessage and their data / strings are owned by RemoteServer. - * These can be freed via RemoteServer::releaseReceivedMessage(). - */ -struct ReceivedMessage { - char* label; - char* buffer; - size_t bufferByteCount; - size_t messageUid; -}; - -/** - * Manages a tiny WebSocket server that can receive model data and viewer settings. - * - * Client apps can call peekReceivedMessage to check for new data, or acquireReceivedMessage - * to pop it off the small internal queue. When they are done examining the message contents - * they should call releaseReceivedMessage. - */ -class UTILS_PUBLIC RemoteServer { -public: - RemoteServer(int port = 8082); - ~RemoteServer(); - bool isValid() const { return mMessageSender; } - - /** - * Checks if a download is currently in progress and returns its label. - * Returns null if nothing is being downloaded. - */ - char const* peekIncomingLabel() const; - - /** - * Pops a message off the incoming queue or returns null if there are no unread messages. - * - * After examining its contents, users should free the message with releaseReceivedMessage. - */ - ReceivedMessage const* acquireReceivedMessage(); - - /** - * Frees the memory that holds the contents of a received message. - */ - void releaseReceivedMessage(ReceivedMessage const* message); - - void sendMessage(const Settings& settings); - void sendMessage(const char* label, const char* buffer, size_t bufsize); - - // For internal use (makes JNI simpler) - ReceivedMessage const* peekReceivedMessage() const; - -private: - void enqueueReceivedMessage(ReceivedMessage* message); - void setIncomingMessage(ReceivedMessage* message); - MessageSender* mMessageSender = nullptr; - MessageReceiver* mMessageReceiver = nullptr; - size_t mNextMessageUid = 0; - static const size_t kMessageCapacity = 4; - ReceivedMessage* mReceivedMessages[kMessageCapacity] = {}; - ReceivedMessage* mIncomingMessage = nullptr; - JsonSerializer mSerializer; - mutable std::mutex mReceivedMessagesMutex; - friend class MessageReceiver; -}; - -} // namespace viewer -} // namespace filament - -#endif // VIEWER_REMOTE_SERVER_H diff --git a/windows/include/filament/viewer/Settings.h b/windows/include/filament/viewer/Settings.h deleted file mode 100644 index 4c8b0abe..00000000 --- a/windows/include/filament/viewer/Settings.h +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (C) 2020 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. - */ - -#ifndef VIEWER_SETTINGS_H -#define VIEWER_SETTINGS_H - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include - -#include - -namespace filament { - -using namespace color; - -class Skybox; -class Renderer; - -namespace viewer { - -struct ColorGradingSettings; -struct DynamicLightingSettings; -struct MaterialSettings; -struct Settings; -struct ViewSettings; -struct LightSettings; -struct ViewerOptions; - -enum class ToneMapping : uint8_t { - LINEAR = 0, - ACES_LEGACY = 1, - ACES = 2, - FILMIC = 3, - GENERIC = 4, - DISPLAY_RANGE = 5, -}; - -using AmbientOcclusionOptions = filament::View::AmbientOcclusionOptions; -using ScreenSpaceReflectionsOptions = filament::View::ScreenSpaceReflectionsOptions; -using AntiAliasing = filament::View::AntiAliasing; -using BloomOptions = filament::View::BloomOptions; -using DepthOfFieldOptions = filament::View::DepthOfFieldOptions; -using Dithering = filament::View::Dithering; -using FogOptions = filament::View::FogOptions; -using RenderQuality = filament::View::RenderQuality; -using ShadowType = filament::View::ShadowType; -using DynamicResolutionOptions = filament::View::DynamicResolutionOptions; -using MultiSampleAntiAliasingOptions = filament::View::MultiSampleAntiAliasingOptions; -using TemporalAntiAliasingOptions = filament::View::TemporalAntiAliasingOptions; -using VignetteOptions = filament::View::VignetteOptions; -using VsmShadowOptions = filament::View::VsmShadowOptions; -using GuardBandOptions = filament::View::GuardBandOptions; -using LightManager = filament::LightManager; - -// These functions push all editable property values to their respective Filament objects. -void applySettings(Engine* engine, const ViewSettings& settings, View* dest); -void applySettings(Engine* engine, const MaterialSettings& settings, MaterialInstance* dest); -void applySettings(Engine* engine, const LightSettings& settings, IndirectLight* ibl, utils::Entity sunlight, - const utils::Entity* sceneLights, size_t sceneLightCount, LightManager* lm, Scene* scene, View* view); -void applySettings(Engine* engine, const ViewerOptions& settings, Camera* camera, Skybox* skybox, - Renderer* renderer); - -// Creates a new ColorGrading object based on the given settings. -UTILS_PUBLIC -ColorGrading* createColorGrading(const ColorGradingSettings& settings, Engine* engine); - -class UTILS_PUBLIC JsonSerializer { -public: - JsonSerializer(); - ~JsonSerializer(); - - // Writes a human-readable JSON string into an internal buffer and returns the result. - const std::string& writeJson(const Settings& in); - - // Reads the given JSON blob and updates the corresponding fields in the given Settings object. - // - The given JSON blob need not specify all settings. - // - Returns true if successful. - // - This function writes warnings and error messages into the utils log. - bool readJson(const char* jsonChunk, size_t size, Settings* out); - -private: - class Context; - Context* context; -}; - -struct GenericToneMapperSettings { - float contrast = 1.55f; - float midGrayIn = 0.18f; - float midGrayOut = 0.215f; - float hdrMax = 10.0f; - bool operator!=(const GenericToneMapperSettings &rhs) const { return !(rhs == *this); } - bool operator==(const GenericToneMapperSettings &rhs) const; -}; - -struct ColorGradingSettings { - // fields are ordered to avoid padding - bool enabled = true; - bool linkedCurves = false; - bool luminanceScaling = false; - bool gamutMapping = false; - filament::ColorGrading::QualityLevel quality = filament::ColorGrading::QualityLevel::MEDIUM; - ToneMapping toneMapping = ToneMapping::ACES_LEGACY; - bool padding0{}; - bool padding1{}; - color::ColorSpace colorspace = Rec709-sRGB-D65; - GenericToneMapperSettings genericToneMapper; - math::float4 shadows{1.0f, 1.0f, 1.0f, 0.0f}; - math::float4 midtones{1.0f, 1.0f, 1.0f, 0.0f}; - math::float4 highlights{1.0f, 1.0f, 1.0f, 0.0f}; - math::float4 ranges{0.0f, 0.333f, 0.550f, 1.0f}; - math::float3 outRed{1.0f, 0.0f, 0.0f}; - math::float3 outGreen{0.0f, 1.0f, 0.0f}; - math::float3 outBlue{0.0f, 0.0f, 1.0f}; - math::float3 slope{1.0f}; - math::float3 offset{0.0f}; - math::float3 power{1.0f}; - math::float3 gamma{1.0f}; - math::float3 midPoint{1.0f}; - math::float3 scale{1.0f}; - float exposure = 0.0f; - float nightAdaptation = 0.0f; - float temperature = 0.0f; - float tint = 0.0f; - float contrast = 1.0f; - float vibrance = 1.0f; - float saturation = 1.0f; - - bool operator!=(const ColorGradingSettings &rhs) const { return !(rhs == *this); } - bool operator==(const ColorGradingSettings &rhs) const; -}; - -struct DynamicLightingSettings { - float zLightNear = 5; - float zLightFar = 100; -}; - -// This defines fields in the same order as the setter methods in filament::View. -struct ViewSettings { - // standalone View settings - AntiAliasing antiAliasing = AntiAliasing::FXAA; - Dithering dithering = Dithering::TEMPORAL; - ShadowType shadowType = ShadowType::PCF; - bool postProcessingEnabled = true; - - // View Options (sorted) - AmbientOcclusionOptions ssao; - ScreenSpaceReflectionsOptions screenSpaceReflections; - BloomOptions bloom; - DepthOfFieldOptions dof; - DynamicResolutionOptions dsr; - FogOptions fog; - MultiSampleAntiAliasingOptions msaa; - RenderQuality renderQuality; - TemporalAntiAliasingOptions taa; - VignetteOptions vignette; - VsmShadowOptions vsmShadowOptions; - GuardBandOptions guardBand; - - // Custom View Options - ColorGradingSettings colorGrading; - DynamicLightingSettings dynamicLighting; -}; - -template -struct MaterialProperty { std::string name; T value; }; - -// This struct has a fixed size for simplicity. Each non-empty property name is an override. -struct MaterialSettings { - static constexpr size_t MAX_COUNT = 4; - MaterialProperty scalar[MAX_COUNT]; - MaterialProperty float3[MAX_COUNT]; - MaterialProperty float4[MAX_COUNT]; -}; - -struct LightSettings { - bool enableShadows = true; - bool enableSunlight = true; - LightManager::ShadowOptions shadowOptions; - SoftShadowOptions softShadowOptions; - float sunlightIntensity = 100000.0f; - float sunlightHaloSize = 10.0f; - float sunlightHaloFalloff = 80.0f; - float sunlightAngularRadius = 1.9f; - math::float3 sunlightDirection = {0.6, -1.0, -0.8}; - math::float3 sunlightColor = filament::Color::toLinear({ 0.98, 0.92, 0.89}); - float iblIntensity = 30000.0f; - float iblRotation = 0.0f; -}; - -struct ViewerOptions { - float cameraAperture = 16.0f; - float cameraSpeed = 125.0f; - float cameraISO = 100.0f; - float cameraNear = 0.1f; - float cameraFar = 100.0f; - float groundShadowStrength = 0.75f; - bool groundPlaneEnabled = false; - bool skyboxEnabled = true; - sRGBColor backgroundColor = { 0.0f }; - float cameraFocalLength = 28.0f; - float cameraFocusDistance = 10.0f; - bool autoScaleEnabled = true; - bool autoInstancingEnabled = false; -}; - -struct Settings { - ViewSettings view; - MaterialSettings material; - LightSettings lighting; - ViewerOptions viewer; -}; - -} // namespace viewer -} // namespace filament - -#endif // VIEWER_SETTINGS_H diff --git a/windows/include/material/image.bin b/windows/include/material/image.bin deleted file mode 100644 index d8741de2..00000000 Binary files a/windows/include/material/image.bin and /dev/null differ diff --git a/windows/include/material/image.c b/windows/include/material/image.c deleted file mode 100644 index 93faba17..00000000 --- a/windows/include/material/image.c +++ /dev/null @@ -1,694 +0,0 @@ -#include - -const uint8_t IMAGE_PACKAGE[] = { -// IMAGE -0x53, 0x52, 0x45, 0x56, 0x5f, 0x54, 0x41, 0x4d, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x54, 0x41, 0x45, 0x46, -0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x45, 0x4d, 0x41, 0x4e, 0x5f, 0x54, 0x41, 0x4d, 0x06, 0x00, 0x00, -0x00, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x00, 0x4c, 0x44, 0x4d, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x04, 0x00, 0x00, 0x00, 0x06, -0x00, 0x00, 0x00, 0x4e, 0x4d, 0x4f, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x46, 0x49, 0x4e, 0x55, -0x5f, 0x54, 0x41, 0x4d, 0x87, 0x00, 0x00, 0x00, 0x08, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x00, 0x00, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x01, -0x4c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x04, 0x53, 0x68, 0x61, 0x64, -0x6f, 0x77, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x05, 0x46, 0x72, 0x6f, 0x78, 0x65, 0x6c, 0x52, 0x65, -0x63, 0x6f, 0x72, 0x64, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x06, 0x42, 0x6f, 0x6e, 0x65, 0x73, 0x55, -0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x02, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x69, 0x6e, 0x67, 0x55, 0x6e, 0x69, -0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x03, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, -0x73, 0x00, 0x07, 0x50, 0x4d, 0x41, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0xc3, 0x00, 0x00, 0x00, 0x03, 0x00, 0x02, 0x07, 0x07, -0x01, 0x02, 0x09, 0x07, 0x01, 0x0a, 0x00, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x4d, -0x61, 0x70, 0x00, 0x01, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x66, 0x72, 0x6f, 0x78, 0x65, 0x6c, 0x73, 0x00, 0x02, 0x6c, -0x69, 0x67, 0x68, 0x74, 0x5f, 0x69, 0x62, 0x6c, 0x44, 0x46, 0x47, 0x00, 0x03, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x69, -0x62, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x00, 0x04, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x73, -0x61, 0x6f, 0x00, 0x05, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x73, 0x73, 0x72, 0x00, 0x06, 0x6c, 0x69, 0x67, 0x68, 0x74, -0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x00, 0x07, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x54, 0x61, 0x72, -0x67, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x00, -0x08, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x74, -0x61, 0x6e, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x00, 0x09, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, -0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x00, 0x20, 0x42, 0x49, 0x55, 0x5f, 0x54, 0x41, 0x4d, 0x59, 0x00, -0x00, 0x00, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x03, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x11, 0x02, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x03, 0x73, 0x68, 0x6f, 0x77, 0x49, 0x6d, 0x61, 0x67, 0x65, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03, 0x20, 0x42, 0x49, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x21, -0x00, 0x00, 0x00, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x01, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x00, 0x00, 0x02, 0x03, 0x00, 0x53, 0x4e, 0x4f, 0x43, -0x5f, 0x54, 0x41, 0x4d, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x42, 0x55, 0x53, -0x5f, 0x54, 0x41, 0x4d, 0x17, 0x00, 0x00, 0x00, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, -0x6d, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x53, 0x4f, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, -0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x4f, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x45, 0x4c, -0x42, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x44, 0x4d, 0x52, 0x54, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, -0x00, 0x00, 0x00, 0x4c, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x49, 0x52, 0x57, 0x43, -0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x53, 0x57, 0x45, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, -0x00, 0x01, 0x49, 0x52, 0x57, 0x44, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x53, 0x45, 0x54, 0x44, 0x5f, -0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x54, 0x53, 0x4e, 0x49, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, -0x00, 0x53, 0x43, 0x32, 0x41, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x43, 0x32, 0x41, 0x5f, 0x54, -0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x4d, 0x55, 0x43, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, -0x50, 0x4f, 0x52, 0x50, 0x5f, 0x54, 0x41, 0x4d, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x44, 0x41, 0x48, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x4d, 0x48, 0x53, 0x5f, 0x54, 0x41, -0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x54, -0x46, 0x45, 0x52, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x52, 0x4f, 0x49, 0x43, 0x5f, 0x54, 0x41, 0x4d, -0x01, 0x00, 0x00, 0x00, 0x01, 0x41, 0x51, 0x45, 0x52, 0x5f, 0x54, 0x41, 0x4d, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, -0x00, 0x41, 0x41, 0x50, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x52, 0x41, 0x56, 0x53, 0x5f, 0x54, -0x41, 0x4d, 0x04, 0x00, 0x00, 0x00, 0x9a, 0x99, 0x19, 0x3e, 0x52, 0x48, 0x54, 0x53, 0x5f, 0x54, 0x41, 0x4d, 0x04, 0x00, -0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x4f, 0x44, 0x45, 0x56, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x03, 0x52, -0x54, 0x4e, 0x49, 0x5f, 0x54, 0x41, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x50, 0x44, 0x53, 0x43, 0x5f, 0x54, 0x41, 0x4d, -0x01, 0x00, 0x00, 0x00, 0x01, 0x54, 0x58, 0x45, 0x54, 0x5f, 0x43, 0x49, 0x44, 0x9c, 0x28, 0x00, 0x00, 0xb1, 0x01, 0x00, -0x00, 0x23, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x30, 0x30, 0x20, 0x65, 0x73, 0x00, 0x6c, 0x61, 0x79, -0x6f, 0x75, 0x74, 0x28, 0x73, 0x74, 0x64, 0x31, 0x34, 0x30, 0x29, 0x20, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, -0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0x7b, 0x00, 0x6d, 0x61, 0x74, 0x34, -0x20, 0x61, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x62, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x63, 0x3b, 0x00, -0x6d, 0x61, 0x74, 0x34, 0x20, 0x64, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x65, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, -0x20, 0x66, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x67, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x68, 0x3b, 0x00, -0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x69, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x6a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6b, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6c, -0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6d, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6e, 0x3b, 0x00, 0x76, 0x65, -0x63, 0x32, 0x20, 0x6f, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, -0x70, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x71, 0x3b, 0x00, -0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x3b, 0x00, 0x6d, 0x65, -0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x20, 0x75, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x3b, -0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x77, 0x3b, 0x00, 0x6d, 0x65, -0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x78, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, -0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x79, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, -0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x61, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, -0x62, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x75, 0x76, 0x65, 0x63, 0x33, 0x20, 0x63, 0x7a, -0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x64, 0x7a, 0x3b, 0x00, 0x6d, -0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x65, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, -0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, -0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x67, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, -0x76, 0x65, 0x63, 0x33, 0x20, 0x68, 0x7a, 0x5b, 0x39, 0x5d, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, -0x76, 0x65, 0x63, 0x33, 0x20, 0x69, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x6a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, -0x6b, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6c, 0x7a, 0x3b, -0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6d, 0x7a, 0x3b, 0x00, 0x6d, 0x65, -0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x6e, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, -0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6f, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x70, 0x7a, -0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x71, 0x7a, 0x3b, 0x00, 0x6d, -0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, -0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, -0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x77, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, -0x78, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x79, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x7a, -0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x61, 0x7a, 0x7a, -0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x62, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x63, -0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, -0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x65, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x67, 0x7a, -0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x68, 0x7a, 0x7a, -0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x69, 0x7a, 0x7a, 0x3b, -0x00, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6a, 0x7a, 0x7a, 0x3b, 0x00, -0x6d, 0x61, 0x74, 0x34, 0x20, 0x6b, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x6c, 0x7a, 0x7a, 0x3b, 0x00, -0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6d, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, -0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6e, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, -0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6f, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, -0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x70, 0x7a, 0x7a, 0x3b, 0x00, 0x6d, 0x65, 0x64, 0x69, -0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x71, 0x7a, 0x7a, 0x5b, 0x36, 0x30, 0x5d, 0x3b, 0x00, 0x7d, 0x20, -0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x3b, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x20, -0x6f, 0x75, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, -0x65, 0x78, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, -0x3d, 0x20, 0x30, 0x29, 0x20, 0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, -0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x61, 0x72, -0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x6f, 0x75, 0x74, 0x20, 0x76, -0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, -0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, -0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, -0x6e, 0x28, 0x29, 0x00, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, -0x20, 0x67, 0x6c, 0x5f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, -0x20, 0x5f, 0x32, 0x39, 0x31, 0x20, 0x3d, 0x20, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, -0x6e, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x33, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x31, 0x3b, -0x00, 0x5f, 0x33, 0x33, 0x33, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x31, 0x2e, 0x7a, 0x20, 0x2a, 0x20, 0x28, -0x2d, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x30, 0x2e, 0x35, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x32, -0x36, 0x37, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, -0x20, 0x2a, 0x20, 0x5f, 0x33, 0x33, 0x33, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x36, 0x39, 0x20, -0x3d, 0x20, 0x5f, 0x32, 0x36, 0x37, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x34, 0x33, 0x3b, -0x00, 0x69, 0x66, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x32, 0x36, 0x39, 0x29, 0x20, 0x3c, 0x20, 0x31, 0x2e, 0x30, -0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x33, -0x37, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x36, 0x37, 0x3b, 0x00, 0x5f, 0x33, 0x33, 0x37, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, -0x5f, 0x32, 0x36, 0x39, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x20, 0x3f, 0x20, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x38, -0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x20, 0x3a, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, -0x32, 0x32, 0x65, 0x2d, 0x31, 0x39, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x37, 0x3b, -0x00, 0x7d, 0x00, 0x65, 0x6c, 0x73, 0x65, 0x00, 0x5f, 0x33, 0x34, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x36, 0x37, 0x3b, -0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x32, 0x38, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x34, 0x33, 0x20, 0x2a, 0x20, -0x28, 0x31, 0x2e, 0x30, 0x20, 0x2f, 0x20, 0x5f, 0x33, 0x34, 0x33, 0x2e, 0x77, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, -0x20, 0x5f, 0x32, 0x39, 0x38, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x32, 0x39, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x2a, 0x20, 0x30, -0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, -0x34, 0x20, 0x5f, 0x33, 0x34, 0x30, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x3b, 0x00, -0x5f, 0x33, 0x34, 0x30, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x38, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x33, 0x34, -0x30, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x38, 0x2e, 0x79, 0x3b, 0x00, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, -0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x34, 0x30, 0x3b, 0x00, 0x76, -0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, -0x78, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x33, 0x2e, 0x78, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, -0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, -0x33, 0x2e, 0x79, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, -0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x33, 0x2e, 0x7a, 0x3b, 0x00, 0x67, 0x6c, -0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x31, 0x3b, 0x00, 0x67, 0x6c, -0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, -0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x2d, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x30, -0x2e, 0x35, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, -0x3d, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, -0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x64, 0x6f, 0x74, 0x28, 0x67, 0x6c, 0x5f, 0x50, 0x6f, -0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x77, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, -0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x29, 0x3b, 0x00, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6d, -0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3b, 0x00, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, -0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x69, 0x6e, 0x74, 0x3b, 0x00, 0x76, 0x65, 0x63, -0x34, 0x20, 0x5f, 0x35, 0x36, 0x34, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x61, -0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x62, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, -0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x63, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, -0x20, 0x64, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x65, 0x3b, 0x00, 0x68, 0x69, -0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x66, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, -0x74, 0x34, 0x20, 0x67, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x68, 0x3b, 0x00, -0x76, 0x65, 0x63, 0x32, 0x20, 0x69, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, -0x6a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6b, 0x3b, 0x00, 0x68, 0x69, -0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6c, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, -0x63, 0x34, 0x20, 0x6d, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6e, 0x3b, 0x00, -0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6f, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, -0x70, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x71, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x20, 0x72, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, -0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x75, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x20, 0x77, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x78, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x79, -0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x61, 0x7a, 0x3b, -0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x62, 0x7a, 0x3b, 0x00, 0x75, 0x76, 0x65, 0x63, 0x33, 0x20, 0x63, 0x7a, 0x3b, 0x00, -0x75, 0x69, 0x6e, 0x74, 0x20, 0x64, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x65, 0x7a, 0x3b, 0x00, 0x66, 0x6c, -0x6f, 0x61, 0x74, 0x20, 0x66, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x67, 0x7a, 0x3b, 0x00, 0x76, 0x65, -0x63, 0x33, 0x20, 0x68, 0x7a, 0x5b, 0x39, 0x5d, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x69, 0x7a, 0x3b, 0x00, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6a, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x6b, 0x7a, 0x3b, 0x00, 0x76, 0x65, -0x63, 0x34, 0x20, 0x6c, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6d, 0x7a, 0x3b, 0x00, 0x75, 0x69, 0x6e, 0x74, -0x20, 0x6e, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6f, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, -0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x70, 0x7a, 0x3b, 0x00, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x71, 0x7a, 0x3b, 0x00, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x72, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x73, 0x7a, 0x3b, 0x00, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x7a, 0x3b, 0x00, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x77, 0x7a, 0x3b, 0x00, 0x75, -0x69, 0x6e, 0x74, 0x20, 0x78, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x79, -0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x7a, 0x7a, 0x3b, 0x00, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x61, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x62, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x63, -0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x7a, 0x7a, 0x3b, -0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x65, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x66, 0x7a, 0x7a, -0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x67, 0x7a, 0x7a, 0x3b, 0x00, 0x66, -0x6c, 0x6f, 0x61, 0x74, 0x20, 0x68, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x69, 0x7a, 0x7a, 0x3b, -0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6a, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, -0x74, 0x34, 0x20, 0x6b, 0x7a, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x6c, -0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6d, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x20, 0x6e, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6f, 0x7a, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, -0x61, 0x74, 0x20, 0x70, 0x7a, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x71, 0x7a, 0x7a, 0x5b, 0x36, 0x30, 0x5d, -0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x73, 0x74, 0x64, 0x31, 0x34, 0x30, 0x29, 0x20, 0x75, 0x6e, 0x69, -0x66, 0x6f, 0x72, 0x6d, 0x20, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, -0x76, 0x65, 0x63, 0x33, 0x20, 0x62, 0x3b, 0x00, 0x69, 0x6e, 0x74, 0x20, 0x63, 0x3b, 0x00, 0x7d, 0x20, 0x6d, 0x61, 0x74, -0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, -0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x6d, -0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x3b, -0x00, 0x69, 0x6e, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, -0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, -0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, -0x63, 0x34, 0x20, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, -0x34, 0x30, 0x39, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, -0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, -0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x34, 0x32, 0x30, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, -0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x61, 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x63, 0x6c, 0x61, -0x6d, 0x70, 0x28, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x2e, -0x78, 0x79, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, -0x31, 0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x68, 0x69, -0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x34, 0x32, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x32, 0x30, -0x2e, 0x78, 0x79, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x32, 0x34, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, -0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x63, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x3b, 0x00, -0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x33, 0x31, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x32, 0x34, -0x29, 0x00, 0x5f, 0x34, 0x33, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x32, 0x30, 0x2e, 0x78, 0x20, 0x3e, 0x20, 0x31, 0x2e, -0x30, 0x3b, 0x00, 0x5f, 0x34, 0x33, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x32, 0x34, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, -0x20, 0x5f, 0x34, 0x33, 0x38, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x33, 0x31, 0x29, 0x00, 0x5f, 0x34, -0x33, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x32, 0x30, 0x2e, 0x78, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, -0x34, 0x33, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x33, 0x31, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x34, -0x35, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x33, 0x38, 0x29, 0x00, 0x5f, 0x34, 0x34, 0x35, 0x20, 0x3d, -0x20, 0x5f, 0x34, 0x32, 0x30, 0x2e, 0x79, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x34, 0x34, 0x35, 0x20, -0x3d, 0x20, 0x5f, 0x34, 0x33, 0x38, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x34, 0x35, 0x32, 0x3b, 0x00, 0x69, -0x66, 0x20, 0x28, 0x21, 0x5f, 0x34, 0x34, 0x35, 0x29, 0x00, 0x5f, 0x34, 0x35, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x32, -0x30, 0x2e, 0x79, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x34, 0x35, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x34, -0x34, 0x35, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x35, 0x36, 0x30, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x5f, -0x34, 0x35, 0x32, 0x29, 0x00, 0x5f, 0x35, 0x36, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x30, 0x39, 0x3b, 0x00, 0x5f, 0x34, -0x32, 0x31, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x34, 0x32, 0x30, 0x2e, 0x79, 0x3b, -0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x34, 0x36, 0x36, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x74, 0x65, 0x78, -0x74, 0x75, 0x72, 0x65, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, -0x69, 0x6d, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x5f, 0x34, 0x32, 0x31, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, -0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x70, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, -0x29, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x34, 0x36, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x36, 0x36, -0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x34, 0x37, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x36, 0x36, -0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x34, 0x36, 0x38, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x35, -0x33, 0x38, 0x3b, 0x00, 0x5f, 0x35, 0x33, 0x38, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x37, 0x31, 0x2e, 0x78, 0x3b, -0x00, 0x5f, 0x35, 0x33, 0x38, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x37, 0x31, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x35, -0x33, 0x38, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x37, 0x31, 0x2e, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, -0x5f, 0x34, 0x38, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x33, 0x38, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2b, 0x20, 0x28, 0x5f, -0x34, 0x30, 0x39, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x34, 0x36, -0x38, 0x29, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x35, 0x34, 0x35, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, -0x34, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x5f, 0x35, 0x34, 0x35, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x38, -0x36, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x35, 0x34, 0x35, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x38, 0x36, 0x2e, 0x79, -0x3b, 0x00, 0x5f, 0x35, 0x34, 0x35, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x38, 0x36, 0x2e, 0x7a, 0x3b, 0x00, 0x5f, -0x35, 0x36, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x34, 0x35, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, -0x72, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x36, 0x30, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x39, 0x33, 0x39, 0x3b, -0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x73, 0x61, 0x6d, -0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x69, 0x62, 0x6c, 0x53, 0x70, -0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x3b, 0x00, 0x69, 0x6e, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, -0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, -0x6f, 0x6e, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x39, 0x31, 0x30, 0x3b, -0x00, 0x69, 0x66, 0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x63, -0x5b, 0x32, 0x5d, 0x2e, 0x77, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x00, 0x5f, 0x39, 0x31, 0x30, 0x20, 0x3d, -0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x62, 0x5b, 0x33, 0x5d, 0x2e, -0x78, 0x79, 0x7a, 0x20, 0x2d, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, -0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x5f, 0x39, 0x31, 0x30, 0x20, 0x3d, 0x20, 0x66, -0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x62, 0x5b, 0x32, 0x5d, 0x2e, 0x78, 0x79, -0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x35, 0x37, 0x34, 0x20, 0x3d, -0x20, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x28, 0x5f, 0x39, 0x31, 0x30, 0x29, 0x3b, 0x00, 0x76, 0x65, -0x63, 0x33, 0x20, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x35, 0x37, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x37, -0x34, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x36, 0x30, 0x32, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, -0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, 0x2c, 0x20, 0x31, 0x2e, -0x30, 0x29, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x36, 0x31, 0x33, 0x20, -0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x61, 0x20, 0x2a, -0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, -0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, -0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, -0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x36, -0x31, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x31, 0x33, 0x2e, 0x78, 0x79, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, -0x36, 0x31, 0x37, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, -0x2e, 0x63, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x32, 0x34, 0x3b, 0x00, -0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x36, 0x31, 0x37, 0x29, 0x00, 0x5f, 0x36, 0x32, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x36, -0x31, 0x33, 0x2e, 0x78, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x32, 0x34, 0x20, 0x3d, 0x20, 0x5f, -0x36, 0x31, 0x37, 0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x33, 0x31, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, -0x21, 0x5f, 0x36, 0x32, 0x34, 0x29, 0x00, 0x5f, 0x36, 0x33, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x31, 0x33, 0x2e, 0x78, -0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x33, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x32, 0x34, 0x3b, -0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x33, 0x38, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x36, 0x33, -0x31, 0x29, 0x00, 0x5f, 0x36, 0x33, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x31, 0x33, 0x2e, 0x79, 0x20, 0x3c, 0x20, 0x30, -0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x33, 0x38, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x33, 0x31, 0x3b, 0x00, 0x62, 0x6f, 0x6f, -0x6c, 0x20, 0x5f, 0x36, 0x34, 0x35, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x36, 0x33, 0x38, 0x29, 0x00, 0x5f, -0x36, 0x34, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x31, 0x33, 0x2e, 0x79, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x00, -0x5f, 0x36, 0x34, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x33, 0x38, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x39, -0x32, 0x35, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x36, 0x34, 0x35, 0x29, 0x00, 0x5f, 0x39, 0x32, 0x35, 0x20, 0x3d, -0x20, 0x5f, 0x36, 0x30, 0x32, 0x3b, 0x00, 0x5f, 0x36, 0x31, 0x34, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x20, -0x2d, 0x20, 0x5f, 0x36, 0x31, 0x33, 0x2e, 0x79, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x36, 0x35, 0x39, 0x20, -0x3d, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, -0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x5f, 0x36, 0x31, 0x34, -0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x70, 0x29, 0x2c, 0x20, -0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x36, -0x36, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x35, 0x39, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x36, -0x36, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x35, 0x39, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x36, 0x36, 0x31, -0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x38, 0x38, 0x37, 0x3b, 0x00, 0x5f, 0x38, 0x38, 0x37, 0x2e, 0x78, 0x20, -0x3d, 0x20, 0x5f, 0x36, 0x36, 0x34, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x38, 0x38, 0x37, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, -0x36, 0x36, 0x34, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x38, 0x38, 0x37, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x36, 0x34, -0x2e, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x36, 0x37, 0x39, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x38, 0x37, -0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2b, 0x20, 0x28, 0x5f, 0x36, 0x30, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, -0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x36, 0x36, 0x31, 0x29, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, -0x38, 0x39, 0x34, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x5f, 0x38, 0x39, -0x34, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x37, 0x39, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x38, 0x39, 0x34, 0x2e, 0x79, -0x20, 0x3d, 0x20, 0x5f, 0x36, 0x37, 0x39, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x38, 0x39, 0x34, 0x2e, 0x7a, 0x20, 0x3d, 0x20, -0x5f, 0x36, 0x37, 0x39, 0x2e, 0x7a, 0x3b, 0x00, 0x5f, 0x39, 0x32, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x39, 0x34, 0x3b, -0x00, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x39, 0x32, 0x35, 0x3b, 0x00, 0x68, -0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x34, 0x38, 0x32, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x72, -0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, -0x7a, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x62, 0x5b, -0x33, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x34, 0x38, 0x34, 0x20, 0x3d, 0x20, -0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x39, 0x33, 0x33, -0x3b, 0x00, 0x64, 0x6f, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, 0x32, -0x37, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x28, 0x5f, 0x34, 0x38, 0x32, 0x29, 0x3b, 0x00, 0x69, 0x66, -0x20, 0x28, 0x5f, 0x37, 0x32, 0x37, 0x20, 0x3e, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x64, 0x7a, 0x7a, 0x29, 0x00, 0x5f, 0x39, 0x33, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x38, 0x34, 0x3b, -0x00, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, -0x5f, 0x37, 0x34, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x38, 0x32, 0x2e, 0x79, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, 0x34, 0x34, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, -0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x63, 0x7a, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x37, 0x34, 0x33, 0x3b, 0x00, -0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x39, 0x32, 0x36, 0x3b, 0x00, 0x69, 0x66, -0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x37, 0x34, 0x34, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x2e, 0x30, 0x30, 0x31, 0x32, -0x35, 0x29, 0x00, 0x5f, 0x39, 0x32, 0x36, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x2d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, -0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x78, 0x29, 0x20, 0x2a, 0x20, 0x65, 0x78, 0x70, 0x28, 0x28, -0x2d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x63, 0x7a, 0x7a, 0x29, 0x20, -0x2a, 0x20, 0x5f, 0x37, 0x34, 0x33, 0x20, 0x2b, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x79, 0x29, 0x20, 0x2b, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, -0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x7a, 0x29, 0x20, 0x2f, 0x20, 0x5f, 0x37, 0x34, 0x34, 0x3b, 0x00, 0x5f, -0x39, 0x32, 0x36, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, -0x79, 0x7a, 0x2e, 0x7a, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, -0x37, 0x32, 0x20, 0x3d, 0x20, 0x65, 0x78, 0x70, 0x28, 0x2d, 0x28, 0x5f, 0x39, 0x32, 0x36, 0x20, 0x2a, 0x20, 0x6d, 0x61, -0x78, 0x28, 0x5f, 0x37, 0x32, 0x37, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x7a, 0x7a, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x20, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x37, 0x37, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x37, 0x32, 0x3b, -0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, 0x37, 0x37, 0x20, 0x3d, 0x20, 0x6d, 0x69, 0x6e, 0x28, 0x31, 0x2e, -0x30, 0x20, 0x2d, 0x20, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x37, 0x37, 0x32, 0x2c, 0x20, 0x66, 0x72, 0x61, -0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x61, 0x7a, 0x7a, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, -0x33, 0x20, 0x5f, 0x39, 0x32, 0x37, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, -0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x7a, 0x7a, 0x20, 0x3e, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x00, 0x5f, 0x39, 0x32, -0x37, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x65, 0x7a, -0x7a, 0x20, 0x2a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x6f, 0x64, 0x28, 0x6c, 0x69, 0x67, 0x68, 0x74, -0x5f, 0x69, 0x62, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x2c, 0x20, 0x5f, 0x34, 0x38, 0x32, 0x2c, 0x20, -0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x67, 0x7a, 0x29, 0x2e, 0x78, 0x79, -0x7a, 0x3b, 0x00, 0x5f, 0x39, 0x32, 0x37, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x2e, 0x65, 0x7a, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x37, 0x39, 0x39, 0x20, 0x3d, -0x20, 0x5f, 0x39, 0x32, 0x37, 0x20, 0x2a, 0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x66, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x37, 0x37, 0x37, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, -0x5f, 0x39, 0x33, 0x32, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x2e, 0x68, 0x7a, 0x7a, 0x20, 0x3e, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, -0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x38, 0x31, 0x33, 0x20, 0x3d, 0x20, 0x65, 0x78, 0x70, 0x28, 0x2d, 0x28, -0x5f, 0x39, 0x32, 0x36, 0x20, 0x2a, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x5f, 0x37, 0x32, 0x37, 0x20, 0x2d, 0x20, 0x66, 0x72, -0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x67, 0x7a, 0x7a, 0x2c, 0x20, 0x30, 0x2e, 0x30, -0x29, 0x29, 0x29, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x38, -0x31, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x31, 0x33, 0x3b, 0x00, 0x5f, 0x39, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x37, -0x39, 0x39, 0x20, 0x2b, 0x20, 0x28, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, -0x2e, 0x6b, 0x7a, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x2e, 0x6b, 0x7a, 0x2e, 0x77, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x28, 0x6d, 0x61, 0x78, -0x28, 0x64, 0x6f, 0x74, 0x28, 0x2d, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x35, 0x37, 0x34, 0x2c, 0x20, 0x66, -0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x7a, 0x29, 0x2c, 0x20, 0x30, 0x2e, -0x30, 0x29, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x68, 0x7a, -0x7a, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x6d, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, -0x38, 0x31, 0x33, 0x29, 0x29, 0x29, 0x3b, 0x00, 0x5f, 0x39, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x39, 0x39, 0x3b, -0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x38, 0x34, 0x35, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x34, 0x38, 0x34, 0x2e, 0x78, -0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x37, 0x37, 0x37, 0x29, 0x29, 0x20, 0x2b, -0x20, 0x5f, 0x39, 0x33, 0x32, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x39, 0x30, 0x35, 0x20, 0x3d, 0x20, 0x5f, -0x34, 0x38, 0x34, 0x3b, 0x00, 0x5f, 0x39, 0x30, 0x35, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x34, 0x35, 0x2e, 0x78, -0x3b, 0x00, 0x5f, 0x39, 0x30, 0x35, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x34, 0x35, 0x2e, 0x79, 0x3b, 0x00, 0x5f, -0x39, 0x30, 0x35, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x38, 0x34, 0x35, 0x2e, 0x7a, 0x3b, 0x00, 0x5f, 0x39, 0x33, 0x33, -0x20, 0x3d, 0x20, 0x5f, 0x39, 0x30, 0x35, 0x3b, 0x00, 0x7d, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x28, 0x66, 0x61, 0x6c, -0x73, 0x65, 0x29, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x39, 0x33, -0x33, 0x3b, 0x00, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x50, 0x65, 0x72, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x61, -0x62, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x77, -0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, -0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x33, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, -0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, -0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x54, 0x61, 0x72, 0x67, -0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, -0x66, 0x6c, 0x61, 0x67, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, 0x70, -0x20, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x3b, 0x00, 0x68, 0x69, 0x67, 0x68, -0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x3b, 0x00, 0x68, 0x69, -0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5b, 0x38, 0x5d, -0x3b, 0x00, 0x7d, 0x3b, 0x00, 0x23, 0x69, 0x66, 0x6e, 0x64, 0x65, 0x66, 0x20, 0x53, 0x50, 0x49, 0x52, 0x56, 0x5f, 0x43, -0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x31, 0x00, 0x23, -0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x53, 0x50, 0x49, 0x52, 0x56, 0x5f, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, -0x4f, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x31, 0x20, 0x36, 0x34, 0x00, 0x23, 0x65, 0x6e, 0x64, -0x69, 0x66, 0x00, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, -0x4d, 0x41, 0x58, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x53, 0x20, 0x3d, 0x20, 0x53, 0x50, 0x49, 0x52, -0x56, 0x5f, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, 0x49, 0x44, 0x5f, -0x31, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x73, 0x74, 0x64, 0x31, 0x34, 0x30, 0x29, 0x20, 0x75, 0x6e, -0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, -0x00, 0x50, 0x65, 0x72, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x20, 0x61, -0x5b, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, -0x53, 0x5d, 0x3b, 0x00, 0x7d, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, -0x3b, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x69, 0x6e, 0x74, 0x20, -0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, -0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x6f, 0x75, 0x74, -0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x75, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6f, 0x75, 0x74, 0x50, 0x69, 0x63, 0x6b, -0x69, 0x6e, 0x67, 0x3b, 0x00, 0x69, 0x6e, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, -0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x6f, 0x75, 0x74, 0x50, -0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x69, -0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x61, 0x5b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, -0x65, 0x78, 0x5d, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x3b, 0x00, 0x6f, 0x75, 0x74, 0x50, 0x69, 0x63, -0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x42, 0x69, 0x74, 0x73, 0x54, 0x6f, -0x55, 0x69, 0x6e, 0x74, 0x28, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, -0x2e, 0x7a, 0x20, 0x2f, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, -0x2e, 0x77, 0x29, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, -0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x23, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x34, 0x31, 0x30, -0x00, 0x23, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x47, 0x4c, 0x5f, 0x41, 0x52, 0x42, 0x5f, 0x73, -0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, -0x69, 0x6e, 0x67, 0x20, 0x3a, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, -0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x38, 0x29, 0x20, 0x66, 0x6c, 0x61, 0x74, 0x20, 0x6f, -0x75, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, -0x78, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, -0x20, 0x30, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, -0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, -0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x34, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, -0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, -0x6e, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, -0x20, 0x37, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, -0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x32, 0x39, 0x32, 0x20, -0x3d, 0x20, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x76, 0x65, 0x63, -0x34, 0x20, 0x5f, 0x33, 0x33, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x32, 0x3b, 0x00, 0x5f, 0x33, 0x33, 0x34, 0x2e, -0x7a, 0x20, 0x3d, 0x20, 0x66, 0x6d, 0x61, 0x28, 0x5f, 0x32, 0x39, 0x32, 0x2e, 0x7a, 0x2c, 0x20, 0x2d, 0x30, 0x2e, 0x35, -0x2c, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x32, 0x36, 0x38, 0x20, 0x3d, 0x20, -0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x66, 0x20, 0x2a, 0x20, 0x5f, 0x33, -0x33, 0x34, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x37, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x36, -0x38, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x34, 0x34, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, -0x61, 0x62, 0x73, 0x28, 0x5f, 0x32, 0x37, 0x30, 0x29, 0x20, 0x3c, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, -0x32, 0x65, 0x2d, 0x31, 0x39, 0x29, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x33, 0x38, 0x20, 0x3d, 0x20, 0x5f, -0x32, 0x36, 0x38, 0x3b, 0x00, 0x5f, 0x33, 0x33, 0x38, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x32, 0x37, 0x30, 0x20, -0x3c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x20, 0x3f, 0x20, 0x28, 0x2d, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, -0x65, 0x2d, 0x31, 0x39, 0x29, 0x20, 0x3a, 0x20, 0x31, 0x2e, 0x30, 0x38, 0x34, 0x32, 0x30, 0x32, 0x32, 0x65, 0x2d, 0x31, -0x39, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x38, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x34, -0x20, 0x3d, 0x20, 0x5f, 0x32, 0x36, 0x38, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x32, 0x38, 0x34, 0x20, 0x3d, -0x20, 0x5f, 0x33, 0x34, 0x34, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2f, 0x20, 0x5f, 0x33, 0x34, 0x34, 0x2e, -0x77, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x32, 0x39, 0x39, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x32, 0x39, -0x32, 0x2e, 0x78, 0x79, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2b, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, -0x2e, 0x35, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x34, 0x31, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, -0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x31, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, -0x39, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x33, 0x34, 0x31, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x39, 0x39, 0x2e, 0x79, -0x3b, 0x00, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x20, 0x3d, -0x20, 0x5f, 0x33, 0x34, 0x31, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, -0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x34, 0x2e, 0x78, 0x3b, 0x00, -0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, -0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x38, 0x34, 0x2e, 0x79, 0x3b, 0x00, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, -0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x32, -0x38, 0x34, 0x2e, 0x7a, 0x3b, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, -0x5f, 0x32, 0x39, 0x32, 0x3b, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x20, -0x3d, 0x20, 0x66, 0x6d, 0x61, 0x28, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x2c, -0x20, 0x2d, 0x30, 0x2e, 0x35, 0x2c, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, -0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, -0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, -0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x30, 0x29, 0x20, 0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, -0x34, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x3b, 0x00, -0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x34, 0x32, 0x30, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, -0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x61, 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x63, 0x6c, 0x61, 0x6d, -0x70, 0x28, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x56, 0x2e, 0x78, -0x79, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x31, -0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, -0x32, 0x20, 0x5f, 0x34, 0x32, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x32, 0x30, 0x2e, 0x78, 0x79, 0x3b, 0x00, 0x76, 0x65, -0x63, 0x34, 0x20, 0x5f, 0x37, 0x37, 0x32, 0x3b, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, -0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x69, 0x62, 0x6c, 0x53, 0x70, -0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, -0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x34, 0x29, 0x20, 0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, -0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x76, -0x65, 0x63, 0x33, 0x20, 0x73, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x3b, 0x00, 0x76, 0x65, -0x63, 0x34, 0x20, 0x66, 0x6f, 0x67, 0x28, 0x69, 0x6e, 0x6f, 0x75, 0x74, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x63, 0x6f, -0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x69, 0x65, 0x77, 0x29, 0x00, 0x66, 0x6c, 0x6f, 0x61, -0x74, 0x20, 0x5f, 0x31, 0x37, 0x37, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x28, 0x76, 0x69, 0x65, 0x77, -0x29, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x31, 0x37, 0x37, 0x20, 0x3e, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, -0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x64, 0x7a, 0x7a, 0x29, 0x00, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, -0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x30, 0x35, 0x20, 0x3d, 0x20, -0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x63, 0x7a, 0x7a, 0x20, 0x2a, 0x20, -0x76, 0x69, 0x65, 0x77, 0x2e, 0x79, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x37, 0x36, 0x33, 0x3b, 0x00, -0x69, 0x66, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x32, 0x30, 0x35, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x2e, 0x30, 0x30, -0x31, 0x32, 0x35, 0x29, 0x00, 0x5f, 0x37, 0x36, 0x33, 0x20, 0x3d, 0x20, 0x66, 0x6d, 0x61, 0x28, 0x2d, 0x66, 0x72, 0x61, -0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x78, 0x2c, 0x20, 0x65, 0x78, 0x70, -0x28, 0x66, 0x6d, 0x61, 0x28, 0x2d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, -0x63, 0x7a, 0x7a, 0x2c, 0x20, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x79, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, -0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x79, 0x29, 0x29, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, -0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x7a, 0x29, 0x20, 0x2f, 0x20, 0x5f, 0x32, 0x30, -0x35, 0x3b, 0x00, 0x5f, 0x37, 0x36, 0x33, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, -0x72, 0x6d, 0x73, 0x2e, 0x79, 0x7a, 0x2e, 0x7a, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x5f, 0x32, 0x34, 0x35, -0x20, 0x3d, 0x20, 0x6d, 0x69, 0x6e, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x65, 0x78, 0x70, 0x28, 0x2d, 0x28, 0x5f, -0x37, 0x36, 0x33, 0x20, 0x2a, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x5f, 0x31, 0x37, 0x37, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, -0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x7a, 0x7a, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, -0x29, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x61, 0x7a, 0x7a, -0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x37, 0x36, 0x34, 0x3b, 0x00, 0x5f, 0x37, 0x36, 0x34, 0x20, 0x3d, -0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x65, 0x7a, 0x7a, 0x20, 0x2a, -0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x6f, 0x64, 0x28, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x69, 0x62, -0x6c, 0x53, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x2c, 0x20, 0x76, 0x69, 0x65, 0x77, 0x2c, 0x20, 0x66, 0x72, 0x61, -0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x67, 0x7a, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, -0x5f, 0x37, 0x36, 0x34, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, -0x2e, 0x65, 0x7a, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x32, 0x37, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x37, -0x36, 0x34, 0x20, 0x2a, 0x20, 0x28, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, -0x66, 0x7a, 0x20, 0x2a, 0x20, 0x5f, 0x32, 0x34, 0x35, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x37, 0x36, -0x36, 0x3b, 0x00, 0x5f, 0x37, 0x36, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x37, 0x20, 0x2b, 0x20, 0x28, 0x28, 0x66, -0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6b, 0x7a, 0x2e, 0x78, 0x79, 0x7a, 0x20, -0x2a, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x6b, 0x7a, 0x2e, 0x77, -0x29, 0x20, 0x2a, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x28, 0x6d, 0x61, 0x78, 0x28, 0x64, 0x6f, 0x74, 0x28, 0x2d, 0x73, 0x68, -0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, -0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x69, 0x7a, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x66, 0x72, 0x61, -0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x68, 0x7a, 0x7a, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x31, -0x2e, 0x30, 0x20, 0x2d, 0x20, 0x65, 0x78, 0x70, 0x28, 0x2d, 0x28, 0x5f, 0x37, 0x36, 0x33, 0x20, 0x2a, 0x20, 0x6d, 0x61, -0x78, 0x28, 0x5f, 0x31, 0x37, 0x37, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x67, 0x7a, 0x7a, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x3b, 0x00, 0x5f, -0x37, 0x36, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x32, 0x37, 0x37, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x33, 0x32, -0x36, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x33, 0x33, 0x32, -0x20, 0x3d, 0x20, 0x28, 0x5f, 0x33, 0x32, 0x36, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, -0x2d, 0x20, 0x5f, 0x32, 0x34, 0x35, 0x29, 0x29, 0x20, 0x2b, 0x20, 0x5f, 0x37, 0x36, 0x36, 0x3b, 0x00, 0x63, 0x6f, 0x6c, -0x6f, 0x72, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x32, 0x2e, 0x78, 0x3b, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, -0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x32, 0x2e, 0x79, 0x3b, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x7a, -0x20, 0x3d, 0x20, 0x5f, 0x33, 0x33, 0x32, 0x2e, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x37, 0x34, 0x37, -0x3b, 0x00, 0x5f, 0x37, 0x34, 0x37, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, -0x6d, 0x73, 0x2e, 0x62, 0x5b, 0x33, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2d, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, -0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, -0x5f, 0x37, 0x34, 0x37, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, -0x2e, 0x62, 0x5b, 0x32, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x73, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x76, -0x69, 0x65, 0x77, 0x20, 0x3d, 0x20, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x28, 0x5f, 0x37, 0x34, 0x37, -0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x35, 0x39, 0x35, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, -0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x62, 0x2c, 0x20, 0x31, 0x2e, -0x30, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x36, 0x30, 0x36, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, -0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x61, 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, -0x63, 0x6c, 0x61, 0x6d, 0x70, 0x28, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, -0x55, 0x56, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x2c, 0x20, 0x76, 0x65, -0x63, 0x32, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, -0x00, 0x76, 0x65, 0x63, 0x32, 0x20, 0x5f, 0x36, 0x30, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x30, 0x36, 0x2e, 0x78, 0x79, -0x3b, 0x00, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x5f, 0x36, 0x31, 0x30, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, -0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x63, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x3b, 0x00, 0x62, 0x6f, 0x6f, -0x6c, 0x20, 0x5f, 0x36, 0x31, 0x37, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x21, 0x5f, 0x36, 0x31, 0x30, 0x29, 0x00, 0x5f, -0x36, 0x31, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x30, 0x36, 0x2e, 0x78, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x00, -0x5f, 0x36, 0x31, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x31, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x32, 0x34, 0x20, 0x3d, 0x20, -0x5f, 0x36, 0x30, 0x36, 0x2e, 0x78, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x33, 0x31, 0x20, 0x3d, -0x20, 0x5f, 0x36, 0x30, 0x36, 0x2e, 0x79, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x00, 0x5f, 0x36, 0x33, 0x38, 0x20, -0x3d, 0x20, 0x5f, 0x36, 0x30, 0x36, 0x2e, 0x79, 0x20, 0x3e, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, -0x20, 0x5f, 0x37, 0x36, 0x32, 0x3b, 0x00, 0x69, 0x66, 0x20, 0x28, 0x5f, 0x36, 0x33, 0x38, 0x29, 0x00, 0x5f, 0x37, 0x36, -0x32, 0x20, 0x3d, 0x20, 0x5f, 0x35, 0x39, 0x35, 0x3b, 0x00, 0x5f, 0x36, 0x30, 0x37, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x31, -0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x36, 0x30, 0x36, 0x2e, 0x79, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x36, -0x35, 0x32, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x78, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x6d, 0x61, 0x74, -0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x5f, -0x36, 0x30, 0x37, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2e, 0x70, -0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x30, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, -0x20, 0x5f, 0x36, 0x35, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x35, 0x32, 0x2e, 0x77, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, -0x20, 0x5f, 0x36, 0x35, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x35, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2a, 0x20, 0x5f, -0x36, 0x35, 0x34, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x37, 0x33, 0x31, 0x3b, 0x00, 0x5f, 0x37, 0x33, 0x31, -0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x35, 0x37, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x37, 0x33, 0x31, 0x2e, 0x79, 0x20, -0x3d, 0x20, 0x5f, 0x36, 0x35, 0x37, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x37, 0x33, 0x31, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, -0x36, 0x35, 0x37, 0x2e, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x5f, 0x36, 0x37, 0x32, 0x20, 0x3d, 0x20, 0x5f, -0x37, 0x33, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2b, 0x20, 0x28, 0x5f, 0x35, 0x39, 0x35, 0x2e, 0x78, 0x79, 0x7a, 0x20, -0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x36, 0x35, 0x34, 0x29, 0x29, 0x3b, 0x00, 0x76, 0x65, 0x63, -0x34, 0x20, 0x5f, 0x37, 0x33, 0x38, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x00, -0x5f, 0x37, 0x33, 0x38, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x37, 0x32, 0x2e, 0x78, 0x3b, 0x00, 0x5f, 0x37, 0x33, -0x38, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x36, 0x37, 0x32, 0x2e, 0x79, 0x3b, 0x00, 0x5f, 0x37, 0x33, 0x38, 0x2e, 0x7a, -0x20, 0x3d, 0x20, 0x5f, 0x36, 0x37, 0x32, 0x2e, 0x7a, 0x3b, 0x00, 0x5f, 0x37, 0x36, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x37, -0x33, 0x38, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x37, 0x36, 0x32, -0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x20, 0x3d, 0x20, 0x66, 0x72, 0x61, 0x67, 0x43, -0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x33, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x31, 0x20, 0x3d, -0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, -0x6e, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, -0x73, 0x2e, 0x62, 0x5b, 0x33, 0x5d, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x00, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x34, 0x38, -0x37, 0x20, 0x3d, 0x20, 0x66, 0x6f, 0x67, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, -0x5f, 0x31, 0x29, 0x3b, 0x00, 0x66, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x34, 0x38, -0x37, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, -0x65, 0x6c, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3b, 0x00, 0x6d, 0x61, 0x74, 0x33, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, -0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x74, 0x72, 0x69, -0x78, 0x3b, 0x00, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, -0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x00, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x43, 0x68, 0x61, 0x6e, -0x6e, 0x65, 0x6c, 0x73, 0x3b, 0x00, 0x75, 0x69, 0x6e, 0x74, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x3b, -0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x3b, 0x00, 0x76, 0x65, 0x63, -0x34, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5b, 0x38, 0x5d, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, -0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x38, 0x29, 0x20, 0x66, 0x6c, 0x61, 0x74, -0x20, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, -0x65, 0x78, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, -0x3d, 0x20, 0x30, 0x29, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x75, 0x76, 0x65, 0x63, 0x32, 0x20, 0x6f, 0x75, 0x74, 0x50, 0x69, -0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3b, 0x00, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, -0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x37, 0x29, 0x20, 0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x65, 0x72, 0x74, -0x65, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x00, 0x4c, 0x53, 0x4c, 0x47, 0x5f, 0x54, 0x41, -0x4d, 0xe4, 0x08, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, -0x01, 0x00, 0x01, 0x50, 0x01, 0x00, 0x00, 0x01, 0x10, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x01, 0x10, 0x01, 0x86, 0x02, 0x00, -0x00, 0x01, 0x20, 0x01, 0x9a, 0x02, 0x00, 0x00, 0x01, 0x30, 0x01, 0x58, 0x04, 0x00, 0x00, 0x01, 0x44, 0x01, 0x9a, 0x04, -0x00, 0x00, 0x02, 0x00, 0x00, 0xb2, 0x04, 0x00, 0x00, 0x02, 0x00, 0x01, 0x9a, 0x05, 0x00, 0x00, 0x02, 0x10, 0x00, 0xb2, -0x04, 0x00, 0x00, 0x02, 0x10, 0x01, 0xce, 0x06, 0x00, 0x00, 0x02, 0x20, 0x01, 0xe0, 0x06, 0x00, 0x00, 0x02, 0x30, 0x01, -0x8e, 0x08, 0x00, 0x00, 0x02, 0x44, 0x01, 0xce, 0x08, 0x00, 0x00, 0xbb, 0x07, 0x00, 0x00, 0x6f, 0x00, 0x00, 0x00, 0x00, -0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, -0x00, 0x0b, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, 0x14, -0x00, 0x15, 0x00, 0x16, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1e, -0x00, 0x1f, 0x00, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, 0x24, 0x00, 0x25, 0x00, 0x26, 0x00, 0x27, 0x00, 0x28, -0x00, 0x29, 0x00, 0x2a, 0x00, 0x2b, 0x00, 0x2c, 0x00, 0x2d, 0x00, 0x2e, 0x00, 0x2f, 0x00, 0x30, 0x00, 0x31, 0x00, 0x32, -0x00, 0x33, 0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3b, 0x00, 0x3c, -0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x40, 0x00, 0x41, 0x00, 0x42, 0x00, 0x43, 0x00, 0x44, 0x00, 0x45, 0x00, 0x46, -0x00, 0x47, 0x00, 0x48, 0x00, 0x49, 0x00, 0x4a, 0x00, 0x4b, 0x00, 0x4c, 0x00, 0x4d, 0x00, 0x4e, 0x00, 0x02, 0x00, 0x4f, -0x00, 0x50, 0x00, 0x51, 0x00, 0x52, 0x00, 0x53, 0x00, 0x54, 0x00, 0x55, 0x00, 0x56, 0x00, 0x02, 0x00, 0x57, 0x00, 0x58, -0x00, 0x59, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x5c, 0x00, 0x5a, 0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5f, 0x00, 0x60, -0x00, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00, 0x64, 0x00, 0x65, 0x00, 0x66, 0x00, 0x67, 0x00, 0x68, 0x00, 0x69, 0x00, 0x5a, -0x00, 0x17, 0x08, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x6b, 0x00, 0x6c, 0x00, 0x01, 0x00, 0x02, -0x00, 0x6d, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x70, 0x00, 0x71, 0x00, 0x72, 0x00, 0x73, 0x00, 0x74, 0x00, 0x75, 0x00, 0x76, -0x00, 0x77, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00, 0x7b, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7e, 0x00, 0x7f, 0x00, 0x80, -0x00, 0x81, 0x00, 0x82, 0x00, 0x83, 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, 0x00, 0x8a, -0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, -0x00, 0x95, 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, -0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1, 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, 0x00, 0xa8, -0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0x48, -0x00, 0xb2, 0x00, 0x02, 0x00, 0x6d, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0x4e, -0x00, 0x02, 0x00, 0xb9, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0x02, 0x00, 0xbf, 0x00, 0x5a, -0x00, 0x5b, 0x00, 0x02, 0x00, 0xc0, 0x00, 0x5a, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0x02, 0x00, 0xc3, 0x00, 0x5a, 0x00, 0x5b, -0x00, 0x02, 0x00, 0xc4, 0x00, 0x5a, 0x00, 0xc5, 0x00, 0xc6, 0x00, 0x02, 0x00, 0xc7, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, -0x00, 0xc8, 0x00, 0x5a, 0x00, 0xc9, 0x00, 0xca, 0x00, 0x02, 0x00, 0xcb, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xcc, -0x00, 0x5a, 0x00, 0xcd, 0x00, 0xce, 0x00, 0x02, 0x00, 0xcf, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xd0, 0x00, 0xd1, -0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, -0x00, 0xdc, 0x00, 0xdd, 0x00, 0x5a, 0x00, 0xde, 0x00, 0x5a, 0x00, 0x51, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x6a, 0x00, 0x6b, 0x00, 0x4e, 0x00, 0x02, 0x00, 0x5a, 0x00, 0x62, 0x0e, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x00, -0x00, 0x6a, 0x00, 0x6b, 0x00, 0xdf, 0x00, 0x01, 0x00, 0x02, 0x00, 0x6d, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x70, 0x00, 0x71, -0x00, 0x72, 0x00, 0x73, 0x00, 0x74, 0x00, 0x75, 0x00, 0x76, 0x00, 0x77, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00, 0x7b, -0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7e, 0x00, 0x7f, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, 0x00, 0x84, 0x00, 0x85, -0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, -0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, -0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1, 0x00, 0xa2, 0x00, 0xa3, -0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, -0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0x48, 0x00, 0xb2, 0x00, 0x02, 0x00, 0x6d, 0x00, 0xb3, 0x00, 0xb4, -0x00, 0xb5, 0x00, 0xe0, 0x00, 0xb6, 0x00, 0xe1, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0x4e, 0x00, 0x02, 0x00, 0xe2, 0x00, 0xe3, -0x00, 0x02, 0x00, 0xe4, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xe5, 0x00, 0x5a, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, -0x00, 0xe9, 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0x02, 0x00, 0xee, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, -0x00, 0xef, 0x00, 0x5a, 0x00, 0xf0, 0x00, 0xf1, 0x00, 0x02, 0x00, 0xf2, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xf3, -0x00, 0x5a, 0x00, 0xf4, 0x00, 0xf5, 0x00, 0x02, 0x00, 0xf6, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xf7, 0x00, 0x5a, -0x00, 0xf8, 0x00, 0xf9, 0x00, 0x02, 0x00, 0xfa, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xfb, 0x00, 0x5a, 0x00, 0xfc, -0x00, 0xfd, 0x00, 0x02, 0x00, 0xfe, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xff, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, -0x01, 0x03, 0x01, 0x04, 0x01, 0x05, 0x01, 0x06, 0x01, 0x07, 0x01, 0x08, 0x01, 0x09, 0x01, 0x0a, 0x01, 0x0b, 0x01, 0x0c, -0x01, 0x5a, 0x00, 0x0d, 0x01, 0x0e, 0x01, 0x0f, 0x01, 0x10, 0x01, 0x11, 0x01, 0x02, 0x00, 0x12, 0x01, 0x13, 0x01, 0x02, -0x00, 0x14, 0x01, 0x15, 0x01, 0x5a, 0x00, 0x16, 0x01, 0x17, 0x01, 0x18, 0x01, 0x19, 0x01, 0x02, 0x00, 0x1a, 0x01, 0x5a, -0x00, 0x5b, 0x00, 0x02, 0x00, 0x1b, 0x01, 0x5a, 0x00, 0x1c, 0x01, 0x1d, 0x01, 0x1e, 0x01, 0x1f, 0x01, 0x20, 0x01, 0x02, -0x00, 0x21, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x22, 0x01, 0x5a, 0x00, 0x23, 0x01, 0x24, 0x01, 0x25, 0x01, 0x02, -0x00, 0x26, 0x01, 0x27, 0x01, 0x28, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x29, 0x01, 0x5a, 0x00, 0x2a, 0x01, 0x2b, -0x01, 0x2c, 0x01, 0x2d, 0x01, 0x2e, 0x01, 0x2f, 0x01, 0x15, 0x01, 0x30, 0x01, 0x31, 0x01, 0x5a, 0x00, 0x13, 0x03, 0x00, -0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x6b, 0x00, 0x32, 0x01, 0x02, 0x00, 0x33, 0x01, 0x34, 0x01, 0x35, -0x01, 0x36, 0x01, 0x37, 0x01, 0x38, 0x01, 0x39, 0x01, 0x3a, 0x01, 0x3b, 0x01, 0x3c, 0x01, 0x3d, 0x01, 0x3e, 0x01, 0x3f, -0x01, 0x02, 0x00, 0x40, 0x01, 0x41, 0x01, 0x42, 0x01, 0x43, 0x01, 0x44, 0x01, 0x4e, 0x00, 0x02, 0x00, 0x45, 0x01, 0x46, -0x01, 0x5a, 0x00, 0x91, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x6b, 0x00, 0xb8, 0x00, 0x4e, -0x00, 0x02, 0x00, 0x47, 0x01, 0x5a, 0x00, 0xea, 0x06, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x48, 0x01, 0x49, 0x01, 0x01, -0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x75, -0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, 0x00, 0x11, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x14, 0x00, 0x15, -0x00, 0x80, 0x00, 0x17, 0x00, 0x82, 0x00, 0x83, 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, -0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, -0x00, 0x94, 0x00, 0x95, 0x00, 0x2c, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9d, -0x00, 0x9e, 0x00, 0x35, 0x00, 0x36, 0x00, 0xa1, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0x3d, -0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0x41, 0x00, 0x42, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, -0x00, 0x48, 0x00, 0x4a, 0x01, 0x4a, 0x00, 0x4b, 0x01, 0x4c, 0x01, 0x4d, 0x01, 0x4e, 0x00, 0x02, 0x00, 0x4f, 0x00, 0x4e, -0x01, 0x4f, 0x01, 0x50, 0x01, 0x51, 0x01, 0x52, 0x01, 0x53, 0x01, 0x54, 0x01, 0x02, 0x00, 0x55, 0x01, 0x56, 0x01, 0x57, -0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x58, 0x01, 0x5a, 0x00, 0x59, 0x01, 0x5a, 0x01, 0x5b, 0x01, 0x5c, 0x01, 0x5d, -0x01, 0x5e, 0x01, 0x5f, 0x01, 0x60, 0x01, 0x61, 0x01, 0x62, 0x01, 0x63, 0x01, 0x68, 0x00, 0x69, 0x00, 0x5a, 0x00, 0x71, -0x07, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x48, 0x01, 0x49, 0x01, 0x6c, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, -0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x75, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, -0x00, 0x0f, 0x00, 0x10, 0x00, 0x11, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x14, 0x00, 0x15, 0x00, 0x80, 0x00, 0x17, 0x00, 0x82, -0x00, 0x83, 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, -0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, 0x00, 0x2c, -0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x35, 0x00, 0x36, -0x00, 0xa1, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0x3d, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, -0x00, 0x41, 0x00, 0x42, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0x48, 0x00, 0xb2, 0x00, 0x02, -0x00, 0x03, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0xb5, 0x00, 0x64, 0x01, 0x65, 0x01, 0xb8, 0x00, 0x4e, 0x00, 0x02, 0x00, 0xb9, -0x00, 0x66, 0x01, 0x67, 0x01, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0x02, 0x00, 0xbf, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, -0x00, 0xc0, 0x00, 0x5a, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0x02, 0x00, 0xc3, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xc4, -0x00, 0x5a, 0x00, 0xc5, 0x00, 0xc6, 0x00, 0x02, 0x00, 0xc7, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xc8, 0x00, 0x5a, -0x00, 0xc9, 0x00, 0xca, 0x00, 0x02, 0x00, 0xcb, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xcc, 0x00, 0x5a, 0x00, 0xcd, -0x00, 0xce, 0x00, 0x02, 0x00, 0xcf, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xd2, 0x00, 0xd3, -0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd, -0x00, 0x5a, 0x00, 0xde, 0x00, 0x5a, 0x00, 0x52, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x48, 0x01, 0x49, 0x01, 0x4e, -0x00, 0x02, 0x00, 0x5a, 0x00, 0x39, 0x0d, 0x00, 0x00, 0xd3, 0x00, 0x00, 0x00, 0x48, 0x01, 0x49, 0x01, 0x68, 0x01, 0x01, -0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x75, -0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, 0x00, 0x11, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x14, 0x00, 0x15, -0x00, 0x80, 0x00, 0x17, 0x00, 0x82, 0x00, 0x83, 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, -0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, -0x00, 0x94, 0x00, 0x95, 0x00, 0x2c, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9d, -0x00, 0x9e, 0x00, 0x35, 0x00, 0x36, 0x00, 0xa1, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0x3d, -0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0x41, 0x00, 0x42, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, -0x00, 0x48, 0x00, 0xb2, 0x00, 0x02, 0x00, 0x03, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0xb5, 0x00, 0x69, 0x01, 0x64, 0x01, 0x6a, -0x01, 0x65, 0x01, 0xb8, 0x00, 0x6b, 0x01, 0x6c, 0x01, 0x02, 0x00, 0x6d, 0x01, 0x6e, 0x01, 0x02, 0x00, 0x6f, 0x01, 0x5a, -0x00, 0x70, 0x01, 0x71, 0x01, 0x72, 0x01, 0x02, 0x00, 0x73, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x74, 0x01, 0x5a, -0x00, 0x75, 0x01, 0x76, 0x01, 0x20, 0x01, 0x02, 0x00, 0x77, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x78, 0x01, 0x5a, -0x00, 0x79, 0x01, 0x7a, 0x01, 0x25, 0x01, 0x02, 0x00, 0x7b, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x7c, 0x01, 0x5a, -0x00, 0x7d, 0x01, 0x7e, 0x01, 0x7f, 0x01, 0x80, 0x01, 0x81, 0x01, 0x6f, 0x01, 0x5a, 0x00, 0x4e, 0x00, 0x02, 0x00, 0x82, -0x01, 0xe3, 0x00, 0x02, 0x00, 0x83, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x84, 0x01, 0x5a, 0x00, 0x85, 0x01, 0x86, -0x01, 0x87, 0x01, 0x88, 0x01, 0x89, 0x01, 0x8a, 0x01, 0x8b, 0x01, 0x02, 0x00, 0x8c, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, -0x00, 0x8d, 0x01, 0x5a, 0x00, 0xec, 0x00, 0xed, 0x00, 0x02, 0x00, 0x8e, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xef, -0x00, 0x5a, 0x00, 0xf0, 0x00, 0xf1, 0x00, 0x02, 0x00, 0x8f, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xf3, 0x00, 0x5a, -0x00, 0xf4, 0x00, 0xf5, 0x00, 0x02, 0x00, 0x90, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xf7, 0x00, 0x5a, 0x00, 0x91, -0x01, 0x92, 0x01, 0x02, 0x00, 0x93, 0x01, 0x5a, 0x00, 0x5b, 0x00, 0x02, 0x00, 0x94, 0x01, 0x95, 0x01, 0x96, 0x01, 0x97, -0x01, 0x98, 0x01, 0x99, 0x01, 0x9a, 0x01, 0x9b, 0x01, 0x9c, 0x01, 0x9d, 0x01, 0x9e, 0x01, 0x9f, 0x01, 0xa0, 0x01, 0xa1, -0x01, 0x5a, 0x00, 0xa2, 0x01, 0xa3, 0x01, 0xa4, 0x01, 0xa5, 0x01, 0xa6, 0x01, 0x5a, 0x00, 0x02, 0x03, 0x00, 0x00, 0x1c, -0x00, 0x00, 0x00, 0x48, 0x01, 0x49, 0x01, 0x32, 0x01, 0x02, 0x00, 0xa7, 0x01, 0xa8, 0x01, 0xa9, 0x01, 0xaa, 0x01, 0xab, -0x01, 0xac, 0x01, 0xad, 0x01, 0x3a, 0x01, 0x3b, 0x01, 0x3c, 0x01, 0x3d, 0x01, 0x3e, 0x01, 0x3f, 0x01, 0x02, 0x00, 0x40, -0x01, 0x41, 0x01, 0xae, 0x01, 0xaf, 0x01, 0xb0, 0x01, 0x4e, 0x00, 0x02, 0x00, 0x45, 0x01, 0x46, 0x01, 0x5a, 0x00, 0x92, -0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x48, 0x01, 0x49, 0x01, 0xb8, 0x00, 0x4e, 0x00, 0x02, 0x00, 0x47, 0x01, 0x5a, -0x00, - -}; - -int IMAGE_IMAGE_OFFSET = 0; -int IMAGE_IMAGE_SIZE = 13681; diff --git a/windows/lib/Debug/OGLCompilerd.lib b/windows/lib/Debug/OGLCompilerd.lib deleted file mode 100644 index f311139b..00000000 --- a/windows/lib/Debug/OGLCompilerd.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0f75eba5f550f4347a9dffbbec176c79cb76bc8aabee5781c2359a49856637d8 -size 201928 diff --git a/windows/lib/Debug/OSDependentd.lib b/windows/lib/Debug/OSDependentd.lib deleted file mode 100644 index 8e534200..00000000 --- a/windows/lib/Debug/OSDependentd.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ac0c40667b4e1bd03baaf16eccc9dd034dadb96faf62b9dbe616a17e19f0f34f -size 50724 diff --git a/windows/lib/Debug/SPIRV-Tools.lib b/windows/lib/Debug/SPIRV-Tools.lib deleted file mode 100644 index 54846c3b..00000000 --- a/windows/lib/Debug/SPIRV-Tools.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f6c5460403a8d4a155e4dc5c0a2fd95370858d84030acc7948ca616ec7a9611e -size 77788102 diff --git a/windows/lib/Debug/SPIRVd.lib b/windows/lib/Debug/SPIRVd.lib deleted file mode 100644 index f6a94e7c..00000000 --- a/windows/lib/Debug/SPIRVd.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:08c5b72bc6b2165b01908b52faecb852a857ddb8f65516d37f6affa9f4872c0e -size 32110592 diff --git a/windows/lib/Debug/angle/backend.lib b/windows/lib/Debug/angle/backend.lib deleted file mode 100644 index f31b12a1..00000000 --- a/windows/lib/Debug/angle/backend.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1fcbbe01dc1cc92264b2bcf56a386c34c79fb2c90b5ab5f95e8aa37db3542788 -size 20903930 diff --git a/windows/lib/Debug/angle/filament.lib b/windows/lib/Debug/angle/filament.lib deleted file mode 100644 index 9def7aec..00000000 --- a/windows/lib/Debug/angle/filament.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d4235e79cade6c4c862d1cf767c97d9983bd98d170128a44ff7794aa27959a68 -size 153021042 diff --git a/windows/lib/Debug/angle/libEGL.dll b/windows/lib/Debug/angle/libEGL.dll deleted file mode 100644 index 730a5607..00000000 --- a/windows/lib/Debug/angle/libEGL.dll +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6ae56046e5c4560cf781ee5f1a4557c63ec2d19a2a71ff60adbecc717b38d8fa -size 222720 diff --git a/windows/lib/Debug/angle/libEGL.dll.lib b/windows/lib/Debug/angle/libEGL.dll.lib deleted file mode 100644 index 1cdd7301..00000000 --- a/windows/lib/Debug/angle/libEGL.dll.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:25dc56bd7b4a32b6397f86d44e598add8e4ac4c4520df42d2a82e3218260ad9a -size 27126 diff --git a/windows/lib/Debug/angle/libEGL.dll.pdb b/windows/lib/Debug/angle/libEGL.dll.pdb deleted file mode 100644 index 48692b2c..00000000 --- a/windows/lib/Debug/angle/libEGL.dll.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d17be2b996420c38caf1e038b4e9be8d3f3e7d44579bccaff6226c2d73d6a2f4 -size 1695744 diff --git a/windows/lib/Debug/angle/libGLESv2.dll b/windows/lib/Debug/angle/libGLESv2.dll deleted file mode 100644 index 6ba0affc..00000000 --- a/windows/lib/Debug/angle/libGLESv2.dll +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7727c415097ee9971a496b0351166c4f136218726a9dc87848988a7f694b1934 -size 25372160 diff --git a/windows/lib/Debug/angle/libGLESv2.dll.lib b/windows/lib/Debug/angle/libGLESv2.dll.lib deleted file mode 100644 index 1ae4d073..00000000 --- a/windows/lib/Debug/angle/libGLESv2.dll.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4f2b6f7d94e2f0d7b0f65616f7adf857205a7bc1911f45d414a9245ed0ae0059 -size 411126 diff --git a/windows/lib/Debug/angle/libGLESv2.dll.pdb b/windows/lib/Debug/angle/libGLESv2.dll.pdb deleted file mode 100644 index ddad79a6..00000000 --- a/windows/lib/Debug/angle/libGLESv2.dll.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:44c823206c6b2a34d462c73ce4831544e00fce732763785ee7182f30f4d5e66b -size 141041664 diff --git a/windows/lib/Debug/angle/uberarchive.lib b/windows/lib/Debug/angle/uberarchive.lib deleted file mode 100644 index 8d3b44ad..00000000 --- a/windows/lib/Debug/angle/uberarchive.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a851deeff8646644d1d8d0b677f464825783a98cfd5a939288bbd9410a4b3291 -size 3638008 diff --git a/windows/lib/Debug/assimp.lib b/windows/lib/Debug/assimp.lib deleted file mode 100644 index bd6b3d18..00000000 --- a/windows/lib/Debug/assimp.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6fd71b1473226aa9dcf4c1211a48de97855ef8ff8fdce576e77d3d91be54fa08 -size 100507056 diff --git a/windows/lib/Debug/basis_encoder.lib b/windows/lib/Debug/basis_encoder.lib deleted file mode 100644 index 4657e3f7..00000000 --- a/windows/lib/Debug/basis_encoder.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4060e48ab34eb0bc90e0b6af12af2f7442e9e9df92f564de48633684c8ce92fd -size 16416582 diff --git a/windows/lib/Debug/basis_transcoder.lib b/windows/lib/Debug/basis_transcoder.lib deleted file mode 100644 index c1a78977..00000000 --- a/windows/lib/Debug/basis_transcoder.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1cb273e84a57493cb37965007b8c8034bc30337f133353aca7c4a937ac00a09b -size 1685594 diff --git a/windows/lib/Debug/bluevk.lib b/windows/lib/Debug/bluevk.lib deleted file mode 100644 index 3ad3e953..00000000 --- a/windows/lib/Debug/bluevk.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8d5482809fcb58a23bae84219e39939740da3bddf8d6c13593f2cb1fa0c17c5a -size 1179532 diff --git a/windows/lib/Debug/camutils.lib b/windows/lib/Debug/camutils.lib deleted file mode 100644 index 3a7e9084..00000000 --- a/windows/lib/Debug/camutils.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd0a8b57352a2fc83060a9a94818003be85a684db6e14339e1622d383902576c -size 499200 diff --git a/windows/lib/Debug/civetweb.lib b/windows/lib/Debug/civetweb.lib deleted file mode 100644 index 10603f1a..00000000 --- a/windows/lib/Debug/civetweb.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e63c73f490f9124328230681c068805437f384d040b0ed0b7cac787fafad98e4 -size 1795670 diff --git a/windows/lib/Debug/d3dcompiler_47.dll b/windows/lib/Debug/d3dcompiler_47.dll deleted file mode 100644 index 05e85090..00000000 --- a/windows/lib/Debug/d3dcompiler_47.dll +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7353f25dc5cf84d09894e3e0461cef0e56799adbc617fce37620ca67240b547d -size 4916712 diff --git a/windows/lib/Debug/draco_animation.lib b/windows/lib/Debug/draco_animation.lib deleted file mode 100644 index eae7caf0..00000000 --- a/windows/lib/Debug/draco_animation.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6aba8df60959a44682ec19c2f03e24c2965e3de8f7b629d2c96d9b2f3fb965ad -size 850586 diff --git a/windows/lib/Debug/draco_animation_dec.lib b/windows/lib/Debug/draco_animation_dec.lib deleted file mode 100644 index a5f26971..00000000 --- a/windows/lib/Debug/draco_animation_dec.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8d681a21b73778347c9ec3415d38538889fd922d6e21a649e428950b72c46b8c -size 675434 diff --git a/windows/lib/Debug/draco_attributes.lib b/windows/lib/Debug/draco_attributes.lib deleted file mode 100644 index 5c9b89be..00000000 --- a/windows/lib/Debug/draco_attributes.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b2132ef22bffade5e7b110b5e0ff9b778b15915221a01e278feb89fc85abf229 -size 10643532 diff --git a/windows/lib/Debug/draco_core.lib b/windows/lib/Debug/draco_core.lib deleted file mode 100644 index 7d9d8eba..00000000 --- a/windows/lib/Debug/draco_core.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5a61c1410cbf2c5478099f602a1d3e4daaaced69937a05d4a19dd572f9f7dc90 -size 2836898 diff --git a/windows/lib/Debug/draco_dec_config.lib b/windows/lib/Debug/draco_dec_config.lib deleted file mode 100644 index 9ad52bd3..00000000 --- a/windows/lib/Debug/draco_dec_config.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:07a414377a220ec7f9388bafbce419d58ba399b9cd0372ea9bf95f158910c43c -size 4990 diff --git a/windows/lib/Debug/draco_io.lib b/windows/lib/Debug/draco_io.lib deleted file mode 100644 index ad5977b5..00000000 --- a/windows/lib/Debug/draco_io.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:454e872df8faf376f61f3434181e585fd44e9f905a089549fff8f5fbb9b048fb -size 15797076 diff --git a/windows/lib/Debug/draco_mesh.lib b/windows/lib/Debug/draco_mesh.lib deleted file mode 100644 index 75d20175..00000000 --- a/windows/lib/Debug/draco_mesh.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:af79f04670caf60a0896703f07b2fd75a38109407bc052371b352a542debf518 -size 9674256 diff --git a/windows/lib/Debug/draco_metadata.lib b/windows/lib/Debug/draco_metadata.lib deleted file mode 100644 index ecdc5c87..00000000 --- a/windows/lib/Debug/draco_metadata.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec52feac7930ffa3ad82eb5bc3f655bb07b074d551c35b243cc567bc0fc5bf84 -size 2526302 diff --git a/windows/lib/Debug/draco_metadata_dec.lib b/windows/lib/Debug/draco_metadata_dec.lib deleted file mode 100644 index 540375a1..00000000 --- a/windows/lib/Debug/draco_metadata_dec.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6bcb3bbbf5655bb8f95d38751483845849de21cba2e935d9be38b71963e9f57b -size 1033710 diff --git a/windows/lib/Debug/draco_point_cloud.lib b/windows/lib/Debug/draco_point_cloud.lib deleted file mode 100644 index f38dc130..00000000 --- a/windows/lib/Debug/draco_point_cloud.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d9fb31c06661beae2fa36b69093a4bc5be0b229135a5ee270b39cbc321b13a0 -size 2743562 diff --git a/windows/lib/Debug/draco_points_dec.lib b/windows/lib/Debug/draco_points_dec.lib deleted file mode 100644 index 258c96fa..00000000 --- a/windows/lib/Debug/draco_points_dec.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c6c8bec36d8cff53bbb3e52a8f0f87d5d678da0cf6137a0ea612e8b45e86cd01 -size 3266654 diff --git a/windows/lib/Debug/dracodec.lib b/windows/lib/Debug/dracodec.lib deleted file mode 100644 index 38ae96b1..00000000 --- a/windows/lib/Debug/dracodec.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:70d51fd988eacd19c2f5c7f781a9d9e5e923d3d503627d77bcd2a36a02467760 -size 80495378 diff --git a/windows/lib/Debug/filabridge.lib b/windows/lib/Debug/filabridge.lib deleted file mode 100644 index 9de70255..00000000 --- a/windows/lib/Debug/filabridge.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec8471a3ac5b7dee2428a5c99fe853eb0cdadf74ab9db165f5e0e67af7282aac -size 2549442 diff --git a/windows/lib/Debug/filaflat.lib b/windows/lib/Debug/filaflat.lib deleted file mode 100644 index d652f466..00000000 --- a/windows/lib/Debug/filaflat.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:83c0bb77a70dc12987e9750a369592166e7c349ec12c68c0edeb4f5c4e0c3791 -size 3079582 diff --git a/windows/lib/Debug/filagui.lib b/windows/lib/Debug/filagui.lib deleted file mode 100644 index 5f13c4a1..00000000 --- a/windows/lib/Debug/filagui.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:49c7a54762ba6d6dc5f58210b50495b1f9a2df9f2765e6ea7583d292c91665f2 -size 1713514 diff --git a/windows/lib/Debug/filamat.lib b/windows/lib/Debug/filamat.lib deleted file mode 100644 index 16696fd4..00000000 --- a/windows/lib/Debug/filamat.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:658dcec9c1cb98ed523ae4a60c64290e89521d98e2ec4ecc6387c176a9b337e5 -size 41194792 diff --git a/windows/lib/Debug/filament-iblprefilter.lib b/windows/lib/Debug/filament-iblprefilter.lib deleted file mode 100644 index ec90961a..00000000 --- a/windows/lib/Debug/filament-iblprefilter.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8df0991817adfbcbd293d21bcc309075482b548334856dbdb5a9813aa13c03d5 -size 534654 diff --git a/windows/lib/Debug/filamentapp-resources.lib b/windows/lib/Debug/filamentapp-resources.lib deleted file mode 100644 index 471216cb..00000000 --- a/windows/lib/Debug/filamentapp-resources.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c728ace87c6c0cd6cd0ca9678ceb7c1fa12ebb6cc7e51b63fedc8603831b8eba -size 914418 diff --git a/windows/lib/Debug/filamentapp.lib b/windows/lib/Debug/filamentapp.lib deleted file mode 100644 index 8ad61aa1..00000000 --- a/windows/lib/Debug/filamentapp.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7f3e6106b51042443a25716d68addc4c36862069f2be6823ce33d72d63d8efab -size 8384746 diff --git a/windows/lib/Debug/geometry.lib b/windows/lib/Debug/geometry.lib deleted file mode 100644 index 2872cd54..00000000 --- a/windows/lib/Debug/geometry.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0b4ca5d460eb9d7d81b93bff5e8ac684a6ac901a7e60052ed532b6e419e9de33 -size 3059388 diff --git a/windows/lib/Debug/getopt.lib b/windows/lib/Debug/getopt.lib deleted file mode 100644 index f3e2519b..00000000 --- a/windows/lib/Debug/getopt.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:180905fcebbfd80c653cce54ddfe44217cfe05ce5c08be8e6f0119a8a161679a -size 45890 diff --git a/windows/lib/Debug/gltf-demo-resources.lib b/windows/lib/Debug/gltf-demo-resources.lib deleted file mode 100644 index 4655b4db..00000000 --- a/windows/lib/Debug/gltf-demo-resources.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f479340a4ff300924f48224833164de49e7ebed0bc6005105d617fd48cf57041 -size 4092876 diff --git a/windows/lib/Debug/gltf_viewer.lib b/windows/lib/Debug/gltf_viewer.lib deleted file mode 100644 index bb4da348..00000000 --- a/windows/lib/Debug/gltf_viewer.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e6645c4c29ed27cc804b98a006bc8108c7aa91ba64e4241d908c8d9cc571c16 -size 139008 diff --git a/windows/lib/Debug/gltfio.lib b/windows/lib/Debug/gltfio.lib deleted file mode 100644 index 9f0b052b..00000000 --- a/windows/lib/Debug/gltfio.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c1775a21866a2a08afd9dbca572244a33ab1a979faa5fa66f965edefccf891b -size 1523638 diff --git a/windows/lib/Debug/gltfio_core.lib b/windows/lib/Debug/gltfio_core.lib deleted file mode 100644 index 9f36b4d6..00000000 --- a/windows/lib/Debug/gltfio_core.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:590676cef5d1b4560eb8a9173e33b0dbab2ea5f9fe29a9b32e96d40d9fd8a73f -size 45343778 diff --git a/windows/lib/Debug/ibl-lite.lib b/windows/lib/Debug/ibl-lite.lib deleted file mode 100644 index fb3f3d7d..00000000 --- a/windows/lib/Debug/ibl-lite.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3454628d573dd027a4ddf7c1d4e851c50ba3dff8e9a4de8bd2f52d316e972cb8 -size 6560674 diff --git a/windows/lib/Debug/ibl.lib b/windows/lib/Debug/ibl.lib deleted file mode 100644 index 0dd3514b..00000000 --- a/windows/lib/Debug/ibl.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b5cad6e0a913d248756db1edfb6854c9f5abf79e400b27a73e131438a2234cd7 -size 7409116 diff --git a/windows/lib/Debug/image.lib b/windows/lib/Debug/image.lib deleted file mode 100644 index a290e09c..00000000 --- a/windows/lib/Debug/image.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5be056b660901e3385d487bebfb7401cdd6849bd9abceb1105253461f9bb1afe -size 3116312 diff --git a/windows/lib/Debug/imageio.lib b/windows/lib/Debug/imageio.lib deleted file mode 100644 index f4836f62..00000000 --- a/windows/lib/Debug/imageio.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b6a5edbf9a3e4547100e75e337c649e7ae6d931f38f4ebea2fdf89905400bd77 -size 3775340 diff --git a/windows/lib/Debug/imgui.lib b/windows/lib/Debug/imgui.lib deleted file mode 100644 index 9faa7485..00000000 --- a/windows/lib/Debug/imgui.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:92ced8fae8ddbfbabaffdb5c2c16f08aeeabc7c9f22e09cc87e78db5e13fbeb9 -size 5155596 diff --git a/windows/lib/Debug/ktxreader.lib b/windows/lib/Debug/ktxreader.lib deleted file mode 100644 index abab47ec..00000000 --- a/windows/lib/Debug/ktxreader.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:177f17471003a98828c61020a87c5225d060d6ec483023853a386883e3b23dfc -size 1073050 diff --git a/windows/lib/Debug/libc++.dll b/windows/lib/Debug/libc++.dll deleted file mode 100644 index 30119ed7..00000000 --- a/windows/lib/Debug/libc++.dll +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7fb7a22ad254dac200c5bb4ac5c73b812cd8724efdeaeff2f72b1c51a4709061 -size 1629184 diff --git a/windows/lib/Debug/libc++.dll.lib b/windows/lib/Debug/libc++.dll.lib deleted file mode 100644 index dadd0c41..00000000 --- a/windows/lib/Debug/libc++.dll.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:94005da524b2ed1d70c816fc20a91f2248acaf784cde8f0693c712facd874b89 -size 1018948 diff --git a/windows/lib/Debug/libc++.dll.pdb b/windows/lib/Debug/libc++.dll.pdb deleted file mode 100644 index 8eeba3de..00000000 --- a/windows/lib/Debug/libc++.dll.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bccc2476e4a5b82b17a6b2fcf10e30b9b8ae7fb82d3a1b23d666d61d7133c23c -size 6397952 diff --git a/windows/lib/Debug/math.lib b/windows/lib/Debug/math.lib deleted file mode 100644 index 06dc4376..00000000 --- a/windows/lib/Debug/math.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b0a167d705eb02d05c673eeef0c6b5860fabff88df636843d03b68bba484ae7 -size 3488 diff --git a/windows/lib/Debug/matlang.lib b/windows/lib/Debug/matlang.lib deleted file mode 100644 index 431adf93..00000000 --- a/windows/lib/Debug/matlang.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cb8d2d05a7ca264db6b3dcd27b4ef065e4e0516a2aac7877d42f3e4ee0f5aadc -size 23585228 diff --git a/windows/lib/Debug/meshoptimizer.lib b/windows/lib/Debug/meshoptimizer.lib deleted file mode 100644 index 06b371b0..00000000 --- a/windows/lib/Debug/meshoptimizer.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d6fa4d813686f0bf02ad5e39322dff801da2c1c26557c70897ee58cdba5d6d3f -size 654844 diff --git a/windows/lib/Debug/mikktspace.lib b/windows/lib/Debug/mikktspace.lib deleted file mode 100644 index 9b347a03..00000000 --- a/windows/lib/Debug/mikktspace.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ea689eefcc0d7ca34dc642c1f23b1f779f244e5daaac9c05cff79bb4cce00e15 -size 116578 diff --git a/windows/lib/Debug/opengl/backend.lib b/windows/lib/Debug/opengl/backend.lib deleted file mode 100644 index ebc10e76..00000000 --- a/windows/lib/Debug/opengl/backend.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3827c9ad4d7849dd1266e317976fbea04a9c754594ece7d604e48b76d07e120b -size 20577924 diff --git a/windows/lib/Debug/opengl/bluegl.lib b/windows/lib/Debug/opengl/bluegl.lib deleted file mode 100644 index 9fd0fc91..00000000 --- a/windows/lib/Debug/opengl/bluegl.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f032b3bda4d738d935e56dd89b10001480ce0146e0ffd94add2e79d7f76087d5 -size 1706380 diff --git a/windows/lib/Debug/opengl/filament.lib b/windows/lib/Debug/opengl/filament.lib deleted file mode 100644 index 479836dd..00000000 --- a/windows/lib/Debug/opengl/filament.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ce9d22143ce3d4cf6a680fde8a7f6ddfd8edeb18c0a8c38c3843915cdc8060a8 -size 152979336 diff --git a/windows/lib/Debug/opengl/uberarchive.lib b/windows/lib/Debug/opengl/uberarchive.lib deleted file mode 100644 index eecf6bc2..00000000 --- a/windows/lib/Debug/opengl/uberarchive.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fb6214dcbfc505987921d21289934fa44d4e42e1e5e24aa243a61688d8f644b5 -size 3615830 diff --git a/windows/lib/Debug/png.lib b/windows/lib/Debug/png.lib deleted file mode 100644 index 1ecf5f97..00000000 --- a/windows/lib/Debug/png.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f5c3745cabf4fc2620f6d5e6f540adba6e75753e118889d796a7e315e9cb727c -size 1491764 diff --git a/windows/lib/Debug/shaders.lib b/windows/lib/Debug/shaders.lib deleted file mode 100644 index 6917952b..00000000 --- a/windows/lib/Debug/shaders.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:040032f8825e94b7a0d87153fc6d1ca12b17e6ceb081d6f5e855474201b073db -size 216764 diff --git a/windows/lib/Debug/smol-v.lib b/windows/lib/Debug/smol-v.lib deleted file mode 100644 index 6958d5fa..00000000 --- a/windows/lib/Debug/smol-v.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8dda9d10c4c0b811e26996a3f38f12a29dfe651bdb8e7b0e3b040bfaba89b41b -size 315644 diff --git a/windows/lib/Debug/stb.lib b/windows/lib/Debug/stb.lib deleted file mode 100644 index af50169b..00000000 --- a/windows/lib/Debug/stb.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:93471d2b9e3fa6a313d1157448b0f1707981ce57a2c4467d4da94b17a0eae5c3 -size 279218 diff --git a/windows/lib/Debug/third_party_abseil-cpp_absl.dll b/windows/lib/Debug/third_party_abseil-cpp_absl.dll deleted file mode 100644 index fdcce939..00000000 --- a/windows/lib/Debug/third_party_abseil-cpp_absl.dll +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d8a4bdd6fe9599e045af5c8fc0b8734fab569e6e524395d6ff32118de2d3ebc0 -size 2709504 diff --git a/windows/lib/Debug/third_party_abseil-cpp_absl.dll.lib b/windows/lib/Debug/third_party_abseil-cpp_absl.dll.lib deleted file mode 100644 index 2fd8c5e5..00000000 --- a/windows/lib/Debug/third_party_abseil-cpp_absl.dll.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b17474d55653bd6500cd0798abe8eaa44b963b7768f3c0a3692924761ad80246 -size 4097356 diff --git a/windows/lib/Debug/third_party_abseil-cpp_absl.dll.pdb b/windows/lib/Debug/third_party_abseil-cpp_absl.dll.pdb deleted file mode 100644 index aae50307..00000000 --- a/windows/lib/Debug/third_party_abseil-cpp_absl.dll.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd1100558fa512ad6f42882db6ca87c590f57dc5d9d81428ed53e4b96c314d5c -size 10821632 diff --git a/windows/lib/Debug/third_party_zlib.dll b/windows/lib/Debug/third_party_zlib.dll deleted file mode 100644 index 7f6feaed..00000000 --- a/windows/lib/Debug/third_party_zlib.dll +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:28756defd96757d4fb2b91f96918331dcaab9b6fdf14db8ba8b17388bec4b15a -size 204800 diff --git a/windows/lib/Debug/third_party_zlib.dll.lib b/windows/lib/Debug/third_party_zlib.dll.lib deleted file mode 100644 index bf3325b5..00000000 --- a/windows/lib/Debug/third_party_zlib.dll.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0ed37440ff1840b33e43559d011cf46a42f37c590f32ed8b0a59d11305db552 -size 19650 diff --git a/windows/lib/Debug/third_party_zlib.dll.pdb b/windows/lib/Debug/third_party_zlib.dll.pdb deleted file mode 100644 index 94eae2d9..00000000 --- a/windows/lib/Debug/third_party_zlib.dll.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:72eafb51fc85a3e88319833aec983d94f2f82a88c656a303704c4af2d6f74abe -size 835584 diff --git a/windows/lib/Debug/tinyexr.lib b/windows/lib/Debug/tinyexr.lib deleted file mode 100644 index daad0b2d..00000000 --- a/windows/lib/Debug/tinyexr.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a3609ce8c07235bb6726ca44b7f227e8f7549ce81364adea5fe3bc6bafa9b6e9 -size 3511572 diff --git a/windows/lib/Debug/uberzlib.lib b/windows/lib/Debug/uberzlib.lib deleted file mode 100644 index 6680b2ad..00000000 --- a/windows/lib/Debug/uberzlib.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e702e681e5c855c6e6757fb99820f3ab2a8d56065f24dc2cbe6cbed18cbe682a -size 1566006 diff --git a/windows/lib/Debug/utils.lib b/windows/lib/Debug/utils.lib deleted file mode 100644 index 4e069fe1..00000000 --- a/windows/lib/Debug/utils.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b1c194d91a608880020a725384f35026f1d96776c39bf0601c13597576527673 -size 10168646 diff --git a/windows/lib/Debug/viewer.lib b/windows/lib/Debug/viewer.lib deleted file mode 100644 index 984f13a1..00000000 --- a/windows/lib/Debug/viewer.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e98815ccf4171cbaba37ff8667565329bff275437b1b63f11516b148cd5f1582 -size 6727544 diff --git a/windows/lib/Debug/vkshaders.lib b/windows/lib/Debug/vkshaders.lib deleted file mode 100644 index 7f240fcf..00000000 --- a/windows/lib/Debug/vkshaders.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6e37d424407789cf7bb86e0af691ddb9a7e810465424db6225c4b43bed2c7454 -size 9806 diff --git a/windows/lib/Debug/z.lib b/windows/lib/Debug/z.lib deleted file mode 100644 index 424c298e..00000000 --- a/windows/lib/Debug/z.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8d70e619c81f2081170a7381cc64812cffb02926086dcc388e617621043664fd -size 354516 diff --git a/windows/lib/Debug/zstd.lib b/windows/lib/Debug/zstd.lib deleted file mode 100644 index 2560e2a2..00000000 --- a/windows/lib/Debug/zstd.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d8ce541f2c4d5939687564a9d190b0a0cac6142b3cdb81c6ade15662ffe8065b -size 1435946 diff --git a/windows/lib/Release/OGLCompiler.lib b/windows/lib/Release/OGLCompiler.lib deleted file mode 100644 index b7bb2c51..00000000 --- a/windows/lib/Release/OGLCompiler.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fb32bc7ac13fe1cd88ed24d5714e269ed147c4ce00685477d0d56722f8435d3d -size 53238 diff --git a/windows/lib/Release/OSDependent.lib b/windows/lib/Release/OSDependent.lib deleted file mode 100644 index 84ebfc0d..00000000 --- a/windows/lib/Release/OSDependent.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4f9204da2c6121a7f176b5bf13f76ccd85ca5a6ed9454a383a759518b5031b99 -size 44146 diff --git a/windows/lib/Release/SPIRV-Tools-opt.lib b/windows/lib/Release/SPIRV-Tools-opt.lib deleted file mode 100644 index 4f976f2b..00000000 --- a/windows/lib/Release/SPIRV-Tools-opt.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:59608430a7bb2b7c7ba1a10d90217ea63cfd14caacdc0bf10d9208325b594e44 -size 71588600 diff --git a/windows/lib/Release/SPIRV-Tools.lib b/windows/lib/Release/SPIRV-Tools.lib deleted file mode 100644 index 44230683..00000000 --- a/windows/lib/Release/SPIRV-Tools.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:209a2996c1edb22c88110af75fb262a458f80cc652c74d522177c4a609af6028 -size 21607498 diff --git a/windows/lib/Release/SPIRV.lib b/windows/lib/Release/SPIRV.lib deleted file mode 100644 index bfdaf6a8..00000000 --- a/windows/lib/Release/SPIRV.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:502f78327a3e11a84d9525788d297aa1ac012b37f9877cd380870bd441ede790 -size 7905514 diff --git a/windows/lib/Release/angle/backend.lib b/windows/lib/Release/angle/backend.lib deleted file mode 100644 index cdd98974..00000000 --- a/windows/lib/Release/angle/backend.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4f33438aae9a17d92961a4ec1d5d876fe239647bb7f8196b795c378f25bd45da -size 4501658 diff --git a/windows/lib/Release/angle/backend.pdb b/windows/lib/Release/angle/backend.pdb deleted file mode 100644 index 0d8b7982..00000000 --- a/windows/lib/Release/angle/backend.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5f9897c1279240e3784e40c0273cb7d73894f82078d33c6afd60d3a56993ce22 -size 2805760 diff --git a/windows/lib/Release/angle/filament.lib b/windows/lib/Release/angle/filament.lib deleted file mode 100644 index 2a8e90d6..00000000 --- a/windows/lib/Release/angle/filament.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2c01f5f19a8c9a0a7a5c9f25c363e22e9689b76e243a24eb75f79e367b686270 -size 27972428 diff --git a/windows/lib/Release/angle/filament.pdb b/windows/lib/Release/angle/filament.pdb deleted file mode 100644 index 170d00d0..00000000 --- a/windows/lib/Release/angle/filament.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b8c04681192d2bfd0cac26b74f51a3a1979e55db64b481b1c879a668f65e75f0 -size 8572928 diff --git a/windows/lib/Release/angle/libEGL.dll b/windows/lib/Release/angle/libEGL.dll deleted file mode 100644 index 62a645a2..00000000 --- a/windows/lib/Release/angle/libEGL.dll +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ac268c42d78985af066d1caeac1d4f17acd7df5ea89f67e8e25f1aa391a2b8d1 -size 454656 diff --git a/windows/lib/Release/angle/libEGL.dll.lib b/windows/lib/Release/angle/libEGL.dll.lib deleted file mode 100644 index 1cdd7301..00000000 --- a/windows/lib/Release/angle/libEGL.dll.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:25dc56bd7b4a32b6397f86d44e598add8e4ac4c4520df42d2a82e3218260ad9a -size 27126 diff --git a/windows/lib/Release/angle/libEGL.dll.pdb b/windows/lib/Release/angle/libEGL.dll.pdb deleted file mode 100644 index ecc9630e..00000000 --- a/windows/lib/Release/angle/libEGL.dll.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:57f1be2d71c7f28400ed9cec439b1083518e4eea88869b93f603521a6b4ea195 -size 12591104 diff --git a/windows/lib/Release/angle/libGLESv2.dll b/windows/lib/Release/angle/libGLESv2.dll deleted file mode 100644 index ebd0528b..00000000 --- a/windows/lib/Release/angle/libGLESv2.dll +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dad57352cbce97cacc1e71b08410276e3814f9604bf2cea3047dd3d6afcb1593 -size 6934528 diff --git a/windows/lib/Release/angle/libGLESv2.dll.lib b/windows/lib/Release/angle/libGLESv2.dll.lib deleted file mode 100644 index 1ae4d073..00000000 --- a/windows/lib/Release/angle/libGLESv2.dll.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4f2b6f7d94e2f0d7b0f65616f7adf857205a7bc1911f45d414a9245ed0ae0059 -size 411126 diff --git a/windows/lib/Release/angle/libGLESv2.dll.pdb b/windows/lib/Release/angle/libGLESv2.dll.pdb deleted file mode 100644 index 2dc7646a..00000000 --- a/windows/lib/Release/angle/libGLESv2.dll.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8ca68c5953bc7524e531ae64df7174ceccb5c0533f02acd1e9445f4121e173a4 -size 86671360 diff --git a/windows/lib/Release/angle/uberarchive.lib b/windows/lib/Release/angle/uberarchive.lib deleted file mode 100644 index 91890920..00000000 --- a/windows/lib/Release/angle/uberarchive.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:349d22ce80f955463e36c7e422b11a2185d72690e6727638cd3dd1999916027d -size 62166 diff --git a/windows/lib/Release/angle/uberarchive.pdb b/windows/lib/Release/angle/uberarchive.pdb deleted file mode 100644 index b98e2721..00000000 --- a/windows/lib/Release/angle/uberarchive.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f83f8c13f144587d26728a3c9f1c64b97e82a5cbd9f1797f4cda5a4c2d4c713b -size 69632 diff --git a/windows/lib/Release/basis_encoder.lib b/windows/lib/Release/basis_encoder.lib deleted file mode 100644 index 149cf9f8..00000000 --- a/windows/lib/Release/basis_encoder.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cd96ab51fe9ce9c288a4946e060eee00163bcb2508c20e4aec5cd9dc8c899e38 -size 6014970 diff --git a/windows/lib/Release/basis_transcoder.lib b/windows/lib/Release/basis_transcoder.lib deleted file mode 100644 index c65ba8c4..00000000 --- a/windows/lib/Release/basis_transcoder.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf8c2561a890cf6e9f150e22fdb52e7e7f34f83673dbfb8e6f97777c2441e1f1 -size 1147112 diff --git a/windows/lib/Release/camutils.lib b/windows/lib/Release/camutils.lib deleted file mode 100644 index d008c6a7..00000000 --- a/windows/lib/Release/camutils.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a8cfad65a989d05566d7af4a18860fe536e484169f51bee68b04ac3f8de61c46 -size 227968 diff --git a/windows/lib/Release/draco_animation.lib b/windows/lib/Release/draco_animation.lib deleted file mode 100644 index 6f6ccfff..00000000 --- a/windows/lib/Release/draco_animation.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:115724dc07b52bd010a1494f6272aa8498e6724fe4abfb53a950fd544c5153aa -size 153310 diff --git a/windows/lib/Release/draco_animation_dec.lib b/windows/lib/Release/draco_animation_dec.lib deleted file mode 100644 index 85eb9d27..00000000 --- a/windows/lib/Release/draco_animation_dec.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a0c7cc1b94efaacfb7efbabc68362f13ca62c35a972833aa7c72c19db52b988a -size 138788 diff --git a/windows/lib/Release/draco_attributes.lib b/windows/lib/Release/draco_attributes.lib deleted file mode 100644 index 5b792500..00000000 --- a/windows/lib/Release/draco_attributes.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:74afb6123b06862375b602522c41e478f7ab959b542ba33206b6573ac0c0be2d -size 1979424 diff --git a/windows/lib/Release/draco_compression_attributes_dec.lib b/windows/lib/Release/draco_compression_attributes_dec.lib deleted file mode 100644 index faaf5762..00000000 --- a/windows/lib/Release/draco_compression_attributes_dec.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:23bebd014758ea8837a76b194ad389adbfef81369103c34eae3e3df66b7a1631 -size 2840874 diff --git a/windows/lib/Release/draco_compression_bit_coders.lib b/windows/lib/Release/draco_compression_bit_coders.lib deleted file mode 100644 index c6886804..00000000 --- a/windows/lib/Release/draco_compression_bit_coders.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:da96cf1dd9d194688106fd2a04b71049ccbe00c152ba574c60e8ac37b22ae2d2 -size 1013510 diff --git a/windows/lib/Release/draco_compression_decode.lib b/windows/lib/Release/draco_compression_decode.lib deleted file mode 100644 index 5fc959a8..00000000 --- a/windows/lib/Release/draco_compression_decode.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:101916f2573a8e08172ae48fe169639d9d56bbc541da3e8c747293a1fba169a4 -size 286668 diff --git a/windows/lib/Release/draco_compression_entropy.lib b/windows/lib/Release/draco_compression_entropy.lib deleted file mode 100644 index 3b48f7ca..00000000 --- a/windows/lib/Release/draco_compression_entropy.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e435402467ae20606a2fdbc405090578dcf72bd78c9e7d2ac465f17da75491c -size 1702542 diff --git a/windows/lib/Release/draco_compression_mesh_dec.lib b/windows/lib/Release/draco_compression_mesh_dec.lib deleted file mode 100644 index fa304219..00000000 --- a/windows/lib/Release/draco_compression_mesh_dec.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06527008fa064e2bf491d8b7cb6a779319be87d5980910e0cd5293912d57c323 -size 1789170 diff --git a/windows/lib/Release/draco_compression_point_cloud_dec.lib b/windows/lib/Release/draco_compression_point_cloud_dec.lib deleted file mode 100644 index 58f5487d..00000000 --- a/windows/lib/Release/draco_compression_point_cloud_dec.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:606d1965466f5f94ecb80ca4b9e5e9ff6502b6f5aedfe3a15e777ee2f517575f -size 624710 diff --git a/windows/lib/Release/draco_core.lib b/windows/lib/Release/draco_core.lib deleted file mode 100644 index 2eac40d5..00000000 --- a/windows/lib/Release/draco_core.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a39750f593ada579c9da6c32067dda8bc1c98fcf2cf52da1aa85b7dd70934028 -size 733334 diff --git a/windows/lib/Release/draco_dec_config.lib b/windows/lib/Release/draco_dec_config.lib deleted file mode 100644 index 5c7f9530..00000000 --- a/windows/lib/Release/draco_dec_config.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c7c47b7b2a30d9646f10c7179972f84346545052ad6fe5626ceb8e10038dc46 -size 1746 diff --git a/windows/lib/Release/draco_io.lib b/windows/lib/Release/draco_io.lib deleted file mode 100644 index fd5315bc..00000000 --- a/windows/lib/Release/draco_io.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1d1b6865e645c53357ac83d1aef52e3cf958798e888c0d7f7cf81ec0119ce17e -size 3746064 diff --git a/windows/lib/Release/draco_mesh.lib b/windows/lib/Release/draco_mesh.lib deleted file mode 100644 index 21c4d462..00000000 --- a/windows/lib/Release/draco_mesh.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1186c857f628207f8a929631c1489f621c2b2f35d6d430f8dcc5c864d5a73dc9 -size 1891614 diff --git a/windows/lib/Release/draco_metadata.lib b/windows/lib/Release/draco_metadata.lib deleted file mode 100644 index 40cac792..00000000 --- a/windows/lib/Release/draco_metadata.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e3f931c16310960d8d43eb7dbd89ded630425e85d8610dcf6d478caf3c4d5fc5 -size 532830 diff --git a/windows/lib/Release/draco_metadata_dec.lib b/windows/lib/Release/draco_metadata_dec.lib deleted file mode 100644 index 81547b37..00000000 --- a/windows/lib/Release/draco_metadata_dec.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b4aa56d402b49e36e2ad64dd1d4419ae766cbf796792d3ba61b493193cb08bbb -size 226352 diff --git a/windows/lib/Release/draco_point_cloud.lib b/windows/lib/Release/draco_point_cloud.lib deleted file mode 100644 index 50ab6329..00000000 --- a/windows/lib/Release/draco_point_cloud.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9631e212cb2fab8293fd096eadb1f80e66f1b10057d2530ac54d6a4d8cfae8aa -size 524378 diff --git a/windows/lib/Release/draco_points_dec.lib b/windows/lib/Release/draco_points_dec.lib deleted file mode 100644 index 999a881d..00000000 --- a/windows/lib/Release/draco_points_dec.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:603221d72a4bd1ec4451fcf7a5fd8c6947800e131677c353a2456018321a1bf2 -size 858064 diff --git a/windows/lib/Release/dracodec.lib b/windows/lib/Release/dracodec.lib deleted file mode 100644 index 772457fb..00000000 --- a/windows/lib/Release/dracodec.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:33666e83440d759a624d73679d3862a52d864b37d6bd4deaf7bd7656951705fa -size 18861078 diff --git a/windows/lib/Release/filabridge.lib b/windows/lib/Release/filabridge.lib deleted file mode 100644 index 6bb664a5..00000000 --- a/windows/lib/Release/filabridge.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8835d9855f5c2690cc0d536346c966b220c8504c5b65986d98a667efab9b83f3 -size 506948 diff --git a/windows/lib/Release/filaflat.lib b/windows/lib/Release/filaflat.lib deleted file mode 100644 index 1aae5acf..00000000 --- a/windows/lib/Release/filaflat.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7cedc4dcaf38633b76008de8913d15db65ed6002e25cf8c3d948ee607225227a -size 590084 diff --git a/windows/lib/Release/filamat.lib b/windows/lib/Release/filamat.lib deleted file mode 100644 index 20c9f9a9..00000000 --- a/windows/lib/Release/filamat.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c799dbeec6642ef6e62d6ce812c912dd11fcda1d6e8b10f22883edffaedfb7a9 -size 8309170 diff --git a/windows/lib/Release/filament.lib b/windows/lib/Release/filament.lib deleted file mode 100644 index 44869341..00000000 --- a/windows/lib/Release/filament.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0ec9e8f7896af67837536fcf50079e15d11d4069205591e8178438cc826b4526 -size 27931534 diff --git a/windows/lib/Release/geometry.lib b/windows/lib/Release/geometry.lib deleted file mode 100644 index bfa73647..00000000 --- a/windows/lib/Release/geometry.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d8174d94b2aa0621e471d03bf4fdda7072962f5b512f721127a69eb2c0a8f3e0 -size 798556 diff --git a/windows/lib/Release/getopt.lib b/windows/lib/Release/getopt.lib deleted file mode 100644 index edcd435e..00000000 --- a/windows/lib/Release/getopt.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8a2721489920a4c3e6264e4e59c65ba08612171beb0d795040deb33a0c61c1e2 -size 45550 diff --git a/windows/lib/Release/glslang.lib b/windows/lib/Release/glslang.lib deleted file mode 100644 index 2b703100..00000000 --- a/windows/lib/Release/glslang.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:025c5e0676238629a7bf426718323f0c1a2808e5e300169b279dcb2986bc5980 -size 21673530 diff --git a/windows/lib/Release/gltfio.lib b/windows/lib/Release/gltfio.lib deleted file mode 100644 index fd3f6121..00000000 --- a/windows/lib/Release/gltfio.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ddd746a77e1ae26f33fdac22a1efdf32a69e227ebb6ad9d3bfa6723f15cfd44 -size 340090 diff --git a/windows/lib/Release/gltfio_core.lib b/windows/lib/Release/gltfio_core.lib deleted file mode 100644 index ecd32439..00000000 --- a/windows/lib/Release/gltfio_core.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:664cf90ad081e9937fc260c951e5b576ef374c1f3cb4ac5edea5f776702033e8 -size 8802666 diff --git a/windows/lib/Release/ibl-lite.lib b/windows/lib/Release/ibl-lite.lib deleted file mode 100644 index 2b6a9ea6..00000000 --- a/windows/lib/Release/ibl-lite.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c0c8da7e72c244489c08cfcb711f3abc97a5dd104a23909ba35b6e60c7a6d814 -size 1598444 diff --git a/windows/lib/Release/ibl.lib b/windows/lib/Release/ibl.lib deleted file mode 100644 index 52255805..00000000 --- a/windows/lib/Release/ibl.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:56871a8d40c5c114369bd29962ac3a35f96537f6ce1da9827facb31625e0d430 -size 1850122 diff --git a/windows/lib/Release/image.lib b/windows/lib/Release/image.lib deleted file mode 100644 index f440d764..00000000 --- a/windows/lib/Release/image.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fa7e72c10ce54cdfbe8e80279f30a032c2741d2b2d867ba052f64508d055bea7 -size 694394 diff --git a/windows/lib/Release/imageio.lib b/windows/lib/Release/imageio.lib deleted file mode 100644 index c089bce3..00000000 --- a/windows/lib/Release/imageio.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:efcb080dd70cd45e56341261660e50dcaf3d23f02909e03d6abaa4a6c4efb340 -size 1317888 diff --git a/windows/lib/Release/ktxreader.lib b/windows/lib/Release/ktxreader.lib deleted file mode 100644 index 79afaf5f..00000000 --- a/windows/lib/Release/ktxreader.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:48b1e91383e118db2eab70d75e500fd2618df1038a105d539ffb47935f558de0 -size 274774 diff --git a/windows/lib/Release/math.lib b/windows/lib/Release/math.lib deleted file mode 100644 index a447b5ec..00000000 --- a/windows/lib/Release/math.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d9fa0e0f66f8b4a0fdb50a0852fcda64a501da6ed9e6a8b470aba877ec0da6ed -size 1106 diff --git a/windows/lib/Release/matlang.lib b/windows/lib/Release/matlang.lib deleted file mode 100644 index 0d833c6b..00000000 --- a/windows/lib/Release/matlang.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f6c7a58aa6d40eb62d1c218456f58eef03ce694e7ab66030c4b4d561635dda91 -size 4824458 diff --git a/windows/lib/Release/meshoptimizer.lib b/windows/lib/Release/meshoptimizer.lib deleted file mode 100644 index 8a1eed98..00000000 --- a/windows/lib/Release/meshoptimizer.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1847143bb36cfd986362e6a37c7f537d52bdd1469d1f7465bf222971c5b19c4d -size 508696 diff --git a/windows/lib/Release/mikktspace.lib b/windows/lib/Release/mikktspace.lib deleted file mode 100644 index ff71d68f..00000000 --- a/windows/lib/Release/mikktspace.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec905b6344e4515e6b87748529ea7ff7dda5e093ce719d3f81dd464da42a304c -size 116224 diff --git a/windows/lib/Release/opengl/backend.lib b/windows/lib/Release/opengl/backend.lib deleted file mode 100644 index abd98e18..00000000 --- a/windows/lib/Release/opengl/backend.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:db7c2105955776ca6a946dc28b02114e1b670a2272cded6d9ae575f9390cb3d0 -size 4430582 diff --git a/windows/lib/Release/opengl/backend.pdb b/windows/lib/Release/opengl/backend.pdb deleted file mode 100644 index 53030b90..00000000 --- a/windows/lib/Release/opengl/backend.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bf0190be5237c7cda21fb5b23462a4eca37149eb7d3ec27158a9692a7f4f7fe0 -size 2797568 diff --git a/windows/lib/Release/opengl/bluegl.lib b/windows/lib/Release/opengl/bluegl.lib deleted file mode 100644 index 7513bf07..00000000 --- a/windows/lib/Release/opengl/bluegl.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:af44e04c48df8675168d9d4976faa569868f25fc0995a7854947bd64db00f294 -size 1876560 diff --git a/windows/lib/Release/opengl/bluegl.pdb b/windows/lib/Release/opengl/bluegl.pdb deleted file mode 100644 index e75d061c..00000000 --- a/windows/lib/Release/opengl/bluegl.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a0549e15af4181cfba098f6f2efc168f77373fb3d51c5a0068953ed41280c3e3 -size 708608 diff --git a/windows/lib/Release/opengl/filament.lib b/windows/lib/Release/opengl/filament.lib deleted file mode 100644 index eba871a7..00000000 --- a/windows/lib/Release/opengl/filament.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:45ede612fb0dfe8a94c21818ab71947e1d3f5ebdfde086b4d5f6bd2520266c3d -size 27931534 diff --git a/windows/lib/Release/opengl/filament.pdb b/windows/lib/Release/opengl/filament.pdb deleted file mode 100644 index 0c24b9f3..00000000 --- a/windows/lib/Release/opengl/filament.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:26767b8aaac06dddbef4094cd55bcf4dc0477945a90a56ce1df21fcc6ca4f760 -size 8581120 diff --git a/windows/lib/Release/opengl/uberarchive.lib b/windows/lib/Release/opengl/uberarchive.lib deleted file mode 100644 index e6671190..00000000 --- a/windows/lib/Release/opengl/uberarchive.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3c40dbb6b83ba05cfb04426c1f20af992e5a446a9637325bca7b6237d70807af -size 61906 diff --git a/windows/lib/Release/opengl/uberarchive.pdb b/windows/lib/Release/opengl/uberarchive.pdb deleted file mode 100644 index 16ce4767..00000000 --- a/windows/lib/Release/opengl/uberarchive.pdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2cecdf0be05ee31b1768a21415d09910127d84a33e7f3379de8f3ff044153846 -size 69632 diff --git a/windows/lib/Release/png.lib b/windows/lib/Release/png.lib deleted file mode 100644 index b53150ff..00000000 --- a/windows/lib/Release/png.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:637aca1fffb12325d14068fab7166823fc2684b5295d4d3db745c1ba3861c567 -size 1678486 diff --git a/windows/lib/Release/shaders.lib b/windows/lib/Release/shaders.lib deleted file mode 100644 index 5baa8689..00000000 --- a/windows/lib/Release/shaders.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79d97bb70c2e4c6c9258ca2a9ce4e2c9519c0fad75ae3a973a379bb79fa90a91 -size 138816 diff --git a/windows/lib/Release/smol-v.lib b/windows/lib/Release/smol-v.lib deleted file mode 100644 index 0395f139..00000000 --- a/windows/lib/Release/smol-v.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:945d24b441d72ebfa26ad0f1dcfb8e2180b70aac379b9c61373bdfd161e20b61 -size 224852 diff --git a/windows/lib/Release/spirv-cross-core.lib b/windows/lib/Release/spirv-cross-core.lib deleted file mode 100644 index 47d09753..00000000 --- a/windows/lib/Release/spirv-cross-core.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a29687b1f89cfa5a422e5b09a102bdc00fd1b159e8388a67936eab6da2207d2 -size 5172314 diff --git a/windows/lib/Release/spirv-cross-glsl.lib b/windows/lib/Release/spirv-cross-glsl.lib deleted file mode 100644 index 0d623a29..00000000 --- a/windows/lib/Release/spirv-cross-glsl.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:efb7d5f48ace85bd24633bd933d118cdc42f1ed7d8d4ac8b334e6107d2cdcab9 -size 11637070 diff --git a/windows/lib/Release/spirv-cross-msl.lib b/windows/lib/Release/spirv-cross-msl.lib deleted file mode 100644 index 02fef739..00000000 --- a/windows/lib/Release/spirv-cross-msl.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:04025f36413735117440356b2646c25cc6b7b7f2841dd73f4908ec43b2077a0c -size 16271700 diff --git a/windows/lib/Release/stb.lib b/windows/lib/Release/stb.lib deleted file mode 100644 index 818c2668..00000000 --- a/windows/lib/Release/stb.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c6c6985624269fb7f0ef1ab1c5e458b5a0defcaafac8f4da4766c6577126c74e -size 359298 diff --git a/windows/lib/Release/tinyexr.lib b/windows/lib/Release/tinyexr.lib deleted file mode 100644 index 52aa8646..00000000 --- a/windows/lib/Release/tinyexr.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c6db4e392e1c7a4c39d5af7e5d0f4793d166c3e794aed2401d4f01823230dca9 -size 1301126 diff --git a/windows/lib/Release/uberzlib.lib b/windows/lib/Release/uberzlib.lib deleted file mode 100644 index 5060fcaa..00000000 --- a/windows/lib/Release/uberzlib.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:616466157038dd589701dcfbd3854f01f550f19d89cbf49be3ea9021373f06c8 -size 305890 diff --git a/windows/lib/Release/utils.lib b/windows/lib/Release/utils.lib deleted file mode 100644 index 756be068..00000000 --- a/windows/lib/Release/utils.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:63de17da0acf511ad84b3a8f4f70fd51b4e072e9b441aacc05ea9b061a62a546 -size 2401100 diff --git a/windows/lib/Release/z.lib b/windows/lib/Release/z.lib deleted file mode 100644 index 2706d56f..00000000 --- a/windows/lib/Release/z.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eeeca9fdf9fb908086994e519b69fda5ea7291102387cd6505209e8aec20525e -size 382124 diff --git a/windows/lib/Release/zstd.lib b/windows/lib/Release/zstd.lib deleted file mode 100644 index 97e82f30..00000000 --- a/windows/lib/Release/zstd.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9b21236701404fac55a1dea35c3849555efee42154bfe374dcd6fe67ced1bea4 -size 2358552

+ Quickstart (Flutter) • + Documentation • + Showcase • + Discord +