react-native-macos 0.0.0-bb8a035db → 0.0.0-bc0c2c4d1
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/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.js +7 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/RCTImageView.mm +14 -10
- package/Libraries/Lists/VirtualizedList.js +13 -1
- package/Libraries/Text/BaseText/RCTBaseTextViewManager.m +1 -0
- package/Libraries/Text/RCTTextAttributes.h +2 -0
- package/Libraries/Text/RCTTextAttributes.m +9 -0
- package/Libraries/Text/Text/RCTDynamicTypeRamp.h +40 -0
- package/Libraries/Text/Text/RCTDynamicTypeRamp.m +77 -0
- package/Libraries/Text/Text/RCTTextView.m +118 -47
- package/Libraries/Text/Text.js +0 -8
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h +5 -0
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m +55 -5
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m +2 -0
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.h +1 -1
- package/Libraries/Text/TextInput/RCTBaseTextInputView.m +1 -1
- package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +0 -1
- package/Libraries/Text/TextNativeComponent.js +2 -0
- package/Libraries/Text/TextProps.js +29 -0
- package/React/Base/RCTAssert.h +4 -3
- package/React/Base/RCTAssert.m +11 -2
- package/React/Base/RCTBridge.m +1 -1
- package/React/Base/RCTConstants.h +6 -0
- package/React/Base/RCTConstants.m +15 -0
- package/React/Base/RCTConvert.m +1 -1
- package/React/Base/RCTUIKit.h +8 -13
- package/React/Base/RCTVersion.m +1 -1
- package/React/Base/macOS/RCTUIKit.m +33 -0
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +6 -2
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +17 -3
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +8 -1
- package/React/Fabric/Mounting/RCTMountingManager.h +1 -1
- package/React/Fabric/Mounting/RCTMountingManager.mm +3 -3
- package/React/Fabric/RCTConversions.h +9 -1
- package/React/Fabric/RCTLocalizationProvider.mm +10 -4
- package/React/Fabric/RCTScheduler.h +5 -0
- package/React/Fabric/RCTScheduler.mm +10 -0
- package/React/Fabric/RCTSurfacePresenter.h +2 -0
- package/React/Fabric/RCTSurfacePresenter.mm +12 -11
- package/React/Fabric/RCTSurfaceTouchHandler.mm +0 -1
- package/React/React-RCTFabric.podspec +1 -1
- package/React/Views/RCTView.m +6 -1
- package/React/Views/RCTViewManager.m +1 -1
- package/React/Views/ScrollView/RCTScrollView.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/React-Fabric.podspec +1 -1
- package/ReactCommon/React-rncore.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/renderer/core/EventDispatcher.cpp +21 -0
- package/ReactCommon/react/renderer/core/EventDispatcher.h +15 -0
- package/ReactCommon/react/renderer/core/EventListener.cpp +39 -0
- package/ReactCommon/react/renderer/core/EventListener.h +44 -0
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +14 -0
- package/ReactCommon/react/renderer/scheduler/Scheduler.h +6 -0
- package/ReactCommon/react/utils/ManagedObjectWrapper.h +1 -1
- package/ReactCommon/react/utils/ManagedObjectWrapper.mm +1 -3
- package/package.json +1 -1
- package/template/Gemfile.lock +3 -3
- package/template/package.json +1 -1
|
@@ -82,7 +82,6 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
|
|
|
82
82
|
butter::shared_mutex _observerListMutex;
|
|
83
83
|
NSMutableArray<id<RCTSurfacePresenterObserver>> *_observers;
|
|
84
84
|
RCTImageLoader *_imageLoader;
|
|
85
|
-
RuntimeExecutor _runtimeExecutor;
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
- (instancetype)initWithContextContainer:(ContextContainer::Shared)contextContainer
|
|
@@ -111,7 +110,7 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
|
|
|
111
110
|
return _mountingManager;
|
|
112
111
|
}
|
|
113
112
|
|
|
114
|
-
- (RCTScheduler *_Nullable)
|
|
113
|
+
- (RCTScheduler *_Nullable)scheduler
|
|
115
114
|
{
|
|
116
115
|
std::lock_guard<std::mutex> lock(_schedulerAccessMutex);
|
|
117
116
|
return _scheduler;
|
|
@@ -147,7 +146,7 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
|
|
|
147
146
|
- (void)registerSurface:(RCTFabricSurface *)surface
|
|
148
147
|
{
|
|
149
148
|
[_surfaceRegistry registerSurface:surface];
|
|
150
|
-
RCTScheduler *scheduler = [self
|
|
149
|
+
RCTScheduler *scheduler = [self scheduler];
|
|
151
150
|
if (scheduler) {
|
|
152
151
|
[scheduler registerSurface:surface.surfaceHandler];
|
|
153
152
|
}
|
|
@@ -155,7 +154,7 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
|
|
|
155
154
|
|
|
156
155
|
- (void)unregisterSurface:(RCTFabricSurface *)surface
|
|
157
156
|
{
|
|
158
|
-
RCTScheduler *scheduler = [self
|
|
157
|
+
RCTScheduler *scheduler = [self scheduler];
|
|
159
158
|
if (scheduler) {
|
|
160
159
|
[scheduler unregisterSurface:surface.surfaceHandler];
|
|
161
160
|
}
|
|
@@ -176,7 +175,7 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
|
|
|
176
175
|
|
|
177
176
|
- (BOOL)synchronouslyUpdateViewOnUIThread:(NSNumber *)reactTag props:(NSDictionary *)props
|
|
178
177
|
{
|
|
179
|
-
RCTScheduler *scheduler = [self
|
|
178
|
+
RCTScheduler *scheduler = [self scheduler];
|
|
180
179
|
if (!scheduler) {
|
|
181
180
|
return NO;
|
|
182
181
|
}
|
|
@@ -200,7 +199,7 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
|
|
|
200
199
|
|
|
201
200
|
- (void)setupAnimationDriverWithSurfaceHandler:(facebook::react::SurfaceHandler const &)surfaceHandler
|
|
202
201
|
{
|
|
203
|
-
[[self
|
|
202
|
+
[[self scheduler] setupAnimationDriver:surfaceHandler];
|
|
204
203
|
}
|
|
205
204
|
|
|
206
205
|
- (BOOL)suspend
|
|
@@ -257,6 +256,10 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
|
|
|
257
256
|
RCTExperimentSetPreemptiveViewAllocationDisabled(YES);
|
|
258
257
|
}
|
|
259
258
|
|
|
259
|
+
if (reactNativeConfig && reactNativeConfig->getBool("rn_convergence:dispatch_pointer_events")) {
|
|
260
|
+
RCTSetDispatchW3CPointerEvents(YES);
|
|
261
|
+
}
|
|
262
|
+
|
|
260
263
|
auto componentRegistryFactory =
|
|
261
264
|
[factory = wrapManagedObject(_mountingManager.componentViewRegistry.componentViewFactory)](
|
|
262
265
|
EventDispatcher::Weak const &eventDispatcher, ContextContainer::Shared const &contextContainer) {
|
|
@@ -342,7 +345,7 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
|
|
|
342
345
|
NSString *commandStr = [[NSString alloc] initWithUTF8String:commandName.c_str()];
|
|
343
346
|
NSArray *argsArray = convertFollyDynamicToId(args);
|
|
344
347
|
|
|
345
|
-
[
|
|
348
|
+
[_mountingManager dispatchCommand:tag commandName:commandStr args:argsArray];
|
|
346
349
|
}
|
|
347
350
|
|
|
348
351
|
- (void)schedulerDidSendAccessibilityEvent:(const facebook::react::ShadowView &)shadowView
|
|
@@ -351,16 +354,14 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
|
|
|
351
354
|
ReactTag tag = shadowView.tag;
|
|
352
355
|
NSString *eventTypeStr = [[NSString alloc] initWithUTF8String:eventType.c_str()];
|
|
353
356
|
|
|
354
|
-
[
|
|
357
|
+
[_mountingManager sendAccessibilityEvent:tag eventType:eventTypeStr];
|
|
355
358
|
}
|
|
356
359
|
|
|
357
360
|
- (void)schedulerDidSetIsJSResponder:(BOOL)isJSResponder
|
|
358
361
|
blockNativeResponder:(BOOL)blockNativeResponder
|
|
359
362
|
forShadowView:(facebook::react::ShadowView const &)shadowView;
|
|
360
363
|
{
|
|
361
|
-
[
|
|
362
|
-
blockNativeResponder:blockNativeResponder
|
|
363
|
-
forShadowView:shadowView];
|
|
364
|
+
[_mountingManager setIsJSResponder:isJSResponder blockNativeResponder:blockNativeResponder forShadowView:shadowView];
|
|
364
365
|
}
|
|
365
366
|
|
|
366
367
|
- (void)addObserver:(id<RCTSurfacePresenterObserver>)observer
|
|
@@ -28,7 +28,7 @@ Pod::Spec.new do |s|
|
|
|
28
28
|
s.homepage = "https://reactnative.dev/"
|
|
29
29
|
s.license = package["license"]
|
|
30
30
|
s.author = "Facebook, Inc. and its affiliates"
|
|
31
|
-
s.platforms = { :ios => "11.0" }
|
|
31
|
+
s.platforms = { :ios => "11.0", :osx => "10.15" } # TODO(macOS GH#774)
|
|
32
32
|
s.source = source
|
|
33
33
|
s.source_files = "Fabric/**/*.{c,h,m,mm,S,cpp}"
|
|
34
34
|
s.exclude_files = "**/tests/*",
|
package/React/Views/RCTView.m
CHANGED
|
@@ -1440,9 +1440,14 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
|
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
1442
|
|
|
1443
|
+
- (BOOL)needsPanelToBecomeKey {
|
|
1444
|
+
// We need to override this so that mouse clicks don't move keyboard focus on focusable views by default.
|
|
1445
|
+
return false;
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1443
1448
|
- (BOOL)acceptsFirstResponder
|
|
1444
1449
|
{
|
|
1445
|
-
|
|
1450
|
+
return [self focusable] || [super acceptsFirstResponder];
|
|
1446
1451
|
}
|
|
1447
1452
|
|
|
1448
1453
|
- (void)updateTrackingAreas
|
|
@@ -95,7 +95,7 @@ RCT_EXPORT_MODULE()
|
|
|
95
95
|
|
|
96
96
|
- (void)setBridge:(RCTBridge *)bridge
|
|
97
97
|
{
|
|
98
|
-
|
|
98
|
+
RCTErrorNotAllowedForNewArchitecture(self, @"RCTViewManager must not be initialized for the new architecture");
|
|
99
99
|
_bridge = bridge;
|
|
100
100
|
}
|
|
101
101
|
|
|
@@ -29,7 +29,7 @@ Pod::Spec.new do |s|
|
|
|
29
29
|
s.homepage = "https://reactnative.dev/"
|
|
30
30
|
s.license = package["license"]
|
|
31
31
|
s.author = "Facebook, Inc. and its affiliates"
|
|
32
|
-
s.platforms = { :ios => "11.0" }
|
|
32
|
+
s.platforms = { :ios => "11.0", :osx => "10.15" } # TODO(macOS GH#774)
|
|
33
33
|
s.source = source
|
|
34
34
|
s.source_files = "dummyFile.cpp"
|
|
35
35
|
s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
|
|
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
|
|
|
25
25
|
s.homepage = "https://reactnative.dev/"
|
|
26
26
|
s.license = package["license"]
|
|
27
27
|
s.author = "Facebook, Inc. and its affiliates"
|
|
28
|
-
s.platforms = { :ios => "11.0" }
|
|
28
|
+
s.platforms = { :ios => "11.0", :osx => "10.15" } # TODO(macOS GH#774)
|
|
29
29
|
s.source = source
|
|
30
30
|
s.source_files = "dummyFile.cpp"
|
|
31
31
|
s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
|
|
@@ -36,6 +36,10 @@ EventDispatcher::EventDispatcher(
|
|
|
36
36
|
|
|
37
37
|
void EventDispatcher::dispatchEvent(RawEvent &&rawEvent, EventPriority priority)
|
|
38
38
|
const {
|
|
39
|
+
// Allows the event listener to interrupt default event dispatch
|
|
40
|
+
if (eventListeners_.willDispatchEvent(rawEvent)) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
39
43
|
getEventQueue(priority).enqueueEvent(std::move(rawEvent));
|
|
40
44
|
}
|
|
41
45
|
|
|
@@ -46,6 +50,10 @@ void EventDispatcher::dispatchStateUpdate(
|
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
void EventDispatcher::dispatchUniqueEvent(RawEvent &&rawEvent) const {
|
|
53
|
+
// Allows the event listener to interrupt default event dispatch
|
|
54
|
+
if (eventListeners_.willDispatchEvent(rawEvent)) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
49
57
|
asynchronousBatchedQueue_->enqueueUniqueEvent(std::move(rawEvent));
|
|
50
58
|
}
|
|
51
59
|
|
|
@@ -62,5 +70,18 @@ const EventQueue &EventDispatcher::getEventQueue(EventPriority priority) const {
|
|
|
62
70
|
}
|
|
63
71
|
}
|
|
64
72
|
|
|
73
|
+
void EventDispatcher::addListener(
|
|
74
|
+
const std::shared_ptr<EventListener const> &listener) const {
|
|
75
|
+
eventListeners_.addListener(listener);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/*
|
|
79
|
+
* Removes provided event listener to the event dispatcher.
|
|
80
|
+
*/
|
|
81
|
+
void EventDispatcher::removeListener(
|
|
82
|
+
const std::shared_ptr<EventListener const> &listener) const {
|
|
83
|
+
eventListeners_.removeListener(listener);
|
|
84
|
+
}
|
|
85
|
+
|
|
65
86
|
} // namespace react
|
|
66
87
|
} // namespace facebook
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
#include <react/renderer/core/BatchedEventQueue.h>
|
|
11
11
|
#include <react/renderer/core/EventBeat.h>
|
|
12
|
+
#include <react/renderer/core/EventListener.h>
|
|
12
13
|
#include <react/renderer/core/EventPriority.h>
|
|
13
14
|
#include <react/renderer/core/EventQueueProcessor.h>
|
|
14
15
|
#include <react/renderer/core/StateUpdate.h>
|
|
@@ -52,6 +53,18 @@ class EventDispatcher {
|
|
|
52
53
|
void dispatchStateUpdate(StateUpdate &&stateUpdate, EventPriority priority)
|
|
53
54
|
const;
|
|
54
55
|
|
|
56
|
+
#pragma mark - Event listeners
|
|
57
|
+
/*
|
|
58
|
+
* Adds provided event listener to the event dispatcher.
|
|
59
|
+
*/
|
|
60
|
+
void addListener(const std::shared_ptr<EventListener const> &listener) const;
|
|
61
|
+
|
|
62
|
+
/*
|
|
63
|
+
* Removes provided event listener to the event dispatcher.
|
|
64
|
+
*/
|
|
65
|
+
void removeListener(
|
|
66
|
+
const std::shared_ptr<EventListener const> &listener) const;
|
|
67
|
+
|
|
55
68
|
private:
|
|
56
69
|
EventQueue const &getEventQueue(EventPriority priority) const;
|
|
57
70
|
|
|
@@ -59,6 +72,8 @@ class EventDispatcher {
|
|
|
59
72
|
std::unique_ptr<BatchedEventQueue> synchronousBatchedQueue_;
|
|
60
73
|
std::unique_ptr<UnbatchedEventQueue> asynchronousUnbatchedQueue_;
|
|
61
74
|
std::unique_ptr<BatchedEventQueue> asynchronousBatchedQueue_;
|
|
75
|
+
|
|
76
|
+
mutable EventListenerContainer eventListeners_;
|
|
62
77
|
};
|
|
63
78
|
|
|
64
79
|
} // namespace react
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#include "EventListener.h"
|
|
9
|
+
|
|
10
|
+
namespace facebook::react {
|
|
11
|
+
|
|
12
|
+
bool EventListenerContainer::willDispatchEvent(const RawEvent &event) {
|
|
13
|
+
std::shared_lock<butter::shared_mutex> lock(mutex_);
|
|
14
|
+
|
|
15
|
+
bool handled = false;
|
|
16
|
+
for (auto const &listener : eventListeners_) {
|
|
17
|
+
handled = handled || listener->operator()(event);
|
|
18
|
+
}
|
|
19
|
+
return handled;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
void EventListenerContainer::addListener(
|
|
23
|
+
const std::shared_ptr<EventListener const> &listener) {
|
|
24
|
+
std::unique_lock<butter::shared_mutex> lock(mutex_);
|
|
25
|
+
|
|
26
|
+
eventListeners_.push_back(listener);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
void EventListenerContainer::removeListener(
|
|
30
|
+
const std::shared_ptr<EventListener const> &listener) {
|
|
31
|
+
std::unique_lock<butter::shared_mutex> lock(mutex_);
|
|
32
|
+
|
|
33
|
+
auto it = std::find(eventListeners_.begin(), eventListeners_.end(), listener);
|
|
34
|
+
if (it != eventListeners_.end()) {
|
|
35
|
+
eventListeners_.erase(it);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <string>
|
|
11
|
+
|
|
12
|
+
#include <react/renderer/core/RawEvent.h>
|
|
13
|
+
|
|
14
|
+
#include <butter/mutex.h>
|
|
15
|
+
|
|
16
|
+
namespace facebook {
|
|
17
|
+
namespace react {
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Listener for events dispatched to JS runtime.
|
|
21
|
+
* Return `true` to interrupt default dispatch to JS event emitter, `false` to
|
|
22
|
+
* pass through to default handlers.
|
|
23
|
+
*/
|
|
24
|
+
using EventListener = std::function<bool(const RawEvent &event)>;
|
|
25
|
+
|
|
26
|
+
class EventListenerContainer {
|
|
27
|
+
public:
|
|
28
|
+
/*
|
|
29
|
+
* Invoke listeners in this container with the event.
|
|
30
|
+
* Returns true if event was handled by the listener, false to continue
|
|
31
|
+
* default dispatch.
|
|
32
|
+
*/
|
|
33
|
+
bool willDispatchEvent(const RawEvent &event);
|
|
34
|
+
|
|
35
|
+
void addListener(const std::shared_ptr<EventListener const> &listener);
|
|
36
|
+
void removeListener(const std::shared_ptr<EventListener const> &listener);
|
|
37
|
+
|
|
38
|
+
private:
|
|
39
|
+
butter::shared_mutex mutex_;
|
|
40
|
+
std::vector<std::shared_ptr<EventListener const>> eventListeners_;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
} // namespace react
|
|
44
|
+
} // namespace facebook
|
|
@@ -27,7 +27,7 @@ Pod::Spec.new do |s|
|
|
|
27
27
|
s.homepage = "https://reactnative.dev/"
|
|
28
28
|
s.license = package["license"]
|
|
29
29
|
s.author = "Facebook, Inc. and its affiliates"
|
|
30
|
-
s.platforms = { :ios => "11.0", :
|
|
30
|
+
s.platforms = { :ios => "11.0", :osx => "10.15" } # TODO(macOS GH#774)
|
|
31
31
|
s.source = source
|
|
32
32
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
33
33
|
s.source_files = "**/*.{m,mm,cpp,h}"
|
|
@@ -351,5 +351,19 @@ ContextContainer::Shared Scheduler::getContextContainer() const {
|
|
|
351
351
|
return contextContainer_;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
+
void Scheduler::addEventListener(
|
|
355
|
+
const std::shared_ptr<EventListener const> &listener) {
|
|
356
|
+
if (eventDispatcher_->has_value()) {
|
|
357
|
+
eventDispatcher_->value().addListener(listener);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
void Scheduler::removeEventListener(
|
|
362
|
+
const std::shared_ptr<EventListener const> &listener) {
|
|
363
|
+
if (eventDispatcher_->has_value()) {
|
|
364
|
+
eventDispatcher_->value().removeListener(listener);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
354
368
|
} // namespace react
|
|
355
369
|
} // namespace facebook
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
#include <react/renderer/components/root/RootComponentDescriptor.h>
|
|
17
17
|
#include <react/renderer/core/ComponentDescriptor.h>
|
|
18
18
|
#include <react/renderer/core/EventEmitter.h>
|
|
19
|
+
#include <react/renderer/core/EventListener.h>
|
|
19
20
|
#include <react/renderer/core/LayoutConstraints.h>
|
|
20
21
|
#include <react/renderer/mounting/MountingOverrideDelegate.h>
|
|
21
22
|
#include <react/renderer/scheduler/InspectorData.h>
|
|
@@ -107,6 +108,11 @@ class Scheduler final : public UIManagerDelegate {
|
|
|
107
108
|
#pragma mark - ContextContainer
|
|
108
109
|
ContextContainer::Shared getContextContainer() const;
|
|
109
110
|
|
|
111
|
+
#pragma mark - Event listeners
|
|
112
|
+
void addEventListener(const std::shared_ptr<EventListener const> &listener);
|
|
113
|
+
void removeEventListener(
|
|
114
|
+
const std::shared_ptr<EventListener const> &listener);
|
|
115
|
+
|
|
110
116
|
private:
|
|
111
117
|
friend class SurfaceHandler;
|
|
112
118
|
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#include "ManagedObjectWrapper.h"
|
|
9
9
|
|
|
10
|
-
#if
|
|
11
|
-
#if TARGET_OS_MAC && TARGET_OS_IPHONE
|
|
10
|
+
#if TARGET_OS_MAC
|
|
12
11
|
|
|
13
12
|
namespace facebook {
|
|
14
13
|
namespace react {
|
|
@@ -35,4 +34,3 @@ void wrappedManagedObjectDeleter(void *cfPointer) noexcept
|
|
|
35
34
|
@end
|
|
36
35
|
|
|
37
36
|
#endif
|
|
38
|
-
#endif
|
package/package.json
CHANGED
package/template/Gemfile.lock
CHANGED
|
@@ -56,7 +56,7 @@ GEM
|
|
|
56
56
|
colored2 (3.1.2)
|
|
57
57
|
concurrent-ruby (1.1.10)
|
|
58
58
|
escape (0.0.4)
|
|
59
|
-
ethon (0.
|
|
59
|
+
ethon (0.16.0)
|
|
60
60
|
ffi (>= 1.15.0)
|
|
61
61
|
ffi (1.15.5)
|
|
62
62
|
fourflusher (2.3.1)
|
|
@@ -85,7 +85,7 @@ GEM
|
|
|
85
85
|
colored2 (~> 3.1)
|
|
86
86
|
nanaimo (~> 0.3.0)
|
|
87
87
|
rexml (~> 3.2.4)
|
|
88
|
-
zeitwerk (2.6.
|
|
88
|
+
zeitwerk (2.6.6)
|
|
89
89
|
|
|
90
90
|
PLATFORMS
|
|
91
91
|
ruby
|
|
@@ -97,4 +97,4 @@ RUBY VERSION
|
|
|
97
97
|
ruby 3.0.4p208
|
|
98
98
|
|
|
99
99
|
BUNDLED WITH
|
|
100
|
-
2.3.
|
|
100
|
+
2.3.24
|