@iternio/react-native-auto-play 0.1.1 → 0.1.3

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.
Files changed (140) hide show
  1. package/ios/hybrid/HybridAutoPlay.swift +3 -5
  2. package/ios/scenes/AutoPlayScene.swift +13 -1
  3. package/nitrogen/generated/android/c++/JFunc_void.hpp +2 -1
  4. package/nitrogen/generated/android/c++/JFunc_void_AlertDismissalReason.hpp +2 -1
  5. package/nitrogen/generated/android/c++/JFunc_void_ColorScheme.hpp +2 -1
  6. package/nitrogen/generated/android/c++/JFunc_void_Point.hpp +2 -1
  7. package/nitrogen/generated/android/c++/JFunc_void_Point_double.hpp +2 -1
  8. package/nitrogen/generated/android/c++/JFunc_void_Point_std__optional_Point_.hpp +2 -1
  9. package/nitrogen/generated/android/c++/JFunc_void_SafeAreaInsets.hpp +2 -1
  10. package/nitrogen/generated/android/c++/JFunc_void_VisibilityState.hpp +2 -1
  11. package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +2 -1
  12. package/nitrogen/generated/android/c++/JFunc_void_std__optional_Location__std__optional_std__string_.hpp +2 -1
  13. package/nitrogen/generated/android/c++/JFunc_void_std__optional_Telemetry__std__optional_std__string_.hpp +2 -1
  14. package/nitrogen/generated/android/c++/JFunc_void_std__optional_bool_.hpp +2 -1
  15. package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +2 -1
  16. package/nitrogen/generated/android/c++/JFunc_void_std__string_ColorScheme.hpp +2 -1
  17. package/nitrogen/generated/android/c++/JFunc_void_std__string_ZoomEvent.hpp +2 -1
  18. package/nitrogen/generated/android/c++/JFunc_void_std__string_bool.hpp +2 -1
  19. package/nitrogen/generated/android/c++/JFunc_void_std__string_std__string.hpp +2 -1
  20. package/nitrogen/generated/android/c++/JGridTemplateConfig.hpp +6 -15
  21. package/nitrogen/generated/android/c++/JHybridAndroidAutoTelemetrySpec.cpp +2 -3
  22. package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.cpp +5 -12
  23. package/nitrogen/generated/android/c++/JHybridClusterSpec.cpp +6 -15
  24. package/nitrogen/generated/android/c++/JHybridGridTemplateSpec.cpp +1 -0
  25. package/nitrogen/generated/android/c++/JHybridInformationTemplateSpec.cpp +1 -0
  26. package/nitrogen/generated/android/c++/JHybridListTemplateSpec.cpp +1 -0
  27. package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.cpp +1 -0
  28. package/nitrogen/generated/android/c++/JHybridMessageTemplateSpec.cpp +1 -0
  29. package/nitrogen/generated/android/c++/JHybridSearchTemplateSpec.cpp +1 -0
  30. package/nitrogen/generated/android/c++/JInformationTemplateConfig.hpp +6 -15
  31. package/nitrogen/generated/android/c++/JListTemplateConfig.hpp +6 -15
  32. package/nitrogen/generated/android/c++/JMapTemplateConfig.hpp +14 -39
  33. package/nitrogen/generated/android/c++/JMessageTemplateConfig.hpp +6 -15
  34. package/nitrogen/generated/android/c++/JNavigationAlertAction.hpp +2 -3
  35. package/nitrogen/generated/android/c++/JNitroAction.hpp +2 -3
  36. package/nitrogen/generated/android/c++/JNitroBaseMapTemplateConfig.hpp +7 -18
  37. package/nitrogen/generated/android/c++/JNitroGridButton.hpp +2 -3
  38. package/nitrogen/generated/android/c++/JNitroManeuver.cpp +9 -9
  39. package/nitrogen/generated/android/c++/JNitroMapButton.hpp +2 -3
  40. package/nitrogen/generated/android/c++/JNitroNavigationAlert.hpp +3 -6
  41. package/nitrogen/generated/android/c++/JNitroRow.hpp +2 -3
  42. package/nitrogen/generated/android/c++/JNitroSection.hpp +1 -0
  43. package/nitrogen/generated/android/c++/JSearchTemplateConfig.hpp +8 -21
  44. package/nitrogen/generated/android/c++/JTripSelectorCallback.hpp +2 -3
  45. package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.cpp +1 -0
  46. package/nitrogen/generated/ios/swift/AssetImage.swift +1 -0
  47. package/nitrogen/generated/ios/swift/AutoText.swift +1 -0
  48. package/nitrogen/generated/ios/swift/Distance.swift +1 -0
  49. package/nitrogen/generated/ios/swift/DurationWithTimeZone.swift +1 -0
  50. package/nitrogen/generated/ios/swift/Func_void.swift +1 -1
  51. package/nitrogen/generated/ios/swift/Func_void_AlertDismissalReason.swift +1 -1
  52. package/nitrogen/generated/ios/swift/Func_void_ColorScheme.swift +1 -1
  53. package/nitrogen/generated/ios/swift/Func_void_Point.swift +1 -1
  54. package/nitrogen/generated/ios/swift/Func_void_Point_double.swift +1 -1
  55. package/nitrogen/generated/ios/swift/Func_void_Point_std__optional_Point_.swift +1 -1
  56. package/nitrogen/generated/ios/swift/Func_void_SafeAreaInsets.swift +1 -1
  57. package/nitrogen/generated/ios/swift/Func_void_VisibilityState.swift +1 -1
  58. package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -1
  59. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -1
  60. package/nitrogen/generated/ios/swift/Func_void_std__optional_Location__std__optional_std__string_.swift +1 -1
  61. package/nitrogen/generated/ios/swift/Func_void_std__optional_bool_.swift +1 -1
  62. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +1 -1
  63. package/nitrogen/generated/ios/swift/Func_void_std__string_ColorScheme.swift +1 -1
  64. package/nitrogen/generated/ios/swift/Func_void_std__string_ZoomEvent.swift +1 -1
  65. package/nitrogen/generated/ios/swift/Func_void_std__string_bool.swift +1 -1
  66. package/nitrogen/generated/ios/swift/Func_void_std__string_std__string.swift +1 -1
  67. package/nitrogen/generated/ios/swift/GlyphImage.swift +1 -0
  68. package/nitrogen/generated/ios/swift/GridTemplateConfig.swift +1 -0
  69. package/nitrogen/generated/ios/swift/HybridAutoPlaySpec.swift +0 -1
  70. package/nitrogen/generated/ios/swift/HybridAutoPlaySpec_cxx.swift +0 -1
  71. package/nitrogen/generated/ios/swift/HybridCarPlayDashboardSpec.swift +0 -1
  72. package/nitrogen/generated/ios/swift/HybridCarPlayDashboardSpec_cxx.swift +0 -1
  73. package/nitrogen/generated/ios/swift/HybridClusterSpec.swift +0 -1
  74. package/nitrogen/generated/ios/swift/HybridClusterSpec_cxx.swift +0 -1
  75. package/nitrogen/generated/ios/swift/HybridGridTemplateSpec.swift +0 -1
  76. package/nitrogen/generated/ios/swift/HybridGridTemplateSpec_cxx.swift +0 -1
  77. package/nitrogen/generated/ios/swift/HybridInformationTemplateSpec.swift +0 -1
  78. package/nitrogen/generated/ios/swift/HybridInformationTemplateSpec_cxx.swift +0 -1
  79. package/nitrogen/generated/ios/swift/HybridListTemplateSpec.swift +0 -1
  80. package/nitrogen/generated/ios/swift/HybridListTemplateSpec_cxx.swift +0 -1
  81. package/nitrogen/generated/ios/swift/HybridMapTemplateSpec.swift +0 -1
  82. package/nitrogen/generated/ios/swift/HybridMapTemplateSpec_cxx.swift +0 -1
  83. package/nitrogen/generated/ios/swift/HybridSearchTemplateSpec.swift +0 -1
  84. package/nitrogen/generated/ios/swift/HybridSearchTemplateSpec_cxx.swift +0 -1
  85. package/nitrogen/generated/ios/swift/ImageLane.swift +1 -0
  86. package/nitrogen/generated/ios/swift/InformationTemplateConfig.swift +1 -0
  87. package/nitrogen/generated/ios/swift/LaneGuidance.swift +1 -0
  88. package/nitrogen/generated/ios/swift/ListTemplateConfig.swift +1 -0
  89. package/nitrogen/generated/ios/swift/Location.swift +1 -0
  90. package/nitrogen/generated/ios/swift/MapTemplateConfig.swift +1 -0
  91. package/nitrogen/generated/ios/swift/MessageTemplateConfig.swift +1 -0
  92. package/nitrogen/generated/ios/swift/NavigationAlertAction.swift +1 -0
  93. package/nitrogen/generated/ios/swift/NitroAction.swift +1 -0
  94. package/nitrogen/generated/ios/swift/NitroAttributedString.swift +1 -0
  95. package/nitrogen/generated/ios/swift/NitroAttributedStringImage.swift +1 -0
  96. package/nitrogen/generated/ios/swift/NitroBaseMapTemplateConfig.swift +1 -0
  97. package/nitrogen/generated/ios/swift/NitroCarPlayDashboardButton.swift +1 -0
  98. package/nitrogen/generated/ios/swift/NitroColor.swift +1 -0
  99. package/nitrogen/generated/ios/swift/NitroGridButton.swift +1 -0
  100. package/nitrogen/generated/ios/swift/NitroLoadingManeuver.swift +1 -0
  101. package/nitrogen/generated/ios/swift/NitroMapButton.swift +1 -0
  102. package/nitrogen/generated/ios/swift/NitroMessageManeuver.swift +1 -0
  103. package/nitrogen/generated/ios/swift/NitroNavigationAlert.swift +1 -0
  104. package/nitrogen/generated/ios/swift/NitroRoutingManeuver.swift +1 -0
  105. package/nitrogen/generated/ios/swift/NitroRow.swift +1 -0
  106. package/nitrogen/generated/ios/swift/NitroSection.swift +1 -0
  107. package/nitrogen/generated/ios/swift/Point.swift +1 -0
  108. package/nitrogen/generated/ios/swift/PreferredImageLane.swift +1 -0
  109. package/nitrogen/generated/ios/swift/RouteChoice.swift +1 -0
  110. package/nitrogen/generated/ios/swift/SafeAreaInsets.swift +1 -0
  111. package/nitrogen/generated/ios/swift/SearchTemplateConfig.swift +1 -0
  112. package/nitrogen/generated/ios/swift/TravelEstimates.swift +1 -0
  113. package/nitrogen/generated/ios/swift/TripConfig.swift +1 -0
  114. package/nitrogen/generated/ios/swift/TripPoint.swift +1 -0
  115. package/nitrogen/generated/ios/swift/TripPreviewTextConfiguration.swift +1 -0
  116. package/nitrogen/generated/ios/swift/TripSelectorCallback.swift +1 -0
  117. package/nitrogen/generated/ios/swift/TripsConfig.swift +1 -0
  118. package/package.json +2 -2
  119. package/lib/specs/HybridAndroidAutoTelemetry.nitro.d.ts +0 -15
  120. package/lib/specs/HybridAndroidAutoTelemetry.nitro.js +0 -1
  121. package/lib/specs/HybridAutoPlay.nitro.d.ts +0 -64
  122. package/lib/specs/HybridAutoPlay.nitro.js +0 -1
  123. package/lib/specs/HybridCarPlayDashboard.nitro.d.ts +0 -22
  124. package/lib/specs/HybridCarPlayDashboard.nitro.js +0 -1
  125. package/lib/specs/HybridCluster.nitro.d.ts +0 -19
  126. package/lib/specs/HybridCluster.nitro.js +0 -1
  127. package/lib/specs/HybridGridTemplate.nitro.d.ts +0 -14
  128. package/lib/specs/HybridGridTemplate.nitro.js +0 -1
  129. package/lib/specs/HybridInformationTemplate.nitro.d.ts +0 -13
  130. package/lib/specs/HybridInformationTemplate.nitro.js +0 -1
  131. package/lib/specs/HybridListTemplate.nitro.d.ts +0 -13
  132. package/lib/specs/HybridListTemplate.nitro.js +0 -1
  133. package/lib/specs/HybridMapTemplate.nitro.d.ts +0 -25
  134. package/lib/specs/HybridMapTemplate.nitro.js +0 -1
  135. package/lib/specs/HybridMessageTemplate.nitro.d.ts +0 -12
  136. package/lib/specs/HybridMessageTemplate.nitro.js +0 -1
  137. package/lib/specs/HybridSearchTemplate.nitro.d.ts +0 -13
  138. package/lib/specs/HybridSearchTemplate.nitro.js +0 -1
  139. package/lib/types/GestureEvents.d.ts +0 -37
  140. package/lib/types/GestureEvents.js +0 -1
@@ -129,15 +129,13 @@ class HybridAutoPlay: HybridAutoPlaySpec {
129
129
  scene,
130
130
  interfaceController in
131
131
  let carPlayTemplate = template.getTemplate()
132
-
132
+
133
133
  if carPlayTemplate is CPMapTemplate {
134
134
  try await MainActor.run {
135
135
  try scene.initRootView()
136
136
  }
137
137
  }
138
138
 
139
- await template.invalidate()
140
-
141
139
  let _ = try await interfaceController.setRootTemplate(
142
140
  carPlayTemplate,
143
141
  animated: false
@@ -162,9 +160,9 @@ class HybridAutoPlay: HybridAutoPlaySpec {
162
160
 
163
161
  return try await RootModule.withInterfaceController {
164
162
  interfaceController in
165
-
163
+
166
164
  let carPlayTemplate = template.getTemplate()
167
-
165
+
168
166
  if carPlayTemplate is CPAlertTemplate {
169
167
  let animated = try await
170
168
  !interfaceController.dismissTemplate(
@@ -39,6 +39,13 @@ class AutoPlayScene: UIResponder {
39
39
  current
40
40
  }
41
41
 
42
+ // Get trait collection from the CarPlay interface controller
43
+ if let carTraitCollection = interfaceController?.interfaceController
44
+ .carTraitCollection
45
+ {
46
+ self.traitCollection = carTraitCollection
47
+ }
48
+
42
49
  if let window = self.window {
43
50
  ViewUtils.showLaunchScreen(window: window)
44
51
  safeAreaInsets = window.safeAreaInsets
@@ -64,7 +71,7 @@ class AutoPlayScene: UIResponder {
64
71
  "window nil for module: \(moduleName)"
65
72
  )
66
73
  }
67
-
74
+
68
75
  guard
69
76
  let rootView = ViewUtils.getRootView(
70
77
  moduleName: moduleName,
@@ -84,6 +91,11 @@ class AutoPlayScene: UIResponder {
84
91
  }
85
92
 
86
93
  open func traitCollectionDidChange(traitCollection: UITraitCollection) {
94
+ if self.traitCollection.userInterfaceStyle
95
+ == traitCollection.userInterfaceStyle
96
+ {
97
+ return
98
+ }
87
99
  self.traitCollection = traitCollection
88
100
  TemplateStore.traitCollectionDidChange()
89
101
  }
@@ -11,6 +11,7 @@
11
11
  #include <functional>
12
12
 
13
13
  #include <functional>
14
+ #include <NitroModules/JNICallable.hpp>
14
15
 
15
16
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
16
17
 
@@ -37,7 +38,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
37
38
  /**
38
39
  * An implementation of Func_void that is backed by a C++ implementation (using `std::function<...>`)
39
40
  */
40
- struct JFunc_void_cxx final: public jni::HybridClass<JFunc_void_cxx, JFunc_void> {
41
+ class JFunc_void_cxx final: public jni::HybridClass<JFunc_void_cxx, JFunc_void> {
41
42
  public:
42
43
  static jni::local_ref<JFunc_void::javaobject> fromCpp(const std::function<void()>& func) {
43
44
  return JFunc_void_cxx::newObjectCxxArgs(func);
@@ -12,6 +12,7 @@
12
12
 
13
13
  #include "AlertDismissalReason.hpp"
14
14
  #include <functional>
15
+ #include <NitroModules/JNICallable.hpp>
15
16
  #include "JAlertDismissalReason.hpp"
16
17
 
17
18
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
@@ -39,7 +40,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
39
40
  /**
40
41
  * An implementation of Func_void_AlertDismissalReason that is backed by a C++ implementation (using `std::function<...>`)
41
42
  */
42
- struct JFunc_void_AlertDismissalReason_cxx final: public jni::HybridClass<JFunc_void_AlertDismissalReason_cxx, JFunc_void_AlertDismissalReason> {
43
+ class JFunc_void_AlertDismissalReason_cxx final: public jni::HybridClass<JFunc_void_AlertDismissalReason_cxx, JFunc_void_AlertDismissalReason> {
43
44
  public:
44
45
  static jni::local_ref<JFunc_void_AlertDismissalReason::javaobject> fromCpp(const std::function<void(AlertDismissalReason /* reason */)>& func) {
45
46
  return JFunc_void_AlertDismissalReason_cxx::newObjectCxxArgs(func);
@@ -12,6 +12,7 @@
12
12
 
13
13
  #include "ColorScheme.hpp"
14
14
  #include <functional>
15
+ #include <NitroModules/JNICallable.hpp>
15
16
  #include "JColorScheme.hpp"
16
17
 
17
18
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
@@ -39,7 +40,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
39
40
  /**
40
41
  * An implementation of Func_void_ColorScheme that is backed by a C++ implementation (using `std::function<...>`)
41
42
  */
42
- struct JFunc_void_ColorScheme_cxx final: public jni::HybridClass<JFunc_void_ColorScheme_cxx, JFunc_void_ColorScheme> {
43
+ class JFunc_void_ColorScheme_cxx final: public jni::HybridClass<JFunc_void_ColorScheme_cxx, JFunc_void_ColorScheme> {
43
44
  public:
44
45
  static jni::local_ref<JFunc_void_ColorScheme::javaobject> fromCpp(const std::function<void(ColorScheme /* colorScheme */)>& func) {
45
46
  return JFunc_void_ColorScheme_cxx::newObjectCxxArgs(func);
@@ -12,6 +12,7 @@
12
12
 
13
13
  #include "Point.hpp"
14
14
  #include <functional>
15
+ #include <NitroModules/JNICallable.hpp>
15
16
  #include "JPoint.hpp"
16
17
 
17
18
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
@@ -39,7 +40,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
39
40
  /**
40
41
  * An implementation of Func_void_Point that is backed by a C++ implementation (using `std::function<...>`)
41
42
  */
42
- struct JFunc_void_Point_cxx final: public jni::HybridClass<JFunc_void_Point_cxx, JFunc_void_Point> {
43
+ class JFunc_void_Point_cxx final: public jni::HybridClass<JFunc_void_Point_cxx, JFunc_void_Point> {
43
44
  public:
44
45
  static jni::local_ref<JFunc_void_Point::javaobject> fromCpp(const std::function<void(const Point& /* center */)>& func) {
45
46
  return JFunc_void_Point_cxx::newObjectCxxArgs(func);
@@ -12,6 +12,7 @@
12
12
 
13
13
  #include "Point.hpp"
14
14
  #include <functional>
15
+ #include <NitroModules/JNICallable.hpp>
15
16
  #include "JPoint.hpp"
16
17
 
17
18
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
@@ -39,7 +40,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
39
40
  /**
40
41
  * An implementation of Func_void_Point_double that is backed by a C++ implementation (using `std::function<...>`)
41
42
  */
42
- struct JFunc_void_Point_double_cxx final: public jni::HybridClass<JFunc_void_Point_double_cxx, JFunc_void_Point_double> {
43
+ class JFunc_void_Point_double_cxx final: public jni::HybridClass<JFunc_void_Point_double_cxx, JFunc_void_Point_double> {
43
44
  public:
44
45
  static jni::local_ref<JFunc_void_Point_double::javaobject> fromCpp(const std::function<void(const Point& /* center */, double /* scale */)>& func) {
45
46
  return JFunc_void_Point_double_cxx::newObjectCxxArgs(func);
@@ -13,6 +13,7 @@
13
13
  #include "Point.hpp"
14
14
  #include <optional>
15
15
  #include <functional>
16
+ #include <NitroModules/JNICallable.hpp>
16
17
  #include "JPoint.hpp"
17
18
 
18
19
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
@@ -40,7 +41,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
40
41
  /**
41
42
  * An implementation of Func_void_Point_std__optional_Point_ that is backed by a C++ implementation (using `std::function<...>`)
42
43
  */
43
- struct JFunc_void_Point_std__optional_Point__cxx final: public jni::HybridClass<JFunc_void_Point_std__optional_Point__cxx, JFunc_void_Point_std__optional_Point_> {
44
+ class JFunc_void_Point_std__optional_Point__cxx final: public jni::HybridClass<JFunc_void_Point_std__optional_Point__cxx, JFunc_void_Point_std__optional_Point_> {
44
45
  public:
45
46
  static jni::local_ref<JFunc_void_Point_std__optional_Point_::javaobject> fromCpp(const std::function<void(const Point& /* translation */, const std::optional<Point>& /* velocity */)>& func) {
46
47
  return JFunc_void_Point_std__optional_Point__cxx::newObjectCxxArgs(func);
@@ -12,6 +12,7 @@
12
12
 
13
13
  #include "SafeAreaInsets.hpp"
14
14
  #include <functional>
15
+ #include <NitroModules/JNICallable.hpp>
15
16
  #include "JSafeAreaInsets.hpp"
16
17
  #include <optional>
17
18
 
@@ -40,7 +41,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
40
41
  /**
41
42
  * An implementation of Func_void_SafeAreaInsets that is backed by a C++ implementation (using `std::function<...>`)
42
43
  */
43
- struct JFunc_void_SafeAreaInsets_cxx final: public jni::HybridClass<JFunc_void_SafeAreaInsets_cxx, JFunc_void_SafeAreaInsets> {
44
+ class JFunc_void_SafeAreaInsets_cxx final: public jni::HybridClass<JFunc_void_SafeAreaInsets_cxx, JFunc_void_SafeAreaInsets> {
44
45
  public:
45
46
  static jni::local_ref<JFunc_void_SafeAreaInsets::javaobject> fromCpp(const std::function<void(const SafeAreaInsets& /* insets */)>& func) {
46
47
  return JFunc_void_SafeAreaInsets_cxx::newObjectCxxArgs(func);
@@ -12,6 +12,7 @@
12
12
 
13
13
  #include "VisibilityState.hpp"
14
14
  #include <functional>
15
+ #include <NitroModules/JNICallable.hpp>
15
16
  #include "JVisibilityState.hpp"
16
17
 
17
18
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
@@ -39,7 +40,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
39
40
  /**
40
41
  * An implementation of Func_void_VisibilityState that is backed by a C++ implementation (using `std::function<...>`)
41
42
  */
42
- struct JFunc_void_VisibilityState_cxx final: public jni::HybridClass<JFunc_void_VisibilityState_cxx, JFunc_void_VisibilityState> {
43
+ class JFunc_void_VisibilityState_cxx final: public jni::HybridClass<JFunc_void_VisibilityState_cxx, JFunc_void_VisibilityState> {
43
44
  public:
44
45
  static jni::local_ref<JFunc_void_VisibilityState::javaobject> fromCpp(const std::function<void(VisibilityState /* payload */)>& func) {
45
46
  return JFunc_void_VisibilityState_cxx::newObjectCxxArgs(func);
@@ -11,6 +11,7 @@
11
11
  #include <functional>
12
12
 
13
13
  #include <functional>
14
+ #include <NitroModules/JNICallable.hpp>
14
15
 
15
16
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
16
17
 
@@ -37,7 +38,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
37
38
  /**
38
39
  * An implementation of Func_void_bool that is backed by a C++ implementation (using `std::function<...>`)
39
40
  */
40
- struct JFunc_void_bool_cxx final: public jni::HybridClass<JFunc_void_bool_cxx, JFunc_void_bool> {
41
+ class JFunc_void_bool_cxx final: public jni::HybridClass<JFunc_void_bool_cxx, JFunc_void_bool> {
41
42
  public:
42
43
  static jni::local_ref<JFunc_void_bool::javaobject> fromCpp(const std::function<void(bool /* isPanningInterfaceVisible */)>& func) {
43
44
  return JFunc_void_bool_cxx::newObjectCxxArgs(func);
@@ -14,6 +14,7 @@
14
14
  #include <optional>
15
15
  #include <string>
16
16
  #include <functional>
17
+ #include <NitroModules/JNICallable.hpp>
17
18
  #include "JLocation.hpp"
18
19
 
19
20
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
@@ -41,7 +42,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
41
42
  /**
42
43
  * An implementation of Func_void_std__optional_Location__std__optional_std__string_ that is backed by a C++ implementation (using `std::function<...>`)
43
44
  */
44
- struct JFunc_void_std__optional_Location__std__optional_std__string__cxx final: public jni::HybridClass<JFunc_void_std__optional_Location__std__optional_std__string__cxx, JFunc_void_std__optional_Location__std__optional_std__string_> {
45
+ class JFunc_void_std__optional_Location__std__optional_std__string__cxx final: public jni::HybridClass<JFunc_void_std__optional_Location__std__optional_std__string__cxx, JFunc_void_std__optional_Location__std__optional_std__string_> {
45
46
  public:
46
47
  static jni::local_ref<JFunc_void_std__optional_Location__std__optional_std__string_::javaobject> fromCpp(const std::function<void(const std::optional<Location>& /* coordinates */, const std::optional<std::string>& /* query */)>& func) {
47
48
  return JFunc_void_std__optional_Location__std__optional_std__string__cxx::newObjectCxxArgs(func);
@@ -14,6 +14,7 @@
14
14
  #include <optional>
15
15
  #include <string>
16
16
  #include <functional>
17
+ #include <NitroModules/JNICallable.hpp>
17
18
  #include "JTelemetry.hpp"
18
19
  #include "NumericTelemetryItem.hpp"
19
20
  #include "JNumericTelemetryItem.hpp"
@@ -47,7 +48,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
47
48
  /**
48
49
  * An implementation of Func_void_std__optional_Telemetry__std__optional_std__string_ that is backed by a C++ implementation (using `std::function<...>`)
49
50
  */
50
- struct JFunc_void_std__optional_Telemetry__std__optional_std__string__cxx final: public jni::HybridClass<JFunc_void_std__optional_Telemetry__std__optional_std__string__cxx, JFunc_void_std__optional_Telemetry__std__optional_std__string_> {
51
+ class JFunc_void_std__optional_Telemetry__std__optional_std__string__cxx final: public jni::HybridClass<JFunc_void_std__optional_Telemetry__std__optional_std__string__cxx, JFunc_void_std__optional_Telemetry__std__optional_std__string_> {
51
52
  public:
52
53
  static jni::local_ref<JFunc_void_std__optional_Telemetry__std__optional_std__string_::javaobject> fromCpp(const std::function<void(const std::optional<Telemetry>& /* tlm */, const std::optional<std::string>& /* error */)>& func) {
53
54
  return JFunc_void_std__optional_Telemetry__std__optional_std__string__cxx::newObjectCxxArgs(func);
@@ -12,6 +12,7 @@
12
12
 
13
13
  #include <optional>
14
14
  #include <functional>
15
+ #include <NitroModules/JNICallable.hpp>
15
16
 
16
17
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
17
18
 
@@ -38,7 +39,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
38
39
  /**
39
40
  * An implementation of Func_void_std__optional_bool_ that is backed by a C++ implementation (using `std::function<...>`)
40
41
  */
41
- struct JFunc_void_std__optional_bool__cxx final: public jni::HybridClass<JFunc_void_std__optional_bool__cxx, JFunc_void_std__optional_bool_> {
42
+ class JFunc_void_std__optional_bool__cxx final: public jni::HybridClass<JFunc_void_std__optional_bool__cxx, JFunc_void_std__optional_bool_> {
42
43
  public:
43
44
  static jni::local_ref<JFunc_void_std__optional_bool_::javaobject> fromCpp(const std::function<void(std::optional<bool> /* animated */)>& func) {
44
45
  return JFunc_void_std__optional_bool__cxx::newObjectCxxArgs(func);
@@ -12,6 +12,7 @@
12
12
 
13
13
  #include <string>
14
14
  #include <functional>
15
+ #include <NitroModules/JNICallable.hpp>
15
16
 
16
17
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
17
18
 
@@ -38,7 +39,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
38
39
  /**
39
40
  * An implementation of Func_void_std__string that is backed by a C++ implementation (using `std::function<...>`)
40
41
  */
41
- struct JFunc_void_std__string_cxx final: public jni::HybridClass<JFunc_void_std__string_cxx, JFunc_void_std__string> {
42
+ class JFunc_void_std__string_cxx final: public jni::HybridClass<JFunc_void_std__string_cxx, JFunc_void_std__string> {
42
43
  public:
43
44
  static jni::local_ref<JFunc_void_std__string::javaobject> fromCpp(const std::function<void(const std::string& /* searchText */)>& func) {
44
45
  return JFunc_void_std__string_cxx::newObjectCxxArgs(func);
@@ -13,6 +13,7 @@
13
13
  #include <string>
14
14
  #include "ColorScheme.hpp"
15
15
  #include <functional>
16
+ #include <NitroModules/JNICallable.hpp>
16
17
  #include "JColorScheme.hpp"
17
18
 
18
19
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
@@ -40,7 +41,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
40
41
  /**
41
42
  * An implementation of Func_void_std__string_ColorScheme that is backed by a C++ implementation (using `std::function<...>`)
42
43
  */
43
- struct JFunc_void_std__string_ColorScheme_cxx final: public jni::HybridClass<JFunc_void_std__string_ColorScheme_cxx, JFunc_void_std__string_ColorScheme> {
44
+ class JFunc_void_std__string_ColorScheme_cxx final: public jni::HybridClass<JFunc_void_std__string_ColorScheme_cxx, JFunc_void_std__string_ColorScheme> {
44
45
  public:
45
46
  static jni::local_ref<JFunc_void_std__string_ColorScheme::javaobject> fromCpp(const std::function<void(const std::string& /* clusterId */, ColorScheme /* payload */)>& func) {
46
47
  return JFunc_void_std__string_ColorScheme_cxx::newObjectCxxArgs(func);
@@ -13,6 +13,7 @@
13
13
  #include <string>
14
14
  #include "ZoomEvent.hpp"
15
15
  #include <functional>
16
+ #include <NitroModules/JNICallable.hpp>
16
17
  #include "JZoomEvent.hpp"
17
18
 
18
19
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
@@ -40,7 +41,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
40
41
  /**
41
42
  * An implementation of Func_void_std__string_ZoomEvent that is backed by a C++ implementation (using `std::function<...>`)
42
43
  */
43
- struct JFunc_void_std__string_ZoomEvent_cxx final: public jni::HybridClass<JFunc_void_std__string_ZoomEvent_cxx, JFunc_void_std__string_ZoomEvent> {
44
+ class JFunc_void_std__string_ZoomEvent_cxx final: public jni::HybridClass<JFunc_void_std__string_ZoomEvent_cxx, JFunc_void_std__string_ZoomEvent> {
44
45
  public:
45
46
  static jni::local_ref<JFunc_void_std__string_ZoomEvent::javaobject> fromCpp(const std::function<void(const std::string& /* clusterId */, ZoomEvent /* payload */)>& func) {
46
47
  return JFunc_void_std__string_ZoomEvent_cxx::newObjectCxxArgs(func);
@@ -12,6 +12,7 @@
12
12
 
13
13
  #include <string>
14
14
  #include <functional>
15
+ #include <NitroModules/JNICallable.hpp>
15
16
 
16
17
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
17
18
 
@@ -38,7 +39,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
38
39
  /**
39
40
  * An implementation of Func_void_std__string_bool that is backed by a C++ implementation (using `std::function<...>`)
40
41
  */
41
- struct JFunc_void_std__string_bool_cxx final: public jni::HybridClass<JFunc_void_std__string_bool_cxx, JFunc_void_std__string_bool> {
42
+ class JFunc_void_std__string_bool_cxx final: public jni::HybridClass<JFunc_void_std__string_bool_cxx, JFunc_void_std__string_bool> {
42
43
  public:
43
44
  static jni::local_ref<JFunc_void_std__string_bool::javaobject> fromCpp(const std::function<void(const std::string& /* clusterId */, bool /* payload */)>& func) {
44
45
  return JFunc_void_std__string_bool_cxx::newObjectCxxArgs(func);
@@ -12,6 +12,7 @@
12
12
 
13
13
  #include <string>
14
14
  #include <functional>
15
+ #include <NitroModules/JNICallable.hpp>
15
16
 
16
17
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
17
18
 
@@ -38,7 +39,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
38
39
  /**
39
40
  * An implementation of Func_void_std__string_std__string that is backed by a C++ implementation (using `std::function<...>`)
40
41
  */
41
- struct JFunc_void_std__string_std__string_cxx final: public jni::HybridClass<JFunc_void_std__string_std__string_cxx, JFunc_void_std__string_std__string> {
42
+ class JFunc_void_std__string_std__string_cxx final: public jni::HybridClass<JFunc_void_std__string_std__string_cxx, JFunc_void_std__string_std__string> {
42
43
  public:
43
44
  static jni::local_ref<JFunc_void_std__string_std__string::javaobject> fromCpp(const std::function<void(const std::string& /* tripId */, const std::string& /* routeId */)>& func) {
44
45
  return JFunc_void_std__string_std__string_cxx::newObjectCxxArgs(func);
@@ -43,6 +43,7 @@
43
43
  #include "NitroGridButton.hpp"
44
44
  #include "NitroMapButton.hpp"
45
45
  #include "NitroMapButtonType.hpp"
46
+ #include <NitroModules/JNICallable.hpp>
46
47
  #include <functional>
47
48
  #include <optional>
48
49
  #include <string>
@@ -98,9 +99,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
98
99
  return downcast->cthis()->getFunction();
99
100
  } else {
100
101
  auto onWillAppearRef = jni::make_global(onWillAppear);
101
- return [onWillAppearRef](std::optional<bool> animated) -> void {
102
- return onWillAppearRef->invoke(animated);
103
- };
102
+ return JNICallable<JFunc_void_std__optional_bool_, void(std::optional<bool>)>(std::move(onWillAppearRef));
104
103
  }
105
104
  }()) : std::nullopt,
106
105
  onWillDisappear != nullptr ? std::make_optional([&]() -> std::function<void(std::optional<bool> /* animated */)> {
@@ -109,9 +108,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
109
108
  return downcast->cthis()->getFunction();
110
109
  } else {
111
110
  auto onWillDisappearRef = jni::make_global(onWillDisappear);
112
- return [onWillDisappearRef](std::optional<bool> animated) -> void {
113
- return onWillDisappearRef->invoke(animated);
114
- };
111
+ return JNICallable<JFunc_void_std__optional_bool_, void(std::optional<bool>)>(std::move(onWillDisappearRef));
115
112
  }
116
113
  }()) : std::nullopt,
117
114
  onDidAppear != nullptr ? std::make_optional([&]() -> std::function<void(std::optional<bool> /* animated */)> {
@@ -120,9 +117,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
120
117
  return downcast->cthis()->getFunction();
121
118
  } else {
122
119
  auto onDidAppearRef = jni::make_global(onDidAppear);
123
- return [onDidAppearRef](std::optional<bool> animated) -> void {
124
- return onDidAppearRef->invoke(animated);
125
- };
120
+ return JNICallable<JFunc_void_std__optional_bool_, void(std::optional<bool>)>(std::move(onDidAppearRef));
126
121
  }
127
122
  }()) : std::nullopt,
128
123
  onDidDisappear != nullptr ? std::make_optional([&]() -> std::function<void(std::optional<bool> /* animated */)> {
@@ -131,9 +126,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
131
126
  return downcast->cthis()->getFunction();
132
127
  } else {
133
128
  auto onDidDisappearRef = jni::make_global(onDidDisappear);
134
- return [onDidDisappearRef](std::optional<bool> animated) -> void {
135
- return onDidDisappearRef->invoke(animated);
136
- };
129
+ return JNICallable<JFunc_void_std__optional_bool_, void(std::optional<bool>)>(std::move(onDidDisappearRef));
137
130
  }
138
131
  }()) : std::nullopt,
139
132
  onPopped != nullptr ? std::make_optional([&]() -> std::function<void()> {
@@ -142,9 +135,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
142
135
  return downcast->cthis()->getFunction();
143
136
  } else {
144
137
  auto onPoppedRef = jni::make_global(onPopped);
145
- return [onPoppedRef]() -> void {
146
- return onPoppedRef->invoke();
147
- };
138
+ return JNICallable<JFunc_void, void()>(std::move(onPoppedRef));
148
139
  }
149
140
  }()) : std::nullopt,
150
141
  autoDismissMs != nullptr ? std::make_optional(autoDismissMs->value()) : std::nullopt,
@@ -18,6 +18,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct StringTelem
18
18
 
19
19
  #include <functional>
20
20
  #include "JFunc_void.hpp"
21
+ #include <NitroModules/JNICallable.hpp>
21
22
  #include "Telemetry.hpp"
22
23
  #include <optional>
23
24
  #include <string>
@@ -71,9 +72,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
71
72
  return downcast->cthis()->getFunction();
72
73
  } else {
73
74
  auto __resultRef = jni::make_global(__result);
74
- return [__resultRef]() -> void {
75
- return __resultRef->invoke();
76
- };
75
+ return JNICallable<JFunc_void, void()>(std::move(__resultRef));
77
76
  }
78
77
  }();
79
78
  }
@@ -32,6 +32,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroBu
32
32
 
33
33
  #include <functional>
34
34
  #include "JFunc_void.hpp"
35
+ #include <NitroModules/JNICallable.hpp>
35
36
  #include <NitroModules/Promise.hpp>
36
37
  #include <NitroModules/JPromise.hpp>
37
38
  #include "EventName.hpp"
@@ -106,9 +107,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
106
107
  return downcast->cthis()->getFunction();
107
108
  } else {
108
109
  auto __resultRef = jni::make_global(__result);
109
- return [__resultRef]() -> void {
110
- return __resultRef->invoke();
111
- };
110
+ return JNICallable<JFunc_void, void()>(std::move(__resultRef));
112
111
  }
113
112
  }();
114
113
  }
@@ -121,9 +120,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
121
120
  return downcast->cthis()->getFunction();
122
121
  } else {
123
122
  auto __resultRef = jni::make_global(__result);
124
- return [__resultRef]() -> void {
125
- return __resultRef->invoke();
126
- };
123
+ return JNICallable<JFunc_void, void()>(std::move(__resultRef));
127
124
  }
128
125
  }();
129
126
  }
@@ -136,9 +133,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
136
133
  return downcast->cthis()->getFunction();
137
134
  } else {
138
135
  auto __resultRef = jni::make_global(__result);
139
- return [__resultRef]() -> void {
140
- return __resultRef->invoke();
141
- };
136
+ return JNICallable<JFunc_void, void()>(std::move(__resultRef));
142
137
  }
143
138
  }();
144
139
  }
@@ -226,9 +221,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
226
221
  return downcast->cthis()->getFunction();
227
222
  } else {
228
223
  auto __resultRef = jni::make_global(__result);
229
- return [__resultRef]() -> void {
230
- return __resultRef->invoke();
231
- };
224
+ return JNICallable<JFunc_void, void()>(std::move(__resultRef));
232
225
  }
233
226
  }();
234
227
  }
@@ -26,6 +26,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ZoomEve
26
26
 
27
27
  #include <functional>
28
28
  #include "JFunc_void.hpp"
29
+ #include <NitroModules/JNICallable.hpp>
29
30
  #include <NitroModules/Promise.hpp>
30
31
  #include <NitroModules/JPromise.hpp>
31
32
  #include "ClusterEventName.hpp"
@@ -95,9 +96,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
95
96
  return downcast->cthis()->getFunction();
96
97
  } else {
97
98
  auto __resultRef = jni::make_global(__result);
98
- return [__resultRef]() -> void {
99
- return __resultRef->invoke();
100
- };
99
+ return JNICallable<JFunc_void, void()>(std::move(__resultRef));
101
100
  }
102
101
  }();
103
102
  }
@@ -138,9 +137,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
138
137
  return downcast->cthis()->getFunction();
139
138
  } else {
140
139
  auto __resultRef = jni::make_global(__result);
141
- return [__resultRef]() -> void {
142
- return __resultRef->invoke();
143
- };
140
+ return JNICallable<JFunc_void, void()>(std::move(__resultRef));
144
141
  }
145
142
  }();
146
143
  }
@@ -153,9 +150,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
153
150
  return downcast->cthis()->getFunction();
154
151
  } else {
155
152
  auto __resultRef = jni::make_global(__result);
156
- return [__resultRef]() -> void {
157
- return __resultRef->invoke();
158
- };
153
+ return JNICallable<JFunc_void, void()>(std::move(__resultRef));
159
154
  }
160
155
  }();
161
156
  }
@@ -168,9 +163,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
168
163
  return downcast->cthis()->getFunction();
169
164
  } else {
170
165
  auto __resultRef = jni::make_global(__result);
171
- return [__resultRef]() -> void {
172
- return __resultRef->invoke();
173
- };
166
+ return JNICallable<JFunc_void, void()>(std::move(__resultRef));
174
167
  }
175
168
  }();
176
169
  }
@@ -183,9 +176,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
183
176
  return downcast->cthis()->getFunction();
184
177
  } else {
185
178
  auto __resultRef = jni::make_global(__result);
186
- return [__resultRef]() -> void {
187
- return __resultRef->invoke();
188
- };
179
+ return JNICallable<JFunc_void, void()>(std::move(__resultRef));
189
180
  }
190
181
  }();
191
182
  }
@@ -46,6 +46,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
46
46
  #include <optional>
47
47
  #include <functional>
48
48
  #include "JFunc_void_std__optional_bool_.hpp"
49
+ #include <NitroModules/JNICallable.hpp>
49
50
  #include "JFunc_void.hpp"
50
51
  #include "NitroAction.hpp"
51
52
  #include <vector>
@@ -50,6 +50,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
50
50
  #include <optional>
51
51
  #include <functional>
52
52
  #include "JFunc_void_std__optional_bool_.hpp"
53
+ #include <NitroModules/JNICallable.hpp>
53
54
  #include "JFunc_void.hpp"
54
55
  #include "NitroAction.hpp"
55
56
  #include <vector>
@@ -50,6 +50,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
50
50
  #include <optional>
51
51
  #include <functional>
52
52
  #include "JFunc_void_std__optional_bool_.hpp"
53
+ #include <NitroModules/JNICallable.hpp>
53
54
  #include "JFunc_void.hpp"
54
55
  #include "NitroAction.hpp"
55
56
  #include <vector>
@@ -99,6 +99,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct TripConfig;
99
99
  #include <string>
100
100
  #include <functional>
101
101
  #include "JFunc_void_std__string.hpp"
102
+ #include <NitroModules/JNICallable.hpp>
102
103
  #include <NitroModules/Promise.hpp>
103
104
  #include <NitroModules/JPromise.hpp>
104
105
  #include "MapTemplateConfig.hpp"
@@ -42,6 +42,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
42
42
  #include <optional>
43
43
  #include <functional>
44
44
  #include "JFunc_void_std__optional_bool_.hpp"
45
+ #include <NitroModules/JNICallable.hpp>
45
46
  #include "JFunc_void.hpp"
46
47
  #include "NitroAction.hpp"
47
48
  #include <vector>
@@ -44,6 +44,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroSe
44
44
  #include <optional>
45
45
  #include <functional>
46
46
  #include "JFunc_void_std__optional_bool_.hpp"
47
+ #include <NitroModules/JNICallable.hpp>
47
48
  #include "JFunc_void.hpp"
48
49
  #include "NitroAction.hpp"
49
50
  #include <vector>