diff --git a/packages/react-native/Libraries/Text/TextInput/Multiline/RCTWrappedTextView.h b/packages/react-native/Libraries/Text/TextInput/Multiline/RCTWrappedTextView.h index e63d0b3cd8ee1e..31a26b81d81985 100644 --- a/packages/react-native/Libraries/Text/TextInput/Multiline/RCTWrappedTextView.h +++ b/packages/react-native/Libraries/Text/TextInput/Multiline/RCTWrappedTextView.h @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface RCTWrappedTextView : RCTPlatformView +@interface RCTWrappedTextView : RCTPlatformView // [macOS] @property (nonatomic, weak) id textInputDelegate; @property (assign) BOOL hideVerticalScrollIndicator; diff --git a/packages/react-native/React/Base/Surface/RCTSurface.mm b/packages/react-native/React/Base/Surface/RCTSurface.mm index 14f88de1f3ddad..92e05a6178a6b5 100644 --- a/packages/react-native/React/Base/Surface/RCTSurface.mm +++ b/packages/react-native/React/Base/Surface/RCTSurface.mm @@ -465,7 +465,7 @@ - (BOOL)synchronouslyWaitForStage:(RCTSurfaceStage)stage timeout:(NSTimeInterval // right after the semaphore signals. // Atomic variant of `_waitingForMountingStageOnMainQueue = YES;` - atomic_fetch_or(&_waitingForMountingStageOnMainQueue, 1); + atomic_store(&_waitingForMountingStageOnMainQueue, 1); // [macOS] C++23 compatibility } dispatch_semaphore_t semaphore; @@ -488,7 +488,7 @@ - (BOOL)synchronouslyWaitForStage:(RCTSurfaceStage)stage timeout:(NSTimeInterval auto timeoutOccurred = dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, timeout * NSEC_PER_SEC)); // Atomic equivalent of `_waitingForMountingStageOnMainQueue = NO;`. - atomic_fetch_and(&_waitingForMountingStageOnMainQueue, 0); + atomic_store(&_waitingForMountingStageOnMainQueue, 0); // [macOS] C++23 compatibility if (!timeoutOccurred) { // Balancing the semaphore. @@ -546,7 +546,7 @@ - (BOOL)uiManager:(__unused RCTUIManager *)manager performMountingWithBlock:(RCT { if (atomic_load(&_waitingForMountingStageOnMainQueue) && (self.stage & RCTSurfaceStageSurfaceDidInitialLayout)) { // Atomic equivalent of `_waitingForMountingStageOnMainQueue = NO;`. - atomic_fetch_and(&_waitingForMountingStageOnMainQueue, 0); + atomic_store(&_waitingForMountingStageOnMainQueue, 0); // [macOS] C++23 compatibility { std::lock_guard lock(_mutex); diff --git a/packages/react-native/React/DevSupport/RCTPackagerConnection.mm b/packages/react-native/React/DevSupport/RCTPackagerConnection.mm index 39419d60e12036..8b3a873c606c57 100644 --- a/packages/react-native/React/DevSupport/RCTPackagerConnection.mm +++ b/packages/react-native/React/DevSupport/RCTPackagerConnection.mm @@ -9,6 +9,7 @@ #import #import +#import // [macOS] #import #import diff --git a/packages/react-native/React/Views/RCTCursor.m b/packages/react-native/React/Views/RCTCursor.m index 05575465fbef9e..eb82994bf17829 100644 --- a/packages/react-native/React/Views/RCTCursor.m +++ b/packages/react-native/React/Views/RCTCursor.m @@ -8,6 +8,7 @@ // [macOS] #import +#import #import "RCTCursor.h" #if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 150000 /* __MAC_15_0 */ diff --git a/packages/react-native/React/Views/RCTViewManager.m b/packages/react-native/React/Views/RCTViewManager.m index f0ab7716a7e192..3b6ae1c7b956f5 100644 --- a/packages/react-native/React/Views/RCTViewManager.m +++ b/packages/react-native/React/Views/RCTViewManager.m @@ -442,6 +442,7 @@ - (void) updateAccessibilityRole:(RCTView *)view withDefaultView:(RCTView *)defa // Unspecified values do not. // This wouldn't override a container view's `userInteractionEnabled = NO` view.userInteractionEnabled = YES; + break; // [macOS] case RCTPointerEventsNone: view.userInteractionEnabled = NO; break; diff --git a/packages/react-native/React/Views/ScrollView/RCTScrollView.m b/packages/react-native/React/Views/ScrollView/RCTScrollView.m index afd67aea8c8eac..4554849746f89e 100644 --- a/packages/react-native/React/Views/ScrollView/RCTScrollView.m +++ b/packages/react-native/React/Views/ScrollView/RCTScrollView.m @@ -318,7 +318,7 @@ @interface RCTScrollView () @implementation RCTScrollView { id _eventDispatcher; CGRect _prevFirstVisibleFrame; - __weak RCTUIView *_firstVisibleView; // [macOS] + __weak RCTPlatformView *_firstVisibleView; // [macOS] RCTCustomScrollView *_scrollView; #if !TARGET_OS_OSX // [macOS] UIView *_contentView; @@ -940,17 +940,15 @@ - (void)centerContentIfNeeded _scrollView.contentInset = UIEdgeInsetsMake(top, left, top, left); } -#if !TARGET_OS_OSX // [macOS] -- (void)addScrollListener:(NSObject *)scrollListener +- (void)addScrollListener:(NSObject *)scrollListener // [macOS] { [_scrollListeners addObject:scrollListener]; } -- (void)removeScrollListener:(NSObject *)scrollListener +- (void)removeScrollListener:(NSObject *)scrollListener // [macOS] { [_scrollListeners removeObject:scrollListener]; } -#endif // [macOS] - (void)scrollViewDidScroll:(RCTCustomScrollView *)scrollView // [macOS] { diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/platform/macos/react/renderer/components/view/MouseEvent.h b/packages/react-native/ReactCommon/react/renderer/components/view/platform/macos/react/renderer/components/view/MouseEvent.h index 334506c93adc6e..3c588ef1db7b7d 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/platform/macos/react/renderer/components/view/MouseEvent.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/platform/macos/react/renderer/components/view/MouseEvent.h @@ -7,7 +7,7 @@ #pragma once -#include +#include // [macOS] namespace facebook::react {