Adds support to compile react-native-svg against WinAppSDK (#2255)

# Summary

Adds namespace redirects required to compile react-native-svg sources
against WinAppSDK for react-native-windows.

## Test Plan

There aren't a lot of examples for building react-native-windows apps in
open source targeting WinAppSDK, but we have some proprietary builds,
and this source code is working there (it is also still compatible with
UWP).
This commit is contained in:
Eric Rozell
2024-04-12 05:10:19 -04:00
committed by GitHub
parent 4b51a41a22
commit 9f6f6fd40c
14 changed files with 60 additions and 53 deletions
+8 -8
View File
@@ -8,7 +8,7 @@ struct SvgViewManager : SvgViewManagerT<SvgViewManager> {
// IViewManager
hstring Name();
Windows::UI::Xaml::FrameworkElement CreateView();
xaml::FrameworkElement CreateView();
// IViewManagerWithReactContext
Microsoft::ReactNative::IReactContext ReactContext();
@@ -17,18 +17,18 @@ struct SvgViewManager : SvgViewManagerT<SvgViewManager> {
// IViewManagerWithNativeProperties
Windows::Foundation::Collections::IMapView<hstring, Microsoft::ReactNative::ViewManagerPropertyType> NativeProps();
void UpdateProperties(
Windows::UI::Xaml::FrameworkElement const &view,
xaml::FrameworkElement const &view,
Microsoft::ReactNative::IJSValueReader const &propertyMapReader);
// IViewManagerWithChildren
void
AddView(Windows::UI::Xaml::FrameworkElement const &parent, Windows::UI::Xaml::UIElement const &child, int64_t index);
void RemoveAllChildren(Windows::UI::Xaml::FrameworkElement const &parent);
void RemoveChildAt(Windows::UI::Xaml::FrameworkElement const &parent, int64_t index);
AddView(xaml::FrameworkElement const &parent, xaml::UIElement const &child, int64_t index);
void RemoveAllChildren(xaml::FrameworkElement const &parent);
void RemoveChildAt(xaml::FrameworkElement const &parent, int64_t index);
void ReplaceChild(
Windows::UI::Xaml::FrameworkElement const &parent,
Windows::UI::Xaml::UIElement const &oldChild,
Windows::UI::Xaml::UIElement const &newChild);
xaml::FrameworkElement const &parent,
xaml::UIElement const &oldChild,
xaml::UIElement const &newChild);
// IViewManagerWithPointerEvents
void OnPointerEvent(