react-native-windows 0.74.0-preview.3 → 0.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +181 -154
- 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 +36 -12
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.h +16 -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 +180 -128
- 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 +16 -22
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +5 -5
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +9 -10
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +5 -5
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +6 -5
- 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 +7 -3
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +2 -2
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +36 -35
- 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 +25 -19
- 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 +5 -8
- 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/Utils/KeyboardUtils.cpp +10 -2
- package/Microsoft.ReactNative/Utils/KeyboardUtils.h +4 -1
- package/Microsoft.ReactNative/ViewProps.idl +11 -1
- package/Microsoft.ReactNative/packages.lock.json +70 -42
- package/Microsoft.ReactNative.Cxx/AutoDraw.h +6 -4
- package/Microsoft.ReactNative.Cxx/{CompositionSwitcher.interop.h → CompositionSwitcher.Experimental.interop.h} +3 -3
- 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/Scripts/OfficeReact.Win32.nuspec +2 -0
- package/package.json +8 -5
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +2 -7
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
#include "CompositionViewComponentView.h"
|
|
8
8
|
|
|
9
|
+
#include <AutoDraw.h>
|
|
9
10
|
#include <Fabric/AbiState.h>
|
|
10
11
|
#include <Fabric/AbiViewProps.h>
|
|
11
12
|
#include <Fabric/Composition/CompositionRootView.h>
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
#include <Utils/KeyboardUtils.h>
|
|
15
16
|
#include <Utils/ValueUtils.h>
|
|
16
17
|
#include <Views/FrameworkElementTransferProperties.h>
|
|
18
|
+
#include <winrt/Microsoft.ReactNative.Composition.Experimental.h>
|
|
17
19
|
#include <winrt/Windows.UI.Composition.h>
|
|
18
20
|
#include "CompositionContextHelper.h"
|
|
19
21
|
#include "CompositionDynamicAutomationProvider.h"
|
|
@@ -31,11 +33,15 @@ namespace winrt::Microsoft::ReactNative::Composition::implementation {
|
|
|
31
33
|
CreateCompositionComponentViewArgs::CreateCompositionComponentViewArgs(
|
|
32
34
|
const winrt::Microsoft::ReactNative::IReactContext &reactContext,
|
|
33
35
|
facebook::react::Tag tag,
|
|
34
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compositionContext)
|
|
36
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compositionContext)
|
|
35
37
|
: base_type(reactContext, tag), m_compositionContext(compositionContext){};
|
|
36
38
|
|
|
37
|
-
winrt::Microsoft::
|
|
38
|
-
|
|
39
|
+
winrt::Microsoft::UI::Composition::Compositor CreateCompositionComponentViewArgs::Compositor() const noexcept {
|
|
40
|
+
return winrt::Microsoft::ReactNative::Composition::CompositionUIService::GetCompositor(ReactContext().Properties());
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext
|
|
44
|
+
CreateCompositionComponentViewArgs::CompositionContext() const noexcept {
|
|
39
45
|
return m_compositionContext;
|
|
40
46
|
}
|
|
41
47
|
|
|
@@ -48,10 +54,17 @@ void CreateCompositionComponentViewArgs::Features(ComponentViewFeatures value) n
|
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
ComponentView::ComponentView(const winrt::Microsoft::ReactNative::Composition::CreateCompositionComponentViewArgs &args)
|
|
51
|
-
: ComponentView(
|
|
57
|
+
: ComponentView(
|
|
58
|
+
winrt::get_self<
|
|
59
|
+
winrt::Microsoft::ReactNative::Composition::implementation::CreateCompositionComponentViewArgs>(args)
|
|
60
|
+
->CompositionContext(),
|
|
61
|
+
args.Tag(),
|
|
62
|
+
args.ReactContext(),
|
|
63
|
+
args.Features(),
|
|
64
|
+
true) {}
|
|
52
65
|
|
|
53
66
|
ComponentView::ComponentView(
|
|
54
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
67
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
55
68
|
facebook::react::Tag tag,
|
|
56
69
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext,
|
|
57
70
|
ComponentViewFeatures flags,
|
|
@@ -74,9 +87,9 @@ facebook::react::Props::Shared ComponentView::props() noexcept {
|
|
|
74
87
|
void ComponentView::onThemeChanged() noexcept {
|
|
75
88
|
if ((m_flags & ComponentViewFeatures::Background) == ComponentViewFeatures::Background) {
|
|
76
89
|
if (viewProps()->backgroundColor) {
|
|
77
|
-
Visual().as<ISpriteVisual>().Brush(theme()->Brush(*viewProps()->backgroundColor));
|
|
90
|
+
Visual().as<Experimental::ISpriteVisual>().Brush(theme()->Brush(*viewProps()->backgroundColor));
|
|
78
91
|
} else {
|
|
79
|
-
Visual().as<ISpriteVisual>().Brush(nullptr);
|
|
92
|
+
Visual().as<Experimental::ISpriteVisual>().Brush(nullptr);
|
|
80
93
|
}
|
|
81
94
|
}
|
|
82
95
|
|
|
@@ -108,7 +121,13 @@ winrt::Microsoft::ReactNative::Composition::Theme ComponentView::Theme() const n
|
|
|
108
121
|
return theme()->get_strong().as<winrt::Microsoft::ReactNative::Composition::Theme>();
|
|
109
122
|
}
|
|
110
123
|
|
|
111
|
-
winrt::Microsoft::
|
|
124
|
+
winrt::Microsoft::UI::Composition::Compositor ComponentView::Compositor() const noexcept {
|
|
125
|
+
return winrt::Microsoft::ReactNative::Composition::Experimental::MicrosoftCompositionContextHelper::InnerCompositor(
|
|
126
|
+
m_compContext);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext ComponentView::CompositionContext()
|
|
130
|
+
const noexcept {
|
|
112
131
|
return m_compContext;
|
|
113
132
|
}
|
|
114
133
|
|
|
@@ -121,9 +140,9 @@ void ComponentView::updateProps(
|
|
|
121
140
|
if ((m_flags & ComponentViewFeatures::Background) == ComponentViewFeatures::Background) {
|
|
122
141
|
if (oldViewProps.backgroundColor != newViewProps.backgroundColor) {
|
|
123
142
|
if (newViewProps.backgroundColor) {
|
|
124
|
-
Visual().as<ISpriteVisual>().Brush(theme()->Brush(*newViewProps.backgroundColor));
|
|
143
|
+
Visual().as<Experimental::ISpriteVisual>().Brush(theme()->Brush(*newViewProps.backgroundColor));
|
|
125
144
|
} else {
|
|
126
|
-
Visual().as<ISpriteVisual>().Brush(nullptr);
|
|
145
|
+
Visual().as<Experimental::ISpriteVisual>().Brush(nullptr);
|
|
127
146
|
}
|
|
128
147
|
}
|
|
129
148
|
}
|
|
@@ -295,15 +314,17 @@ const facebook::react::SharedViewEventEmitter &ComponentView::GetEventEmitter()
|
|
|
295
314
|
return m_eventEmitter;
|
|
296
315
|
}
|
|
297
316
|
|
|
298
|
-
std::array<
|
|
317
|
+
std::array<
|
|
318
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual,
|
|
319
|
+
ComponentView::SpecialBorderLayerCount>
|
|
299
320
|
ComponentView::FindSpecialBorderLayers() const noexcept {
|
|
300
|
-
std::array<winrt::Microsoft::ReactNative::Composition::ISpriteVisual, SpecialBorderLayerCount> layers{
|
|
321
|
+
std::array<winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual, SpecialBorderLayerCount> layers{
|
|
301
322
|
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr};
|
|
302
323
|
|
|
303
324
|
if (m_numBorderVisuals) {
|
|
304
325
|
for (uint8_t i = 0; i < m_numBorderVisuals; i++) {
|
|
305
326
|
auto visual = Visual().GetAt(i);
|
|
306
|
-
layers[i] = visual.as<winrt::Microsoft::ReactNative::Composition::ISpriteVisual>();
|
|
327
|
+
layers[i] = visual.as<winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual>();
|
|
307
328
|
}
|
|
308
329
|
}
|
|
309
330
|
|
|
@@ -328,12 +349,13 @@ struct RoundedPathParameters {
|
|
|
328
349
|
* right, bottom right, bottom left). "rectPathGeometry" defines the bounding box of the generated shape.
|
|
329
350
|
*/
|
|
330
351
|
static winrt::com_ptr<ID2D1PathGeometry> GenerateRoundedRectPathGeometry(
|
|
331
|
-
winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
352
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
332
353
|
const RoundedPathParameters ¶ms,
|
|
333
354
|
const facebook::react::RectangleEdges<float> &rectPathGeometry) noexcept {
|
|
334
355
|
winrt::com_ptr<ID2D1PathGeometry> pathGeometry;
|
|
335
356
|
winrt::com_ptr<ID2D1Factory1> spD2dFactory;
|
|
336
|
-
compContext.as<::Microsoft::ReactNative::Composition::ICompositionContextInterop>()->D2DFactory(
|
|
357
|
+
compContext.as<::Microsoft::ReactNative::Composition::Experimental::ICompositionContextInterop>()->D2DFactory(
|
|
358
|
+
spD2dFactory.put());
|
|
337
359
|
|
|
338
360
|
// Create a path geometry.
|
|
339
361
|
HRESULT hr = spD2dFactory->CreatePathGeometry(pathGeometry.put());
|
|
@@ -513,7 +535,7 @@ RoundedPathParameters GenerateRoundedPathParameters(
|
|
|
513
535
|
}
|
|
514
536
|
|
|
515
537
|
static winrt::com_ptr<ID2D1PathGeometry> GenerateRoundedRectPathGeometry(
|
|
516
|
-
winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
538
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
517
539
|
const facebook::react::RectangleCorners<float> &baseRadius,
|
|
518
540
|
const facebook::react::RectangleEdges<float> &inset,
|
|
519
541
|
const facebook::react::RectangleEdges<float> &rectPathGeometry) noexcept {
|
|
@@ -547,37 +569,14 @@ void DrawShape(
|
|
|
547
569
|
pRT->DrawGeometry(&geometry, brush, strokeWidth, strokeStyle);
|
|
548
570
|
}
|
|
549
571
|
|
|
550
|
-
struct AutoDrawHelper {
|
|
551
|
-
AutoDrawHelper(winrt::com_ptr<::Microsoft::ReactNative::Composition::ICompositionDrawingSurfaceInterop> &surface) {
|
|
552
|
-
m_surface = surface;
|
|
553
|
-
m_surface->BeginDraw(m_pRT.put(), &m_offset);
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
~AutoDrawHelper() {
|
|
557
|
-
m_surface->EndDraw();
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
const winrt::com_ptr<ID2D1DeviceContext> &GetRenderTarget() const noexcept {
|
|
561
|
-
return m_pRT;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
POINT Offset() const noexcept {
|
|
565
|
-
return m_offset;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
private:
|
|
569
|
-
winrt::com_ptr<::Microsoft::ReactNative::Composition::ICompositionDrawingSurfaceInterop> m_surface;
|
|
570
|
-
POINT m_offset;
|
|
571
|
-
winrt::com_ptr<ID2D1DeviceContext> m_pRT;
|
|
572
|
-
};
|
|
573
|
-
|
|
574
572
|
template <typename TShape>
|
|
575
573
|
void SetBorderLayerPropertiesCommon(
|
|
576
574
|
winrt::Microsoft::ReactNative::Composition::implementation::Theme *theme,
|
|
577
|
-
winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
578
|
-
winrt::Microsoft::ReactNative::Composition::ISpriteVisual &layer,
|
|
575
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
576
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual &layer,
|
|
579
577
|
TShape &shape,
|
|
580
|
-
winrt::com_ptr<::Microsoft::ReactNative::Composition::ICompositionDrawingSurfaceInterop>
|
|
578
|
+
winrt::com_ptr<::Microsoft::ReactNative::Composition::Experimental::ICompositionDrawingSurfaceInterop>
|
|
579
|
+
&borderTexture,
|
|
581
580
|
const D2D1_RECT_F &textureRect,
|
|
582
581
|
facebook::react::Point anchorPoint,
|
|
583
582
|
facebook::react::Point anchorOffset,
|
|
@@ -599,75 +598,69 @@ void SetBorderLayerPropertiesCommon(
|
|
|
599
598
|
|
|
600
599
|
layer.Brush(surface);
|
|
601
600
|
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
601
|
+
POINT offset;
|
|
602
|
+
::Microsoft::ReactNative::Composition::AutoDrawDrawingSurface autoDraw(
|
|
603
|
+
surface, 1.0f /* We have already done the dpi scaling */, &offset);
|
|
604
|
+
if (auto pRT = autoDraw.GetRenderTarget()) {
|
|
605
|
+
// Clear with transparency
|
|
606
|
+
pRT->Clear();
|
|
605
607
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
// Clear with transparency
|
|
611
|
-
pRT->Clear();
|
|
612
|
-
|
|
613
|
-
if (!facebook::react::isColorMeaningful(borderColor)) {
|
|
614
|
-
return;
|
|
615
|
-
}
|
|
608
|
+
if (!facebook::react::isColorMeaningful(borderColor)) {
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
616
611
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
612
|
+
winrt::com_ptr<ID2D1Factory> spFactory;
|
|
613
|
+
pRT->GetFactory(spFactory.put());
|
|
614
|
+
assert(spFactory);
|
|
615
|
+
if (spFactory == nullptr)
|
|
616
|
+
return;
|
|
622
617
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
618
|
+
winrt::com_ptr<ID2D1SolidColorBrush> spBorderBrush;
|
|
619
|
+
pRT->CreateSolidColorBrush(theme->D2DColor(*borderColor), spBorderBrush.put());
|
|
620
|
+
assert(spBorderBrush);
|
|
621
|
+
if (spBorderBrush == nullptr)
|
|
622
|
+
return;
|
|
628
623
|
|
|
629
|
-
|
|
624
|
+
winrt::com_ptr<ID2D1StrokeStyle> spStrokeStyle;
|
|
630
625
|
|
|
631
|
-
|
|
626
|
+
enum class BorderStyle { Solid, Dotted, Dashed };
|
|
632
627
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
628
|
+
if (borderStyle == facebook::react::BorderStyle::Dotted || borderStyle == facebook::react::BorderStyle::Dashed) {
|
|
629
|
+
const auto capStyle =
|
|
630
|
+
borderStyle == facebook::react::BorderStyle::Dashed ? D2D1_CAP_STYLE_FLAT : D2D1_CAP_STYLE_ROUND;
|
|
631
|
+
const auto strokeStyleProps = D2D1::StrokeStyleProperties(
|
|
632
|
+
capStyle,
|
|
633
|
+
capStyle,
|
|
634
|
+
capStyle,
|
|
635
|
+
D2D1_LINE_JOIN_MITER,
|
|
636
|
+
10.0f,
|
|
637
|
+
borderStyle == facebook::react::BorderStyle::Dashed ? D2D1_DASH_STYLE_DASH : D2D1_DASH_STYLE_DOT,
|
|
638
|
+
0.0f);
|
|
639
|
+
spFactory->CreateStrokeStyle(&strokeStyleProps, nullptr, 0, spStrokeStyle.put());
|
|
640
|
+
}
|
|
641
|
+
D2D1::Matrix3x2F originalTransform;
|
|
642
|
+
D2D1::Matrix3x2F translationTransform =
|
|
643
|
+
D2D1::Matrix3x2F::Translation(-textureRect.left + offset.x, -textureRect.top + offset.y);
|
|
649
644
|
|
|
650
|
-
|
|
651
|
-
|
|
645
|
+
pRT->GetTransform(&originalTransform);
|
|
646
|
+
translationTransform = originalTransform * translationTransform;
|
|
652
647
|
|
|
653
|
-
|
|
654
|
-
pRT->SetTransform(translationTransform);
|
|
655
|
-
pRT->GetDpi(&oldDpiX, &oldDpiY);
|
|
656
|
-
pRT->SetDpi(96.0f, 96.0f); // We have already done the dpi scaling...
|
|
648
|
+
pRT->SetTransform(translationTransform);
|
|
657
649
|
|
|
658
|
-
|
|
650
|
+
DrawShape(pRT, shape, spBorderBrush.get(), strokeWidth, spStrokeStyle.get());
|
|
659
651
|
|
|
660
|
-
|
|
661
|
-
|
|
652
|
+
pRT->SetTransform(originalTransform);
|
|
653
|
+
}
|
|
662
654
|
}
|
|
663
655
|
|
|
664
656
|
template <typename TShape>
|
|
665
657
|
void SetBorderLayerProperties(
|
|
666
658
|
winrt::Microsoft::ReactNative::Composition::implementation::Theme *theme,
|
|
667
|
-
winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
668
|
-
winrt::Microsoft::ReactNative::Composition::ISpriteVisual &layer,
|
|
659
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
660
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual &layer,
|
|
669
661
|
TShape &shape,
|
|
670
|
-
winrt::com_ptr<::Microsoft::ReactNative::Composition::ICompositionDrawingSurfaceInterop>
|
|
662
|
+
winrt::com_ptr<::Microsoft::ReactNative::Composition::Experimental::ICompositionDrawingSurfaceInterop>
|
|
663
|
+
&borderTexture,
|
|
671
664
|
const D2D1_RECT_F &textureRect,
|
|
672
665
|
facebook::react::Point anchorPoint,
|
|
673
666
|
facebook::react::Point anchorOffset,
|
|
@@ -700,7 +693,7 @@ void SetBorderLayerProperties(
|
|
|
700
693
|
layer.Brush(theme->Brush(*borderColor));
|
|
701
694
|
|
|
702
695
|
winrt::com_ptr<ID2D1Factory1> spD2dFactory;
|
|
703
|
-
compContext.as<::Microsoft::ReactNative::Composition::ICompositionContextInterop>()->D2DFactory(
|
|
696
|
+
compContext.as<::Microsoft::ReactNative::Composition::Experimental::ICompositionContextInterop>()->D2DFactory(
|
|
704
697
|
spD2dFactory.put());
|
|
705
698
|
|
|
706
699
|
winrt::com_ptr<ID2D1TransformedGeometry> transformedShape;
|
|
@@ -708,7 +701,8 @@ void SetBorderLayerProperties(
|
|
|
708
701
|
winrt::check_hresult(
|
|
709
702
|
spD2dFactory->CreateTransformedGeometry(&shape, &translationTransform, transformedShape.put()));
|
|
710
703
|
|
|
711
|
-
layer.as<::Microsoft::ReactNative::Composition::IVisualInterop>()->SetClippingPath(
|
|
704
|
+
layer.as<::Microsoft::ReactNative::Composition::Experimental::IVisualInterop>()->SetClippingPath(
|
|
705
|
+
transformedShape.get());
|
|
712
706
|
}
|
|
713
707
|
/*
|
|
714
708
|
else
|
|
@@ -731,9 +725,10 @@ const float Bottom = 1.0;
|
|
|
731
725
|
template <typename TShape>
|
|
732
726
|
void DrawAllBorderLayers(
|
|
733
727
|
winrt::Microsoft::ReactNative::Composition::implementation::Theme *theme,
|
|
734
|
-
winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
735
|
-
std::array<
|
|
736
|
-
|
|
728
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
729
|
+
std::array<
|
|
730
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual,
|
|
731
|
+
ComponentView::SpecialBorderLayerCount> &spBorderLayers,
|
|
737
732
|
TShape &shape,
|
|
738
733
|
const facebook::react::BorderWidths &borderWidths,
|
|
739
734
|
const facebook::react::BorderRadii &borderRadii,
|
|
@@ -742,7 +737,7 @@ void DrawAllBorderLayers(
|
|
|
742
737
|
const facebook::react::BorderColors &borderColors,
|
|
743
738
|
facebook::react::BorderStyle borderStyle) {
|
|
744
739
|
// Now that we've drawn our nice border in one layer, split it into its component layers
|
|
745
|
-
winrt::com_ptr<::Microsoft::ReactNative::Composition::ICompositionDrawingSurfaceInterop>
|
|
740
|
+
winrt::com_ptr<::Microsoft::ReactNative::Composition::Experimental::ICompositionDrawingSurfaceInterop>
|
|
746
741
|
spTextures[ComponentView::SpecialBorderLayerCount];
|
|
747
742
|
|
|
748
743
|
// Set component border properties
|
|
@@ -903,7 +898,7 @@ void DrawAllBorderLayers(
|
|
|
903
898
|
}
|
|
904
899
|
|
|
905
900
|
winrt::com_ptr<ID2D1GeometryGroup> GetGeometryForRoundedBorder(
|
|
906
|
-
winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
901
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
907
902
|
const facebook::react::RectangleCorners<float> &radius,
|
|
908
903
|
const facebook::react::RectangleEdges<float> &inset,
|
|
909
904
|
const facebook::react::RectangleEdges<float> &thickness,
|
|
@@ -956,7 +951,8 @@ winrt::com_ptr<ID2D1GeometryGroup> GetGeometryForRoundedBorder(
|
|
|
956
951
|
|
|
957
952
|
ID2D1Geometry *ppGeometries[] = {outerPathGeometry.get(), innerPathGeometry.get()};
|
|
958
953
|
winrt::com_ptr<ID2D1Factory1> spD2dFactory;
|
|
959
|
-
compContext.as<::Microsoft::ReactNative::Composition::ICompositionContextInterop>()->D2DFactory(
|
|
954
|
+
compContext.as<::Microsoft::ReactNative::Composition::Experimental::ICompositionContextInterop>()->D2DFactory(
|
|
955
|
+
spD2dFactory.put());
|
|
960
956
|
|
|
961
957
|
winrt::com_ptr<ID2D1GeometryGroup> geometryGroup = nullptr;
|
|
962
958
|
// Create a geometry group.
|
|
@@ -1036,7 +1032,8 @@ facebook::react::BorderMetrics resolveAndAlignBorderMetrics(
|
|
|
1036
1032
|
|
|
1037
1033
|
bool ComponentView::TryUpdateSpecialBorderLayers(
|
|
1038
1034
|
winrt::Microsoft::ReactNative::Composition::implementation::Theme *theme,
|
|
1039
|
-
std::array<winrt::Microsoft::ReactNative::Composition::ISpriteVisual, SpecialBorderLayerCount>
|
|
1035
|
+
std::array<winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual, SpecialBorderLayerCount>
|
|
1036
|
+
&spBorderVisuals,
|
|
1040
1037
|
facebook::react::LayoutMetrics const &layoutMetrics,
|
|
1041
1038
|
const facebook::react::ViewProps &viewProps) noexcept {
|
|
1042
1039
|
auto borderMetrics = resolveAndAlignBorderMetrics(layoutMetrics, viewProps);
|
|
@@ -1150,13 +1147,13 @@ void ComponentView::finalizeBorderUpdates(
|
|
|
1150
1147
|
if (!TryUpdateSpecialBorderLayers(theme(), spBorderLayers, layoutMetrics, viewProps)) {
|
|
1151
1148
|
for (auto &spBorderLayer : spBorderLayers) {
|
|
1152
1149
|
if (spBorderLayer) {
|
|
1153
|
-
spBorderLayer.as<winrt::Microsoft::ReactNative::Composition::ISpriteVisual>().Brush(nullptr);
|
|
1150
|
+
spBorderLayer.as<winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual>().Brush(nullptr);
|
|
1154
1151
|
}
|
|
1155
1152
|
}
|
|
1156
1153
|
}
|
|
1157
1154
|
}
|
|
1158
1155
|
|
|
1159
|
-
winrt::Microsoft::ReactNative::Composition::IVisual ComponentView::OuterVisual() const noexcept {
|
|
1156
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual ComponentView::OuterVisual() const noexcept {
|
|
1160
1157
|
return m_outerVisual ? m_outerVisual : Visual();
|
|
1161
1158
|
}
|
|
1162
1159
|
|
|
@@ -1203,29 +1200,29 @@ void ComponentView::applyShadowProps(const facebook::react::ViewProps &viewProps
|
|
|
1203
1200
|
shadow.BlurRadius(viewProps.shadowRadius);
|
|
1204
1201
|
if (viewProps.shadowColor)
|
|
1205
1202
|
shadow.Color(theme()->Color(*viewProps.shadowColor));
|
|
1206
|
-
Visual().as<winrt::Microsoft::ReactNative::Composition::ISpriteVisual>().Shadow(shadow);
|
|
1203
|
+
Visual().as<winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual>().Shadow(shadow);
|
|
1207
1204
|
}
|
|
1208
1205
|
|
|
1209
1206
|
void ComponentView::updateTransformProps(
|
|
1210
1207
|
const facebook::react::ViewProps &oldViewProps,
|
|
1211
1208
|
const facebook::react::ViewProps &newViewProps,
|
|
1212
|
-
winrt::Microsoft::ReactNative::Composition::IVisual visual) noexcept {
|
|
1209
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual visual) noexcept {
|
|
1213
1210
|
// check for backfaceVisibility prop
|
|
1214
1211
|
if (oldViewProps.backfaceVisibility != newViewProps.backfaceVisibility) {
|
|
1215
1212
|
static_assert(
|
|
1216
1213
|
static_cast<facebook::react::BackfaceVisibility>(
|
|
1217
|
-
winrt::Microsoft::ReactNative::Composition::BackfaceVisibility::Inherit) ==
|
|
1214
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::BackfaceVisibility::Inherit) ==
|
|
1218
1215
|
facebook::react::BackfaceVisibility::Auto);
|
|
1219
1216
|
static_assert(
|
|
1220
1217
|
static_cast<facebook::react::BackfaceVisibility>(
|
|
1221
|
-
winrt::Microsoft::ReactNative::Composition::BackfaceVisibility::Visible) ==
|
|
1218
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::BackfaceVisibility::Visible) ==
|
|
1222
1219
|
facebook::react::BackfaceVisibility::Visible);
|
|
1223
1220
|
static_assert(
|
|
1224
1221
|
static_cast<facebook::react::BackfaceVisibility>(
|
|
1225
|
-
winrt::Microsoft::ReactNative::Composition::BackfaceVisibility::Hidden) ==
|
|
1222
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::BackfaceVisibility::Hidden) ==
|
|
1226
1223
|
facebook::react::BackfaceVisibility::Hidden);
|
|
1227
|
-
visual.BackfaceVisibility(
|
|
1228
|
-
|
|
1224
|
+
visual.BackfaceVisibility(static_cast<winrt::Microsoft::ReactNative::Composition::Experimental::BackfaceVisibility>(
|
|
1225
|
+
newViewProps.backfaceVisibility));
|
|
1229
1226
|
}
|
|
1230
1227
|
|
|
1231
1228
|
// Transform - TODO doesn't handle multiple of the same kind of transform -- Doesn't handle hittesting updates
|
|
@@ -1316,7 +1313,7 @@ void ComponentView::updateBorderLayoutMetrics(
|
|
|
1316
1313
|
|
|
1317
1314
|
if (borderMetrics.borderRadii.topLeft == 0 && borderMetrics.borderRadii.topRight == 0 &&
|
|
1318
1315
|
borderMetrics.borderRadii.bottomLeft == 0 && borderMetrics.borderRadii.bottomRight == 0) {
|
|
1319
|
-
Visual().as<::Microsoft::ReactNative::Composition::IVisualInterop>()->SetClippingPath(nullptr);
|
|
1316
|
+
Visual().as<::Microsoft::ReactNative::Composition::Experimental::IVisualInterop>()->SetClippingPath(nullptr);
|
|
1320
1317
|
} else {
|
|
1321
1318
|
winrt::com_ptr<ID2D1PathGeometry> pathGeometry = GenerateRoundedRectPathGeometry(
|
|
1322
1319
|
m_compContext,
|
|
@@ -1327,7 +1324,8 @@ void ComponentView::updateBorderLayoutMetrics(
|
|
|
1327
1324
|
layoutMetrics.frame.size.width * layoutMetrics.pointScaleFactor,
|
|
1328
1325
|
layoutMetrics.frame.size.height * layoutMetrics.pointScaleFactor});
|
|
1329
1326
|
|
|
1330
|
-
Visual().as<::Microsoft::ReactNative::Composition::IVisualInterop>()->SetClippingPath(
|
|
1327
|
+
Visual().as<::Microsoft::ReactNative::Composition::Experimental::IVisualInterop>()->SetClippingPath(
|
|
1328
|
+
pathGeometry.get());
|
|
1331
1329
|
}
|
|
1332
1330
|
|
|
1333
1331
|
if (m_layoutMetrics != layoutMetrics) {
|
|
@@ -1359,7 +1357,8 @@ ComponentView::supplementalComponentDescriptorProviders() noexcept {
|
|
|
1359
1357
|
comp::CompositionPropertySet ComponentView::EnsureCenterPointPropertySet() noexcept {
|
|
1360
1358
|
if (m_centerPropSet == nullptr) {
|
|
1361
1359
|
if (auto compositor =
|
|
1362
|
-
winrt::Microsoft::ReactNative::Composition::CompositionContextHelper::InnerCompositor(
|
|
1360
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::CompositionContextHelper::InnerCompositor(
|
|
1361
|
+
m_compContext)) {
|
|
1363
1362
|
m_centerPropSet = compositor.CreatePropertySet();
|
|
1364
1363
|
UpdateCenterPropertySet();
|
|
1365
1364
|
m_centerPropSet.InsertMatrix4x4(L"transform", winrt::Windows::Foundation::Numerics::float4x4::identity());
|
|
@@ -1404,12 +1403,13 @@ void ComponentView::EnsureTransformMatrixFacade() noexcept {
|
|
|
1404
1403
|
|
|
1405
1404
|
auto centerPointPropSet = EnsureCenterPointPropertySet();
|
|
1406
1405
|
if (auto compositor =
|
|
1407
|
-
winrt::Microsoft::ReactNative::Composition::CompositionContextHelper::InnerCompositor(
|
|
1406
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::CompositionContextHelper::InnerCompositor(
|
|
1407
|
+
m_compContext)) {
|
|
1408
1408
|
// TODO cache expression instead of creating new ones all the time
|
|
1409
1409
|
auto expression = compositor.CreateExpressionAnimation(
|
|
1410
1410
|
L"Matrix4x4.CreateFromScale(PS.dpiScale3Inv) * Matrix4x4.CreateFromTranslation(PS.translation) * PS.transform * Matrix4x4.CreateFromScale(PS.dpiScale3)");
|
|
1411
1411
|
expression.SetReferenceParameter(L"PS", centerPointPropSet);
|
|
1412
|
-
winrt::Microsoft::ReactNative::Composition::CompositionContextHelper::InnerVisual(OuterVisual())
|
|
1412
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::CompositionContextHelper::InnerVisual(OuterVisual())
|
|
1413
1413
|
.StartAnimation(L"TransformMatrix", expression);
|
|
1414
1414
|
}
|
|
1415
1415
|
}
|
|
@@ -1454,10 +1454,17 @@ std::string ComponentView::DefaultHelpText() const noexcept {
|
|
|
1454
1454
|
|
|
1455
1455
|
ViewComponentView::ViewComponentView(
|
|
1456
1456
|
const winrt::Microsoft::ReactNative::Composition::CreateCompositionComponentViewArgs &args)
|
|
1457
|
-
: ViewComponentView(
|
|
1457
|
+
: ViewComponentView(
|
|
1458
|
+
winrt::get_self<
|
|
1459
|
+
winrt::Microsoft::ReactNative::Composition::implementation::CreateCompositionComponentViewArgs>(args)
|
|
1460
|
+
->CompositionContext(),
|
|
1461
|
+
args.Tag(),
|
|
1462
|
+
args.ReactContext(),
|
|
1463
|
+
args.Features(),
|
|
1464
|
+
true) {}
|
|
1458
1465
|
|
|
1459
1466
|
ViewComponentView::ViewComponentView(
|
|
1460
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
1467
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
1461
1468
|
facebook::react::Tag tag,
|
|
1462
1469
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext,
|
|
1463
1470
|
ComponentViewFeatures flags,
|
|
@@ -1467,25 +1474,37 @@ ViewComponentView::ViewComponentView(
|
|
|
1467
1474
|
m_props = defaultProps;
|
|
1468
1475
|
}
|
|
1469
1476
|
|
|
1470
|
-
winrt::Microsoft::ReactNative::Composition::IVisual ViewComponentView::
|
|
1477
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual ViewComponentView::createVisual() noexcept {
|
|
1471
1478
|
return m_compContext.CreateSpriteVisual();
|
|
1472
1479
|
}
|
|
1473
1480
|
|
|
1481
|
+
winrt::Microsoft::UI::Composition::Visual ViewComponentView::CreateVisual() noexcept {
|
|
1482
|
+
return winrt::Microsoft::ReactNative::Composition::Experimental::MicrosoftCompositionContextHelper::InnerVisual(
|
|
1483
|
+
createVisual());
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1474
1486
|
void ViewComponentView::ensureVisual() noexcept {
|
|
1475
1487
|
if (!m_visual) {
|
|
1476
1488
|
if (m_customComponent) {
|
|
1477
1489
|
// Review is it expected that I need this cast to call overridden methods?
|
|
1478
1490
|
winrt::Microsoft::ReactNative::Composition::ViewComponentView outer(*this);
|
|
1479
|
-
|
|
1491
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IInternalCreateVisual internalCreateVisual{nullptr};
|
|
1492
|
+
if (outer.try_as(internalCreateVisual)) {
|
|
1493
|
+
m_visual = internalCreateVisual.CreateInternalVisual();
|
|
1494
|
+
} else {
|
|
1495
|
+
m_visual =
|
|
1496
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::MicrosoftCompositionContextHelper::CreateVisual(
|
|
1497
|
+
outer.CreateVisual());
|
|
1498
|
+
}
|
|
1480
1499
|
} else {
|
|
1481
|
-
m_visual =
|
|
1500
|
+
m_visual = createVisual();
|
|
1482
1501
|
}
|
|
1483
1502
|
OuterVisual().InsertAt(m_visual, 0);
|
|
1484
1503
|
}
|
|
1485
1504
|
}
|
|
1486
1505
|
|
|
1487
1506
|
winrt::Microsoft::ReactNative::ComponentView ViewComponentView::Create(
|
|
1488
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
1507
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
1489
1508
|
facebook::react::Tag tag,
|
|
1490
1509
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept {
|
|
1491
1510
|
return winrt::make<ViewComponentView>(compContext, tag, reactContext, ComponentViewFeatures::Default, false);
|
|
@@ -1570,10 +1589,43 @@ facebook::react::Tag ViewComponentView::hitTest(
|
|
|
1570
1589
|
return -1;
|
|
1571
1590
|
}
|
|
1572
1591
|
|
|
1592
|
+
inline winrt::Windows::System::VirtualKey GetLeftOrRightModifiedKey(
|
|
1593
|
+
const winrt::Microsoft::ReactNative::Composition::Input::KeyboardSource &source,
|
|
1594
|
+
winrt::Windows::System::VirtualKey leftKey,
|
|
1595
|
+
winrt::Windows::System::VirtualKey rightKey) {
|
|
1596
|
+
return (source.GetKeyState(leftKey) == winrt::Windows::UI::Core::CoreVirtualKeyStates::Down) ? leftKey : rightKey;
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
std::string CodeFromVirtualKey(
|
|
1600
|
+
const winrt::Microsoft::ReactNative::Composition::Input::KeyboardSource &source,
|
|
1601
|
+
winrt::Windows::System::VirtualKey virtualKey) {
|
|
1602
|
+
int key = static_cast<int>(virtualKey);
|
|
1603
|
+
|
|
1604
|
+
if (isdigit(key)) {
|
|
1605
|
+
return "Digit" + std::string(1, static_cast<char>(key));
|
|
1606
|
+
} else if (isupper(key)) {
|
|
1607
|
+
return "Key" + std::string(1, static_cast<char>(key));
|
|
1608
|
+
} else {
|
|
1609
|
+
// Override the virtual key if it's modified key of Control, Shift or Menu
|
|
1610
|
+
if (virtualKey == winrt::Windows::System::VirtualKey::Control) {
|
|
1611
|
+
virtualKey = GetLeftOrRightModifiedKey(
|
|
1612
|
+
source, winrt::Windows::System::VirtualKey::LeftControl, winrt::Windows::System::VirtualKey::RightControl);
|
|
1613
|
+
} else if (virtualKey == winrt::Windows::System::VirtualKey::Shift) {
|
|
1614
|
+
virtualKey = GetLeftOrRightModifiedKey(
|
|
1615
|
+
source, winrt::Windows::System::VirtualKey::LeftShift, winrt::Windows::System::VirtualKey::RightShift);
|
|
1616
|
+
} else if (virtualKey == winrt::Windows::System::VirtualKey::Menu) {
|
|
1617
|
+
virtualKey = GetLeftOrRightModifiedKey(
|
|
1618
|
+
source, winrt::Windows::System::VirtualKey::LeftMenu, winrt::Windows::System::VirtualKey::RightMenu);
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
return ::Microsoft::ReactNative::GetOrUnidentifiedCode(virtualKey);
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1573
1625
|
void ViewComponentView::OnKeyDown(
|
|
1574
1626
|
const winrt::Microsoft::ReactNative::Composition::Input::KeyboardSource &source,
|
|
1575
1627
|
const winrt::Microsoft::ReactNative::Composition::Input::KeyRoutedEventArgs &args) noexcept {
|
|
1576
|
-
auto eventCode =
|
|
1628
|
+
auto eventCode = CodeFromVirtualKey(source, args.Key());
|
|
1577
1629
|
bool fShift = source.GetKeyState(winrt::Windows::System::VirtualKey::Shift) !=
|
|
1578
1630
|
winrt::Windows::UI::Core::CoreVirtualKeyStates::None;
|
|
1579
1631
|
bool fAlt = source.GetKeyState(winrt::Windows::System::VirtualKey::Menu) !=
|
|
@@ -1612,7 +1664,7 @@ void ViewComponentView::OnKeyDown(
|
|
|
1612
1664
|
void ViewComponentView::OnKeyUp(
|
|
1613
1665
|
const winrt::Microsoft::ReactNative::Composition::Input::KeyboardSource &source,
|
|
1614
1666
|
const winrt::Microsoft::ReactNative::Composition::Input::KeyRoutedEventArgs &args) noexcept {
|
|
1615
|
-
auto eventCode =
|
|
1667
|
+
auto eventCode = CodeFromVirtualKey(source, args.Key());
|
|
1616
1668
|
bool fShift = source.GetKeyState(winrt::Windows::System::VirtualKey::Shift) !=
|
|
1617
1669
|
winrt::Windows::UI::Core::CoreVirtualKeyStates::None;
|
|
1618
1670
|
bool fAlt = source.GetKeyState(winrt::Windows::System::VirtualKey::Menu) !=
|
|
@@ -1679,7 +1731,7 @@ winrt::Microsoft::ReactNative::ViewProps ViewComponentView::ViewProps() noexcept
|
|
|
1679
1731
|
return winrt::make<winrt::Microsoft::ReactNative::implementation::ViewProps>(m_props);
|
|
1680
1732
|
}
|
|
1681
1733
|
|
|
1682
|
-
winrt::Microsoft::ReactNative::Composition::IVisual ViewComponentView::Visual() const noexcept {
|
|
1734
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual ViewComponentView::Visual() const noexcept {
|
|
1683
1735
|
assert(m_visual);
|
|
1684
1736
|
return m_visual;
|
|
1685
1737
|
}
|