react-native-windows 0.69.6 → 0.70.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/.flowconfig +5 -1
- package/Chakra/ChakraHelpers.cpp +1 -1
- package/Chakra/ChakraPlatform.cpp +1 -1
- package/Chakra/ChakraValue.cpp +6 -3
- package/Chakra/ChakraValue.h +1 -1
- package/Directory.Build.props +7 -7
- package/Folly/Folly.vcxproj +20 -13
- package/Folly/cgmanifest.json +14 -0
- package/Libraries/Alert/Alert.js +18 -4
- package/Libraries/Alert/Alert.windows.js +4 -0
- package/Libraries/Alert/NativeAlertManager.js +1 -0
- package/Libraries/Animated/Animated.js +2 -2
- package/Libraries/Animated/AnimatedEvent.js +7 -4
- package/Libraries/Animated/AnimatedImplementation.js +17 -3
- package/Libraries/Animated/AnimatedMock.js +7 -2
- package/Libraries/Animated/NativeAnimatedHelper.js +220 -95
- package/Libraries/Animated/NativeAnimatedModule.js +3 -0
- package/Libraries/Animated/NativeAnimatedTurboModule.js +3 -0
- package/Libraries/Animated/animations/SpringAnimation.js +3 -3
- package/Libraries/Animated/animations/TimingAnimation.js +3 -3
- package/Libraries/Animated/createAnimatedComponent.js +8 -1
- package/Libraries/Animated/nodes/AnimatedAddition.js +3 -1
- package/Libraries/Animated/nodes/AnimatedColor.js +50 -29
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +3 -1
- package/Libraries/Animated/nodes/AnimatedDivision.js +3 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +22 -21
- package/Libraries/Animated/nodes/AnimatedModulo.js +3 -1
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +3 -2
- package/Libraries/Animated/nodes/AnimatedProps.js +20 -12
- package/Libraries/Animated/nodes/AnimatedStyle.js +19 -16
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +3 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +5 -5
- package/Libraries/Animated/nodes/AnimatedValue.js +14 -5
- package/Libraries/Animated/nodes/AnimatedValueXY.js +28 -1
- package/Libraries/Animated/useAnimatedProps.js +1 -0
- package/Libraries/AppState/AppState.js +0 -32
- package/Libraries/AppTheme/AppTheme.js +14 -8
- package/Libraries/AppTheme/AppThemeTypes.d.ts +0 -3
- package/Libraries/BatchedBridge/MessageQueue.js +21 -15
- package/Libraries/BatchedBridge/NativeModules.js +3 -4
- package/Libraries/Blob/FileReader.js +0 -6
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +0 -20
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +0 -20
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -0
- package/Libraries/Components/Keyboard/Keyboard.js +0 -11
- package/Libraries/Components/Pressable/Pressable.js +2 -0
- package/Libraries/Components/Pressable/Pressable.windows.js +2 -0
- package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +1 -3
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +3 -30
- package/Libraries/Components/SafeAreaView/SafeAreaView.windows.js +4 -30
- package/Libraries/Components/ScrollView/ScrollView.js +13 -11
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +5 -3
- package/Libraries/Components/StatusBar/StatusBar.js +10 -7
- package/Libraries/Components/TextInput/InputAccessoryView.js +14 -13
- package/Libraries/Components/TextInput/TextInput.js +12 -2
- package/Libraries/Components/TextInput/TextInput.windows.js +12 -2
- package/Libraries/Components/Touchable/PooledClass.js +16 -4
- package/Libraries/Components/Touchable/Touchable.js +50 -1
- package/Libraries/Components/Touchable/Touchable.windows.js +972 -0
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -2
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +0 -7
- package/Libraries/Components/View/ViewPropTypes.js +3 -8
- package/Libraries/Components/View/ViewPropTypes.windows.js +3 -8
- package/Libraries/Core/ExceptionsManager.js +2 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/Timers/JSTimers.js +2 -2
- package/Libraries/Core/polyfillPromise.js +0 -32
- package/Libraries/Core/setUpBatchedBridge.js +5 -1
- package/Libraries/Core/setUpPerformance.js +1 -1
- package/Libraries/EventEmitter/NativeEventEmitter.js +0 -13
- package/Libraries/Image/AssetSourceResolver.js +2 -2
- package/Libraries/Image/Image.android.js +5 -3
- package/Libraries/Image/Image.ios.js +6 -3
- package/Libraries/Image/Image.windows.js +6 -3
- package/Libraries/Image/ImageSource.js +7 -5
- package/Libraries/Inspector/ElementBox.js +2 -2
- package/Libraries/Inspector/NetworkOverlay.js +13 -8
- package/Libraries/Interaction/PanResponder.js +16 -14
- package/Libraries/Linking/Linking.js +0 -11
- package/Libraries/Lists/FlatList.js +3 -2
- package/Libraries/Lists/SectionList.js +2 -0
- package/Libraries/Lists/ViewabilityHelper.js +7 -3
- package/Libraries/Lists/VirtualizeUtils.js +33 -20
- package/Libraries/Lists/VirtualizedList.js +93 -47
- package/Libraries/Lists/VirtualizedListContext.js +1 -0
- package/Libraries/Lists/VirtualizedSectionList.js +14 -9
- package/Libraries/Lists/__tests__/VirtualizeUtils-test.js +19 -18
- package/Libraries/Lists/__tests__/VirtualizedList-test.js +10 -6
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/LogBox/LogBox.js +3 -1
- package/Libraries/LogBox/UI/AnsiHighlight.js +2 -0
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +3 -0
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +0 -3
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +8 -3
- package/Libraries/NativeComponent/BaseViewConfig.android.js +9 -18
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +26 -12
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +26 -12
- package/Libraries/Network/XMLHttpRequest.js +9 -11
- package/Libraries/Performance/PureComponentDebug.js +1 -0
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +9 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +16 -0
- package/Libraries/Pressability/Pressability.js +26 -16
- package/Libraries/Pressability/Pressability.windows.js +30 -17
- package/Libraries/Promise.js +0 -1
- package/Libraries/ReactNative/AppRegistry.js +16 -13
- package/Libraries/ReactNative/BridgelessUIManager.js +2 -0
- package/Libraries/ReactNative/PaperUIManager.js +9 -9
- package/Libraries/ReactNative/PaperUIManager.windows.js +7 -8
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +12 -0
- package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +68 -0
- package/Libraries/ReactNative/getNativeComponentAttributes.js +6 -7
- package/Libraries/ReactNative/renderApplication.js +1 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +4443 -3615
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +1496 -1170
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +1694 -1356
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +4439 -3588
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1583 -1249
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1719 -1372
- package/Libraries/Storage/AsyncStorage.js +7 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +8 -0
- package/Libraries/StyleSheet/flattenStyle.js +1 -1
- package/Libraries/StyleSheet/processTransform.js +2 -0
- package/Libraries/StyleSheet/processTransform.windows.js +2 -0
- package/Libraries/StyleSheet/splitLayoutProps.js +2 -0
- package/Libraries/Text/Text.js +15 -7
- package/Libraries/Text/Text.windows.js +14 -7
- package/Libraries/Types/CoreEventTypes.js +137 -11
- package/Libraries/Types/CoreEventTypes.windows.js +147 -22
- package/Libraries/Utilities/Dimensions.js +0 -13
- package/Libraries/Utilities/HMRClient.js +3 -3
- package/Libraries/Utilities/Platform.ios.js +0 -7
- package/Libraries/Utilities/ReactNativeTestTools.js +3 -1
- package/Libraries/Utilities/codegenNativeCommands.js +11 -2
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
- package/Libraries/Utilities/stringifySafe.js +3 -1
- package/Libraries/Utilities/truncate.js +1 -1
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -2
- package/Libraries/Vibration/Vibration.js +1 -1
- package/Libraries/WebSocket/WebSocket.js +1 -0
- package/Libraries/vendor/emitter/EventEmitter.js +105 -12
- package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +73 -117
- package/Microsoft.ReactNative/Base/CoreNativeModules.cpp +24 -12
- package/Microsoft.ReactNative/CoreApp.cpp +303 -0
- package/Microsoft.ReactNative/CoreAppPage.cpp +21 -0
- package/Microsoft.ReactNative/CoreAppPage.h +15 -0
- package/Microsoft.ReactNative/CoreAppPage.idl +12 -0
- package/Microsoft.ReactNative/CoreAppPage.xaml +14 -0
- package/Microsoft.ReactNative/Fabric/ActivityIndicatorComponentView.cpp +1 -2
- package/Microsoft.ReactNative/Fabric/ActivityIndicatorComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/ComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/ImageComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/ImageComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/ParagraphComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/ParagraphComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/ScrollViewComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/ScrollViewComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/SliderComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/SliderComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/SwitchComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/SwitchComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/TextComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/TextComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/TextInput/WindowsTextInputComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/TextInput/WindowsTextInputComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/ViewComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/ViewComponentView.h +1 -1
- package/Microsoft.ReactNative/GlyphViewManager.cpp +1 -0
- package/Microsoft.ReactNative/IReactDispatcher.cpp +18 -0
- package/Microsoft.ReactNative/IReactDispatcher.h +18 -3
- package/Microsoft.ReactNative/IReactDispatcher.idl +15 -0
- package/Microsoft.ReactNative/IReactPropertyBag.cpp +9 -0
- package/Microsoft.ReactNative/IReactPropertyBag.h +3 -0
- package/Microsoft.ReactNative/IReactPropertyBag.idl +3 -0
- package/Microsoft.ReactNative/JSDispatcherWriter.cpp +60 -22
- package/Microsoft.ReactNative/JSDispatcherWriter.h +5 -3
- package/Microsoft.ReactNative/JsiApi.cpp +41 -1
- package/Microsoft.ReactNative/JsiApi.h +3 -0
- package/Microsoft.ReactNative/JsiApi.idl +19 -1
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +18 -2
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +7 -7
- package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.h +1 -1
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +15 -12
- package/Microsoft.ReactNative/Modules/AlertModule.h +1 -1
- package/Microsoft.ReactNative/Modules/AppStateModule.cpp +45 -9
- package/Microsoft.ReactNative/Modules/AppStateModule.h +9 -3
- package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.h +1 -1
- package/Microsoft.ReactNative/Modules/ClipboardModule.h +1 -1
- package/Microsoft.ReactNative/Modules/DevSettingsModule.h +1 -1
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +1 -1
- package/Microsoft.ReactNative/Modules/I18nManagerModule.h +1 -1
- package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/ImageViewManagerModule.h +1 -1
- package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +1 -1
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +1 -1
- package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +66 -39
- package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +41 -11
- package/Microsoft.ReactNative/Modules/PaperUIManagerModule.h +1 -1
- package/Microsoft.ReactNative/QuirkSettings.cpp +22 -0
- package/Microsoft.ReactNative/QuirkSettings.h +10 -0
- package/Microsoft.ReactNative/QuirkSettings.idl +7 -0
- package/Microsoft.ReactNative/ReactApplication.cpp +44 -0
- package/Microsoft.ReactNative/ReactApplication.h +40 -5
- package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.cpp +5 -2
- package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.h +1 -0
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +24 -4
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +1 -1
- package/Microsoft.ReactNative/ReactPointerEventArgs.cpp +12 -2
- package/Microsoft.ReactNative/TurboModulesProvider.cpp +146 -84
- package/Microsoft.ReactNative/TurboModulesProvider.h +5 -0
- package/Microsoft.ReactNative/Utils/BatchingEventEmitter.cpp +1 -0
- package/Microsoft.ReactNative/Utils/Helpers.cpp +1 -1
- package/Microsoft.ReactNative/Utils/Helpers.h +1 -1
- package/Microsoft.ReactNative/Utils/PropertyUtils.h +1 -1
- package/Microsoft.ReactNative/Utils/TransformableText.h +1 -1
- package/Microsoft.ReactNative/Utils/ValueUtils.cpp +0 -1
- package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +9 -7
- package/Microsoft.ReactNative/Views/DynamicAutomationProperties.cpp +3 -3
- package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +13 -1
- package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.cpp +1 -1
- package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +63 -13
- package/Microsoft.ReactNative/Views/Image/ImageViewManager.cpp +1 -1
- package/Microsoft.ReactNative/Views/Image/ReactImage.cpp +5 -6
- package/Microsoft.ReactNative/Views/Image/ReactImage.h +4 -4
- package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.h +1 -1
- package/Microsoft.ReactNative/Views/TextInputViewManager.cpp +21 -2
- package/Microsoft.ReactNative/Views/TextViewManager.cpp +6 -3
- package/Microsoft.ReactNative/Views/TouchEventHandler.cpp +1 -1
- package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +7 -1
- package/Microsoft.ReactNative/Views/ViewPanel.cpp +4 -0
- package/Microsoft.ReactNative/Views/ViewViewManager.cpp +8 -3
- package/Microsoft.ReactNative/Views/cppwinrt/DynamicAutomationPeer.idl +2 -0
- package/Microsoft.ReactNative/microsoft.reactnative.def +4 -1
- package/Microsoft.ReactNative.Cxx/AppModelHelpers.h +17 -0
- package/Microsoft.ReactNative.Cxx/CoreApp.h +60 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.cpp +65 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +13 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.cpp +53 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.h +32 -0
- package/Microsoft.ReactNative.Cxx/JSI/LongLivedJsiValue.h +84 -0
- package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.cpp +14 -2
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +4 -0
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +10 -0
- package/Microsoft.ReactNative.Managed/packages.lock.json +1 -24
- package/Mso/dispatchQueue/dispatchQueue.h +12 -4
- package/Mso/src/dispatchQueue/looperScheduler.cpp +36 -9
- package/Mso/src/dispatchQueue/queueService.cpp +2 -2
- package/Mso/src/dispatchQueue/queueService.h +2 -2
- package/Mso/src/dispatchQueue/uiScheduler_winrt.cpp +6 -1
- package/Mso/src/memoryApi/memoryApi.cpp +3 -0
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/JSEngine.props +1 -1
- package/PropertySheets/Release.props +6 -0
- package/ReactCommon/ReactCommon.vcxproj +11 -21
- package/ReactCommon/ReactCommon.vcxproj.filters +64 -46
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.h +145 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +344 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/BaseTextProps.cpp +313 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewProps.cpp +455 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/ConcreteComponentDescriptor.h +216 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/PropsMacros.h +91 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/graphics/RectangleEdges.h +100 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/CompactValue.h +3 -1
- package/Scripts/Microsoft.ReactNative.nuspec +6 -0
- package/Scripts/Microsoft.ReactNative.targets +7 -0
- package/Shared/DevSettings.h +4 -0
- package/Shared/InstanceManager.cpp +29 -0
- package/Shared/InstanceManager.h +14 -0
- package/Shared/JSI/ChakraRuntime.cpp +11 -2
- package/Shared/JSI/ChakraRuntime.h +2 -0
- package/Shared/Modules/BlobModule.cpp +4 -4
- package/Shared/Modules/BlobModule.h +1 -1
- package/Shared/Modules/FileReaderModule.cpp +3 -2
- package/Shared/Modules/IBlobPersistor.h +1 -1
- package/Shared/Networking/IHttpResource.h +1 -0
- package/Shared/Networking/OriginPolicyHttpFilter.cpp +16 -10
- package/Shared/Networking/WinRTHttpResource.cpp +34 -2
- package/Shared/OInstance.cpp +29 -6
- package/Shared/OInstance.h +4 -13
- package/Shared/Threading/BatchingQueueThread.cpp +23 -12
- package/Shared/Utils.cpp +2 -5
- package/codegen/NativeAlertManagerSpec.g.h +2 -0
- package/codegen/NativeAnimatedModuleSpec.g.h +6 -0
- package/codegen/NativeAnimatedTurboModuleSpec.g.h +6 -0
- package/codegen/react/components/rnwcore/Props.cpp +2 -2
- package/codegen/react/components/rnwcore/Props.h +1 -1
- package/fmt/cgmanifest.json +14 -0
- package/fmt/fmt.vcxproj +25 -11
- package/jest/assetFileTransformer.js +3 -2
- package/jest/setup.js +4 -0
- package/package.json +25 -26
- package/rntypes/index.d.ts +0 -1
- package/template/cs-app-WinAppSDK/proj/{NuGet.Config → NuGet_Config} +0 -0
- package/template/metro.devMode.config.js +49 -2
- package/template/shared-app/proj/{NuGet.Config → NuGet_Config} +0 -0
- package/template/shared-lib/proj/{NuGet.Config → NuGet_Config} +0 -0
- package/Libraries/vendor/emitter/EventSubscription.js +0 -19
- package/Libraries/vendor/emitter/_EmitterSubscription.js +0 -62
- package/Libraries/vendor/emitter/_EventEmitter.js +0 -184
- package/Libraries/vendor/emitter/_EventSubscription.js +0 -45
- package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +0 -108
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +0 -87
- package/Scripts/copyRNLibraries.js +0 -99
- package/jest/preprocessor.js +0 -40
- package/jest/preprocessor_DO_NOT_USE.js +0 -122
|
@@ -40,6 +40,18 @@ EnableBackHandlerKindProperty() noexcept {
|
|
|
40
40
|
return propId;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
winrt::Microsoft::ReactNative::ReactPropertyId<bool> MapWindowDeactivatedToAppStateInactiveProperty() noexcept {
|
|
44
|
+
static winrt::Microsoft::ReactNative::ReactPropertyId<bool> propId{
|
|
45
|
+
L"ReactNative.QuirkSettings", L"MapWindowDeactivatedToAppStateInactiveProperty"};
|
|
46
|
+
return propId;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/*static*/ void QuirkSettings::SetMapWindowDeactivatedToAppStateInactive(
|
|
50
|
+
winrt::Microsoft::ReactNative::ReactPropertyBag properties,
|
|
51
|
+
bool value) noexcept {
|
|
52
|
+
properties.Set(MapWindowDeactivatedToAppStateInactiveProperty(), value);
|
|
53
|
+
}
|
|
54
|
+
|
|
43
55
|
#pragma region IDL interface
|
|
44
56
|
|
|
45
57
|
/*static*/ void QuirkSettings::SetMatchAndroidAndIOSStretchBehavior(
|
|
@@ -60,6 +72,12 @@ EnableBackHandlerKindProperty() noexcept {
|
|
|
60
72
|
ReactPropertyBag(settings.Properties()).Set(EnableBackHandlerKindProperty(), kind);
|
|
61
73
|
}
|
|
62
74
|
|
|
75
|
+
/*static*/ void QuirkSettings::SetMapWindowDeactivatedToAppStateInactive(
|
|
76
|
+
winrt::Microsoft::ReactNative::ReactInstanceSettings settings,
|
|
77
|
+
bool value) noexcept {
|
|
78
|
+
SetMapWindowDeactivatedToAppStateInactive(ReactPropertyBag(settings.Properties()), value);
|
|
79
|
+
}
|
|
80
|
+
|
|
63
81
|
#pragma endregion IDL interface
|
|
64
82
|
|
|
65
83
|
/*static*/ bool QuirkSettings::GetMatchAndroidAndIOSStretchBehavior(ReactPropertyBag properties) noexcept {
|
|
@@ -76,4 +94,8 @@ EnableBackHandlerKindProperty() noexcept {
|
|
|
76
94
|
.value_or(winrt::Microsoft::ReactNative::BackNavigationHandlerKind::JavaScript);
|
|
77
95
|
}
|
|
78
96
|
|
|
97
|
+
/*static*/ bool QuirkSettings::GetMapWindowDeactivatedToAppStateInactive(ReactPropertyBag properties) noexcept {
|
|
98
|
+
return properties.Get(MapWindowDeactivatedToAppStateInactiveProperty()).value_or(false);
|
|
99
|
+
}
|
|
100
|
+
|
|
79
101
|
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
@@ -26,6 +26,12 @@ struct QuirkSettings : QuirkSettingsT<QuirkSettings> {
|
|
|
26
26
|
|
|
27
27
|
static bool GetEnableFabric(winrt::Microsoft::ReactNative::ReactPropertyBag properties) noexcept;
|
|
28
28
|
|
|
29
|
+
static void SetMapWindowDeactivatedToAppStateInactive(
|
|
30
|
+
winrt::Microsoft::ReactNative::ReactPropertyBag properties,
|
|
31
|
+
bool value) noexcept;
|
|
32
|
+
static bool GetMapWindowDeactivatedToAppStateInactive(
|
|
33
|
+
winrt::Microsoft::ReactNative::ReactPropertyBag properties) noexcept;
|
|
34
|
+
|
|
29
35
|
#pragma region Public API - part of IDL interface
|
|
30
36
|
static void SetMatchAndroidAndIOSStretchBehavior(
|
|
31
37
|
winrt::Microsoft::ReactNative::ReactInstanceSettings settings,
|
|
@@ -35,6 +41,10 @@ struct QuirkSettings : QuirkSettingsT<QuirkSettings> {
|
|
|
35
41
|
static void SetBackHandlerKind(
|
|
36
42
|
winrt::Microsoft::ReactNative::ReactInstanceSettings settings,
|
|
37
43
|
winrt::Microsoft::ReactNative::BackNavigationHandlerKind kind) noexcept;
|
|
44
|
+
|
|
45
|
+
static void SetMapWindowDeactivatedToAppStateInactive(
|
|
46
|
+
winrt::Microsoft::ReactNative::ReactInstanceSettings settings,
|
|
47
|
+
bool value) noexcept;
|
|
38
48
|
#pragma endregion Public API - part of IDL interface
|
|
39
49
|
};
|
|
40
50
|
|
|
@@ -39,5 +39,12 @@ namespace Microsoft.ReactNative
|
|
|
39
39
|
"these events, including forwarding to JavaScript. This will allow applications to handle back "
|
|
40
40
|
"navigation in native code, but will prevent the `BackHandler` native module from receiving events.")
|
|
41
41
|
static void SetBackHandlerKind(ReactInstanceSettings settings, BackNavigationHandlerKind kind);
|
|
42
|
+
|
|
43
|
+
DOC_STRING(
|
|
44
|
+
"By default `react-native-windows` will only track `active` and `background` `AppState`. "
|
|
45
|
+
"Setting this to true enables `react-native-windows` to also track `inactive` `AppState` which [maps closely to iOS.](https://reactnative.dev/docs/appstate)"
|
|
46
|
+
"`inactive` tracks the [Window.Activated Event](https://docs.microsoft.com/uwp/api/windows.ui.core.corewindow.activated) when the window is deactivated.")
|
|
47
|
+
DOC_DEFAULT("false")
|
|
48
|
+
static void SetMapWindowDeactivatedToAppStateInactive(ReactInstanceSettings settings, Boolean value);
|
|
42
49
|
}
|
|
43
50
|
} // namespace Microsoft.ReactNative
|
|
@@ -114,6 +114,10 @@ void ReactApplication::OnLaunched(activation::LaunchActivatedEventArgs const &e_
|
|
|
114
114
|
e_;
|
|
115
115
|
#endif // USE_WINUI3
|
|
116
116
|
|
|
117
|
+
if (m_launched) {
|
|
118
|
+
m_launched({*this}, e);
|
|
119
|
+
}
|
|
120
|
+
|
|
117
121
|
this->OnCreate(e);
|
|
118
122
|
}
|
|
119
123
|
|
|
@@ -195,6 +199,10 @@ void ReactApplication::OnCreate(Windows::ApplicationModel::Activation::IActivate
|
|
|
195
199
|
}
|
|
196
200
|
|
|
197
201
|
Window::Current().Activate();
|
|
202
|
+
|
|
203
|
+
if (m_viewCreated) {
|
|
204
|
+
m_viewCreated({*this}, args);
|
|
205
|
+
}
|
|
198
206
|
}
|
|
199
207
|
|
|
200
208
|
/// <summary>
|
|
@@ -219,4 +227,40 @@ void ReactApplication::OnNavigationFailed(IInspectable const &, NavigationFailed
|
|
|
219
227
|
throw hresult_error(E_FAIL, hstring(L"Failed to load Page ") + e.SourcePageType().Name);
|
|
220
228
|
}
|
|
221
229
|
|
|
230
|
+
void ReactApplication::LaunchedInternal(ReactApplication::AppLaunchedDelegate delegate) noexcept {
|
|
231
|
+
m_launched = delegate;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
ReactApplication::AppLaunchedDelegate ReactApplication::LaunchedInternal() const noexcept {
|
|
235
|
+
return m_launched;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
void ReactApplication::ViewCreatedInternal(ReactApplication::AppViewCreatedDelegate delegate) noexcept {
|
|
239
|
+
m_viewCreated = delegate;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
ReactApplication::AppViewCreatedDelegate ReactApplication::ViewCreatedInternal() const noexcept {
|
|
243
|
+
return m_viewCreated;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
void ReactApplication::PageNavigatedInternal(ReactApplication::AppPageNavigatedDelegate delegate) noexcept {
|
|
247
|
+
m_pageNavigated = delegate;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
ReactApplication::AppPageNavigatedDelegate ReactApplication::PageNavigatedInternal() const noexcept {
|
|
251
|
+
return m_pageNavigated;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
xaml::Markup::IXamlType ReactApplication::GetXamlType(winrt::hstring const &name) const {
|
|
255
|
+
return m_provider.GetXamlType(name);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
xaml::Markup::IXamlType ReactApplication::GetXamlType(::winrt::Windows::UI::Xaml::Interop::TypeName const &type) const {
|
|
259
|
+
return m_provider.GetXamlType(type);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
::winrt::com_array<xaml::Markup::XmlnsDefinition> ReactApplication::GetXmlnsDefinitions() const {
|
|
263
|
+
return m_provider.GetXmlnsDefinitions();
|
|
264
|
+
}
|
|
265
|
+
|
|
222
266
|
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
#include "ReactApplication.g.h"
|
|
7
7
|
#include <CppWinRTIncludes.h>
|
|
8
|
+
#include <UI.Xaml.Markup.h>
|
|
9
|
+
#include <winrt/Microsoft.ReactNative.h>
|
|
8
10
|
#include "ReactNativeHost.h"
|
|
9
11
|
|
|
10
12
|
#ifdef USE_WINUI3
|
|
@@ -71,7 +73,7 @@ struct __declspec(empty_bases) NoDefaultCtorReactApplication_base :
|
|
|
71
73
|
}
|
|
72
74
|
};
|
|
73
75
|
|
|
74
|
-
struct ReactApplication : NoDefaultCtorReactApplication_base<ReactApplication> {
|
|
76
|
+
struct ReactApplication : NoDefaultCtorReactApplication_base<ReactApplication, xaml::Markup::IXamlMetadataProvider> {
|
|
75
77
|
public: // ReactApplication ABI API
|
|
76
78
|
ReactApplication();
|
|
77
79
|
ReactApplication(IInspectable const &outer) noexcept;
|
|
@@ -89,17 +91,48 @@ struct ReactApplication : NoDefaultCtorReactApplication_base<ReactApplication> {
|
|
|
89
91
|
hstring JavaScriptBundleFile() noexcept;
|
|
90
92
|
void JavaScriptBundleFile(hstring const &value) noexcept;
|
|
91
93
|
|
|
92
|
-
public:
|
|
93
94
|
void OnActivated(Windows::ApplicationModel::Activation::IActivatedEventArgs const &e);
|
|
94
95
|
void OnLaunched(activation::LaunchActivatedEventArgs const &e);
|
|
95
96
|
void OnSuspending(IInspectable const &, Windows::ApplicationModel::SuspendingEventArgs const &);
|
|
96
97
|
void OnNavigationFailed(IInspectable const &, xaml::Navigation::NavigationFailedEventArgs const &);
|
|
97
98
|
|
|
99
|
+
using AppLaunchedDelegate = winrt::delegate<void(
|
|
100
|
+
winrt::Microsoft::ReactNative::ReactApplication const &sender,
|
|
101
|
+
winrt::Windows::ApplicationModel::Activation::LaunchActivatedEventArgs const &args)>;
|
|
102
|
+
|
|
103
|
+
void LaunchedInternal(AppLaunchedDelegate delegate) noexcept;
|
|
104
|
+
AppLaunchedDelegate LaunchedInternal() const noexcept;
|
|
105
|
+
|
|
106
|
+
using AppViewCreatedDelegate =
|
|
107
|
+
winrt::delegate<void(winrt::Microsoft::ReactNative::ReactApplication const &sender, winrt::hstring const &args)>;
|
|
108
|
+
|
|
109
|
+
void ViewCreatedInternal(AppViewCreatedDelegate delegate) noexcept;
|
|
110
|
+
|
|
111
|
+
AppViewCreatedDelegate ViewCreatedInternal() const noexcept;
|
|
112
|
+
|
|
113
|
+
using AppPageNavigatedDelegate =
|
|
114
|
+
winrt::delegate<void(winrt::Microsoft::ReactNative::ReactApplication const &sender, ReactRootView const &view)>;
|
|
115
|
+
|
|
116
|
+
void PageNavigatedInternal(AppPageNavigatedDelegate delegate) noexcept;
|
|
117
|
+
|
|
118
|
+
AppPageNavigatedDelegate PageNavigatedInternal() const noexcept;
|
|
119
|
+
|
|
120
|
+
xaml::Markup::IXamlType GetXamlType(winrt::hstring const &name) const;
|
|
121
|
+
|
|
122
|
+
xaml::Markup::IXamlType GetXamlType(::winrt::Windows::UI::Xaml::Interop::TypeName const &type) const;
|
|
123
|
+
::winrt::com_array<xaml::Markup::XmlnsDefinition> GetXmlnsDefinitions() const;
|
|
124
|
+
|
|
98
125
|
private:
|
|
99
|
-
ReactNative::ReactInstanceSettings m_instanceSettings{nullptr};
|
|
100
|
-
ReactNative::ReactNativeHost m_host{nullptr};
|
|
126
|
+
winrt::Microsoft::ReactNative::ReactInstanceSettings m_instanceSettings{nullptr};
|
|
127
|
+
winrt::Microsoft::ReactNative::ReactNativeHost m_host{nullptr};
|
|
101
128
|
|
|
102
129
|
void OnCreate(Windows::ApplicationModel::Activation::IActivatedEventArgs const &e);
|
|
130
|
+
|
|
131
|
+
AppLaunchedDelegate m_launched;
|
|
132
|
+
AppViewCreatedDelegate m_viewCreated;
|
|
133
|
+
AppPageNavigatedDelegate m_pageNavigated;
|
|
134
|
+
|
|
135
|
+
XamlMetaDataProvider m_provider;
|
|
103
136
|
};
|
|
104
137
|
|
|
105
138
|
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
@@ -109,7 +142,9 @@ namespace winrt::Microsoft::ReactNative::factory_implementation {
|
|
|
109
142
|
// Override the CreateInstance method to pass baseInterface to the ReactApplication constructor
|
|
110
143
|
// to support correct COM aggregation that is need to inherit from the ReactApplication.
|
|
111
144
|
struct ReactApplication : ReactApplicationT<ReactApplication, implementation::ReactApplication> {
|
|
112
|
-
auto CreateInstance(
|
|
145
|
+
auto CreateInstance(
|
|
146
|
+
winrt::Windows::Foundation::IInspectable const &baseInterface,
|
|
147
|
+
winrt::Windows::Foundation::IInspectable &innerInterface) {
|
|
113
148
|
return impl::composable_factory<implementation::ReactApplication>::template CreateInstance<
|
|
114
149
|
Microsoft::ReactNative::ReactApplication>(baseInterface, innerInterface, baseInterface);
|
|
115
150
|
}
|
|
@@ -12,6 +12,7 @@ namespace Mso {
|
|
|
12
12
|
struct JSCallInvokerScheduler
|
|
13
13
|
: Mso::UnknownObject<Mso::RefCountStrategy::WeakRef, IDispatchQueueScheduler, IJSCallInvokerQueueScheduler> {
|
|
14
14
|
JSCallInvokerScheduler(
|
|
15
|
+
const Mso::DispatchQueueSettings &settings,
|
|
15
16
|
std::shared_ptr<facebook::react::CallInvoker> &&callInvoker,
|
|
16
17
|
Mso::Functor<void(const Mso::ErrorCode &)> &&errorHandler,
|
|
17
18
|
Mso::Promise<void> &&whenQuit) noexcept;
|
|
@@ -45,12 +46,13 @@ std::shared_ptr<facebook::react::MessageQueueThread> JSCallInvokerScheduler::Get
|
|
|
45
46
|
//=============================================================================
|
|
46
47
|
|
|
47
48
|
JSCallInvokerScheduler::JSCallInvokerScheduler(
|
|
49
|
+
const Mso::DispatchQueueSettings &settings,
|
|
48
50
|
std::shared_ptr<facebook::react::CallInvoker> &&callInvoker,
|
|
49
51
|
Mso::Functor<void(const Mso::ErrorCode &)> &&errorHandler,
|
|
50
52
|
Mso::Promise<void> &&whenQuit) noexcept
|
|
51
53
|
: m_callInvoker(callInvoker) {
|
|
52
54
|
m_jsMessageThread = std::make_shared<Mso::React::MessageDispatchQueue>(
|
|
53
|
-
Mso::DispatchQueue::MakeLooperQueue(), std::move(errorHandler), std::move(whenQuit));
|
|
55
|
+
Mso::DispatchQueue::MakeLooperQueue(settings), std::move(errorHandler), std::move(whenQuit));
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
JSCallInvokerScheduler::~JSCallInvokerScheduler() noexcept {
|
|
@@ -91,11 +93,12 @@ void JSCallInvokerScheduler::AwaitTermination() noexcept {
|
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
Mso::CntPtr<IDispatchQueueScheduler> MakeJSCallInvokerScheduler(
|
|
96
|
+
const Mso::DispatchQueueSettings &settings,
|
|
94
97
|
std::shared_ptr<facebook::react::CallInvoker> &&callInvoker,
|
|
95
98
|
Mso::Functor<void(const Mso::ErrorCode &)> &&errorHandler,
|
|
96
99
|
Mso::Promise<void> &&whenQuit) noexcept {
|
|
97
100
|
return Mso::Make<JSCallInvokerScheduler, IDispatchQueueScheduler>(
|
|
98
|
-
std::move(callInvoker), std::move(errorHandler), std::move(whenQuit));
|
|
101
|
+
settings, std::move(callInvoker), std::move(errorHandler), std::move(whenQuit));
|
|
99
102
|
}
|
|
100
103
|
|
|
101
104
|
} // namespace Mso
|
|
@@ -19,6 +19,7 @@ struct IJSCallInvokerQueueScheduler : IUnknown {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
Mso::CntPtr<IDispatchQueueScheduler> MakeJSCallInvokerScheduler(
|
|
22
|
+
Mso::DispatchQueueSettings const &settings,
|
|
22
23
|
std::shared_ptr<facebook::react::CallInvoker> &&callInvoker,
|
|
23
24
|
Mso::Functor<void(const Mso::ErrorCode &)> &&errorHandler,
|
|
24
25
|
Mso::Promise<void> &&whenQuit = nullptr) noexcept;
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
#include "MoveOnCopy.h"
|
|
6
6
|
#include "MsoUtils.h"
|
|
7
7
|
|
|
8
|
+
#include <AppModelHelpers.h>
|
|
8
9
|
#include <Base/CoreNativeModules.h>
|
|
9
10
|
#include <Threading/MessageDispatchQueue.h>
|
|
10
11
|
#include <Threading/MessageQueueThreadFactory.h>
|
|
11
12
|
#include <appModel.h>
|
|
12
13
|
#include <comUtil/qiCast.h>
|
|
13
|
-
|
|
14
14
|
#ifndef CORE_ABI
|
|
15
15
|
#include <XamlUIService.h>
|
|
16
16
|
#endif
|
|
@@ -132,7 +132,8 @@ struct BridgeUIBatchInstanceCallback final : public facebook::react::InstanceCal
|
|
|
132
132
|
virtual ~BridgeUIBatchInstanceCallback() = default;
|
|
133
133
|
void onBatchComplete() override {
|
|
134
134
|
if (auto instance = m_wkInstance.GetStrongPtr()) {
|
|
135
|
-
|
|
135
|
+
auto state = instance->State();
|
|
136
|
+
if (state != ReactInstanceState::HasError && state != ReactInstanceState::Unloaded) {
|
|
136
137
|
if (instance->UseWebDebugger()) {
|
|
137
138
|
// While using a CxxModule for UIManager (which we do when running under webdebugger)
|
|
138
139
|
// We need to post the batch complete to the NativeQueue to ensure that the UIManager
|
|
@@ -469,8 +470,7 @@ void ReactInstanceWin::Initialize() noexcept {
|
|
|
469
470
|
case JSIEngine::V8:
|
|
470
471
|
#if defined(USE_V8)
|
|
471
472
|
{
|
|
472
|
-
|
|
473
|
-
if (GetCurrentPackageFullName(&length, nullptr) != APPMODEL_ERROR_NO_PACKAGE) {
|
|
473
|
+
if (Microsoft::ReactNative::HasPackageIdentity()) {
|
|
474
474
|
preparedScriptStore =
|
|
475
475
|
std::make_unique<facebook::react::BasePreparedScriptStoreImpl>(getApplicationTempFolder());
|
|
476
476
|
} else {
|
|
@@ -510,6 +510,7 @@ void ReactInstanceWin::Initialize() noexcept {
|
|
|
510
510
|
std::move(bundleRootPath), // bundleRootPath
|
|
511
511
|
std::move(cxxModules),
|
|
512
512
|
m_options.TurboModuleProvider,
|
|
513
|
+
m_options.TurboModuleProvider->LongLivedObjectCollection(),
|
|
513
514
|
std::make_unique<BridgeUIBatchInstanceCallback>(weakThis),
|
|
514
515
|
m_jsMessageThread.Load(),
|
|
515
516
|
m_nativeMessageThread.Load(),
|
|
@@ -679,7 +680,26 @@ ReactInstanceState ReactInstanceWin::State() const noexcept {
|
|
|
679
680
|
void ReactInstanceWin::InitJSMessageThread() noexcept {
|
|
680
681
|
m_instance.Exchange(std::make_shared<facebook::react::Instance>());
|
|
681
682
|
|
|
683
|
+
winrt::Microsoft::ReactNative::IReactNotificationService service = m_reactContext->Notifications();
|
|
684
|
+
Mso::DispatchQueueSettings queueSettings{};
|
|
685
|
+
queueSettings.TaskStarting = [service](Mso::DispatchQueue const &) noexcept {
|
|
686
|
+
service.SendNotification(
|
|
687
|
+
winrt::Microsoft::ReactNative::ReactDispatcherHelper::JSDispatcherTaskStartingEventName(), nullptr, nullptr);
|
|
688
|
+
};
|
|
689
|
+
queueSettings.IdleWaitStarting = [service](Mso::DispatchQueue const &) noexcept {
|
|
690
|
+
service.SendNotification(
|
|
691
|
+
winrt::Microsoft::ReactNative::ReactDispatcherHelper::JSDispatcherIdleWaitStartingEventName(),
|
|
692
|
+
nullptr,
|
|
693
|
+
nullptr);
|
|
694
|
+
};
|
|
695
|
+
queueSettings.IdleWaitCompleted = [service](Mso::DispatchQueue const &) noexcept {
|
|
696
|
+
service.SendNotification(
|
|
697
|
+
winrt::Microsoft::ReactNative::ReactDispatcherHelper::JSDispatcherIdleWaitCompletedEventName(),
|
|
698
|
+
nullptr,
|
|
699
|
+
nullptr);
|
|
700
|
+
};
|
|
682
701
|
auto scheduler = Mso::MakeJSCallInvokerScheduler(
|
|
702
|
+
queueSettings,
|
|
683
703
|
m_instance.Load()->getJSCallInvoker(),
|
|
684
704
|
Mso::MakeWeakMemberFunctor(this, &ReactInstanceWin::OnError),
|
|
685
705
|
Mso::Copy(m_whenDestroyed));
|
|
@@ -153,7 +153,7 @@ class ReactInstanceWin final : public Mso::ActiveObject<IReactInstanceInternal>
|
|
|
153
153
|
const bool m_useDirectDebugger : 1;
|
|
154
154
|
const bool m_useWebDebugger : 1;
|
|
155
155
|
|
|
156
|
-
const Mso::CntPtr
|
|
156
|
+
const Mso::CntPtr<::Mso::React::ReactContext> m_reactContext;
|
|
157
157
|
|
|
158
158
|
std::atomic<bool> m_isLoaded{false};
|
|
159
159
|
std::atomic<bool> m_isDestroyed{false};
|
|
@@ -16,8 +16,18 @@ PointerEventKind ReactPointerEventArgs::Kind() const noexcept {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
void ReactPointerEventArgs::Kind(PointerEventKind kind) noexcept {
|
|
19
|
-
// The only event type
|
|
20
|
-
|
|
19
|
+
// The only event type transitions that are supported are:
|
|
20
|
+
// 1. PointerEventKind::CaptureLost to PointerEventKind::End to support cases
|
|
21
|
+
// where XAML firing the CaptureLost event should be treated as a gesture
|
|
22
|
+
// completion event, e.g., for pointer events in selectable text that do
|
|
23
|
+
// not result in text selection.
|
|
24
|
+
// 2. PointerEventKind::End to PointerEventKind::Cancel to support cases
|
|
25
|
+
// where a custom view manager implementing `IViewManagerWithPointerEvents`
|
|
26
|
+
// wants to cancel a gesture, e.g., for a custom drag handle where the end
|
|
27
|
+
// of the gesture should not be treated as a completed press event.
|
|
28
|
+
assert(
|
|
29
|
+
(kind == PointerEventKind::End && m_kind == PointerEventKind::CaptureLost) ||
|
|
30
|
+
(kind == PointerEventKind::Cancel && m_kind == PointerEventKind::End));
|
|
21
31
|
m_kind = kind;
|
|
22
32
|
}
|
|
23
33
|
|