Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

NS_ASSUME_NONNULL_BEGIN

@interface RCTWrappedTextView : RCTPlatformView <RCTBackedTextInputViewProtocol>
@interface RCTWrappedTextView : RCTPlatformView <RCTBackedTextInputViewProtocol, RCTBackedTextInputDelegate, NSTextViewDelegate> // [macOS]

@property (nonatomic, weak) id<RCTBackedTextInputDelegate> textInputDelegate;
@property (assign) BOOL hideVerticalScrollIndicator;
Expand Down
6 changes: 3 additions & 3 deletions packages/react-native/React/Base/Surface/RCTSurface.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand Down Expand Up @@ -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<std::mutex> lock(_mutex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#import <objc/runtime.h>
#import <algorithm>
#import <mutex> // [macOS]
#import <vector>

#import <React/RCTAssert.h>
Expand Down
1 change: 1 addition & 0 deletions packages/react-native/React/Views/RCTCursor.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// [macOS]

#import <Foundation/Foundation.h>
#import <React/RCTUIKit.h>
#import "RCTCursor.h"

#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 150000 /* __MAC_15_0 */
Expand Down
1 change: 1 addition & 0 deletions packages/react-native/React/Views/RCTViewManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ @interface RCTScrollView () <RCTUIManagerObserver>
@implementation RCTScrollView {
id<RCTEventDispatcherProtocol> _eventDispatcher;
CGRect _prevFirstVisibleFrame;
__weak RCTUIView *_firstVisibleView; // [macOS]
__weak RCTPlatformView *_firstVisibleView; // [macOS]
RCTCustomScrollView *_scrollView;
#if !TARGET_OS_OSX // [macOS]
UIView *_contentView;
Expand Down Expand Up @@ -940,17 +940,15 @@ - (void)centerContentIfNeeded
_scrollView.contentInset = UIEdgeInsetsMake(top, left, top, left);
}

#if !TARGET_OS_OSX // [macOS]
- (void)addScrollListener:(NSObject<UIScrollViewDelegate> *)scrollListener
- (void)addScrollListener:(NSObject<RCTUIScrollViewDelegate> *)scrollListener // [macOS]
{
[_scrollListeners addObject:scrollListener];
}

- (void)removeScrollListener:(NSObject<UIScrollViewDelegate> *)scrollListener
- (void)removeScrollListener:(NSObject<RCTUIScrollViewDelegate> *)scrollListener // [macOS]
{
[_scrollListeners removeObject:scrollListener];
}
#endif // [macOS]

- (void)scrollViewDidScroll:(RCTCustomScrollView *)scrollView // [macOS]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/renderer/graphics/Geometry.h>
#include <react/renderer/graphics/Float.h> // [macOS]

namespace facebook::react {

Expand Down
Loading