@iternio/react-native-auto-play 0.6.1 → 0.7.0
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/README.md +3 -3
- package/android/src/automotive/AndroidManifest-nonnav.xml +0 -2
- package/android/src/automotive/AndroidManifest.xml +0 -2
- package/android/src/main/AndroidManifest-nonnav.xml +0 -2
- package/android/src/main/AndroidManifest.xml +0 -2
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/AndroidAutoService.kt +3 -27
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlayTiming.kt +122 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/Parser.kt +2 -2
- package/installTimers.ts +3 -0
- package/installTimers.web.ts +2 -0
- package/ios/hybrid/HybridAutoPlayTiming.swift +123 -0
- package/lib/components/SafeAreaView.js +1 -1
- package/lib/hybrid/HybridAutoPlayTiming.d.ts +2 -0
- package/lib/hybrid/HybridAutoPlayTiming.js +2 -0
- package/lib/hybrid/HybridVoice.js +2 -2
- package/lib/index.js +0 -2
- package/lib/index.web.d.ts +4 -2
- package/lib/installTimers.d.ts +1 -0
- package/lib/installTimers.js +8 -0
- package/lib/installTimers.web.d.ts +1 -0
- package/lib/installTimers.web.js +2 -0
- package/lib/scenes/CarPlayDashboardScene.d.ts +3 -3
- package/lib/specs/AutoPlayTiming.nitro.d.ts +27 -0
- package/lib/specs/AutoPlayTiming.nitro.js +1 -0
- package/lib/types/Telemetry.d.ts +1 -1
- package/lib/utils/AutoPlayTimers.d.ts +21 -0
- package/lib/utils/AutoPlayTimers.js +45 -0
- package/lib/utils/NitroImage.d.ts +5 -2
- package/lib/utils/NitroImage.js +1 -1
- package/lib-cjs/components/SafeAreaView.js +1 -1
- package/lib-cjs/hybrid/HybridVoice.js +2 -2
- package/lib-cjs/index.js +0 -5
- package/lib-cjs/utils/NitroImage.js +1 -1
- package/nitro.json +10 -0
- package/nitrogen/generated/android/ReactNativeAutoPlay+autolinking.cmake +2 -0
- package/nitrogen/generated/android/ReactNativeAutoPlayOnLoad.cpp +16 -0
- package/nitrogen/generated/android/c++/JActiveCarUxRestrictions.hpp +1 -1
- package/nitrogen/generated/android/c++/JAlertActionStyle.hpp +1 -1
- package/nitrogen/generated/android/c++/JAlertDismissalReason.hpp +1 -1
- package/nitrogen/generated/android/c++/JAppFocusState.hpp +1 -1
- package/nitrogen/generated/android/c++/JAssetImage.hpp +18 -18
- package/nitrogen/generated/android/c++/JAutoText.hpp +1 -1
- package/nitrogen/generated/android/c++/JBooleanTelemetryItem.hpp +1 -1
- package/nitrogen/generated/android/c++/JCarUxRestrictions.hpp +1 -1
- package/nitrogen/generated/android/c++/JChargingConnector.hpp +1 -1
- package/nitrogen/generated/android/c++/JClusterEventName.hpp +1 -1
- package/nitrogen/generated/android/c++/JColorScheme.hpp +1 -1
- package/nitrogen/generated/android/c++/JDistance.hpp +1 -1
- package/nitrogen/generated/android/c++/JDistanceUnits.hpp +1 -1
- package/nitrogen/generated/android/c++/JDurationWithTimeZone.hpp +1 -1
- package/nitrogen/generated/android/c++/JEventName.hpp +1 -1
- package/nitrogen/generated/android/c++/JForkType.hpp +1 -1
- package/nitrogen/generated/android/c++/JGlyphImage.hpp +1 -1
- package/nitrogen/generated/android/c++/JGoogleSignIn.hpp +1 -1
- package/nitrogen/generated/android/c++/JGoogleSignInAccount.hpp +1 -1
- package/nitrogen/generated/android/c++/JGridImageSize.hpp +1 -1
- package/nitrogen/generated/android/c++/JGridTemplateConfig.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridAutoPlayTimingSpec.cpp +59 -0
- package/nitrogen/generated/android/c++/JHybridAutoPlayTimingSpec.hpp +64 -0
- package/nitrogen/generated/android/c++/JImageLane.hpp +1 -1
- package/nitrogen/generated/android/c++/JInformationTemplateConfig.hpp +1 -1
- package/nitrogen/generated/android/c++/JInputSignIn.hpp +1 -1
- package/nitrogen/generated/android/c++/JKeepType.hpp +1 -1
- package/nitrogen/generated/android/c++/JKeyboardType.hpp +1 -1
- package/nitrogen/generated/android/c++/JLaneGuidance.hpp +1 -1
- package/nitrogen/generated/android/c++/JListImageType.hpp +1 -1
- package/nitrogen/generated/android/c++/JListTemplateConfig.hpp +1 -1
- package/nitrogen/generated/android/c++/JLocation.hpp +1 -1
- package/nitrogen/generated/android/c++/JManeuverState.hpp +1 -1
- package/nitrogen/generated/android/c++/JManeuverType.hpp +1 -1
- package/nitrogen/generated/android/c++/JMapTemplateConfig.hpp +1 -1
- package/nitrogen/generated/android/c++/JMessageTemplateConfig.hpp +1 -1
- package/nitrogen/generated/android/c++/JNavigationAlertAction.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroAction.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroActionType.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroAlignment.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroAttributedString.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroAttributedStringImage.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroBaseMapTemplateConfig.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroButtonStyle.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroChargerLocation.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroChargerOutlet.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroColor.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroGridButton.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroLoadingManeuver.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroMapButton.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroMapButtonType.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroMessageManeuver.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroNavigationAlert.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroOptionsPanelChargerSection.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroOptionsPanelConfig.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroOptionsPanelGridSection.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroRoutingManeuver.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroRow.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroSection.hpp +1 -1
- package/nitrogen/generated/android/c++/JNitroSectionType.hpp +1 -1
- package/nitrogen/generated/android/c++/JNumericTelemetryItem.hpp +1 -1
- package/nitrogen/generated/android/c++/JOffRampType.hpp +1 -1
- package/nitrogen/generated/android/c++/JOnRampType.hpp +1 -1
- package/nitrogen/generated/android/c++/JPermissionRequestResult.hpp +1 -1
- package/nitrogen/generated/android/c++/JPinSignIn.hpp +1 -1
- package/nitrogen/generated/android/c++/JPoint.hpp +1 -1
- package/nitrogen/generated/android/c++/JPreferredImageLane.hpp +1 -1
- package/nitrogen/generated/android/c++/JQrSignIn.hpp +1 -1
- package/nitrogen/generated/android/c++/JRemoteImage.hpp +1 -1
- package/nitrogen/generated/android/c++/JRouteChoice.hpp +1 -1
- package/nitrogen/generated/android/c++/JSafeAreaInsets.hpp +1 -1
- package/nitrogen/generated/android/c++/JSearchTemplateConfig.hpp +1 -1
- package/nitrogen/generated/android/c++/JSignInMethods.hpp +1 -1
- package/nitrogen/generated/android/c++/JSignInTemplateConfig.hpp +1 -1
- package/nitrogen/generated/android/c++/JStringTelemetryItem.hpp +1 -1
- package/nitrogen/generated/android/c++/JTelemetry.hpp +1 -1
- package/nitrogen/generated/android/c++/JTextInputType.hpp +1 -1
- package/nitrogen/generated/android/c++/JTrafficSide.hpp +1 -1
- package/nitrogen/generated/android/c++/JTravelEstimates.hpp +1 -1
- package/nitrogen/generated/android/c++/JTripConfig.hpp +1 -1
- package/nitrogen/generated/android/c++/JTripPoint.hpp +1 -1
- package/nitrogen/generated/android/c++/JTripPreviewTextConfiguration.hpp +1 -1
- package/nitrogen/generated/android/c++/JTripSelectorCallback.hpp +1 -1
- package/nitrogen/generated/android/c++/JTripsConfig.hpp +1 -1
- package/nitrogen/generated/android/c++/JTurnType.hpp +1 -1
- package/nitrogen/generated/android/c++/JVehicleTelemetryItem.hpp +1 -1
- package/nitrogen/generated/android/c++/JVisibilityState.hpp +1 -1
- package/nitrogen/generated/android/c++/JVisibleTravelEstimate.hpp +1 -1
- package/nitrogen/generated/android/c++/JVoiceAudioEncoding.hpp +1 -1
- package/nitrogen/generated/android/c++/JVoiceInputChunk.hpp +1 -1
- package/nitrogen/generated/android/c++/JVoiceInputResult.hpp +1 -1
- package/nitrogen/generated/android/c++/JWaypointCoordinate.hpp +1 -1
- package/nitrogen/generated/android/c++/JWindowInformation.hpp +1 -1
- package/nitrogen/generated/android/c++/JZoomEvent.hpp +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/AssetImage.kt +15 -15
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_ActiveCarUxRestrictions.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_AlertDismissalReason.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_AppFocusState.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_ColorScheme.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_Point.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_Point_double.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_Point_std__optional_Point_.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_SafeAreaInsets.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_VisibilityState.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_VoiceInputChunk.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_WindowInformation.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_bool.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__optional_Location__std__optional_std__string_.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__optional_Telemetry_.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__optional_bool_.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__optional_std__string__std__optional_GoogleSignInAccount_.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__string.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__string_ColorScheme.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__string_ZoomEvent.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__string_bool.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__string_std__string.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAndroidAutoTelemetrySpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAndroidAutomotiveSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAndroidWindowInformationSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlaySpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlayTimingSpec.kt +65 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridClusterSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridGridTemplateSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridInformationTemplateSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridListTemplateSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridMapTemplateSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridMessageTemplateSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridSearchTemplateSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridSignInTemplateSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridVoiceSpec.kt +2 -0
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.cpp +17 -0
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.hpp +35 -9
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Umbrella.hpp +5 -0
- package/nitrogen/generated/ios/ReactNativeAutoPlayAutolinking.mm +8 -0
- package/nitrogen/generated/ios/ReactNativeAutoPlayAutolinking.swift +12 -0
- package/nitrogen/generated/ios/c++/HybridAutoPlayTimingSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridAutoPlayTimingSpecSwift.hpp +88 -0
- package/nitrogen/generated/ios/swift/AssetImage.swift +13 -13
- package/nitrogen/generated/ios/swift/HybridAutoPlayTimingSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridAutoPlayTimingSpec_cxx.swift +154 -0
- package/nitrogen/generated/shared/c++/AssetImage.hpp +18 -18
- package/nitrogen/generated/shared/c++/HybridAutoPlayTimingSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridAutoPlayTimingSpec.hpp +63 -0
- package/package.json +6 -4
- package/src/components/SafeAreaView.tsx +1 -1
- package/src/hybrid/HybridAutoPlayTiming.ts +5 -0
- package/src/hybrid/HybridVoice.ts +2 -2
- package/src/index.ts +0 -3
- package/src/installTimers.ts +9 -0
- package/src/installTimers.web.ts +2 -0
- package/src/specs/AutoPlayTiming.nitro.ts +25 -0
- package/src/types/Telemetry.ts +1 -1
- package/src/utils/AutoPlayTimers.ts +60 -0
- package/src/utils/NitroImage.ts +13 -3
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HeadlessTaskService.kt +0 -36
- package/lib/AutoPlayHeadlessJsTask.d.ts +0 -5
- package/lib/AutoPlayHeadlessJsTask.js +0 -14
- package/lib-cjs/AutoPlayHeadlessJsTask.js +0 -16
- package/src/AutoPlayHeadlessJsTask.ts +0 -22
package/lib/utils/NitroImage.js
CHANGED
|
@@ -79,7 +79,7 @@ function convert(image) {
|
|
|
79
79
|
// so the input allows all optional parameters which are returned as is even though
|
|
80
80
|
// the return type claims to not have any optional parameters...
|
|
81
81
|
// we specify some default values to not crash because of proper typing required by nitro-modules
|
|
82
|
-
const { height = 0, scale = 0, uri, width = 0, ...rest } = Image.resolveAssetSource(image.image);
|
|
82
|
+
const { height = 0, scale = 0, uri = '', width = 0, ...rest } = Image.resolveAssetSource(image.image) ?? {};
|
|
83
83
|
const assetImage = {
|
|
84
84
|
height,
|
|
85
85
|
scale,
|
|
@@ -10,7 +10,7 @@ const SafeAreaView = (props) => {
|
|
|
10
10
|
return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [
|
|
11
11
|
style,
|
|
12
12
|
{
|
|
13
|
-
...react_native_1.StyleSheet.
|
|
13
|
+
...react_native_1.StyleSheet.absoluteFill,
|
|
14
14
|
paddingTop: safeAreaInsets.top,
|
|
15
15
|
paddingBottom: safeAreaInsets.bottom,
|
|
16
16
|
paddingRight: safeAreaInsets.right,
|
|
@@ -8,8 +8,8 @@ const _native = react_native_nitro_modules_1.NitroModules.createHybridObject('Vo
|
|
|
8
8
|
const startVoiceInput = async (options) => {
|
|
9
9
|
const { onChunk, silenceThresholdMs, maxDurationMs, listeningText, listeningImage, preferSpeechToText, language, startSound, endSound, encoding, } = options ?? {};
|
|
10
10
|
const listeningImageRepeats = listeningImage?.type === 'asset' ? listeningImage.repeats : undefined;
|
|
11
|
-
const startSoundUri = startSound != null ? react_native_1.Image.resolveAssetSource(startSound)
|
|
12
|
-
const endSoundUri = endSound != null ? react_native_1.Image.resolveAssetSource(endSound)
|
|
11
|
+
const startSoundUri = startSound != null ? react_native_1.Image.resolveAssetSource(startSound)?.uri : undefined;
|
|
12
|
+
const endSoundUri = endSound != null ? react_native_1.Image.resolveAssetSource(endSound)?.uri : undefined;
|
|
13
13
|
return await _native.startVoiceInput(silenceThresholdMs, maxDurationMs, listeningText, NitroImage_1.NitroImageUtil.convert(listeningImage), listeningImageRepeats, preferSpeechToText, onChunk, language, startSoundUri, endSoundUri, encoding);
|
|
14
14
|
};
|
|
15
15
|
exports.HybridVoice = {
|
package/lib-cjs/index.js
CHANGED
|
@@ -13,14 +13,10 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
-
};
|
|
19
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
17
|
exports.setIconFont = exports.CarUxRestrictions = exports.AutoPlayModules = exports.HybridAndroidAutomotive = exports.HybridVoice = exports.HybridAutoPlay = exports.HybridAndroidWindowInformation = exports.HybridAndroidAutoTelemetry = void 0;
|
|
21
18
|
const react_native_1 = require("react-native");
|
|
22
19
|
const react_native_nitro_modules_1 = require("react-native-nitro-modules");
|
|
23
|
-
const AutoPlayHeadlessJsTask_1 = __importDefault(require("./AutoPlayHeadlessJsTask"));
|
|
24
20
|
const HybridAndroidAutoTelemetry_1 = require("./hybrid/HybridAndroidAutoTelemetry");
|
|
25
21
|
Object.defineProperty(exports, "HybridAndroidAutoTelemetry", { enumerable: true, get: function () { return HybridAndroidAutoTelemetry_1.HybridAndroidAutoTelemetry; } });
|
|
26
22
|
const HybridAndroidWindowInformation_1 = require("./hybrid/HybridAndroidWindowInformation");
|
|
@@ -29,7 +25,6 @@ const HybridAutoPlay_1 = require("./hybrid/HybridAutoPlay");
|
|
|
29
25
|
Object.defineProperty(exports, "HybridAutoPlay", { enumerable: true, get: function () { return HybridAutoPlay_1.HybridAutoPlay; } });
|
|
30
26
|
const HybridVoice_1 = require("./hybrid/HybridVoice");
|
|
31
27
|
Object.defineProperty(exports, "HybridVoice", { enumerable: true, get: function () { return HybridVoice_1.HybridVoice; } });
|
|
32
|
-
AutoPlayHeadlessJsTask_1.default.registerHeadlessTask(HybridAutoPlay_1.HybridAutoPlay);
|
|
33
28
|
exports.HybridAndroidAutomotive = react_native_1.Platform.OS === 'android'
|
|
34
29
|
? react_native_nitro_modules_1.NitroModules.createHybridObject('AndroidAutomotive')
|
|
35
30
|
: null;
|
|
@@ -83,7 +83,7 @@ function convert(image) {
|
|
|
83
83
|
// so the input allows all optional parameters which are returned as is even though
|
|
84
84
|
// the return type claims to not have any optional parameters...
|
|
85
85
|
// we specify some default values to not crash because of proper typing required by nitro-modules
|
|
86
|
-
const { height = 0, scale = 0, uri, width = 0, ...rest } = react_native_1.Image.resolveAssetSource(image.image);
|
|
86
|
+
const { height = 0, scale = 0, uri = '', width = 0, ...rest } = react_native_1.Image.resolveAssetSource(image.image) ?? {};
|
|
87
87
|
const assetImage = {
|
|
88
88
|
height,
|
|
89
89
|
scale,
|
package/nitro.json
CHANGED
|
@@ -119,6 +119,16 @@
|
|
|
119
119
|
"language": "swift"
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
|
+
"AutoPlayTiming": {
|
|
123
|
+
"android": {
|
|
124
|
+
"implementationClassName": "HybridAutoPlayTiming",
|
|
125
|
+
"language": "kotlin"
|
|
126
|
+
},
|
|
127
|
+
"ios": {
|
|
128
|
+
"implementationClassName": "HybridAutoPlayTiming",
|
|
129
|
+
"language": "swift"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
122
132
|
"Cluster": {
|
|
123
133
|
"android": {
|
|
124
134
|
"implementationClassName": "HybridCluster",
|
|
@@ -37,6 +37,7 @@ target_sources(
|
|
|
37
37
|
../nitrogen/generated/shared/c++/HybridAndroidAutoTelemetrySpec.cpp
|
|
38
38
|
../nitrogen/generated/shared/c++/HybridAndroidWindowInformationSpec.cpp
|
|
39
39
|
../nitrogen/generated/shared/c++/HybridAutoPlaySpec.cpp
|
|
40
|
+
../nitrogen/generated/shared/c++/HybridAutoPlayTimingSpec.cpp
|
|
40
41
|
../nitrogen/generated/shared/c++/HybridCarPlayDashboardSpec.cpp
|
|
41
42
|
../nitrogen/generated/shared/c++/HybridClusterSpec.cpp
|
|
42
43
|
../nitrogen/generated/shared/c++/HybridGridTemplateSpec.cpp
|
|
@@ -53,6 +54,7 @@ target_sources(
|
|
|
53
54
|
../nitrogen/generated/android/c++/JHybridAndroidWindowInformationSpec.cpp
|
|
54
55
|
../nitrogen/generated/android/c++/JHybridAutoPlaySpec.cpp
|
|
55
56
|
../nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage_RemoteImage.cpp
|
|
57
|
+
../nitrogen/generated/android/c++/JHybridAutoPlayTimingSpec.cpp
|
|
56
58
|
../nitrogen/generated/android/c++/JHybridClusterSpec.cpp
|
|
57
59
|
../nitrogen/generated/android/c++/JNitroImage.cpp
|
|
58
60
|
../nitrogen/generated/android/c++/JHybridGridTemplateSpec.cpp
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
#include "JFunc_void_VisibilityState.hpp"
|
|
28
28
|
#include "JFunc_void_std__optional_Location__std__optional_std__string_.hpp"
|
|
29
29
|
#include "JFunc_void_SafeAreaInsets.hpp"
|
|
30
|
+
#include "JHybridAutoPlayTimingSpec.hpp"
|
|
30
31
|
#include "JHybridClusterSpec.hpp"
|
|
31
32
|
#include "JFunc_void_std__string.hpp"
|
|
32
33
|
#include "JFunc_void_std__string_ColorScheme.hpp"
|
|
@@ -156,6 +157,14 @@ struct JHybridSearchTemplateSpecImpl: public jni::JavaClass<JHybridSearchTemplat
|
|
|
156
157
|
return javaPart->getJHybridSearchTemplateSpec();
|
|
157
158
|
}
|
|
158
159
|
};
|
|
160
|
+
struct JHybridAutoPlayTimingSpecImpl: public jni::JavaClass<JHybridAutoPlayTimingSpecImpl, JHybridAutoPlayTimingSpec::JavaPart> {
|
|
161
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlayTiming;";
|
|
162
|
+
static std::shared_ptr<JHybridAutoPlayTimingSpec> create() {
|
|
163
|
+
static const auto constructorFn = javaClassStatic()->getConstructor<JHybridAutoPlayTimingSpecImpl::javaobject()>();
|
|
164
|
+
jni::local_ref<JHybridAutoPlayTimingSpec::JavaPart> javaPart = javaClassStatic()->newObject(constructorFn);
|
|
165
|
+
return javaPart->getJHybridAutoPlayTimingSpec();
|
|
166
|
+
}
|
|
167
|
+
};
|
|
159
168
|
struct JHybridClusterSpecImpl: public jni::JavaClass<JHybridClusterSpecImpl, JHybridClusterSpec::JavaPart> {
|
|
160
169
|
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/HybridCluster;";
|
|
161
170
|
static std::shared_ptr<JHybridClusterSpec> create() {
|
|
@@ -182,6 +191,7 @@ void registerAllNatives() {
|
|
|
182
191
|
margelo::nitro::swe::iternio::reactnativeautoplay::JFunc_void_VisibilityState_cxx::registerNatives();
|
|
183
192
|
margelo::nitro::swe::iternio::reactnativeautoplay::JFunc_void_std__optional_Location__std__optional_std__string__cxx::registerNatives();
|
|
184
193
|
margelo::nitro::swe::iternio::reactnativeautoplay::JFunc_void_SafeAreaInsets_cxx::registerNatives();
|
|
194
|
+
margelo::nitro::swe::iternio::reactnativeautoplay::JHybridAutoPlayTimingSpec::CxxPart::registerNatives();
|
|
185
195
|
margelo::nitro::swe::iternio::reactnativeautoplay::JHybridClusterSpec::CxxPart::registerNatives();
|
|
186
196
|
margelo::nitro::swe::iternio::reactnativeautoplay::JFunc_void_std__string_cxx::registerNatives();
|
|
187
197
|
margelo::nitro::swe::iternio::reactnativeautoplay::JFunc_void_std__string_ColorScheme_cxx::registerNatives();
|
|
@@ -279,6 +289,12 @@ void registerAllNatives() {
|
|
|
279
289
|
return JHybridSearchTemplateSpecImpl::create();
|
|
280
290
|
}
|
|
281
291
|
);
|
|
292
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
293
|
+
"AutoPlayTiming",
|
|
294
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
295
|
+
return JHybridAutoPlayTimingSpecImpl::create();
|
|
296
|
+
}
|
|
297
|
+
);
|
|
282
298
|
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
283
299
|
"Cluster",
|
|
284
300
|
[]() -> std::shared_ptr<HybridObject> {
|
|
@@ -19,7 +19,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
19
19
|
using namespace facebook;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* The C++ JNI bridge between the C++ struct "ActiveCarUxRestrictions" and the
|
|
22
|
+
* The C++ JNI bridge between the C++ struct "ActiveCarUxRestrictions" and the Kotlin data class "ActiveCarUxRestrictions".
|
|
23
23
|
*/
|
|
24
24
|
struct JActiveCarUxRestrictions final: public jni::JavaClass<JActiveCarUxRestrictions> {
|
|
25
25
|
public:
|
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "AlertActionStyle" and the
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "AlertActionStyle" and the Kotlin enum "AlertActionStyle".
|
|
19
19
|
*/
|
|
20
20
|
struct JAlertActionStyle final: public jni::JavaClass<JAlertActionStyle> {
|
|
21
21
|
public:
|
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "AlertDismissalReason" and the
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "AlertDismissalReason" and the Kotlin enum "AlertDismissalReason".
|
|
19
19
|
*/
|
|
20
20
|
struct JAlertDismissalReason final: public jni::JavaClass<JAlertDismissalReason> {
|
|
21
21
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "AppFocusState" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "AppFocusState" and the Kotlin data class "AppFocusState".
|
|
21
21
|
*/
|
|
22
22
|
struct JAppFocusState final: public jni::JavaClass<JAppFocusState> {
|
|
23
23
|
public:
|
|
@@ -20,7 +20,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
20
20
|
using namespace facebook;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* The C++ JNI bridge between the C++ struct "AssetImage" and the
|
|
23
|
+
* The C++ JNI bridge between the C++ struct "AssetImage" and the Kotlin data class "AssetImage".
|
|
24
24
|
*/
|
|
25
25
|
struct JAssetImage final: public jni::JavaClass<JAssetImage> {
|
|
26
26
|
public:
|
|
@@ -34,25 +34,25 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
34
34
|
[[nodiscard]]
|
|
35
35
|
AssetImage toCpp() const {
|
|
36
36
|
static const auto clazz = javaClassStatic();
|
|
37
|
-
static const auto
|
|
38
|
-
jni::local_ref<
|
|
39
|
-
static const auto fieldPackager_asset = clazz->getField<jboolean>("packager_asset");
|
|
40
|
-
jboolean packager_asset = this->getFieldValue(fieldPackager_asset);
|
|
41
|
-
static const auto fieldHeight = clazz->getField<double>("height");
|
|
42
|
-
double height = this->getFieldValue(fieldHeight);
|
|
37
|
+
static const auto fieldUri = clazz->getField<jni::JString>("uri");
|
|
38
|
+
jni::local_ref<jni::JString> uri = this->getFieldValue(fieldUri);
|
|
43
39
|
static const auto fieldWidth = clazz->getField<double>("width");
|
|
44
40
|
double width = this->getFieldValue(fieldWidth);
|
|
41
|
+
static const auto fieldHeight = clazz->getField<double>("height");
|
|
42
|
+
double height = this->getFieldValue(fieldHeight);
|
|
45
43
|
static const auto fieldScale = clazz->getField<double>("scale");
|
|
46
44
|
double scale = this->getFieldValue(fieldScale);
|
|
47
|
-
static const auto
|
|
48
|
-
jni::local_ref<
|
|
45
|
+
static const auto fieldColor = clazz->getField<JNitroColor>("color");
|
|
46
|
+
jni::local_ref<JNitroColor> color = this->getFieldValue(fieldColor);
|
|
47
|
+
static const auto fieldPackager_asset = clazz->getField<jboolean>("packager_asset");
|
|
48
|
+
jboolean packager_asset = this->getFieldValue(fieldPackager_asset);
|
|
49
49
|
return AssetImage(
|
|
50
|
-
|
|
51
|
-
static_cast<bool>(packager_asset),
|
|
52
|
-
height,
|
|
50
|
+
uri->toStdString(),
|
|
53
51
|
width,
|
|
52
|
+
height,
|
|
54
53
|
scale,
|
|
55
|
-
|
|
54
|
+
color != nullptr ? std::make_optional(color->toCpp()) : std::nullopt,
|
|
55
|
+
static_cast<bool>(packager_asset)
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -62,17 +62,17 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
62
62
|
*/
|
|
63
63
|
[[maybe_unused]]
|
|
64
64
|
static jni::local_ref<JAssetImage::javaobject> fromCpp(const AssetImage& value) {
|
|
65
|
-
using JSignature = JAssetImage(jni::alias_ref<
|
|
65
|
+
using JSignature = JAssetImage(jni::alias_ref<jni::JString>, double, double, double, jni::alias_ref<JNitroColor>, jboolean);
|
|
66
66
|
static const auto clazz = javaClassStatic();
|
|
67
67
|
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
68
68
|
return create(
|
|
69
69
|
clazz,
|
|
70
|
-
|
|
71
|
-
value.packager_asset,
|
|
72
|
-
value.height,
|
|
70
|
+
jni::make_jstring(value.uri),
|
|
73
71
|
value.width,
|
|
72
|
+
value.height,
|
|
74
73
|
value.scale,
|
|
75
|
-
|
|
74
|
+
value.color.has_value() ? JNitroColor::fromCpp(value.color.value()) : nullptr,
|
|
75
|
+
value.packager_asset
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
};
|
|
@@ -22,7 +22,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
22
22
|
using namespace facebook;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* The C++ JNI bridge between the C++ struct "AutoText" and the
|
|
25
|
+
* The C++ JNI bridge between the C++ struct "AutoText" and the Kotlin data class "AutoText".
|
|
26
26
|
*/
|
|
27
27
|
struct JAutoText final: public jni::JavaClass<JAutoText> {
|
|
28
28
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "BooleanTelemetryItem" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "BooleanTelemetryItem" and the Kotlin data class "BooleanTelemetryItem".
|
|
21
21
|
*/
|
|
22
22
|
struct JBooleanTelemetryItem final: public jni::JavaClass<JBooleanTelemetryItem> {
|
|
23
23
|
public:
|
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "CarUxRestrictions" and the
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "CarUxRestrictions" and the Kotlin enum "CarUxRestrictions".
|
|
19
19
|
*/
|
|
20
20
|
struct JCarUxRestrictions final: public jni::JavaClass<JCarUxRestrictions> {
|
|
21
21
|
public:
|
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "ChargingConnector" and the
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "ChargingConnector" and the Kotlin enum "ChargingConnector".
|
|
19
19
|
*/
|
|
20
20
|
struct JChargingConnector final: public jni::JavaClass<JChargingConnector> {
|
|
21
21
|
public:
|
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "ClusterEventName" and the
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "ClusterEventName" and the Kotlin enum "ClusterEventName".
|
|
19
19
|
*/
|
|
20
20
|
struct JClusterEventName final: public jni::JavaClass<JClusterEventName> {
|
|
21
21
|
public:
|
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "ColorScheme" and the
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "ColorScheme" and the Kotlin enum "ColorScheme".
|
|
19
19
|
*/
|
|
20
20
|
struct JColorScheme final: public jni::JavaClass<JColorScheme> {
|
|
21
21
|
public:
|
|
@@ -18,7 +18,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
18
18
|
using namespace facebook;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* The C++ JNI bridge between the C++ struct "Distance" and the
|
|
21
|
+
* The C++ JNI bridge between the C++ struct "Distance" and the Kotlin data class "Distance".
|
|
22
22
|
*/
|
|
23
23
|
struct JDistance final: public jni::JavaClass<JDistance> {
|
|
24
24
|
public:
|
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "DistanceUnits" and the
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "DistanceUnits" and the Kotlin enum "DistanceUnits".
|
|
19
19
|
*/
|
|
20
20
|
struct JDistanceUnits final: public jni::JavaClass<JDistanceUnits> {
|
|
21
21
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "DurationWithTimeZone" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "DurationWithTimeZone" and the Kotlin data class "DurationWithTimeZone".
|
|
21
21
|
*/
|
|
22
22
|
struct JDurationWithTimeZone final: public jni::JavaClass<JDurationWithTimeZone> {
|
|
23
23
|
public:
|
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "EventName" and the
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "EventName" and the Kotlin enum "EventName".
|
|
19
19
|
*/
|
|
20
20
|
struct JEventName final: public jni::JavaClass<JEventName> {
|
|
21
21
|
public:
|
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "ForkType" and the
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "ForkType" and the Kotlin enum "ForkType".
|
|
19
19
|
*/
|
|
20
20
|
struct JForkType final: public jni::JavaClass<JForkType> {
|
|
21
21
|
public:
|
|
@@ -20,7 +20,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
20
20
|
using namespace facebook;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* The C++ JNI bridge between the C++ struct "GlyphImage" and the
|
|
23
|
+
* The C++ JNI bridge between the C++ struct "GlyphImage" and the Kotlin data class "GlyphImage".
|
|
24
24
|
*/
|
|
25
25
|
struct JGlyphImage final: public jni::JavaClass<JGlyphImage> {
|
|
26
26
|
public:
|
|
@@ -25,7 +25,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
25
25
|
using namespace facebook;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* The C++ JNI bridge between the C++ struct "GoogleSignIn" and the
|
|
28
|
+
* The C++ JNI bridge between the C++ struct "GoogleSignIn" and the Kotlin data class "GoogleSignIn".
|
|
29
29
|
*/
|
|
30
30
|
struct JGoogleSignIn final: public jni::JavaClass<JGoogleSignIn> {
|
|
31
31
|
public:
|
|
@@ -18,7 +18,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
18
18
|
using namespace facebook;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* The C++ JNI bridge between the C++ struct "GoogleSignInAccount" and the
|
|
21
|
+
* The C++ JNI bridge between the C++ struct "GoogleSignInAccount" and the Kotlin data class "GoogleSignInAccount".
|
|
22
22
|
*/
|
|
23
23
|
struct JGoogleSignInAccount final: public jni::JavaClass<JGoogleSignInAccount> {
|
|
24
24
|
public:
|
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "GridImageSize" and the
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "GridImageSize" and the Kotlin enum "GridImageSize".
|
|
19
19
|
*/
|
|
20
20
|
struct JGridImageSize final: public jni::JavaClass<JGridImageSize> {
|
|
21
21
|
public:
|
|
@@ -59,7 +59,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
59
59
|
using namespace facebook;
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
* The C++ JNI bridge between the C++ struct "GridTemplateConfig" and the
|
|
62
|
+
* The C++ JNI bridge between the C++ struct "GridTemplateConfig" and the Kotlin data class "GridTemplateConfig".
|
|
63
63
|
*/
|
|
64
64
|
struct JGridTemplateConfig final: public jni::JavaClass<JGridTemplateConfig> {
|
|
65
65
|
public:
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JHybridAutoPlayTimingSpec.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "JHybridAutoPlayTimingSpec.hpp"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
#include <functional>
|
|
13
|
+
#include "JFunc_void.hpp"
|
|
14
|
+
#include <NitroModules/JNICallable.hpp>
|
|
15
|
+
|
|
16
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
17
|
+
|
|
18
|
+
std::shared_ptr<JHybridAutoPlayTimingSpec> JHybridAutoPlayTimingSpec::JavaPart::getJHybridAutoPlayTimingSpec() {
|
|
19
|
+
auto hybridObject = JHybridObject::JavaPart::getJHybridObject();
|
|
20
|
+
auto castHybridObject = std::dynamic_pointer_cast<JHybridAutoPlayTimingSpec>(hybridObject);
|
|
21
|
+
if (castHybridObject == nullptr) [[unlikely]] {
|
|
22
|
+
throw std::runtime_error("Failed to downcast JHybridObject to JHybridAutoPlayTimingSpec!");
|
|
23
|
+
}
|
|
24
|
+
return castHybridObject;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
jni::local_ref<JHybridAutoPlayTimingSpec::CxxPart::jhybriddata> JHybridAutoPlayTimingSpec::CxxPart::initHybrid(jni::alias_ref<jhybridobject> jThis) {
|
|
28
|
+
return makeCxxInstance(jThis);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
std::shared_ptr<JHybridObject> JHybridAutoPlayTimingSpec::CxxPart::createHybridObject(const jni::local_ref<JHybridObject::JavaPart>& javaPart) {
|
|
32
|
+
auto castJavaPart = jni::dynamic_ref_cast<JHybridAutoPlayTimingSpec::JavaPart>(javaPart);
|
|
33
|
+
if (castJavaPart == nullptr) [[unlikely]] {
|
|
34
|
+
throw std::runtime_error("Failed to cast JHybridObject::JavaPart to JHybridAutoPlayTimingSpec::JavaPart!");
|
|
35
|
+
}
|
|
36
|
+
return std::make_shared<JHybridAutoPlayTimingSpec>(castJavaPart);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
void JHybridAutoPlayTimingSpec::CxxPart::registerNatives() {
|
|
40
|
+
registerHybrid({
|
|
41
|
+
makeNativeMethod("initHybrid", JHybridAutoPlayTimingSpec::CxxPart::initHybrid),
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Properties
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
// Methods
|
|
49
|
+
double JHybridAutoPlayTimingSpec::createTimer(const std::function<void()>& callback, double durationMs, bool repeats) {
|
|
50
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double(jni::alias_ref<JFunc_void::javaobject> /* callback */, double /* durationMs */, jboolean /* repeats */)>("createTimer_cxx");
|
|
51
|
+
auto __result = method(_javaPart, JFunc_void_cxx::fromCpp(callback), durationMs, repeats);
|
|
52
|
+
return __result;
|
|
53
|
+
}
|
|
54
|
+
void JHybridAutoPlayTimingSpec::deleteTimer(double id) {
|
|
55
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* id */)>("deleteTimer");
|
|
56
|
+
method(_javaPart, id);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridAutoPlayTimingSpec.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <NitroModules/JHybridObject.hpp>
|
|
11
|
+
#include <fbjni/fbjni.h>
|
|
12
|
+
#include "HybridAutoPlayTimingSpec.hpp"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
18
|
+
|
|
19
|
+
using namespace facebook;
|
|
20
|
+
|
|
21
|
+
class JHybridAutoPlayTimingSpec: public virtual HybridAutoPlayTimingSpec, public virtual JHybridObject {
|
|
22
|
+
public:
|
|
23
|
+
struct JavaPart: public jni::JavaClass<JavaPart, JHybridObject::JavaPart> {
|
|
24
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlayTimingSpec;";
|
|
25
|
+
std::shared_ptr<JHybridAutoPlayTimingSpec> getJHybridAutoPlayTimingSpec();
|
|
26
|
+
};
|
|
27
|
+
struct CxxPart: public jni::HybridClass<CxxPart, JHybridObject::CxxPart> {
|
|
28
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlayTimingSpec$CxxPart;";
|
|
29
|
+
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
|
|
30
|
+
static void registerNatives();
|
|
31
|
+
using HybridBase::HybridBase;
|
|
32
|
+
protected:
|
|
33
|
+
std::shared_ptr<JHybridObject> createHybridObject(const jni::local_ref<JHybridObject::JavaPart>& javaPart) override;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
public:
|
|
37
|
+
explicit JHybridAutoPlayTimingSpec(const jni::local_ref<JHybridAutoPlayTimingSpec::JavaPart>& javaPart):
|
|
38
|
+
HybridObject(HybridAutoPlayTimingSpec::TAG),
|
|
39
|
+
JHybridObject(javaPart),
|
|
40
|
+
_javaPart(jni::make_global(javaPart)) {}
|
|
41
|
+
~JHybridAutoPlayTimingSpec() override {
|
|
42
|
+
// Hermes GC can destroy JS objects on a non-JNI Thread.
|
|
43
|
+
jni::ThreadScope::WithClassLoader([&] { _javaPart.reset(); });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public:
|
|
47
|
+
inline const jni::global_ref<JHybridAutoPlayTimingSpec::JavaPart>& getJavaPart() const noexcept {
|
|
48
|
+
return _javaPart;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
// Properties
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
// Methods
|
|
57
|
+
double createTimer(const std::function<void()>& callback, double durationMs, bool repeats) override;
|
|
58
|
+
void deleteTimer(double id) override;
|
|
59
|
+
|
|
60
|
+
private:
|
|
61
|
+
jni::global_ref<JHybridAutoPlayTimingSpec::JavaPart> _javaPart;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -29,7 +29,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
29
29
|
using namespace facebook;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* The C++ JNI bridge between the C++ struct "ImageLane" and the
|
|
32
|
+
* The C++ JNI bridge between the C++ struct "ImageLane" and the Kotlin data class "ImageLane".
|
|
33
33
|
*/
|
|
34
34
|
struct JImageLane final: public jni::JavaClass<JImageLane> {
|
|
35
35
|
public:
|
|
@@ -67,7 +67,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
67
67
|
using namespace facebook;
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
|
-
* The C++ JNI bridge between the C++ struct "InformationTemplateConfig" and the
|
|
70
|
+
* The C++ JNI bridge between the C++ struct "InformationTemplateConfig" and the Kotlin data class "InformationTemplateConfig".
|
|
71
71
|
*/
|
|
72
72
|
struct JInformationTemplateConfig final: public jni::JavaClass<JInformationTemplateConfig> {
|
|
73
73
|
public:
|
|
@@ -27,7 +27,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
27
27
|
using namespace facebook;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* The C++ JNI bridge between the C++ struct "InputSignIn" and the
|
|
30
|
+
* The C++ JNI bridge between the C++ struct "InputSignIn" and the Kotlin data class "InputSignIn".
|
|
31
31
|
*/
|
|
32
32
|
struct JInputSignIn final: public jni::JavaClass<JInputSignIn> {
|
|
33
33
|
public:
|
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "KeepType" and the
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "KeepType" and the Kotlin enum "KeepType".
|
|
19
19
|
*/
|
|
20
20
|
struct JKeepType final: public jni::JavaClass<JKeepType> {
|
|
21
21
|
public:
|
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "KeyboardType" and the
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "KeyboardType" and the Kotlin enum "KeyboardType".
|
|
19
19
|
*/
|
|
20
20
|
struct JKeyboardType final: public jni::JavaClass<JKeyboardType> {
|
|
21
21
|
public:
|
|
@@ -34,7 +34,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
34
34
|
using namespace facebook;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* The C++ JNI bridge between the C++ struct "LaneGuidance" and the
|
|
37
|
+
* The C++ JNI bridge between the C++ struct "LaneGuidance" and the Kotlin data class "LaneGuidance".
|
|
38
38
|
*/
|
|
39
39
|
struct JLaneGuidance final: public jni::JavaClass<JLaneGuidance> {
|
|
40
40
|
public:
|
|
@@ -15,7 +15,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "ListImageType" and the
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "ListImageType" and the Kotlin enum "ListImageType".
|
|
19
19
|
*/
|
|
20
20
|
struct JListImageType final: public jni::JavaClass<JListImageType> {
|
|
21
21
|
public:
|
|
@@ -67,7 +67,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
67
67
|
using namespace facebook;
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
|
-
* The C++ JNI bridge between the C++ struct "ListTemplateConfig" and the
|
|
70
|
+
* The C++ JNI bridge between the C++ struct "ListTemplateConfig" and the Kotlin data class "ListTemplateConfig".
|
|
71
71
|
*/
|
|
72
72
|
struct JListTemplateConfig final: public jni::JavaClass<JListTemplateConfig> {
|
|
73
73
|
public:
|