react-native-windows 0.74.20 → 0.74.22
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/Microsoft.ReactNative/ComponentView.idl +44 -32
- package/Microsoft.ReactNative/Composition.Input.idl +3 -0
- package/Microsoft.ReactNative/CompositionComponentView.idl +43 -24
- package/Microsoft.ReactNative/CompositionSwitcher.idl +3 -0
- package/Microsoft.ReactNative/Fabric/AbiEventEmitter.cpp +21 -0
- package/Microsoft.ReactNative/Fabric/AbiEventEmitter.h +23 -0
- package/Microsoft.ReactNative/Fabric/AbiShadowNode.cpp +7 -0
- package/Microsoft.ReactNative/Fabric/AbiShadowNode.h +3 -0
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +334 -65
- package/Microsoft.ReactNative/Fabric/ComponentView.h +162 -38
- package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.cpp +2 -2
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +3 -0
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +29 -7
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +23 -4
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +44 -13
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +118 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +12 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +147 -119
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +4 -8
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +129 -106
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +31 -54
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +133 -0
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +61 -0
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +9 -8
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/FocusManager.cpp +20 -6
- package/Microsoft.ReactNative/Fabric/Composition/FocusManager.h +13 -6
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +1 -4
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +3 -5
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +1 -6
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +0 -1
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +108 -18
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +33 -5
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +137 -56
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +21 -4
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +45 -10
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +9 -2
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +209 -189
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +2 -5
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +22 -10
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +4 -5
- package/Microsoft.ReactNative/Fabric/Composition/TextDrawing.cpp +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/TextDrawing.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +115 -168
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +11 -14
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +14 -11
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +4 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -13
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +0 -3
- package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +12 -4
- package/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp +338 -0
- package/Microsoft.ReactNative/Fabric/Composition/TooltipService.h +66 -0
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +56 -4
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +7 -0
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +2 -4
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +40 -9
- package/Microsoft.ReactNative/Fabric/ReactTaggedView.h +4 -0
- package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +1 -3
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.cpp +25 -1
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.h +4 -1
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +1 -1
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +9 -2
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +13 -3
- package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +64 -4
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +1 -1
- package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +9 -0
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -0
- package/Microsoft.ReactNative/Modules/SampleTurboModule.cpp +104 -0
- package/Microsoft.ReactNative/Modules/SampleTurboModule.h +78 -0
- package/Microsoft.ReactNative/ReactCoreInjection.h +0 -1
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +0 -7
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +0 -5
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +17 -1
- package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.cpp +59 -0
- package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.h +23 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +179 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.h +35 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +69 -0
- package/Microsoft.ReactNative/ReactNativeIsland.idl +5 -0
- package/Microsoft.ReactNative/ReactNativeWin32App.cpp +82 -0
- package/Microsoft.ReactNative/ReactNativeWin32App.h +38 -0
- package/Microsoft.ReactNative/Timer.idl +1 -1
- package/Microsoft.ReactNative/packages.lock.json +0 -10
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/WinUI.props +1 -1
- package/Shared/Shared.vcxitems +43 -0
- package/Shared/Shared.vcxitems.filters +3 -0
- package/Shared/TurboModuleManager.cpp +0 -3
- package/just-task.js +1 -1
- package/package.json +3 -3
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +1 -0
|
@@ -49,6 +49,15 @@ namespace Microsoft.ReactNative
|
|
|
49
49
|
All = 0x0000000F,
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
+
enum FocusNavigationDirection
|
|
53
|
+
{
|
|
54
|
+
None,
|
|
55
|
+
Next,
|
|
56
|
+
Previous,
|
|
57
|
+
First,
|
|
58
|
+
Last,
|
|
59
|
+
};
|
|
60
|
+
|
|
52
61
|
[webhosthidden]
|
|
53
62
|
[experimental]
|
|
54
63
|
interface IComponentState
|
|
@@ -60,16 +69,10 @@ namespace Microsoft.ReactNative
|
|
|
60
69
|
void UpdateStateWithMutationAndPriority(StateUpdateMutation mutation, EventPriority priority);
|
|
61
70
|
};
|
|
62
71
|
|
|
63
|
-
[experimental]
|
|
64
|
-
[webhosthidden]
|
|
65
|
-
unsealed runtimeclass CreateComponentViewArgs {
|
|
66
|
-
Int32 Tag {get;};
|
|
67
|
-
IReactContext ReactContext { get;};
|
|
68
|
-
};
|
|
69
|
-
|
|
70
72
|
[experimental]
|
|
71
73
|
[webhosthidden]
|
|
72
74
|
runtimeclass LosingFocusEventArgs : Microsoft.ReactNative.Composition.Input.RoutedEventArgs {
|
|
75
|
+
FocusNavigationDirection Direction { get; };
|
|
73
76
|
Microsoft.ReactNative.ComponentView NewFocusedComponent { get; };
|
|
74
77
|
Microsoft.ReactNative.ComponentView OldFocusedComponent { get; };
|
|
75
78
|
|
|
@@ -80,6 +83,7 @@ namespace Microsoft.ReactNative
|
|
|
80
83
|
[experimental]
|
|
81
84
|
[webhosthidden]
|
|
82
85
|
runtimeclass GettingFocusEventArgs : Microsoft.ReactNative.Composition.Input.RoutedEventArgs {
|
|
86
|
+
FocusNavigationDirection Direction { get; };
|
|
83
87
|
Microsoft.ReactNative.ComponentView NewFocusedComponent { get; };
|
|
84
88
|
Microsoft.ReactNative.ComponentView OldFocusedComponent { get; };
|
|
85
89
|
|
|
@@ -89,40 +93,48 @@ namespace Microsoft.ReactNative
|
|
|
89
93
|
|
|
90
94
|
[experimental]
|
|
91
95
|
[webhosthidden]
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
runtimeclass LayoutMetricsChangedArgs {
|
|
97
|
+
LayoutMetrics NewLayoutMetrics { get; };
|
|
98
|
+
LayoutMetrics OldLayoutMetrics { get; };
|
|
99
|
+
};
|
|
100
|
+
|
|
94
101
|
|
|
102
|
+
// [exclusiveto(ComponentView)]
|
|
103
|
+
// [uuid(AEE8C30B-0E56-4FB8-8A80-D5CA9DE90916)]
|
|
104
|
+
// interface IComponentViewFactory
|
|
105
|
+
// {
|
|
106
|
+
// }
|
|
107
|
+
|
|
108
|
+
// [composable(IComponentViewFactory, protected)]
|
|
109
|
+
[experimental]
|
|
110
|
+
[webhosthidden]
|
|
111
|
+
unsealed runtimeclass ComponentView {
|
|
95
112
|
Int32 Tag { get; };
|
|
96
113
|
ComponentView Parent { get; };
|
|
97
114
|
IVectorView<ComponentView> Children { get; };
|
|
98
|
-
IReactContext ReactContext { get;};
|
|
115
|
+
IReactContext ReactContext { get; };
|
|
116
|
+
LayoutMetrics LayoutMetrics { get; };
|
|
117
|
+
IInspectable UserData;
|
|
99
118
|
|
|
100
|
-
|
|
101
|
-
overridable void UnmountChildComponentView(ComponentView childComponentView, UInt32 index);
|
|
102
|
-
overridable void HandleCommand(String commandName, IJSValueReader args);
|
|
103
|
-
overridable void UpdateProps(IComponentProps props, IComponentProps oldProps);
|
|
104
|
-
overridable void UpdateState(IComponentState state);
|
|
105
|
-
overridable void UpdateLayoutMetrics(LayoutMetrics metrics, LayoutMetrics oldMetrics);
|
|
106
|
-
overridable void FinalizeUpdates(ComponentViewUpdateMask updateMask);
|
|
119
|
+
Boolean TryFocus();
|
|
107
120
|
|
|
108
121
|
DOC_STRING("Used to handle key down events when this component is focused, or if a child component did not handle the key down")
|
|
109
|
-
|
|
110
|
-
|
|
122
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.KeyRoutedEventArgs> KeyDown;
|
|
111
123
|
DOC_STRING("Used to handle key up events when this component is focused, or if a child component did not handle the key up")
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
overridable void OnPointerExited(Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs args);
|
|
122
|
-
overridable void OnPointerCaptureLost();
|
|
123
|
-
|
|
124
|
-
Boolean TryFocus();
|
|
124
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.KeyRoutedEventArgs> KeyUp;
|
|
125
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.CharacterReceivedRoutedEventArgs> CharacterReceived;
|
|
126
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs> PointerPressed;
|
|
127
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs> PointerReleased;
|
|
128
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs> PointerMoved;
|
|
129
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs> PointerWheelChanged;
|
|
130
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs> PointerEntered;
|
|
131
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs> PointerExited;
|
|
132
|
+
event Windows.Foundation.EventHandler<ComponentView> PointerCaptureLost;
|
|
125
133
|
|
|
134
|
+
event Windows.Foundation.EventHandler<ComponentView> Destroying;
|
|
135
|
+
event Windows.Foundation.EventHandler<LayoutMetricsChangedArgs> LayoutMetricsChanged;
|
|
136
|
+
event Windows.Foundation.EventHandler<ComponentView> Mounted;
|
|
137
|
+
event Windows.Foundation.EventHandler<ComponentView> Unmounted;
|
|
126
138
|
event Windows.Foundation.EventHandler<LosingFocusEventArgs> LosingFocus;
|
|
127
139
|
event Windows.Foundation.EventHandler<GettingFocusEventArgs> GettingFocus;
|
|
128
140
|
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.RoutedEventArgs> LostFocus;
|
|
@@ -23,6 +23,7 @@ namespace Microsoft.ReactNative.Composition.Input
|
|
|
23
23
|
Windows.System.VirtualKey Key { get; };
|
|
24
24
|
Microsoft.UI.Input.PhysicalKeyStatus KeyStatus { get; };
|
|
25
25
|
Windows.System.VirtualKey OriginalKey { get; };
|
|
26
|
+
KeyboardSource KeyboardSource { get; };
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
interface CharacterReceivedRoutedEventArgs requires RoutedEventArgs
|
|
@@ -30,6 +31,7 @@ namespace Microsoft.ReactNative.Composition.Input
|
|
|
30
31
|
Boolean Handled { get; set; };
|
|
31
32
|
Microsoft.UI.Input.PhysicalKeyStatus KeyStatus { get; };
|
|
32
33
|
Int32 KeyCode { get; };
|
|
34
|
+
KeyboardSource KeyboardSource { get; };
|
|
33
35
|
};
|
|
34
36
|
|
|
35
37
|
interface IPointerPointTransform
|
|
@@ -104,6 +106,7 @@ namespace Microsoft.ReactNative.Composition.Input
|
|
|
104
106
|
UInt64 Timestamp { get; };
|
|
105
107
|
PointerPoint GetOffsetPoint(
|
|
106
108
|
Windows.Foundation.Point offset);
|
|
109
|
+
Microsoft.UI.Input.PointerPoint Inner { get; };
|
|
107
110
|
};
|
|
108
111
|
|
|
109
112
|
runtimeclass PointerRoutedEventArgs : RoutedEventArgs
|
|
@@ -29,116 +29,135 @@ namespace Microsoft.ReactNative.Composition
|
|
|
29
29
|
namespace Experimental {
|
|
30
30
|
[webhosthidden]
|
|
31
31
|
[experimental]
|
|
32
|
-
interface
|
|
32
|
+
interface IInternalComponentView
|
|
33
33
|
{
|
|
34
34
|
ICompositionContext CompositionContext { get; };
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
38
|
+
// [exclusiveto(ComponentView)]
|
|
39
|
+
// [uuid(ABFAC092-E527-47DC-9CF9-7A4003B0AFB0)]
|
|
40
|
+
// interface IComponentViewFactory
|
|
41
|
+
// {
|
|
42
|
+
// }
|
|
44
43
|
|
|
44
|
+
// [composable(IComponentViewFactory, protected)]
|
|
45
45
|
[experimental]
|
|
46
46
|
[webhosthidden]
|
|
47
47
|
unsealed runtimeclass ComponentView : Microsoft.ReactNative.ComponentView {
|
|
48
|
-
ComponentView(CreateCompositionComponentViewArgs args);
|
|
49
|
-
|
|
50
48
|
Microsoft.UI.Composition.Compositor Compositor { get; };
|
|
51
49
|
RootComponentView Root { get; };
|
|
52
50
|
Theme Theme;
|
|
53
|
-
|
|
51
|
+
|
|
52
|
+
event Windows.Foundation.EventHandler<IInspectable> ThemeChanged;
|
|
54
53
|
Boolean CapturePointer(Microsoft.ReactNative.Composition.Input.Pointer pointer);
|
|
55
54
|
void ReleasePointerCapture(Microsoft.ReactNative.Composition.Input.Pointer pointer);
|
|
56
55
|
};
|
|
57
56
|
|
|
58
57
|
namespace Experimental {
|
|
58
|
+
|
|
59
|
+
[webhosthidden]
|
|
60
|
+
[experimental]
|
|
61
|
+
delegate Microsoft.ReactNative.Composition.Experimental.IVisual CreateInternalVisualDelegate(Microsoft.ReactNative.ComponentView view);
|
|
62
|
+
|
|
59
63
|
[webhosthidden]
|
|
60
64
|
[experimental]
|
|
61
65
|
DOC_STRING("Custom ViewComponents need to implement this interface to be able to provide a custom"
|
|
62
66
|
" visual using the composition context that allows custom compositors. This is only required for"
|
|
63
67
|
" custom components that need to support running in RNW instances with custom compositors. Most"
|
|
64
|
-
|
|
68
|
+
" custom components can just set CreateVisualHandler on ViewComponentView."
|
|
65
69
|
" This will be removed in a future version")
|
|
66
70
|
interface IInternalCreateVisual
|
|
67
71
|
{
|
|
68
|
-
|
|
72
|
+
CreateInternalVisualDelegate CreateInternalVisualHandler;
|
|
69
73
|
}
|
|
70
74
|
}
|
|
71
75
|
|
|
76
|
+
// [exclusiveto(ViewComponentView)]
|
|
77
|
+
// [uuid(756AA1DF-ED74-467E-9BAA-3797B39B1875)]
|
|
78
|
+
// interface IViewComponentViewFactory
|
|
79
|
+
// {
|
|
80
|
+
// }
|
|
81
|
+
|
|
82
|
+
// [composable(IViewComponentViewFactory, protected)]
|
|
72
83
|
[experimental]
|
|
73
84
|
[webhosthidden]
|
|
74
85
|
unsealed runtimeclass ViewComponentView : ComponentView {
|
|
75
|
-
ViewComponentView(CreateCompositionComponentViewArgs args);
|
|
76
86
|
|
|
77
87
|
Microsoft.ReactNative.ViewProps ViewProps { get; };
|
|
88
|
+
};
|
|
78
89
|
|
|
79
|
-
|
|
90
|
+
// Some other interfaces we could consider implementing/exposing
|
|
91
|
+
// Use ifdef USE_EXPERIMENTAL_WINUI3 to add these
|
|
92
|
+
// Microsoft.UI.Content.IContentLink // Use ifdef USE_EXPERIMENTAL_WINUI3
|
|
93
|
+
// Microsoft.UI.Content.IContentSiteBridge
|
|
94
|
+
// Microsoft.UI.Content.IContentSiteBridge2 // Use ifdef USE_EXPERIMENTAL_WINUI3
|
|
95
|
+
[experimental]
|
|
96
|
+
[webhosthidden]
|
|
97
|
+
runtimeclass ContentIslandComponentView : ViewComponentView {
|
|
98
|
+
void Connect(Microsoft.UI.Content.ContentIsland contentIsland);
|
|
80
99
|
};
|
|
81
100
|
|
|
82
101
|
[experimental]
|
|
83
102
|
[webhosthidden]
|
|
84
103
|
[default_interface]
|
|
85
|
-
|
|
104
|
+
runtimeclass SwitchComponentView : ViewComponentView {
|
|
86
105
|
};
|
|
87
106
|
|
|
88
107
|
[experimental]
|
|
89
108
|
[webhosthidden]
|
|
90
109
|
[default_interface]
|
|
91
|
-
|
|
110
|
+
runtimeclass RootComponentView : ViewComponentView {
|
|
92
111
|
Microsoft.ReactNative.ComponentView GetFocusedComponent();
|
|
93
112
|
};
|
|
94
113
|
|
|
95
114
|
[experimental]
|
|
96
115
|
[webhosthidden]
|
|
97
116
|
[default_interface]
|
|
98
|
-
|
|
117
|
+
runtimeclass DebuggingOverlayComponentView : ViewComponentView {
|
|
99
118
|
};
|
|
100
119
|
|
|
101
120
|
[experimental]
|
|
102
121
|
[webhosthidden]
|
|
103
122
|
[default_interface]
|
|
104
|
-
|
|
123
|
+
runtimeclass ActivityIndicatorComponentView : ViewComponentView {
|
|
105
124
|
};
|
|
106
125
|
|
|
107
126
|
[experimental]
|
|
108
127
|
[webhosthidden]
|
|
109
128
|
[default_interface]
|
|
110
|
-
|
|
129
|
+
runtimeclass WindowsModalHostComponentView : ViewComponentView {
|
|
111
130
|
};
|
|
112
131
|
|
|
113
132
|
[experimental]
|
|
114
133
|
[webhosthidden]
|
|
115
134
|
[default_interface]
|
|
116
|
-
|
|
135
|
+
runtimeclass ImageComponentView : ViewComponentView {
|
|
117
136
|
Microsoft.ReactNative.ImageProps ViewProps { get; };
|
|
118
137
|
};
|
|
119
138
|
|
|
120
139
|
[experimental]
|
|
121
140
|
[webhosthidden]
|
|
122
141
|
[default_interface]
|
|
123
|
-
|
|
142
|
+
runtimeclass ParagraphComponentView : ViewComponentView {
|
|
124
143
|
};
|
|
125
144
|
|
|
126
145
|
[experimental]
|
|
127
146
|
[webhosthidden]
|
|
128
147
|
[default_interface]
|
|
129
|
-
|
|
148
|
+
runtimeclass ScrollViewComponentView : ViewComponentView {
|
|
130
149
|
};
|
|
131
150
|
|
|
132
151
|
[experimental]
|
|
133
152
|
[webhosthidden]
|
|
134
153
|
[default_interface]
|
|
135
|
-
|
|
154
|
+
runtimeclass UnimplementedNativeViewComponentView : ViewComponentView {
|
|
136
155
|
};
|
|
137
156
|
|
|
138
157
|
[experimental]
|
|
139
158
|
[webhosthidden]
|
|
140
159
|
[default_interface]
|
|
141
|
-
|
|
160
|
+
runtimeclass WindowsTextInputComponentView : ViewComponentView {
|
|
142
161
|
};
|
|
143
162
|
|
|
144
163
|
} // namespace Microsoft.ReactNative
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#include "NamespaceRedirect.h"
|
|
5
5
|
#include "DocString.h"
|
|
6
|
+
import "Composition.Input.idl";
|
|
6
7
|
|
|
7
8
|
namespace Microsoft.ReactNative.Composition.Experimental
|
|
8
9
|
{
|
|
@@ -112,6 +113,8 @@ namespace Microsoft.ReactNative.Composition.Experimental
|
|
|
112
113
|
Windows.Foundation.Numerics.Vector3 ScrollPosition { get; };
|
|
113
114
|
void ScrollBy(Windows.Foundation.Numerics.Vector3 offset, Boolean animate);
|
|
114
115
|
void TryUpdatePosition(Windows.Foundation.Numerics.Vector3 position, Boolean animate);
|
|
116
|
+
void OnPointerPressed(Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs args);
|
|
117
|
+
Boolean Horizontal;
|
|
115
118
|
}
|
|
116
119
|
|
|
117
120
|
[webhosthidden]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
#include "AbiEventEmitter.h"
|
|
5
|
+
#include "JsiWriter.h"
|
|
6
|
+
|
|
7
|
+
namespace winrt::Microsoft::ReactNative::implementation {
|
|
8
|
+
|
|
9
|
+
EventEmitter::EventEmitter(facebook::react::EventEmitter::Shared const &eventEmitter) : m_eventEmitter(eventEmitter) {}
|
|
10
|
+
|
|
11
|
+
void EventEmitter::DispatchEvent(
|
|
12
|
+
winrt::hstring eventName,
|
|
13
|
+
const winrt::Microsoft::ReactNative::JSValueArgWriter &args) {
|
|
14
|
+
m_eventEmitter->dispatchEvent(winrt::to_string(eventName), [args](facebook::jsi::Runtime &runtime) {
|
|
15
|
+
auto writer = winrt::make<JsiWriter>(runtime);
|
|
16
|
+
args(writer);
|
|
17
|
+
return winrt::get_self<JsiWriter>(writer)->MoveResult();
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
#pragma once
|
|
5
|
+
|
|
6
|
+
#include "ViewProps.g.h"
|
|
7
|
+
|
|
8
|
+
#include "EventEmitter.g.h"
|
|
9
|
+
#include <react/renderer/core/EventEmitter.h>
|
|
10
|
+
#include <winrt/Microsoft.ReactNative.h>
|
|
11
|
+
|
|
12
|
+
namespace winrt::Microsoft::ReactNative::implementation {
|
|
13
|
+
|
|
14
|
+
struct EventEmitter : EventEmitterT<EventEmitter> {
|
|
15
|
+
EventEmitter(facebook::react::EventEmitter::Shared const &eventEmitter);
|
|
16
|
+
|
|
17
|
+
void DispatchEvent(winrt::hstring eventName, const winrt::Microsoft::ReactNative::JSValueArgWriter &args);
|
|
18
|
+
|
|
19
|
+
private:
|
|
20
|
+
facebook::react::EventEmitter::Shared const m_eventEmitter;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
@@ -65,6 +65,13 @@ void ShadowNode::StateData(winrt::IInspectable tag) noexcept {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
winrt::Microsoft::ReactNative::EventEmitter ShadowNode::EventEmitter() const noexcept {
|
|
69
|
+
if (auto shadowNode = m_shadowNode.lock()) {
|
|
70
|
+
return winrt::make<winrt::Microsoft::ReactNative::implementation::EventEmitter>(shadowNode->getEventEmitter());
|
|
71
|
+
}
|
|
72
|
+
return nullptr;
|
|
73
|
+
}
|
|
74
|
+
|
|
68
75
|
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
69
76
|
|
|
70
77
|
namespace Microsoft::ReactNative {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#include "YogaLayoutableShadowNode.g.h"
|
|
9
9
|
#include <react/components/rnwcore/EventEmitters.h>
|
|
10
10
|
#include <unordered_map>
|
|
11
|
+
#include "AbiEventEmitter.h"
|
|
11
12
|
#include "AbiState.h"
|
|
12
13
|
#include "AbiViewProps.h"
|
|
13
14
|
|
|
@@ -42,6 +43,8 @@ struct ShadowNode : ShadowNodeT<ShadowNode> {
|
|
|
42
43
|
winrt::IInspectable StateData() const noexcept;
|
|
43
44
|
void StateData(winrt::IInspectable tag) noexcept;
|
|
44
45
|
|
|
46
|
+
winrt::Microsoft::ReactNative::EventEmitter EventEmitter() const noexcept;
|
|
47
|
+
|
|
45
48
|
protected:
|
|
46
49
|
facebook::react::ShadowNode::Weak m_shadowNode;
|
|
47
50
|
winrt::IInspectable m_tag;
|