react-native-windows 0.74.0-preview.2 → 0.74.0-preview.4
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/Libraries/Image/AssetSourceResolver.windows.js +186 -0
- package/Libraries/Image/assetPaths.js +36 -0
- package/Microsoft.ReactNative/CompositionComponentView.idl +18 -3
- package/Microsoft.ReactNative/CompositionContext.idl +5 -5
- package/Microsoft.ReactNative/CompositionRootView.idl +22 -8
- package/Microsoft.ReactNative/CompositionSwitcher.idl +2 -2
- package/Microsoft.ReactNative/CompositionUIService.idl +8 -6
- package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +8 -1
- package/Microsoft.ReactNative/Fabric/AbiViewProps.h +7 -2
- package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.cpp +4 -3
- package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.h +5 -5
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +173 -152
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.h +8 -8
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper_emptyimpl.cpp +13 -13
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHelpers.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +14 -11
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.cpp +24 -11
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.h +15 -10
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView_emptyimpl.cpp +15 -4
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.cpp +20 -9
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.h +6 -4
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService_emptyimpl.cpp +5 -2
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +104 -54
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +25 -19
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +2 -2
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +2 -2
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +9 -8
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +5 -5
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +7 -5
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +5 -5
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +4 -4
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +5 -5
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +5 -2
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +2 -2
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +2 -2
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +34 -27
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +6 -6
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +9 -9
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +6 -6
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +5 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +6 -6
- package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +13 -3
- package/Microsoft.ReactNative/Fabric/Composition/Theme.h +16 -8
- package/Microsoft.ReactNative/Fabric/Composition/Theme_emptyimpl.cpp +3 -3
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +3 -3
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +3 -3
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +1 -1
- package/Microsoft.ReactNative/Fabric/IComponentViewRegistry.h +1 -1
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +2 -1
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +7 -5
- package/Microsoft.ReactNative/Theme.idl +12 -1
- package/Microsoft.ReactNative/ViewProps.idl +11 -1
- package/Microsoft.ReactNative/packages.lock.json +70 -42
- package/Microsoft.ReactNative.Cxx/AutoDraw.h +3 -3
- package/Microsoft.ReactNative.Cxx/{CompositionSwitcher.interop.h → CompositionSwitcher.Experimental.interop.h} +2 -2
- package/Microsoft.ReactNative.Cxx/DesktopWindowBridge.h +2 -0
- package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +2 -11
- package/PropertySheets/External/Microsoft.ReactNative.Composition.CppApp.props +1 -1
- package/PropertySheets/External/Microsoft.ReactNative.WindowsSdk.Default.props +5 -3
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/package.json +11 -11
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +2 -7
|
@@ -32,7 +32,7 @@ struct ImageComponentView : ImageComponentViewT<ImageComponentView, ComponentVie
|
|
|
32
32
|
using Super = ImageComponentViewT<ImageComponentView, ComponentView>;
|
|
33
33
|
|
|
34
34
|
[[nodiscard]] static winrt::Microsoft::ReactNative::ComponentView Create(
|
|
35
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
35
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
36
36
|
facebook::react::Tag tag,
|
|
37
37
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept;
|
|
38
38
|
|
|
@@ -56,12 +56,12 @@ struct ImageComponentView : ImageComponentViewT<ImageComponentView, ComponentVie
|
|
|
56
56
|
|
|
57
57
|
facebook::react::Tag hitTest(facebook::react::Point pt, facebook::react::Point &localPt, bool ignorePointerEvents)
|
|
58
58
|
const noexcept override;
|
|
59
|
-
winrt::Microsoft::ReactNative::Composition::IVisual Visual() const noexcept override;
|
|
59
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual Visual() const noexcept override;
|
|
60
60
|
bool focusable() const noexcept override;
|
|
61
61
|
virtual std::string DefaultControlType() const noexcept;
|
|
62
62
|
|
|
63
63
|
ImageComponentView(
|
|
64
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
64
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
65
65
|
facebook::react::Tag tag,
|
|
66
66
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext);
|
|
67
67
|
|
|
@@ -91,8 +91,8 @@ struct ImageComponentView : ImageComponentViewT<ImageComponentView, ComponentVie
|
|
|
91
91
|
|
|
92
92
|
std::shared_ptr<const facebook::react::ImageProps> m_props;
|
|
93
93
|
|
|
94
|
-
winrt::Microsoft::ReactNative::Composition::ISpriteVisual m_visual{nullptr};
|
|
95
|
-
winrt::Microsoft::ReactNative::Composition::IDrawingSurfaceBrush m_drawingSurface;
|
|
94
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_visual{nullptr};
|
|
95
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IDrawingSurfaceBrush m_drawingSurface;
|
|
96
96
|
winrt::com_ptr<IWICBitmap> m_wicbmp;
|
|
97
97
|
std::shared_ptr<WindowsImageResponseObserver> m_imageResponseObserver;
|
|
98
98
|
facebook::react::ImageShadowNode::ConcreteState::Shared m_state;
|
package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
namespace winrt::Microsoft::ReactNative::Composition::implementation {
|
|
21
21
|
WindowsModalHostComponentView::WindowsModalHostComponentView(
|
|
22
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
22
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
23
23
|
facebook::react::Tag tag,
|
|
24
24
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext)
|
|
25
25
|
: Super(
|
|
@@ -34,7 +34,7 @@ WindowsModalHostComponentView::WindowsModalHostComponentView(
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
winrt::Microsoft::ReactNative::ComponentView WindowsModalHostComponentView::Create(
|
|
37
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
37
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
38
38
|
facebook::react::Tag tag,
|
|
39
39
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept {
|
|
40
40
|
return winrt::make<WindowsModalHostComponentView>(compContext, tag, reactContext);
|
|
@@ -240,7 +240,7 @@ void WindowsModalHostComponentView::updateLayoutMetrics(
|
|
|
240
240
|
|
|
241
241
|
drawingSurface.HorizontalAlignmentRatio(0.f);
|
|
242
242
|
drawingSurface.VerticalAlignmentRatio(0.f);
|
|
243
|
-
drawingSurface.Stretch(winrt::Microsoft::ReactNative::Composition::CompositionStretch::None);
|
|
243
|
+
drawingSurface.Stretch(winrt::Microsoft::ReactNative::Composition::Experimental::CompositionStretch::None);
|
|
244
244
|
m_visual.Brush(drawingSurface);
|
|
245
245
|
m_visual.Size(surfaceSize);
|
|
246
246
|
m_visual.Offset({
|
|
@@ -307,11 +307,13 @@ facebook::react::SharedViewProps WindowsModalHostComponentView::viewProps() noex
|
|
|
307
307
|
return m_props;
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
winrt::Microsoft::ReactNative::Composition::IVisual WindowsModalHostComponentView::Visual()
|
|
310
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual WindowsModalHostComponentView::Visual()
|
|
311
|
+
const noexcept {
|
|
311
312
|
return m_visual;
|
|
312
313
|
}
|
|
313
314
|
|
|
314
|
-
winrt::Microsoft::ReactNative::Composition::IVisual WindowsModalHostComponentView::OuterVisual()
|
|
315
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual WindowsModalHostComponentView::OuterVisual()
|
|
316
|
+
const noexcept {
|
|
315
317
|
return m_visual;
|
|
316
318
|
}
|
|
317
319
|
|
|
@@ -17,7 +17,7 @@ struct WindowsModalHostComponentView : WindowsModalHostComponentViewT<WindowsMod
|
|
|
17
17
|
using Super = WindowsModalHostComponentViewT<WindowsModalHostComponentView, ComponentView>;
|
|
18
18
|
|
|
19
19
|
[[nodiscard]] static winrt::Microsoft::ReactNative::ComponentView Create(
|
|
20
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
20
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
21
21
|
facebook::react::Tag tag,
|
|
22
22
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept;
|
|
23
23
|
|
|
@@ -42,12 +42,12 @@ struct WindowsModalHostComponentView : WindowsModalHostComponentViewT<WindowsMod
|
|
|
42
42
|
bool focusable() const noexcept override;
|
|
43
43
|
facebook::react::Tag hitTest(facebook::react::Point pt, facebook::react::Point &localPt, bool ignorePointerEvents)
|
|
44
44
|
const noexcept override;
|
|
45
|
-
winrt::Microsoft::ReactNative::Composition::IVisual Visual() const noexcept override;
|
|
46
|
-
winrt::Microsoft::ReactNative::Composition::IVisual OuterVisual() const noexcept override;
|
|
45
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual Visual() const noexcept override;
|
|
46
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual OuterVisual() const noexcept override;
|
|
47
47
|
virtual std::string DefaultControlType() const noexcept;
|
|
48
48
|
|
|
49
49
|
WindowsModalHostComponentView(
|
|
50
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
50
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
51
51
|
facebook::react::Tag tag,
|
|
52
52
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext);
|
|
53
53
|
|
|
@@ -59,7 +59,7 @@ struct WindowsModalHostComponentView : WindowsModalHostComponentViewT<WindowsMod
|
|
|
59
59
|
|
|
60
60
|
private:
|
|
61
61
|
std::shared_ptr<facebook::react::ModalHostViewProps const> m_props;
|
|
62
|
-
winrt::Microsoft::ReactNative::Composition::ISpriteVisual m_visual{nullptr};
|
|
62
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_visual{nullptr};
|
|
63
63
|
HWND m_hwnd{nullptr};
|
|
64
64
|
winrt::Microsoft::ReactNative::ReactContext m_context;
|
|
65
65
|
};
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
namespace winrt::Microsoft::ReactNative::Composition::implementation {
|
|
20
20
|
|
|
21
21
|
ParagraphComponentView::ParagraphComponentView(
|
|
22
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
22
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
23
23
|
facebook::react::Tag tag,
|
|
24
24
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext)
|
|
25
25
|
: Super(
|
|
@@ -285,7 +285,7 @@ void ParagraphComponentView::updateVisualBrush() noexcept {
|
|
|
285
285
|
if (m_drawingSurface) {
|
|
286
286
|
m_drawingSurface.HorizontalAlignmentRatio(horizAlignment);
|
|
287
287
|
m_drawingSurface.VerticalAlignmentRatio(0.f);
|
|
288
|
-
m_drawingSurface.Stretch(winrt::Microsoft::ReactNative::Composition::CompositionStretch::None);
|
|
288
|
+
m_drawingSurface.Stretch(winrt::Microsoft::ReactNative::Composition::Experimental::CompositionStretch::None);
|
|
289
289
|
}
|
|
290
290
|
m_visual.Brush(m_drawingSurface);
|
|
291
291
|
}
|
|
@@ -346,12 +346,12 @@ std::string ParagraphComponentView::DefaultAccessibleName() const noexcept {
|
|
|
346
346
|
return m_attributedStringBox.getValue().getString();
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
winrt::Microsoft::ReactNative::Composition::IVisual ParagraphComponentView::Visual() const noexcept {
|
|
349
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual ParagraphComponentView::Visual() const noexcept {
|
|
350
350
|
return m_visual;
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
winrt::Microsoft::ReactNative::ComponentView ParagraphComponentView::Create(
|
|
354
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
354
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
355
355
|
facebook::react::Tag tag,
|
|
356
356
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept {
|
|
357
357
|
return winrt::make<ParagraphComponentView>(compContext, tag, reactContext);
|
|
@@ -21,7 +21,7 @@ struct ParagraphComponentView : ParagraphComponentViewT<ParagraphComponentView,
|
|
|
21
21
|
using Super = ParagraphComponentViewT<ParagraphComponentView, ComponentView>;
|
|
22
22
|
|
|
23
23
|
[[nodiscard]] static winrt::Microsoft::ReactNative::ComponentView Create(
|
|
24
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
24
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
25
25
|
facebook::react::Tag tag,
|
|
26
26
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept;
|
|
27
27
|
|
|
@@ -48,12 +48,12 @@ struct ParagraphComponentView : ParagraphComponentViewT<ParagraphComponentView,
|
|
|
48
48
|
void onThemeChanged() noexcept override;
|
|
49
49
|
facebook::react::SharedViewEventEmitter eventEmitterAtPoint(facebook::react::Point pt) noexcept override;
|
|
50
50
|
|
|
51
|
-
winrt::Microsoft::ReactNative::Composition::IVisual Visual() const noexcept override;
|
|
51
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual Visual() const noexcept override;
|
|
52
52
|
virtual std::string DefaultControlType() const noexcept override;
|
|
53
53
|
virtual std::string DefaultAccessibleName() const noexcept override;
|
|
54
54
|
|
|
55
55
|
ParagraphComponentView(
|
|
56
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
56
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
57
57
|
facebook::react::Tag tag,
|
|
58
58
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext);
|
|
59
59
|
|
|
@@ -64,13 +64,13 @@ struct ParagraphComponentView : ParagraphComponentViewT<ParagraphComponentView,
|
|
|
64
64
|
void updateTextAlignment(const std::optional<facebook::react::TextAlignment> &fbAlignment) noexcept;
|
|
65
65
|
|
|
66
66
|
std::shared_ptr<facebook::react::ParagraphProps const> m_props;
|
|
67
|
-
winrt::Microsoft::ReactNative::Composition::ISpriteVisual m_visual{nullptr};
|
|
67
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_visual{nullptr};
|
|
68
68
|
winrt::com_ptr<::IDWriteTextLayout> m_textLayout;
|
|
69
69
|
facebook::react::AttributedStringBox m_attributedStringBox;
|
|
70
70
|
facebook::react::ParagraphAttributes m_paragraphAttributes;
|
|
71
71
|
|
|
72
72
|
bool m_requireRedraw{true};
|
|
73
|
-
winrt::Microsoft::ReactNative::Composition::IDrawingSurfaceBrush m_drawingSurface;
|
|
73
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IDrawingSurfaceBrush m_drawingSurface;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
} // namespace winrt::Microsoft::ReactNative::Composition::implementation
|
|
@@ -96,7 +96,7 @@ void ReactCompositionViewComponentBuilder::SetLayoutHandler(
|
|
|
96
96
|
winrt::Microsoft::ReactNative::ComponentView ReactCompositionViewComponentBuilder::CreateView(
|
|
97
97
|
const IReactContext &reactContext,
|
|
98
98
|
int32_t tag,
|
|
99
|
-
const ICompositionContext &context) noexcept {
|
|
99
|
+
const Experimental::ICompositionContext &context) noexcept {
|
|
100
100
|
if (m_createView) {
|
|
101
101
|
auto args = winrt::make<implementation::CreateCompositionComponentViewArgs>(reactContext, tag, context);
|
|
102
102
|
return m_createView(args);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// Licensed under the MIT License.
|
|
4
4
|
|
|
5
5
|
#include <react/renderer/core/ReactPrimitives.h>
|
|
6
|
+
#include "winrt/Microsoft.ReactNative.Composition.Experimental.h"
|
|
6
7
|
#include "winrt/Microsoft.ReactNative.Composition.h"
|
|
7
8
|
#include "winrt/Microsoft.ReactNative.h"
|
|
8
9
|
|
|
@@ -40,8 +41,10 @@ struct ReactCompositionViewComponentBuilder : winrt::implements<
|
|
|
40
41
|
LayoutHandler LayoutHandler() const noexcept;
|
|
41
42
|
bool IsViewComponent() const noexcept;
|
|
42
43
|
|
|
43
|
-
winrt::Microsoft::ReactNative::ComponentView
|
|
44
|
-
|
|
44
|
+
winrt::Microsoft::ReactNative::ComponentView CreateView(
|
|
45
|
+
const IReactContext &reactContext,
|
|
46
|
+
facebook::react::Tag tag,
|
|
47
|
+
const Experimental::ICompositionContext &context) noexcept;
|
|
45
48
|
|
|
46
49
|
private:
|
|
47
50
|
ViewPropsFactory m_propsFactory;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
namespace winrt::Microsoft::ReactNative::Composition::implementation {
|
|
15
15
|
|
|
16
16
|
RootComponentView::RootComponentView(
|
|
17
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
17
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
18
18
|
facebook::react::Tag tag,
|
|
19
19
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext)
|
|
20
20
|
: base_type(
|
|
@@ -34,7 +34,7 @@ RootComponentView::~RootComponentView() {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
winrt::Microsoft::ReactNative::ComponentView RootComponentView::Create(
|
|
37
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
37
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
38
38
|
facebook::react::Tag tag,
|
|
39
39
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept {
|
|
40
40
|
return winrt::make<RootComponentView>(compContext, tag, reactContext);
|
|
@@ -21,7 +21,7 @@ struct RootComponentView : RootComponentViewT<RootComponentView, ViewComponentVi
|
|
|
21
21
|
using Super = RootComponentViewT<RootComponentView, ViewComponentView>;
|
|
22
22
|
|
|
23
23
|
[[nodiscard]] static winrt::Microsoft::ReactNative::ComponentView Create(
|
|
24
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
24
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
25
25
|
facebook::react::Tag tag,
|
|
26
26
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept;
|
|
27
27
|
|
|
@@ -45,7 +45,7 @@ struct RootComponentView : RootComponentViewT<RootComponentView, ViewComponentVi
|
|
|
45
45
|
winrt::IInspectable UiaProviderFromPoint(const POINT &ptPixels) noexcept;
|
|
46
46
|
|
|
47
47
|
RootComponentView(
|
|
48
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
48
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
49
49
|
facebook::react::Tag tag,
|
|
50
50
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext);
|
|
51
51
|
|
|
@@ -39,7 +39,7 @@ enum class ScrollbarHitRegion : int {
|
|
|
39
39
|
struct ScrollBarComponent {
|
|
40
40
|
ScrollBarComponent(
|
|
41
41
|
const winrt::Microsoft::ReactNative::Composition::ScrollViewComponentView &outer,
|
|
42
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
42
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
43
43
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext,
|
|
44
44
|
bool vertical)
|
|
45
45
|
: m_outer(outer), m_compContext(compContext), m_reactContext(reactContext), m_vertical(vertical) {
|
|
@@ -54,12 +54,14 @@ struct ScrollBarComponent {
|
|
|
54
54
|
m_rootVisual.InsertAt(m_arrowVisualLast, 2);
|
|
55
55
|
m_rootVisual.InsertAt(m_thumbVisual, 3);
|
|
56
56
|
|
|
57
|
-
m_trackVisual.AnimationClass(winrt::Microsoft::ReactNative::Composition::AnimationClass::ScrollBar);
|
|
58
|
-
m_arrowVisualFirst.AnimationClass(
|
|
59
|
-
|
|
57
|
+
m_trackVisual.AnimationClass(winrt::Microsoft::ReactNative::Composition::Experimental::AnimationClass::ScrollBar);
|
|
58
|
+
m_arrowVisualFirst.AnimationClass(
|
|
59
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::AnimationClass::ScrollBar);
|
|
60
|
+
m_arrowVisualLast.AnimationClass(
|
|
61
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::AnimationClass::ScrollBar);
|
|
60
62
|
m_thumbVisual.AnimationClass(
|
|
61
|
-
vertical ? winrt::Microsoft::ReactNative::Composition::AnimationClass::ScrollBarThumbVertical
|
|
62
|
-
: winrt::Microsoft::ReactNative::Composition::AnimationClass::ScrollBarThumbHorizontal);
|
|
63
|
+
vertical ? winrt::Microsoft::ReactNative::Composition::Experimental::AnimationClass::ScrollBarThumbVertical
|
|
64
|
+
: winrt::Microsoft::ReactNative::Composition::Experimental::AnimationClass::ScrollBarThumbHorizontal);
|
|
63
65
|
|
|
64
66
|
updateShy(true);
|
|
65
67
|
onScaleChanged();
|
|
@@ -70,7 +72,9 @@ struct ScrollBarComponent {
|
|
|
70
72
|
updateHighlight(ScrollbarHitRegion::ArrowFirst);
|
|
71
73
|
updateHighlight(ScrollbarHitRegion::ArrowLast);
|
|
72
74
|
updateHighlight(ScrollbarHitRegion::Thumb);
|
|
73
|
-
m_trackVisual.Brush(
|
|
75
|
+
m_trackVisual.Brush(
|
|
76
|
+
winrt::get_self<winrt::Microsoft::ReactNative::Composition::implementation::Theme>(m_outer.Theme())
|
|
77
|
+
->InternalPlatformBrush(L"ScrollBarTrackFill"));
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
void ContentSize(winrt::Windows::Foundation::Size contentSize) noexcept {
|
|
@@ -283,7 +287,7 @@ struct ScrollBarComponent {
|
|
|
283
287
|
}
|
|
284
288
|
}
|
|
285
289
|
|
|
286
|
-
winrt::Microsoft::ReactNative::Composition::IVisual Visual() const noexcept {
|
|
290
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual Visual() const noexcept {
|
|
287
291
|
return m_rootVisual;
|
|
288
292
|
}
|
|
289
293
|
|
|
@@ -307,8 +311,9 @@ struct ScrollBarComponent {
|
|
|
307
311
|
void stopTrackingThumb() noexcept {
|
|
308
312
|
m_nTrackInputOffset = -1;
|
|
309
313
|
m_thumbVisual.AnimationClass(
|
|
310
|
-
m_vertical
|
|
311
|
-
|
|
314
|
+
m_vertical
|
|
315
|
+
? winrt::Microsoft::ReactNative::Composition::Experimental::AnimationClass::ScrollBarThumbVertical
|
|
316
|
+
: winrt::Microsoft::ReactNative::Composition::Experimental::AnimationClass::ScrollBarThumbHorizontal);
|
|
312
317
|
}
|
|
313
318
|
|
|
314
319
|
void handleMoveThumb(const winrt::Microsoft::ReactNative::Composition::Input::PointerRoutedEventArgs &args) {
|
|
@@ -365,7 +370,7 @@ struct ScrollBarComponent {
|
|
|
365
370
|
case ScrollbarHitRegion::Thumb: {
|
|
366
371
|
m_outer.CapturePointer(args.Pointer());
|
|
367
372
|
m_nTrackInputOffset = static_cast<int>((m_vertical ? pos.Y : pos.X) * m_scaleFactor) - m_thumbPos;
|
|
368
|
-
m_thumbVisual.AnimationClass(winrt::Microsoft::ReactNative::Composition::AnimationClass::None);
|
|
373
|
+
m_thumbVisual.AnimationClass(winrt::Microsoft::ReactNative::Composition::Experimental::AnimationClass::None);
|
|
369
374
|
handleMoveThumb(args);
|
|
370
375
|
}
|
|
371
376
|
}
|
|
@@ -510,7 +515,7 @@ struct ScrollBarComponent {
|
|
|
510
515
|
if (drawingSurface) {
|
|
511
516
|
drawingSurface.HorizontalAlignmentRatio(0.0f);
|
|
512
517
|
drawingSurface.VerticalAlignmentRatio(0.0f);
|
|
513
|
-
drawingSurface.Stretch(winrt::Microsoft::ReactNative::Composition::CompositionStretch::None);
|
|
518
|
+
drawingSurface.Stretch(winrt::Microsoft::ReactNative::Composition::Experimental::CompositionStretch::None);
|
|
514
519
|
}
|
|
515
520
|
|
|
516
521
|
auto &arrowVisual = (region == ScrollbarHitRegion::ArrowFirst) ? m_arrowVisualFirst : m_arrowVisualLast;
|
|
@@ -530,11 +535,13 @@ struct ScrollBarComponent {
|
|
|
530
535
|
if (!std::static_pointer_cast<const facebook::react::ScrollViewProps>(
|
|
531
536
|
winrt::get_self<ScrollViewComponentView>(m_outer)->viewProps())
|
|
532
537
|
->scrollEnabled) {
|
|
533
|
-
m_thumbVisual.Brush(
|
|
538
|
+
m_thumbVisual.Brush(
|
|
539
|
+
winrt::get_self<Theme>(m_outer.Theme())->InternalPlatformBrush(L"ScrollBarThumbFillDisabled"));
|
|
534
540
|
} else if (m_highlightedRegion == region) {
|
|
535
|
-
m_thumbVisual.Brush(
|
|
541
|
+
m_thumbVisual.Brush(
|
|
542
|
+
winrt::get_self<Theme>(m_outer.Theme())->InternalPlatformBrush(L"ScrollBarThumbFillPointerOver"));
|
|
536
543
|
} else {
|
|
537
|
-
m_thumbVisual.Brush(m_outer.Theme()
|
|
544
|
+
m_thumbVisual.Brush(winrt::get_self<Theme>(m_outer.Theme())->InternalPlatformBrush(L"ScrollBarThumbFill"));
|
|
538
545
|
}
|
|
539
546
|
}
|
|
540
547
|
}
|
|
@@ -542,7 +549,7 @@ struct ScrollBarComponent {
|
|
|
542
549
|
|
|
543
550
|
private:
|
|
544
551
|
winrt::Microsoft::ReactNative::Composition::ScrollViewComponentView m_outer;
|
|
545
|
-
winrt::Microsoft::ReactNative::Composition::ICompositionContext m_compContext;
|
|
552
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext m_compContext;
|
|
546
553
|
winrt::Microsoft::ReactNative::ReactContext m_reactContext;
|
|
547
554
|
const bool m_vertical;
|
|
548
555
|
bool m_visible{false};
|
|
@@ -562,24 +569,24 @@ struct ScrollBarComponent {
|
|
|
562
569
|
winrt::Windows::Foundation::Numerics::float3 m_offset{0};
|
|
563
570
|
winrt::Windows::Foundation::Size m_contentSize{0, 0};
|
|
564
571
|
winrt::Windows::Foundation::Size m_size{0, 0};
|
|
565
|
-
winrt::Microsoft::ReactNative::Composition::ISpriteVisual m_rootVisual{nullptr};
|
|
566
|
-
winrt::Microsoft::ReactNative::Composition::IRoundedRectangleVisual m_thumbVisual{nullptr};
|
|
567
|
-
winrt::Microsoft::ReactNative::Composition::ISpriteVisual m_arrowVisualFirst{nullptr};
|
|
568
|
-
winrt::Microsoft::ReactNative::Composition::ISpriteVisual m_arrowVisualLast{nullptr};
|
|
569
|
-
winrt::Microsoft::ReactNative::Composition::IDrawingSurfaceBrush m_arrowFirstDrawingSurface{nullptr};
|
|
570
|
-
winrt::Microsoft::ReactNative::Composition::IDrawingSurfaceBrush m_arrowLastDrawingSurface{nullptr};
|
|
571
|
-
winrt::Microsoft::ReactNative::Composition::IRoundedRectangleVisual m_trackVisual{nullptr};
|
|
572
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_rootVisual{nullptr};
|
|
573
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IRoundedRectangleVisual m_thumbVisual{nullptr};
|
|
574
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_arrowVisualFirst{nullptr};
|
|
575
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_arrowVisualLast{nullptr};
|
|
576
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IDrawingSurfaceBrush m_arrowFirstDrawingSurface{nullptr};
|
|
577
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IDrawingSurfaceBrush m_arrowLastDrawingSurface{nullptr};
|
|
578
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IRoundedRectangleVisual m_trackVisual{nullptr};
|
|
572
579
|
};
|
|
573
580
|
|
|
574
581
|
winrt::Microsoft::ReactNative::ComponentView ScrollViewComponentView::Create(
|
|
575
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
582
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
576
583
|
facebook::react::Tag tag,
|
|
577
584
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept {
|
|
578
585
|
return winrt::make<ScrollViewComponentView>(compContext, tag, reactContext);
|
|
579
586
|
}
|
|
580
587
|
|
|
581
588
|
ScrollViewComponentView::ScrollViewComponentView(
|
|
582
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
589
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
583
590
|
facebook::react::Tag tag,
|
|
584
591
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext)
|
|
585
592
|
: Super(
|
|
@@ -1143,7 +1150,7 @@ void ScrollViewComponentView::ensureVisual() noexcept {
|
|
|
1143
1150
|
winrt::auto_revoke,
|
|
1144
1151
|
[this](
|
|
1145
1152
|
winrt::IInspectable const & /*sender*/,
|
|
1146
|
-
winrt::Microsoft::ReactNative::Composition::IScrollPositionChangedArgs const &args) {
|
|
1153
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IScrollPositionChangedArgs const &args) {
|
|
1147
1154
|
updateStateWithContentOffset();
|
|
1148
1155
|
auto eventEmitter = GetEventEmitter();
|
|
1149
1156
|
if (eventEmitter) {
|
|
@@ -1207,7 +1214,7 @@ facebook::react::Point ScrollViewComponentView::getClientOffset() const noexcept
|
|
|
1207
1214
|
parentOffset.y};
|
|
1208
1215
|
}
|
|
1209
1216
|
|
|
1210
|
-
winrt::Microsoft::ReactNative::Composition::IVisual ScrollViewComponentView::Visual() const noexcept {
|
|
1217
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual ScrollViewComponentView::Visual() const noexcept {
|
|
1211
1218
|
return m_visual;
|
|
1212
1219
|
}
|
|
1213
1220
|
|
|
@@ -54,7 +54,7 @@ struct ScrollInteractionTrackerOwner : public winrt::implements<
|
|
|
54
54
|
using Super = ScrollViewComponentViewT<ScrollViewComponentView, ComponentView>;
|
|
55
55
|
|
|
56
56
|
[[nodiscard]] static winrt::Microsoft::ReactNative::ComponentView Create(
|
|
57
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
57
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
58
58
|
facebook::react::Tag tag,
|
|
59
59
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept;
|
|
60
60
|
|
|
@@ -82,7 +82,7 @@ struct ScrollInteractionTrackerOwner : public winrt::implements<
|
|
|
82
82
|
facebook::react::Tag hitTest(facebook::react::Point pt, facebook::react::Point &localPt, bool ignorePointerEvents)
|
|
83
83
|
const noexcept override;
|
|
84
84
|
facebook::react::Point getClientOffset() const noexcept override;
|
|
85
|
-
winrt::Microsoft::ReactNative::Composition::IVisual Visual() const noexcept override;
|
|
85
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual Visual() const noexcept override;
|
|
86
86
|
|
|
87
87
|
void onThemeChanged() noexcept override;
|
|
88
88
|
void OnPointerReleased(
|
|
@@ -101,7 +101,7 @@ struct ScrollInteractionTrackerOwner : public winrt::implements<
|
|
|
101
101
|
void scrollTo(winrt::Windows::Foundation::Numerics::float3 offset, bool animate) noexcept;
|
|
102
102
|
|
|
103
103
|
ScrollViewComponentView(
|
|
104
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
104
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
105
105
|
facebook::react::Tag tag,
|
|
106
106
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext);
|
|
107
107
|
|
|
@@ -125,11 +125,11 @@ struct ScrollInteractionTrackerOwner : public winrt::implements<
|
|
|
125
125
|
void updateStateWithContentOffset() noexcept;
|
|
126
126
|
|
|
127
127
|
facebook::react::Size m_contentSize;
|
|
128
|
-
winrt::Microsoft::ReactNative::Composition::ISpriteVisual m_visual{nullptr};
|
|
129
|
-
winrt::Microsoft::ReactNative::Composition::IScrollVisual m_scrollVisual{nullptr};
|
|
128
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_visual{nullptr};
|
|
129
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IScrollVisual m_scrollVisual{nullptr};
|
|
130
130
|
std::shared_ptr<ScrollBarComponent> m_horizontalScrollbarComponent{nullptr};
|
|
131
131
|
std::shared_ptr<ScrollBarComponent> m_verticalScrollbarComponent{nullptr};
|
|
132
|
-
winrt::Microsoft::ReactNative::Composition::IScrollVisual::ScrollPositionChanged_revoker
|
|
132
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IScrollVisual::ScrollPositionChanged_revoker
|
|
133
133
|
m_scrollPositionChangedRevoker{};
|
|
134
134
|
|
|
135
135
|
facebook::react::SharedViewProps m_props;
|
|
@@ -25,7 +25,7 @@ constexpr float trackStrokeThickness = 1.0f;
|
|
|
25
25
|
} // namespace SwitchConstants
|
|
26
26
|
|
|
27
27
|
SwitchComponentView::SwitchComponentView(
|
|
28
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
28
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
29
29
|
facebook::react::Tag tag,
|
|
30
30
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext)
|
|
31
31
|
: base_type(
|
|
@@ -38,7 +38,7 @@ SwitchComponentView::SwitchComponentView(
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
winrt::Microsoft::ReactNative::ComponentView SwitchComponentView::Create(
|
|
41
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
41
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
42
42
|
facebook::react::Tag tag,
|
|
43
43
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept {
|
|
44
44
|
return winrt::make<SwitchComponentView>(compContext, tag, reactContext);
|
|
@@ -137,9 +137,9 @@ void SwitchComponentView::handleScaleChange() noexcept {
|
|
|
137
137
|
void SwitchComponentView::updateVisuals() noexcept {
|
|
138
138
|
const auto switchProps = std::static_pointer_cast<const facebook::react::SwitchProps>(m_props);
|
|
139
139
|
auto &theme = *this->theme();
|
|
140
|
-
winrt::Microsoft::ReactNative::Composition::IBrush defaultColor;
|
|
141
|
-
winrt::Microsoft::ReactNative::Composition::IBrush fillColor;
|
|
142
|
-
winrt::Microsoft::ReactNative::Composition::IBrush thumbFill;
|
|
140
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IBrush defaultColor;
|
|
141
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IBrush fillColor;
|
|
142
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IBrush thumbFill;
|
|
143
143
|
|
|
144
144
|
auto thumbWidth = SwitchConstants::thumbWidth;
|
|
145
145
|
auto thumbHeight = SwitchConstants::thumbWidth;
|
|
@@ -217,7 +217,7 @@ void SwitchComponentView::updateVisuals() noexcept {
|
|
|
217
217
|
float offsetY = ((SwitchConstants::trackHeight - thumbHeight) * m_layoutMetrics.pointScaleFactor) / 2.0f;
|
|
218
218
|
|
|
219
219
|
if (m_supressAnimationForNextFrame) {
|
|
220
|
-
m_thumbVisual.AnimationClass(winrt::Microsoft::ReactNative::Composition::AnimationClass::None);
|
|
220
|
+
m_thumbVisual.AnimationClass(winrt::Microsoft::ReactNative::Composition::Experimental::AnimationClass::None);
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
if (switchProps->value) {
|
|
@@ -235,7 +235,7 @@ void SwitchComponentView::updateVisuals() noexcept {
|
|
|
235
235
|
m_thumbVisual.Brush(thumbFill);
|
|
236
236
|
|
|
237
237
|
if (m_supressAnimationForNextFrame) {
|
|
238
|
-
m_thumbVisual.AnimationClass(winrt::Microsoft::ReactNative::Composition::AnimationClass::SwitchThumb);
|
|
238
|
+
m_thumbVisual.AnimationClass(winrt::Microsoft::ReactNative::Composition::Experimental::AnimationClass::SwitchThumb);
|
|
239
239
|
m_supressAnimationForNextFrame = false;
|
|
240
240
|
}
|
|
241
241
|
}
|
|
@@ -264,7 +264,7 @@ void SwitchComponentView::ensureVisual() noexcept {
|
|
|
264
264
|
m_visual.InsertAt(m_trackVisual, 0);
|
|
265
265
|
|
|
266
266
|
m_thumbVisual = m_compContext.CreateRoundedRectangleVisual();
|
|
267
|
-
m_thumbVisual.AnimationClass(winrt::Microsoft::ReactNative::Composition::AnimationClass::SwitchThumb);
|
|
267
|
+
m_thumbVisual.AnimationClass(winrt::Microsoft::ReactNative::Composition::Experimental::AnimationClass::SwitchThumb);
|
|
268
268
|
m_trackVisual.InsertAt(m_thumbVisual, 0);
|
|
269
269
|
|
|
270
270
|
handleScaleChange();
|
|
@@ -288,7 +288,7 @@ facebook::react::Tag SwitchComponentView::hitTest(
|
|
|
288
288
|
return -1;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
winrt::Microsoft::ReactNative::Composition::IVisual SwitchComponentView::Visual() const noexcept {
|
|
291
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual SwitchComponentView::Visual() const noexcept {
|
|
292
292
|
return m_visual;
|
|
293
293
|
}
|
|
294
294
|
|
|
@@ -17,7 +17,7 @@ struct SwitchComponentView : SwitchComponentViewT<SwitchComponentView, Component
|
|
|
17
17
|
using Super = SwitchComponentViewT<SwitchComponentView, ComponentView>;
|
|
18
18
|
|
|
19
19
|
[[nodiscard]] static winrt::Microsoft::ReactNative::ComponentView Create(
|
|
20
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
20
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
21
21
|
facebook::react::Tag tag,
|
|
22
22
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept;
|
|
23
23
|
|
|
@@ -55,11 +55,11 @@ struct SwitchComponentView : SwitchComponentViewT<SwitchComponentView, Component
|
|
|
55
55
|
|
|
56
56
|
facebook::react::Tag hitTest(facebook::react::Point pt, facebook::react::Point &localPt, bool ignorePointerEvents)
|
|
57
57
|
const noexcept override;
|
|
58
|
-
winrt::Microsoft::ReactNative::Composition::IVisual Visual() const noexcept override;
|
|
58
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual Visual() const noexcept override;
|
|
59
59
|
std::string DefaultControlType() const noexcept override;
|
|
60
60
|
|
|
61
61
|
SwitchComponentView(
|
|
62
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
62
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
63
63
|
facebook::react::Tag tag,
|
|
64
64
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext);
|
|
65
65
|
|
|
@@ -74,9 +74,9 @@ struct SwitchComponentView : SwitchComponentViewT<SwitchComponentView, Component
|
|
|
74
74
|
bool m_supressAnimationForNextFrame{false};
|
|
75
75
|
bool m_visualUpdateRequired{true};
|
|
76
76
|
facebook::react::Size m_contentSize;
|
|
77
|
-
winrt::Microsoft::ReactNative::Composition::ISpriteVisual m_visual{nullptr};
|
|
78
|
-
winrt::Microsoft::ReactNative::Composition::IRoundedRectangleVisual m_trackVisual{nullptr};
|
|
79
|
-
winrt::Microsoft::ReactNative::Composition::IRoundedRectangleVisual m_thumbVisual{nullptr};
|
|
77
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_visual{nullptr};
|
|
78
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IRoundedRectangleVisual m_trackVisual{nullptr};
|
|
79
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IRoundedRectangleVisual m_thumbVisual{nullptr};
|
|
80
80
|
facebook::react::SharedViewProps m_props;
|
|
81
81
|
};
|
|
82
82
|
|
package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp
CHANGED
|
@@ -482,7 +482,7 @@ facebook::react::AttributedString WindowsTextInputComponentView::getAttributedSt
|
|
|
482
482
|
}
|
|
483
483
|
|
|
484
484
|
WindowsTextInputComponentView::WindowsTextInputComponentView(
|
|
485
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
485
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
486
486
|
facebook::react::Tag tag,
|
|
487
487
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext)
|
|
488
488
|
: Super(
|
|
@@ -1380,7 +1380,7 @@ void WindowsTextInputComponentView::ensureDrawingSurface() noexcept {
|
|
|
1380
1380
|
|
|
1381
1381
|
m_drawingSurface.HorizontalAlignmentRatio(0.f);
|
|
1382
1382
|
m_drawingSurface.VerticalAlignmentRatio(0.f);
|
|
1383
|
-
m_drawingSurface.Stretch(winrt::Microsoft::ReactNative::Composition::CompositionStretch::None);
|
|
1383
|
+
m_drawingSurface.Stretch(winrt::Microsoft::ReactNative::Composition::Experimental::CompositionStretch::None);
|
|
1384
1384
|
m_visual.Brush(m_drawingSurface);
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
@@ -1556,12 +1556,13 @@ void WindowsTextInputComponentView::onThemeChanged() noexcept {
|
|
|
1556
1556
|
base_type::onThemeChanged();
|
|
1557
1557
|
}
|
|
1558
1558
|
|
|
1559
|
-
winrt::Microsoft::ReactNative::Composition::IVisual WindowsTextInputComponentView::Visual()
|
|
1559
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual WindowsTextInputComponentView::Visual()
|
|
1560
|
+
const noexcept {
|
|
1560
1561
|
return m_visual;
|
|
1561
1562
|
}
|
|
1562
1563
|
|
|
1563
1564
|
winrt::Microsoft::ReactNative::ComponentView WindowsTextInputComponentView::Create(
|
|
1564
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
1565
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
1565
1566
|
facebook::react::Tag tag,
|
|
1566
1567
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept {
|
|
1567
1568
|
return winrt::make<WindowsTextInputComponentView>(compContext, tag, reactContext);
|
|
@@ -25,7 +25,7 @@ struct WindowsTextInputComponentView : WindowsTextInputComponentViewT<WindowsTex
|
|
|
25
25
|
|
|
26
26
|
using Super = WindowsTextInputComponentViewT<WindowsTextInputComponentView, ComponentView>;
|
|
27
27
|
[[nodiscard]] static winrt::Microsoft::ReactNative::ComponentView Create(
|
|
28
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
28
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
29
29
|
facebook::react::Tag tag,
|
|
30
30
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept;
|
|
31
31
|
|
|
@@ -52,7 +52,7 @@ struct WindowsTextInputComponentView : WindowsTextInputComponentViewT<WindowsTex
|
|
|
52
52
|
facebook::react::Point &localPt,
|
|
53
53
|
bool ignorePointerEvents = false) const noexcept override;
|
|
54
54
|
void OnRenderingDeviceLost() noexcept override;
|
|
55
|
-
winrt::Microsoft::ReactNative::Composition::IVisual Visual() const noexcept override;
|
|
55
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual Visual() const noexcept override;
|
|
56
56
|
void onFocusLost() noexcept override;
|
|
57
57
|
void onFocusGained() noexcept override;
|
|
58
58
|
bool focusable() const noexcept override;
|
|
@@ -83,7 +83,7 @@ struct WindowsTextInputComponentView : WindowsTextInputComponentViewT<WindowsTex
|
|
|
83
83
|
bool getAcccessiblityIsReadOnly() noexcept override;
|
|
84
84
|
|
|
85
85
|
WindowsTextInputComponentView(
|
|
86
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
86
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
87
87
|
facebook::react::Tag tag,
|
|
88
88
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext);
|
|
89
89
|
|
|
@@ -114,9 +114,9 @@ struct WindowsTextInputComponentView : WindowsTextInputComponentViewT<WindowsTex
|
|
|
114
114
|
const winrt::Microsoft::ReactNative::Composition::Input::CharacterReceivedRoutedEventArgs &args) noexcept;
|
|
115
115
|
|
|
116
116
|
winrt::Windows::UI::Composition::CompositionSurfaceBrush m_brush{nullptr};
|
|
117
|
-
winrt::Microsoft::ReactNative::Composition::ISpriteVisual m_visual{nullptr};
|
|
118
|
-
winrt::Microsoft::ReactNative::Composition::ICaretVisual m_caretVisual{nullptr};
|
|
119
|
-
winrt::Microsoft::ReactNative::Composition::IDrawingSurfaceBrush m_drawingSurface{nullptr};
|
|
117
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_visual{nullptr};
|
|
118
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ICaretVisual m_caretVisual{nullptr};
|
|
119
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IDrawingSurfaceBrush m_drawingSurface{nullptr};
|
|
120
120
|
|
|
121
121
|
// Used by ITextHost impl
|
|
122
122
|
CHARFORMAT2W m_cf;
|