react-native-windows 0.75.0 → 0.75.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Microsoft.ReactNative/ComponentView.idl +33 -32
- package/Microsoft.ReactNative/Composition.Input.idl +2 -0
- package/Microsoft.ReactNative/CompositionComponentView.idl +43 -24
- 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 +318 -59
- package/Microsoft.ReactNative/Fabric/ComponentView.h +155 -33
- 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 +25 -7
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +22 -4
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +43 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +6 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +147 -119
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +4 -8
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +97 -101
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +28 -52
- 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 +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +1 -4
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +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 +57 -1
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +6 -0
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +8 -2
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +2 -0
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +195 -182
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +1 -3
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +16 -4
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +3 -3
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +12 -17
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +4 -11
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +19 -0
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +1 -2
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +10 -7
- package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +1 -3
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.cpp +20 -1
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.h +3 -0
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +13 -3
- package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +57 -4
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +2 -0
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +74 -67
- package/Microsoft.ReactNative/ReactNativeIsland.idl +3 -0
- package/PropertySheets/External/Microsoft.ReactNative.Composition.Package.props +1 -0
- package/PropertySheets/External/Microsoft.ReactNative.Composition.Package.targets +4 -0
- package/PropertySheets/External/Microsoft.ReactNative.Cpp.PackageReferences.props +14 -4
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/WinUI.props +1 -1
- package/Scripts/Microsoft.ReactNative.VersionCheck.targets +2 -0
- package/Shared/DevSettings.h +3 -0
- package/Shared/OInstance.cpp +6 -2
- package/Shared/Shared.vcxitems +7 -0
- package/just-task.js +1 -1
- package/package.json +13 -13
- package/template/cpp-app/proj/MyApp.sln +19 -19
- package/template/cpp-lib/proj/MyLib.sln +19 -19
- package/template/cs-app/proj/MyApp.sln +21 -21
- package/template/cs-lib/proj/MyLib.sln +21 -21
- package/templates/cpp-app/NuGet_Config +13 -0
- package/templates/cpp-app/template.config.js +6 -1
- package/templates/cpp-app/windows/ExperimentalFeatures.props +1 -0
- package/templates/cpp-app/windows/MyApp.sln +29 -19
- package/templates/cpp-lib/NuGet_Config +13 -0
- package/templates/cpp-lib/example/NuGet_Config +6 -0
- package/templates/cpp-lib/template.config.js +6 -1
- package/templates/cpp-lib/windows/ExperimentalFeatures.props +1 -0
- package/templates/cpp-lib/windows/MyLib.sln +35 -25
- package/templates/old/generateWrapper.js +3 -3
- package/templates/templateUtils.js +3 -1
|
@@ -43,13 +43,6 @@ namespace Microsoft.ReactNative
|
|
|
43
43
|
void UpdateStateWithMutation(StateUpdateMutation mutation);
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
[experimental]
|
|
47
|
-
[webhosthidden]
|
|
48
|
-
unsealed runtimeclass CreateComponentViewArgs {
|
|
49
|
-
Int32 Tag {get;};
|
|
50
|
-
IReactContext ReactContext { get;};
|
|
51
|
-
};
|
|
52
|
-
|
|
53
46
|
[experimental]
|
|
54
47
|
[webhosthidden]
|
|
55
48
|
runtimeclass LosingFocusEventArgs : Microsoft.ReactNative.Composition.Input.RoutedEventArgs {
|
|
@@ -72,40 +65,48 @@ namespace Microsoft.ReactNative
|
|
|
72
65
|
|
|
73
66
|
[experimental]
|
|
74
67
|
[webhosthidden]
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
runtimeclass LayoutMetricsChangedArgs {
|
|
69
|
+
LayoutMetrics NewLayoutMetrics { get; };
|
|
70
|
+
LayoutMetrics OldLayoutMetrics { get; };
|
|
71
|
+
};
|
|
72
|
+
|
|
77
73
|
|
|
74
|
+
// [exclusiveto(ComponentView)]
|
|
75
|
+
// [uuid(AEE8C30B-0E56-4FB8-8A80-D5CA9DE90916)]
|
|
76
|
+
// interface IComponentViewFactory
|
|
77
|
+
// {
|
|
78
|
+
// }
|
|
79
|
+
|
|
80
|
+
// [composable(IComponentViewFactory, protected)]
|
|
81
|
+
[experimental]
|
|
82
|
+
[webhosthidden]
|
|
83
|
+
unsealed runtimeclass ComponentView {
|
|
78
84
|
Int32 Tag { get; };
|
|
79
85
|
ComponentView Parent { get; };
|
|
80
86
|
IVectorView<ComponentView> Children { get; };
|
|
81
|
-
IReactContext ReactContext { get;};
|
|
87
|
+
IReactContext ReactContext { get; };
|
|
88
|
+
LayoutMetrics LayoutMetrics { get; };
|
|
89
|
+
IInspectable UserData;
|
|
82
90
|
|
|
83
|
-
|
|
84
|
-
overridable void UnmountChildComponentView(ComponentView childComponentView, UInt32 index);
|
|
85
|
-
overridable void HandleCommand(String commandName, IJSValueReader args);
|
|
86
|
-
overridable void UpdateProps(IComponentProps props, IComponentProps oldProps);
|
|
87
|
-
overridable void UpdateState(IComponentState state);
|
|
88
|
-
overridable void UpdateLayoutMetrics(LayoutMetrics metrics, LayoutMetrics oldMetrics);
|
|
89
|
-
overridable void FinalizeUpdates(ComponentViewUpdateMask updateMask);
|
|
91
|
+
Boolean TryFocus();
|
|
90
92
|
|
|
91
93
|
DOC_STRING("Used to handle key down events when this component is focused, or if a child component did not handle the key down")
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.KeyRoutedEventArgs> KeyDown;
|
|
94
95
|
DOC_STRING("Used to handle key up events when this component is focused, or if a child component did not handle the key up")
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
overridable void OnPointerExited(Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs args);
|
|
105
|
-
overridable void OnPointerCaptureLost();
|
|
106
|
-
|
|
107
|
-
Boolean TryFocus();
|
|
96
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.KeyRoutedEventArgs> KeyUp;
|
|
97
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.CharacterReceivedRoutedEventArgs> CharacterReceived;
|
|
98
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs> PointerPressed;
|
|
99
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs> PointerReleased;
|
|
100
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs> PointerMoved;
|
|
101
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs> PointerWheelChanged;
|
|
102
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs> PointerEntered;
|
|
103
|
+
event Windows.Foundation.EventHandler<Microsoft.ReactNative.Composition.Input.PointerRoutedEventArgs> PointerExited;
|
|
104
|
+
event Windows.Foundation.EventHandler<ComponentView> PointerCaptureLost;
|
|
108
105
|
|
|
106
|
+
event Windows.Foundation.EventHandler<ComponentView> Destroying;
|
|
107
|
+
event Windows.Foundation.EventHandler<LayoutMetricsChangedArgs> LayoutMetricsChanged;
|
|
108
|
+
event Windows.Foundation.EventHandler<ComponentView> Mounted;
|
|
109
|
+
event Windows.Foundation.EventHandler<ComponentView> Unmounted;
|
|
109
110
|
event Windows.Foundation.EventHandler<LosingFocusEventArgs> LosingFocus;
|
|
110
111
|
event Windows.Foundation.EventHandler<GettingFocusEventArgs> GettingFocus;
|
|
111
112
|
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
|
|
@@ -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
|
|
@@ -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;
|