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,74 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNMapErrorCode.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 "RNMapErrorCode.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "RNMapErrorCode" and the the Kotlin enum "RNMapErrorCode".
|
|
19
|
+
*/
|
|
20
|
+
struct JRNMapErrorCode final: public jni::JavaClass<JRNMapErrorCode> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNMapErrorCode;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum RNMapErrorCode.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
RNMapErrorCode toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<RNMapErrorCode>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JRNMapErrorCode> fromCpp(RNMapErrorCode value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldPLAY_SERVICES_MISSING = clazz->getStaticField<JRNMapErrorCode>("PLAY_SERVICES_MISSING");
|
|
45
|
+
static const auto fieldPLAY_SERVICES_INVALID = clazz->getStaticField<JRNMapErrorCode>("PLAY_SERVICES_INVALID");
|
|
46
|
+
static const auto fieldPLAY_SERVICES_DISABLED = clazz->getStaticField<JRNMapErrorCode>("PLAY_SERVICES_DISABLED");
|
|
47
|
+
static const auto fieldPLAY_SERVICES_OUTDATED = clazz->getStaticField<JRNMapErrorCode>("PLAY_SERVICES_OUTDATED");
|
|
48
|
+
static const auto fieldPLAY_SERVICE_UPDATE_AVAILABLE = clazz->getStaticField<JRNMapErrorCode>("PLAY_SERVICE_UPDATE_AVAILABLE");
|
|
49
|
+
static const auto fieldPLAY_SERVICE_UPDATING = clazz->getStaticField<JRNMapErrorCode>("PLAY_SERVICE_UPDATING");
|
|
50
|
+
static const auto fieldUNKNOWN = clazz->getStaticField<JRNMapErrorCode>("UNKNOWN");
|
|
51
|
+
|
|
52
|
+
switch (value) {
|
|
53
|
+
case RNMapErrorCode::PLAY_SERVICES_MISSING:
|
|
54
|
+
return clazz->getStaticFieldValue(fieldPLAY_SERVICES_MISSING);
|
|
55
|
+
case RNMapErrorCode::PLAY_SERVICES_INVALID:
|
|
56
|
+
return clazz->getStaticFieldValue(fieldPLAY_SERVICES_INVALID);
|
|
57
|
+
case RNMapErrorCode::PLAY_SERVICES_DISABLED:
|
|
58
|
+
return clazz->getStaticFieldValue(fieldPLAY_SERVICES_DISABLED);
|
|
59
|
+
case RNMapErrorCode::PLAY_SERVICES_OUTDATED:
|
|
60
|
+
return clazz->getStaticFieldValue(fieldPLAY_SERVICES_OUTDATED);
|
|
61
|
+
case RNMapErrorCode::PLAY_SERVICE_UPDATE_AVAILABLE:
|
|
62
|
+
return clazz->getStaticFieldValue(fieldPLAY_SERVICE_UPDATE_AVAILABLE);
|
|
63
|
+
case RNMapErrorCode::PLAY_SERVICE_UPDATING:
|
|
64
|
+
return clazz->getStaticFieldValue(fieldPLAY_SERVICE_UPDATING);
|
|
65
|
+
case RNMapErrorCode::UNKNOWN:
|
|
66
|
+
return clazz->getStaticFieldValue(fieldUNKNOWN);
|
|
67
|
+
default:
|
|
68
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
69
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNMapPadding.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 "RNMapPadding.hpp"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "RNMapPadding" and the the Kotlin data class "RNMapPadding".
|
|
21
|
+
*/
|
|
22
|
+
struct JRNMapPadding final: public jni::JavaClass<JRNMapPadding> {
|
|
23
|
+
public:
|
|
24
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNMapPadding;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNMapPadding by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
RNMapPadding toCpp() const {
|
|
33
|
+
static const auto clazz = javaClassStatic();
|
|
34
|
+
static const auto fieldTop = clazz->getField<double>("top");
|
|
35
|
+
double top = this->getFieldValue(fieldTop);
|
|
36
|
+
static const auto fieldLeft = clazz->getField<double>("left");
|
|
37
|
+
double left = this->getFieldValue(fieldLeft);
|
|
38
|
+
static const auto fieldBottom = clazz->getField<double>("bottom");
|
|
39
|
+
double bottom = this->getFieldValue(fieldBottom);
|
|
40
|
+
static const auto fieldRight = clazz->getField<double>("right");
|
|
41
|
+
double right = this->getFieldValue(fieldRight);
|
|
42
|
+
return RNMapPadding(
|
|
43
|
+
top,
|
|
44
|
+
left,
|
|
45
|
+
bottom,
|
|
46
|
+
right
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
/**
|
|
52
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
53
|
+
*/
|
|
54
|
+
[[maybe_unused]]
|
|
55
|
+
static jni::local_ref<JRNMapPadding::javaobject> fromCpp(const RNMapPadding& value) {
|
|
56
|
+
return newInstance(
|
|
57
|
+
value.top,
|
|
58
|
+
value.left,
|
|
59
|
+
value.bottom,
|
|
60
|
+
value.right
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNMarker.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 "RNMarker.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRNLatLng.hpp"
|
|
14
|
+
#include "JRNPosition.hpp"
|
|
15
|
+
#include "RNLatLng.hpp"
|
|
16
|
+
#include "RNPosition.hpp"
|
|
17
|
+
#include <optional>
|
|
18
|
+
#include <string>
|
|
19
|
+
|
|
20
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
21
|
+
|
|
22
|
+
using namespace facebook;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The C++ JNI bridge between the C++ struct "RNMarker" and the the Kotlin data class "RNMarker".
|
|
26
|
+
*/
|
|
27
|
+
struct JRNMarker final: public jni::JavaClass<JRNMarker> {
|
|
28
|
+
public:
|
|
29
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNMarker;";
|
|
30
|
+
|
|
31
|
+
public:
|
|
32
|
+
/**
|
|
33
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNMarker by copying all values to C++.
|
|
34
|
+
*/
|
|
35
|
+
[[maybe_unused]]
|
|
36
|
+
[[nodiscard]]
|
|
37
|
+
RNMarker toCpp() const {
|
|
38
|
+
static const auto clazz = javaClassStatic();
|
|
39
|
+
static const auto fieldId = clazz->getField<jni::JString>("id");
|
|
40
|
+
jni::local_ref<jni::JString> id = this->getFieldValue(fieldId);
|
|
41
|
+
static const auto fieldZIndex = clazz->getField<double>("zIndex");
|
|
42
|
+
double zIndex = this->getFieldValue(fieldZIndex);
|
|
43
|
+
static const auto fieldCoordinate = clazz->getField<JRNLatLng>("coordinate");
|
|
44
|
+
jni::local_ref<JRNLatLng> coordinate = this->getFieldValue(fieldCoordinate);
|
|
45
|
+
static const auto fieldAnchor = clazz->getField<JRNPosition>("anchor");
|
|
46
|
+
jni::local_ref<JRNPosition> anchor = this->getFieldValue(fieldAnchor);
|
|
47
|
+
static const auto fieldWidth = clazz->getField<double>("width");
|
|
48
|
+
double width = this->getFieldValue(fieldWidth);
|
|
49
|
+
static const auto fieldHeight = clazz->getField<double>("height");
|
|
50
|
+
double height = this->getFieldValue(fieldHeight);
|
|
51
|
+
static const auto fieldIconSvg = clazz->getField<jni::JString>("iconSvg");
|
|
52
|
+
jni::local_ref<jni::JString> iconSvg = this->getFieldValue(fieldIconSvg);
|
|
53
|
+
return RNMarker(
|
|
54
|
+
id->toStdString(),
|
|
55
|
+
zIndex,
|
|
56
|
+
coordinate->toCpp(),
|
|
57
|
+
anchor != nullptr ? std::make_optional(anchor->toCpp()) : std::nullopt,
|
|
58
|
+
width,
|
|
59
|
+
height,
|
|
60
|
+
iconSvg->toStdString()
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
public:
|
|
65
|
+
/**
|
|
66
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
67
|
+
*/
|
|
68
|
+
[[maybe_unused]]
|
|
69
|
+
static jni::local_ref<JRNMarker::javaobject> fromCpp(const RNMarker& value) {
|
|
70
|
+
return newInstance(
|
|
71
|
+
jni::make_jstring(value.id),
|
|
72
|
+
value.zIndex,
|
|
73
|
+
JRNLatLng::fromCpp(value.coordinate),
|
|
74
|
+
value.anchor.has_value() ? JRNPosition::fromCpp(value.anchor.value()) : nullptr,
|
|
75
|
+
value.width,
|
|
76
|
+
value.height,
|
|
77
|
+
jni::make_jstring(value.iconSvg)
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNPolygon.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 "RNPolygon.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRNLatLng.hpp"
|
|
14
|
+
#include "RNLatLng.hpp"
|
|
15
|
+
#include <optional>
|
|
16
|
+
#include <string>
|
|
17
|
+
#include <vector>
|
|
18
|
+
|
|
19
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
20
|
+
|
|
21
|
+
using namespace facebook;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The C++ JNI bridge between the C++ struct "RNPolygon" and the the Kotlin data class "RNPolygon".
|
|
25
|
+
*/
|
|
26
|
+
struct JRNPolygon final: public jni::JavaClass<JRNPolygon> {
|
|
27
|
+
public:
|
|
28
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNPolygon;";
|
|
29
|
+
|
|
30
|
+
public:
|
|
31
|
+
/**
|
|
32
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNPolygon by copying all values to C++.
|
|
33
|
+
*/
|
|
34
|
+
[[maybe_unused]]
|
|
35
|
+
[[nodiscard]]
|
|
36
|
+
RNPolygon toCpp() const {
|
|
37
|
+
static const auto clazz = javaClassStatic();
|
|
38
|
+
static const auto fieldId = clazz->getField<jni::JString>("id");
|
|
39
|
+
jni::local_ref<jni::JString> id = this->getFieldValue(fieldId);
|
|
40
|
+
static const auto fieldZIndex = clazz->getField<double>("zIndex");
|
|
41
|
+
double zIndex = this->getFieldValue(fieldZIndex);
|
|
42
|
+
static const auto fieldCoordinates = clazz->getField<jni::JArrayClass<JRNLatLng>>("coordinates");
|
|
43
|
+
jni::local_ref<jni::JArrayClass<JRNLatLng>> coordinates = this->getFieldValue(fieldCoordinates);
|
|
44
|
+
static const auto fieldFillColor = clazz->getField<jni::JString>("fillColor");
|
|
45
|
+
jni::local_ref<jni::JString> fillColor = this->getFieldValue(fieldFillColor);
|
|
46
|
+
static const auto fieldStrokeColor = clazz->getField<jni::JString>("strokeColor");
|
|
47
|
+
jni::local_ref<jni::JString> strokeColor = this->getFieldValue(fieldStrokeColor);
|
|
48
|
+
static const auto fieldStrokeWidth = clazz->getField<jni::JDouble>("strokeWidth");
|
|
49
|
+
jni::local_ref<jni::JDouble> strokeWidth = this->getFieldValue(fieldStrokeWidth);
|
|
50
|
+
return RNPolygon(
|
|
51
|
+
id->toStdString(),
|
|
52
|
+
zIndex,
|
|
53
|
+
[&]() {
|
|
54
|
+
size_t __size = coordinates->size();
|
|
55
|
+
std::vector<RNLatLng> __vector;
|
|
56
|
+
__vector.reserve(__size);
|
|
57
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
58
|
+
auto __element = coordinates->getElement(__i);
|
|
59
|
+
__vector.push_back(__element->toCpp());
|
|
60
|
+
}
|
|
61
|
+
return __vector;
|
|
62
|
+
}(),
|
|
63
|
+
fillColor != nullptr ? std::make_optional(fillColor->toStdString()) : std::nullopt,
|
|
64
|
+
strokeColor != nullptr ? std::make_optional(strokeColor->toStdString()) : std::nullopt,
|
|
65
|
+
strokeWidth != nullptr ? std::make_optional(strokeWidth->value()) : std::nullopt
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public:
|
|
70
|
+
/**
|
|
71
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
72
|
+
*/
|
|
73
|
+
[[maybe_unused]]
|
|
74
|
+
static jni::local_ref<JRNPolygon::javaobject> fromCpp(const RNPolygon& value) {
|
|
75
|
+
return newInstance(
|
|
76
|
+
jni::make_jstring(value.id),
|
|
77
|
+
value.zIndex,
|
|
78
|
+
[&]() {
|
|
79
|
+
size_t __size = value.coordinates.size();
|
|
80
|
+
jni::local_ref<jni::JArrayClass<JRNLatLng>> __array = jni::JArrayClass<JRNLatLng>::newArray(__size);
|
|
81
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
82
|
+
const auto& __element = value.coordinates[__i];
|
|
83
|
+
__array->setElement(__i, *JRNLatLng::fromCpp(__element));
|
|
84
|
+
}
|
|
85
|
+
return __array;
|
|
86
|
+
}(),
|
|
87
|
+
value.fillColor.has_value() ? jni::make_jstring(value.fillColor.value()) : nullptr,
|
|
88
|
+
value.strokeColor.has_value() ? jni::make_jstring(value.strokeColor.value()) : nullptr,
|
|
89
|
+
value.strokeWidth.has_value() ? jni::JDouble::valueOf(value.strokeWidth.value()) : nullptr
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNPolyline.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 "RNPolyline.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRNLatLng.hpp"
|
|
14
|
+
#include "JRNLineCapType.hpp"
|
|
15
|
+
#include "JRNLineJoinType.hpp"
|
|
16
|
+
#include "RNLatLng.hpp"
|
|
17
|
+
#include "RNLineCapType.hpp"
|
|
18
|
+
#include "RNLineJoinType.hpp"
|
|
19
|
+
#include <optional>
|
|
20
|
+
#include <string>
|
|
21
|
+
#include <vector>
|
|
22
|
+
|
|
23
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
24
|
+
|
|
25
|
+
using namespace facebook;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The C++ JNI bridge between the C++ struct "RNPolyline" and the the Kotlin data class "RNPolyline".
|
|
29
|
+
*/
|
|
30
|
+
struct JRNPolyline final: public jni::JavaClass<JRNPolyline> {
|
|
31
|
+
public:
|
|
32
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNPolyline;";
|
|
33
|
+
|
|
34
|
+
public:
|
|
35
|
+
/**
|
|
36
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNPolyline by copying all values to C++.
|
|
37
|
+
*/
|
|
38
|
+
[[maybe_unused]]
|
|
39
|
+
[[nodiscard]]
|
|
40
|
+
RNPolyline toCpp() const {
|
|
41
|
+
static const auto clazz = javaClassStatic();
|
|
42
|
+
static const auto fieldId = clazz->getField<jni::JString>("id");
|
|
43
|
+
jni::local_ref<jni::JString> id = this->getFieldValue(fieldId);
|
|
44
|
+
static const auto fieldZIndex = clazz->getField<double>("zIndex");
|
|
45
|
+
double zIndex = this->getFieldValue(fieldZIndex);
|
|
46
|
+
static const auto fieldCoordinates = clazz->getField<jni::JArrayClass<JRNLatLng>>("coordinates");
|
|
47
|
+
jni::local_ref<jni::JArrayClass<JRNLatLng>> coordinates = this->getFieldValue(fieldCoordinates);
|
|
48
|
+
static const auto fieldLineCap = clazz->getField<JRNLineCapType>("lineCap");
|
|
49
|
+
jni::local_ref<JRNLineCapType> lineCap = this->getFieldValue(fieldLineCap);
|
|
50
|
+
static const auto fieldLineJoin = clazz->getField<JRNLineJoinType>("lineJoin");
|
|
51
|
+
jni::local_ref<JRNLineJoinType> lineJoin = this->getFieldValue(fieldLineJoin);
|
|
52
|
+
static const auto fieldColor = clazz->getField<jni::JString>("color");
|
|
53
|
+
jni::local_ref<jni::JString> color = this->getFieldValue(fieldColor);
|
|
54
|
+
static const auto fieldWidth = clazz->getField<jni::JDouble>("width");
|
|
55
|
+
jni::local_ref<jni::JDouble> width = this->getFieldValue(fieldWidth);
|
|
56
|
+
return RNPolyline(
|
|
57
|
+
id->toStdString(),
|
|
58
|
+
zIndex,
|
|
59
|
+
[&]() {
|
|
60
|
+
size_t __size = coordinates->size();
|
|
61
|
+
std::vector<RNLatLng> __vector;
|
|
62
|
+
__vector.reserve(__size);
|
|
63
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
64
|
+
auto __element = coordinates->getElement(__i);
|
|
65
|
+
__vector.push_back(__element->toCpp());
|
|
66
|
+
}
|
|
67
|
+
return __vector;
|
|
68
|
+
}(),
|
|
69
|
+
lineCap != nullptr ? std::make_optional(lineCap->toCpp()) : std::nullopt,
|
|
70
|
+
lineJoin != nullptr ? std::make_optional(lineJoin->toCpp()) : std::nullopt,
|
|
71
|
+
color != nullptr ? std::make_optional(color->toStdString()) : std::nullopt,
|
|
72
|
+
width != nullptr ? std::make_optional(width->value()) : std::nullopt
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public:
|
|
77
|
+
/**
|
|
78
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
79
|
+
*/
|
|
80
|
+
[[maybe_unused]]
|
|
81
|
+
static jni::local_ref<JRNPolyline::javaobject> fromCpp(const RNPolyline& value) {
|
|
82
|
+
return newInstance(
|
|
83
|
+
jni::make_jstring(value.id),
|
|
84
|
+
value.zIndex,
|
|
85
|
+
[&]() {
|
|
86
|
+
size_t __size = value.coordinates.size();
|
|
87
|
+
jni::local_ref<jni::JArrayClass<JRNLatLng>> __array = jni::JArrayClass<JRNLatLng>::newArray(__size);
|
|
88
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
89
|
+
const auto& __element = value.coordinates[__i];
|
|
90
|
+
__array->setElement(__i, *JRNLatLng::fromCpp(__element));
|
|
91
|
+
}
|
|
92
|
+
return __array;
|
|
93
|
+
}(),
|
|
94
|
+
value.lineCap.has_value() ? JRNLineCapType::fromCpp(value.lineCap.value()) : nullptr,
|
|
95
|
+
value.lineJoin.has_value() ? JRNLineJoinType::fromCpp(value.lineJoin.value()) : nullptr,
|
|
96
|
+
value.color.has_value() ? jni::make_jstring(value.color.value()) : nullptr,
|
|
97
|
+
value.width.has_value() ? jni::JDouble::valueOf(value.width.value()) : nullptr
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNPosition.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 "RNPosition.hpp"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "RNPosition" and the the Kotlin data class "RNPosition".
|
|
21
|
+
*/
|
|
22
|
+
struct JRNPosition final: public jni::JavaClass<JRNPosition> {
|
|
23
|
+
public:
|
|
24
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNPosition;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNPosition by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
RNPosition toCpp() const {
|
|
33
|
+
static const auto clazz = javaClassStatic();
|
|
34
|
+
static const auto fieldX = clazz->getField<double>("x");
|
|
35
|
+
double x = this->getFieldValue(fieldX);
|
|
36
|
+
static const auto fieldY = clazz->getField<double>("y");
|
|
37
|
+
double y = this->getFieldValue(fieldY);
|
|
38
|
+
return RNPosition(
|
|
39
|
+
x,
|
|
40
|
+
y
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public:
|
|
45
|
+
/**
|
|
46
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
47
|
+
*/
|
|
48
|
+
[[maybe_unused]]
|
|
49
|
+
static jni::local_ref<JRNPosition::javaobject> fromCpp(const RNPosition& value) {
|
|
50
|
+
return newInstance(
|
|
51
|
+
value.x,
|
|
52
|
+
value.y
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNRegion.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 "RNRegion.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRNLatLng.hpp"
|
|
14
|
+
#include "RNLatLng.hpp"
|
|
15
|
+
|
|
16
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
17
|
+
|
|
18
|
+
using namespace facebook;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The C++ JNI bridge between the C++ struct "RNRegion" and the the Kotlin data class "RNRegion".
|
|
22
|
+
*/
|
|
23
|
+
struct JRNRegion final: public jni::JavaClass<JRNRegion> {
|
|
24
|
+
public:
|
|
25
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNRegion;";
|
|
26
|
+
|
|
27
|
+
public:
|
|
28
|
+
/**
|
|
29
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNRegion by copying all values to C++.
|
|
30
|
+
*/
|
|
31
|
+
[[maybe_unused]]
|
|
32
|
+
[[nodiscard]]
|
|
33
|
+
RNRegion toCpp() const {
|
|
34
|
+
static const auto clazz = javaClassStatic();
|
|
35
|
+
static const auto fieldCenter = clazz->getField<JRNLatLng>("center");
|
|
36
|
+
jni::local_ref<JRNLatLng> center = this->getFieldValue(fieldCenter);
|
|
37
|
+
static const auto fieldLatitudeDelta = clazz->getField<double>("latitudeDelta");
|
|
38
|
+
double latitudeDelta = this->getFieldValue(fieldLatitudeDelta);
|
|
39
|
+
static const auto fieldLongitudeDelta = clazz->getField<double>("longitudeDelta");
|
|
40
|
+
double longitudeDelta = this->getFieldValue(fieldLongitudeDelta);
|
|
41
|
+
return RNRegion(
|
|
42
|
+
center->toCpp(),
|
|
43
|
+
latitudeDelta,
|
|
44
|
+
longitudeDelta
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public:
|
|
49
|
+
/**
|
|
50
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
51
|
+
*/
|
|
52
|
+
[[maybe_unused]]
|
|
53
|
+
static jni::local_ref<JRNRegion::javaobject> fromCpp(const RNRegion& value) {
|
|
54
|
+
return newInstance(
|
|
55
|
+
JRNLatLng::fromCpp(value.center),
|
|
56
|
+
value.latitudeDelta,
|
|
57
|
+
value.longitudeDelta
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNUserInterfaceStyle.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 "RNUserInterfaceStyle.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "RNUserInterfaceStyle" and the the Kotlin enum "RNUserInterfaceStyle".
|
|
19
|
+
*/
|
|
20
|
+
struct JRNUserInterfaceStyle final: public jni::JavaClass<JRNUserInterfaceStyle> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNUserInterfaceStyle;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum RNUserInterfaceStyle.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
RNUserInterfaceStyle toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<RNUserInterfaceStyle>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JRNUserInterfaceStyle> fromCpp(RNUserInterfaceStyle value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldLIGHT = clazz->getStaticField<JRNUserInterfaceStyle>("LIGHT");
|
|
45
|
+
static const auto fieldDARK = clazz->getStaticField<JRNUserInterfaceStyle>("DARK");
|
|
46
|
+
static const auto fieldDEFAULT = clazz->getStaticField<JRNUserInterfaceStyle>("DEFAULT");
|
|
47
|
+
|
|
48
|
+
switch (value) {
|
|
49
|
+
case RNUserInterfaceStyle::LIGHT:
|
|
50
|
+
return clazz->getStaticFieldValue(fieldLIGHT);
|
|
51
|
+
case RNUserInterfaceStyle::DARK:
|
|
52
|
+
return clazz->getStaticFieldValue(fieldDARK);
|
|
53
|
+
case RNUserInterfaceStyle::DEFAULT:
|
|
54
|
+
return clazz->getStaticFieldValue(fieldDEFAULT);
|
|
55
|
+
default:
|
|
56
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
57
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
} // namespace margelo::nitro::rngooglemapsplus
|