react-native-google-maps-plus 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{GoogleMapsNitro.podspec → RNGoogleMapsPlus.podspec} +2 -2
- package/android/CMakeLists.txt +3 -3
- package/android/build.gradle +4 -4
- package/android/gradle.properties +8 -8
- package/android/src/main/cpp/cpp-adapter.cpp +2 -2
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/Color.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro/GoogleMapsNitroViewImpl.kt → rngooglemapsplus/GoogleMapsViewImpl.kt} +7 -7
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/LocationHandler.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/MapMarker.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/MapPolygon.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/MapPolyline.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/PermissionHandler.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/PlayServicesHandler.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro/HybridGoogleMapsNitroModule.kt → rngooglemapsplus/RNGoogleMapsPlusModule.kt} +3 -3
- package/android/src/main/java/com/{googlemapsnitro/GoogleMapsNitroPackage.kt → rngooglemapsplus/RNGoogleMapsPlusPackage.kt} +6 -6
- package/android/src/main/java/com/{googlemapsnitro/HybridGoogleMapsNitroView.kt → rngooglemapsplus/RNGoogleMapsPlusView.kt} +4 -4
- package/ios/{GoogleMapNitroViewImpl.swift → GoogleMapViewImpl.swift} +1 -1
- package/ios/{HybridGoogleMapsNitroModule.swift → RNGoogleMapsPlusModule.swift} +1 -1
- package/ios/{HybridGoogleMapsNitroView.swift → RNGoogleMapsPlusView.swift} +3 -3
- package/lib/module/RNGoogleMapsPlusModule.nitro.js +4 -0
- package/lib/module/RNGoogleMapsPlusModule.nitro.js.map +1 -0
- package/lib/module/RNGoogleMapsPlusView.nitro.js +4 -0
- package/lib/module/RNGoogleMapsPlusView.nitro.js.map +1 -0
- package/lib/module/index.js +3 -3
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/{GoogleMapsNitroModule.nitro.d.ts → RNGoogleMapsPlusModule.nitro.d.ts} +2 -2
- package/lib/typescript/src/RNGoogleMapsPlusModule.nitro.d.ts.map +1 -0
- package/lib/typescript/src/{GoogleMapsNitroView.nitro.d.ts → RNGoogleMapsPlusView.nitro.d.ts} +4 -4
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -5
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +2 -2
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitro.json +11 -11
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/RNGoogleMapsPlus+autolinking.cmake +85 -0
- package/nitrogen/generated/android/RNGoogleMapsPlus+autolinking.gradle +27 -0
- package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +70 -0
- package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNLatLng.hpp +76 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNLocation.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNLocationErrorCode.hpp +76 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNMapErrorCode.hpp +76 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +81 -0
- package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +74 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +75 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusModuleSpec.cpp +83 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusModuleSpec.hpp +67 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +485 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +108 -0
- package/nitrogen/generated/android/c++/JRNAndroidLocationPermissionResult.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNCamera.hpp +67 -0
- package/nitrogen/generated/android/c++/JRNIOSPermissionResult.hpp +59 -0
- package/nitrogen/generated/android/c++/JRNLatLng.hpp +57 -0
- package/nitrogen/generated/android/c++/JRNLineCapType.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNLineJoinType.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNLocation.hpp +58 -0
- package/nitrogen/generated/android/c++/JRNLocationErrorCode.hpp +71 -0
- package/nitrogen/generated/android/c++/JRNLocationPermissionResult.hpp +61 -0
- package/nitrogen/generated/android/c++/JRNMapErrorCode.hpp +74 -0
- package/nitrogen/generated/android/c++/JRNMapPadding.hpp +65 -0
- package/nitrogen/generated/android/c++/JRNMarker.hpp +82 -0
- package/nitrogen/generated/android/c++/JRNPolygon.hpp +94 -0
- package/nitrogen/generated/android/c++/JRNPolyline.hpp +102 -0
- package/nitrogen/generated/android/c++/JRNPosition.hpp +57 -0
- package/nitrogen/generated/android/c++/JRNRegion.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNUserInterfaceStyle.hpp +62 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +132 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNLatLng.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNLocation.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNLocationErrorCode.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNMapErrorCode.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNRegion_RNCamera_bool.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_bool.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_std__string.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusModuleSpec.kt +64 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +263 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNAndroidLocationPermissionResult.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCamera.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNGoogleMapsPlusOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIOSPermissionResult.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLng.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLineCapType.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLineJoinType.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocation.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationErrorCode.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationPermissionResult.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapErrorCode.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapPadding.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygon.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolyline.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPosition.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNRegion.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNUserInterfaceStyle.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewStateUpdater.kt +23 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus+autolinking.rb +60 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +121 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +649 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +104 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlusAutolinking.mm +41 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlusAutolinking.swift +40 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusModuleSpecSwift.hpp +102 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +294 -0
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +191 -0
- package/nitrogen/generated/ios/swift/Func_void_RNLatLng.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNLocation.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNLocationErrorCode.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNLocationPermissionResult.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNMapErrorCode.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNRegion_RNCamera_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusModuleSpec.swift +52 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusModuleSpec_cxx.swift +164 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +73 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +630 -0
- package/nitrogen/generated/ios/swift/RNAndroidLocationPermissionResult.swift +44 -0
- package/nitrogen/generated/ios/swift/RNCamera.swift +123 -0
- package/nitrogen/generated/ios/swift/RNIOSPermissionResult.swift +40 -0
- package/nitrogen/generated/ios/swift/RNLatLng.swift +46 -0
- package/nitrogen/generated/ios/swift/RNLineCapType.swift +44 -0
- package/nitrogen/generated/ios/swift/RNLineJoinType.swift +44 -0
- package/nitrogen/generated/ios/swift/RNLocation.swift +46 -0
- package/nitrogen/generated/ios/swift/RNLocationErrorCode.swift +56 -0
- package/nitrogen/generated/ios/swift/RNLocationPermissionResult.swift +70 -0
- package/nitrogen/generated/ios/swift/RNMapErrorCode.swift +60 -0
- package/nitrogen/generated/ios/swift/RNMapPadding.swift +68 -0
- package/nitrogen/generated/ios/swift/RNMarker.swift +120 -0
- package/nitrogen/generated/ios/swift/RNPolygon.swift +152 -0
- package/nitrogen/generated/ios/swift/RNPolyline.swift +168 -0
- package/nitrogen/generated/ios/swift/RNPosition.swift +46 -0
- package/nitrogen/generated/ios/swift/RNRegion.swift +57 -0
- package/nitrogen/generated/ios/swift/RNUserInterfaceStyle.swift +44 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusModuleSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusModuleSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +66 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +145 -0
- package/nitrogen/generated/shared/c++/RNAndroidLocationPermissionResult.hpp +67 -0
- package/nitrogen/generated/shared/c++/RNCamera.hpp +81 -0
- package/nitrogen/generated/shared/c++/RNIOSPermissionResult.hpp +65 -0
- package/nitrogen/generated/shared/c++/RNLatLng.hpp +71 -0
- package/nitrogen/generated/shared/c++/RNLineCapType.hpp +80 -0
- package/nitrogen/generated/shared/c++/RNLineJoinType.hpp +80 -0
- package/nitrogen/generated/shared/c++/RNLocation.hpp +72 -0
- package/nitrogen/generated/shared/c++/RNLocationErrorCode.hpp +73 -0
- package/nitrogen/generated/shared/c++/RNLocationPermissionResult.hpp +76 -0
- package/nitrogen/generated/shared/c++/RNMapErrorCode.hpp +67 -0
- package/nitrogen/generated/shared/c++/RNMapPadding.hpp +79 -0
- package/nitrogen/generated/shared/c++/RNMarker.hpp +97 -0
- package/nitrogen/generated/shared/c++/RNPolygon.hpp +91 -0
- package/nitrogen/generated/shared/c++/RNPolyline.hpp +101 -0
- package/nitrogen/generated/shared/c++/RNPosition.hpp +71 -0
- package/nitrogen/generated/shared/c++/RNRegion.hpp +76 -0
- package/nitrogen/generated/shared/c++/RNUserInterfaceStyle.hpp +80 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +315 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +139 -0
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +29 -0
- package/package.json +9 -3
- package/src/{GoogleMapsNitroModule.nitro.ts → RNGoogleMapsPlusModule.nitro.ts} +1 -1
- package/src/{GoogleMapsNitroView.nitro.ts → RNGoogleMapsPlusView.nitro.ts} +5 -5
- package/src/index.tsx +11 -11
- package/src/types.ts +2 -2
- package/lib/module/GoogleMapsNitroModule.nitro.js +0 -4
- package/lib/module/GoogleMapsNitroModule.nitro.js.map +0 -1
- package/lib/module/GoogleMapsNitroView.nitro.js +0 -4
- package/lib/module/GoogleMapsNitroView.nitro.js.map +0 -1
- package/lib/typescript/src/GoogleMapsNitroModule.nitro.d.ts.map +0 -1
- package/lib/typescript/src/GoogleMapsNitroView.nitro.d.ts.map +0 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNGoogleMapsPlusOnLoad.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#ifndef BUILDING_RNGOOGLEMAPSPLUS_WITH_GENERATED_CMAKE_PROJECT
|
|
9
|
+
#error RNGoogleMapsPlusOnLoad.cpp is not being built with the autogenerated CMakeLists.txt project. Is a different CMakeLists.txt building this?
|
|
10
|
+
#endif
|
|
11
|
+
|
|
12
|
+
#include "RNGoogleMapsPlusOnLoad.hpp"
|
|
13
|
+
|
|
14
|
+
#include <jni.h>
|
|
15
|
+
#include <fbjni/fbjni.h>
|
|
16
|
+
#include <NitroModules/HybridObjectRegistry.hpp>
|
|
17
|
+
|
|
18
|
+
#include "JHybridRNGoogleMapsPlusModuleSpec.hpp"
|
|
19
|
+
#include "JHybridRNGoogleMapsPlusViewSpec.hpp"
|
|
20
|
+
#include "JFunc_void_RNMapErrorCode.hpp"
|
|
21
|
+
#include "JFunc_void_bool.hpp"
|
|
22
|
+
#include "JFunc_void_RNLocation.hpp"
|
|
23
|
+
#include "JFunc_void_RNLocationErrorCode.hpp"
|
|
24
|
+
#include "JFunc_void_RNLatLng.hpp"
|
|
25
|
+
#include "JFunc_void_std__string.hpp"
|
|
26
|
+
#include "JFunc_void_RNRegion_RNCamera_bool.hpp"
|
|
27
|
+
#include "views/JHybridRNGoogleMapsPlusViewStateUpdater.hpp"
|
|
28
|
+
#include <NitroModules/DefaultConstructableObject.hpp>
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
31
|
+
|
|
32
|
+
int initialize(JavaVM* vm) {
|
|
33
|
+
using namespace margelo::nitro;
|
|
34
|
+
using namespace margelo::nitro::rngooglemapsplus;
|
|
35
|
+
using namespace facebook;
|
|
36
|
+
|
|
37
|
+
return facebook::jni::initialize(vm, [] {
|
|
38
|
+
// Register native JNI methods
|
|
39
|
+
margelo::nitro::rngooglemapsplus::JHybridRNGoogleMapsPlusModuleSpec::registerNatives();
|
|
40
|
+
margelo::nitro::rngooglemapsplus::JHybridRNGoogleMapsPlusViewSpec::registerNatives();
|
|
41
|
+
margelo::nitro::rngooglemapsplus::JFunc_void_RNMapErrorCode_cxx::registerNatives();
|
|
42
|
+
margelo::nitro::rngooglemapsplus::JFunc_void_bool_cxx::registerNatives();
|
|
43
|
+
margelo::nitro::rngooglemapsplus::JFunc_void_RNLocation_cxx::registerNatives();
|
|
44
|
+
margelo::nitro::rngooglemapsplus::JFunc_void_RNLocationErrorCode_cxx::registerNatives();
|
|
45
|
+
margelo::nitro::rngooglemapsplus::JFunc_void_RNLatLng_cxx::registerNatives();
|
|
46
|
+
margelo::nitro::rngooglemapsplus::JFunc_void_std__string_cxx::registerNatives();
|
|
47
|
+
margelo::nitro::rngooglemapsplus::JFunc_void_RNRegion_RNCamera_bool_cxx::registerNatives();
|
|
48
|
+
margelo::nitro::rngooglemapsplus::views::JHybridRNGoogleMapsPlusViewStateUpdater::registerNatives();
|
|
49
|
+
|
|
50
|
+
// Register Nitro Hybrid Objects
|
|
51
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
52
|
+
"RNGoogleMapsPlusView",
|
|
53
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
54
|
+
static DefaultConstructableObject<JHybridRNGoogleMapsPlusViewSpec::javaobject> object("com/rngooglemapsplus/RNGoogleMapsPlusView");
|
|
55
|
+
auto instance = object.create();
|
|
56
|
+
return instance->cthis()->shared();
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
60
|
+
"RNGoogleMapsPlusModule",
|
|
61
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
62
|
+
static DefaultConstructableObject<JHybridRNGoogleMapsPlusModuleSpec::javaobject> object("com/rngooglemapsplus/RNGoogleMapsPlusModule");
|
|
63
|
+
auto instance = object.create();
|
|
64
|
+
return instance->cthis()->shared();
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNGoogleMapsPlusOnLoad.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include <jni.h>
|
|
9
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
10
|
+
|
|
11
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Initializes the native (C++) part of RNGoogleMapsPlus, and autolinks all Hybrid Objects.
|
|
15
|
+
* Call this in your `JNI_OnLoad` function (probably inside `cpp-adapter.cpp`).
|
|
16
|
+
* Example:
|
|
17
|
+
* ```cpp (cpp-adapter.cpp)
|
|
18
|
+
* JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
|
|
19
|
+
* return margelo::nitro::rngooglemapsplus::initialize(vm);
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
int initialize(JavaVM* vm);
|
|
24
|
+
|
|
25
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_RNLatLng.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "RNLatLng.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include "JRNLatLng.hpp"
|
|
16
|
+
|
|
17
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
18
|
+
|
|
19
|
+
using namespace facebook;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Represents the Java/Kotlin callback `(coordinate: RNLatLng) -> Unit`.
|
|
23
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
24
|
+
*/
|
|
25
|
+
struct JFunc_void_RNLatLng: public jni::JavaClass<JFunc_void_RNLatLng> {
|
|
26
|
+
public:
|
|
27
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNLatLng;";
|
|
28
|
+
|
|
29
|
+
public:
|
|
30
|
+
/**
|
|
31
|
+
* Invokes the function this `JFunc_void_RNLatLng` instance holds through JNI.
|
|
32
|
+
*/
|
|
33
|
+
void invoke(const RNLatLng& coordinate) const {
|
|
34
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNLatLng> /* coordinate */)>("invoke");
|
|
35
|
+
method(self(), JRNLatLng::fromCpp(coordinate));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* An implementation of Func_void_RNLatLng that is backed by a C++ implementation (using `std::function<...>`)
|
|
41
|
+
*/
|
|
42
|
+
struct JFunc_void_RNLatLng_cxx final: public jni::HybridClass<JFunc_void_RNLatLng_cxx, JFunc_void_RNLatLng> {
|
|
43
|
+
public:
|
|
44
|
+
static jni::local_ref<JFunc_void_RNLatLng::javaobject> fromCpp(const std::function<void(const RNLatLng& /* coordinate */)>& func) {
|
|
45
|
+
return JFunc_void_RNLatLng_cxx::newObjectCxxArgs(func);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public:
|
|
49
|
+
/**
|
|
50
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_RNLatLng_cxx` instance holds.
|
|
51
|
+
*/
|
|
52
|
+
void invoke_cxx(jni::alias_ref<JRNLatLng> coordinate) {
|
|
53
|
+
_func(coordinate->toCpp());
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public:
|
|
57
|
+
[[nodiscard]]
|
|
58
|
+
inline const std::function<void(const RNLatLng& /* coordinate */)>& getFunction() const {
|
|
59
|
+
return _func;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
public:
|
|
63
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNLatLng_cxx;";
|
|
64
|
+
static void registerNatives() {
|
|
65
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_RNLatLng_cxx::invoke_cxx)});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private:
|
|
69
|
+
explicit JFunc_void_RNLatLng_cxx(const std::function<void(const RNLatLng& /* coordinate */)>& func): _func(func) { }
|
|
70
|
+
|
|
71
|
+
private:
|
|
72
|
+
friend HybridBase;
|
|
73
|
+
std::function<void(const RNLatLng& /* coordinate */)> _func;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_RNLocation.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "RNLocation.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include "JRNLocation.hpp"
|
|
16
|
+
#include "RNLatLng.hpp"
|
|
17
|
+
#include "JRNLatLng.hpp"
|
|
18
|
+
|
|
19
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
20
|
+
|
|
21
|
+
using namespace facebook;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Represents the Java/Kotlin callback `(location: RNLocation) -> Unit`.
|
|
25
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
26
|
+
*/
|
|
27
|
+
struct JFunc_void_RNLocation: public jni::JavaClass<JFunc_void_RNLocation> {
|
|
28
|
+
public:
|
|
29
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNLocation;";
|
|
30
|
+
|
|
31
|
+
public:
|
|
32
|
+
/**
|
|
33
|
+
* Invokes the function this `JFunc_void_RNLocation` instance holds through JNI.
|
|
34
|
+
*/
|
|
35
|
+
void invoke(const RNLocation& location) const {
|
|
36
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNLocation> /* location */)>("invoke");
|
|
37
|
+
method(self(), JRNLocation::fromCpp(location));
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* An implementation of Func_void_RNLocation that is backed by a C++ implementation (using `std::function<...>`)
|
|
43
|
+
*/
|
|
44
|
+
struct JFunc_void_RNLocation_cxx final: public jni::HybridClass<JFunc_void_RNLocation_cxx, JFunc_void_RNLocation> {
|
|
45
|
+
public:
|
|
46
|
+
static jni::local_ref<JFunc_void_RNLocation::javaobject> fromCpp(const std::function<void(const RNLocation& /* location */)>& func) {
|
|
47
|
+
return JFunc_void_RNLocation_cxx::newObjectCxxArgs(func);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
/**
|
|
52
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_RNLocation_cxx` instance holds.
|
|
53
|
+
*/
|
|
54
|
+
void invoke_cxx(jni::alias_ref<JRNLocation> location) {
|
|
55
|
+
_func(location->toCpp());
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
[[nodiscard]]
|
|
60
|
+
inline const std::function<void(const RNLocation& /* location */)>& getFunction() const {
|
|
61
|
+
return _func;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
public:
|
|
65
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNLocation_cxx;";
|
|
66
|
+
static void registerNatives() {
|
|
67
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_RNLocation_cxx::invoke_cxx)});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private:
|
|
71
|
+
explicit JFunc_void_RNLocation_cxx(const std::function<void(const RNLocation& /* location */)>& func): _func(func) { }
|
|
72
|
+
|
|
73
|
+
private:
|
|
74
|
+
friend HybridBase;
|
|
75
|
+
std::function<void(const RNLocation& /* location */)> _func;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_RNLocationErrorCode.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "RNLocationErrorCode.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include "JRNLocationErrorCode.hpp"
|
|
16
|
+
|
|
17
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
18
|
+
|
|
19
|
+
using namespace facebook;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Represents the Java/Kotlin callback `(error: RNLocationErrorCode) -> Unit`.
|
|
23
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
24
|
+
*/
|
|
25
|
+
struct JFunc_void_RNLocationErrorCode: public jni::JavaClass<JFunc_void_RNLocationErrorCode> {
|
|
26
|
+
public:
|
|
27
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNLocationErrorCode;";
|
|
28
|
+
|
|
29
|
+
public:
|
|
30
|
+
/**
|
|
31
|
+
* Invokes the function this `JFunc_void_RNLocationErrorCode` instance holds through JNI.
|
|
32
|
+
*/
|
|
33
|
+
void invoke(RNLocationErrorCode error) const {
|
|
34
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNLocationErrorCode> /* error */)>("invoke");
|
|
35
|
+
method(self(), JRNLocationErrorCode::fromCpp(error));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* An implementation of Func_void_RNLocationErrorCode that is backed by a C++ implementation (using `std::function<...>`)
|
|
41
|
+
*/
|
|
42
|
+
struct JFunc_void_RNLocationErrorCode_cxx final: public jni::HybridClass<JFunc_void_RNLocationErrorCode_cxx, JFunc_void_RNLocationErrorCode> {
|
|
43
|
+
public:
|
|
44
|
+
static jni::local_ref<JFunc_void_RNLocationErrorCode::javaobject> fromCpp(const std::function<void(RNLocationErrorCode /* error */)>& func) {
|
|
45
|
+
return JFunc_void_RNLocationErrorCode_cxx::newObjectCxxArgs(func);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public:
|
|
49
|
+
/**
|
|
50
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_RNLocationErrorCode_cxx` instance holds.
|
|
51
|
+
*/
|
|
52
|
+
void invoke_cxx(jni::alias_ref<JRNLocationErrorCode> error) {
|
|
53
|
+
_func(error->toCpp());
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public:
|
|
57
|
+
[[nodiscard]]
|
|
58
|
+
inline const std::function<void(RNLocationErrorCode /* error */)>& getFunction() const {
|
|
59
|
+
return _func;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
public:
|
|
63
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNLocationErrorCode_cxx;";
|
|
64
|
+
static void registerNatives() {
|
|
65
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_RNLocationErrorCode_cxx::invoke_cxx)});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private:
|
|
69
|
+
explicit JFunc_void_RNLocationErrorCode_cxx(const std::function<void(RNLocationErrorCode /* error */)>& func): _func(func) { }
|
|
70
|
+
|
|
71
|
+
private:
|
|
72
|
+
friend HybridBase;
|
|
73
|
+
std::function<void(RNLocationErrorCode /* error */)> _func;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_RNMapErrorCode.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "RNMapErrorCode.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include "JRNMapErrorCode.hpp"
|
|
16
|
+
|
|
17
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
18
|
+
|
|
19
|
+
using namespace facebook;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Represents the Java/Kotlin callback `(error: RNMapErrorCode) -> Unit`.
|
|
23
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
24
|
+
*/
|
|
25
|
+
struct JFunc_void_RNMapErrorCode: public jni::JavaClass<JFunc_void_RNMapErrorCode> {
|
|
26
|
+
public:
|
|
27
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNMapErrorCode;";
|
|
28
|
+
|
|
29
|
+
public:
|
|
30
|
+
/**
|
|
31
|
+
* Invokes the function this `JFunc_void_RNMapErrorCode` instance holds through JNI.
|
|
32
|
+
*/
|
|
33
|
+
void invoke(RNMapErrorCode error) const {
|
|
34
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNMapErrorCode> /* error */)>("invoke");
|
|
35
|
+
method(self(), JRNMapErrorCode::fromCpp(error));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* An implementation of Func_void_RNMapErrorCode that is backed by a C++ implementation (using `std::function<...>`)
|
|
41
|
+
*/
|
|
42
|
+
struct JFunc_void_RNMapErrorCode_cxx final: public jni::HybridClass<JFunc_void_RNMapErrorCode_cxx, JFunc_void_RNMapErrorCode> {
|
|
43
|
+
public:
|
|
44
|
+
static jni::local_ref<JFunc_void_RNMapErrorCode::javaobject> fromCpp(const std::function<void(RNMapErrorCode /* error */)>& func) {
|
|
45
|
+
return JFunc_void_RNMapErrorCode_cxx::newObjectCxxArgs(func);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public:
|
|
49
|
+
/**
|
|
50
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_RNMapErrorCode_cxx` instance holds.
|
|
51
|
+
*/
|
|
52
|
+
void invoke_cxx(jni::alias_ref<JRNMapErrorCode> error) {
|
|
53
|
+
_func(error->toCpp());
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public:
|
|
57
|
+
[[nodiscard]]
|
|
58
|
+
inline const std::function<void(RNMapErrorCode /* error */)>& getFunction() const {
|
|
59
|
+
return _func;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
public:
|
|
63
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNMapErrorCode_cxx;";
|
|
64
|
+
static void registerNatives() {
|
|
65
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_RNMapErrorCode_cxx::invoke_cxx)});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private:
|
|
69
|
+
explicit JFunc_void_RNMapErrorCode_cxx(const std::function<void(RNMapErrorCode /* error */)>& func): _func(func) { }
|
|
70
|
+
|
|
71
|
+
private:
|
|
72
|
+
friend HybridBase;
|
|
73
|
+
std::function<void(RNMapErrorCode /* error */)> _func;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_RNRegion_RNCamera_bool.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "RNRegion.hpp"
|
|
14
|
+
#include "RNCamera.hpp"
|
|
15
|
+
#include <functional>
|
|
16
|
+
#include "JRNRegion.hpp"
|
|
17
|
+
#include "RNLatLng.hpp"
|
|
18
|
+
#include "JRNLatLng.hpp"
|
|
19
|
+
#include "JRNCamera.hpp"
|
|
20
|
+
#include <optional>
|
|
21
|
+
|
|
22
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
23
|
+
|
|
24
|
+
using namespace facebook;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Represents the Java/Kotlin callback `(region: RNRegion, camera: RNCamera, isGesture: Boolean) -> Unit`.
|
|
28
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
29
|
+
*/
|
|
30
|
+
struct JFunc_void_RNRegion_RNCamera_bool: public jni::JavaClass<JFunc_void_RNRegion_RNCamera_bool> {
|
|
31
|
+
public:
|
|
32
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNRegion_RNCamera_bool;";
|
|
33
|
+
|
|
34
|
+
public:
|
|
35
|
+
/**
|
|
36
|
+
* Invokes the function this `JFunc_void_RNRegion_RNCamera_bool` instance holds through JNI.
|
|
37
|
+
*/
|
|
38
|
+
void invoke(const RNRegion& region, const RNCamera& camera, bool isGesture) const {
|
|
39
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNRegion> /* region */, jni::alias_ref<JRNCamera> /* camera */, jboolean /* isGesture */)>("invoke");
|
|
40
|
+
method(self(), JRNRegion::fromCpp(region), JRNCamera::fromCpp(camera), isGesture);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* An implementation of Func_void_RNRegion_RNCamera_bool that is backed by a C++ implementation (using `std::function<...>`)
|
|
46
|
+
*/
|
|
47
|
+
struct JFunc_void_RNRegion_RNCamera_bool_cxx final: public jni::HybridClass<JFunc_void_RNRegion_RNCamera_bool_cxx, JFunc_void_RNRegion_RNCamera_bool> {
|
|
48
|
+
public:
|
|
49
|
+
static jni::local_ref<JFunc_void_RNRegion_RNCamera_bool::javaobject> fromCpp(const std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>& func) {
|
|
50
|
+
return JFunc_void_RNRegion_RNCamera_bool_cxx::newObjectCxxArgs(func);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
public:
|
|
54
|
+
/**
|
|
55
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_RNRegion_RNCamera_bool_cxx` instance holds.
|
|
56
|
+
*/
|
|
57
|
+
void invoke_cxx(jni::alias_ref<JRNRegion> region, jni::alias_ref<JRNCamera> camera, jboolean isGesture) {
|
|
58
|
+
_func(region->toCpp(), camera->toCpp(), static_cast<bool>(isGesture));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public:
|
|
62
|
+
[[nodiscard]]
|
|
63
|
+
inline const std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>& getFunction() const {
|
|
64
|
+
return _func;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public:
|
|
68
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNRegion_RNCamera_bool_cxx;";
|
|
69
|
+
static void registerNatives() {
|
|
70
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_RNRegion_RNCamera_bool_cxx::invoke_cxx)});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
private:
|
|
74
|
+
explicit JFunc_void_RNRegion_RNCamera_bool_cxx(const std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>& func): _func(func) { }
|
|
75
|
+
|
|
76
|
+
private:
|
|
77
|
+
friend HybridBase;
|
|
78
|
+
std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)> _func;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_bool.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include <functional>
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Represents the Java/Kotlin callback `(ready: Boolean) -> Unit`.
|
|
21
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
22
|
+
*/
|
|
23
|
+
struct JFunc_void_bool: public jni::JavaClass<JFunc_void_bool> {
|
|
24
|
+
public:
|
|
25
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_bool;";
|
|
26
|
+
|
|
27
|
+
public:
|
|
28
|
+
/**
|
|
29
|
+
* Invokes the function this `JFunc_void_bool` instance holds through JNI.
|
|
30
|
+
*/
|
|
31
|
+
void invoke(bool ready) const {
|
|
32
|
+
static const auto method = javaClassStatic()->getMethod<void(jboolean /* ready */)>("invoke");
|
|
33
|
+
method(self(), ready);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* An implementation of Func_void_bool that is backed by a C++ implementation (using `std::function<...>`)
|
|
39
|
+
*/
|
|
40
|
+
struct JFunc_void_bool_cxx final: public jni::HybridClass<JFunc_void_bool_cxx, JFunc_void_bool> {
|
|
41
|
+
public:
|
|
42
|
+
static jni::local_ref<JFunc_void_bool::javaobject> fromCpp(const std::function<void(bool /* ready */)>& func) {
|
|
43
|
+
return JFunc_void_bool_cxx::newObjectCxxArgs(func);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public:
|
|
47
|
+
/**
|
|
48
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_bool_cxx` instance holds.
|
|
49
|
+
*/
|
|
50
|
+
void invoke_cxx(jboolean ready) {
|
|
51
|
+
_func(static_cast<bool>(ready));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public:
|
|
55
|
+
[[nodiscard]]
|
|
56
|
+
inline const std::function<void(bool /* ready */)>& getFunction() const {
|
|
57
|
+
return _func;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
public:
|
|
61
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_bool_cxx;";
|
|
62
|
+
static void registerNatives() {
|
|
63
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_bool_cxx::invoke_cxx)});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
private:
|
|
67
|
+
explicit JFunc_void_bool_cxx(const std::function<void(bool /* ready */)>& func): _func(func) { }
|
|
68
|
+
|
|
69
|
+
private:
|
|
70
|
+
friend HybridBase;
|
|
71
|
+
std::function<void(bool /* ready */)> _func;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_std__string.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include <string>
|
|
14
|
+
#include <functional>
|
|
15
|
+
|
|
16
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
17
|
+
|
|
18
|
+
using namespace facebook;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Represents the Java/Kotlin callback `(id: String) -> Unit`.
|
|
22
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
23
|
+
*/
|
|
24
|
+
struct JFunc_void_std__string: public jni::JavaClass<JFunc_void_std__string> {
|
|
25
|
+
public:
|
|
26
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_std__string;";
|
|
27
|
+
|
|
28
|
+
public:
|
|
29
|
+
/**
|
|
30
|
+
* Invokes the function this `JFunc_void_std__string` instance holds through JNI.
|
|
31
|
+
*/
|
|
32
|
+
void invoke(const std::string& id) const {
|
|
33
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* id */)>("invoke");
|
|
34
|
+
method(self(), jni::make_jstring(id));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* An implementation of Func_void_std__string that is backed by a C++ implementation (using `std::function<...>`)
|
|
40
|
+
*/
|
|
41
|
+
struct JFunc_void_std__string_cxx final: public jni::HybridClass<JFunc_void_std__string_cxx, JFunc_void_std__string> {
|
|
42
|
+
public:
|
|
43
|
+
static jni::local_ref<JFunc_void_std__string::javaobject> fromCpp(const std::function<void(const std::string& /* id */)>& func) {
|
|
44
|
+
return JFunc_void_std__string_cxx::newObjectCxxArgs(func);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public:
|
|
48
|
+
/**
|
|
49
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_std__string_cxx` instance holds.
|
|
50
|
+
*/
|
|
51
|
+
void invoke_cxx(jni::alias_ref<jni::JString> id) {
|
|
52
|
+
_func(id->toStdString());
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
[[nodiscard]]
|
|
57
|
+
inline const std::function<void(const std::string& /* id */)>& getFunction() const {
|
|
58
|
+
return _func;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public:
|
|
62
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_std__string_cxx;";
|
|
63
|
+
static void registerNatives() {
|
|
64
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_std__string_cxx::invoke_cxx)});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
private:
|
|
68
|
+
explicit JFunc_void_std__string_cxx(const std::function<void(const std::string& /* id */)>& func): _func(func) { }
|
|
69
|
+
|
|
70
|
+
private:
|
|
71
|
+
friend HybridBase;
|
|
72
|
+
std::function<void(const std::string& /* id */)> _func;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
} // namespace margelo::nitro::rngooglemapsplus
|