newsmemory-ios-sdk/Frameworks/RNReanimated.xcframework/ios-arm64/Headers/REANodesManager.h

84 lines
2.9 KiB
C
Raw Permalink Normal View History

2024-05-02 15:08:24 +00:00
#import <Foundation/Foundation.h>
2024-10-29 07:36:43 +00:00
#import <RNReanimated/REANode.h>
2024-05-02 15:08:24 +00:00
#import <React/RCTBridgeModule.h>
#import <React/RCTUIManager.h>
@class REAModule;
typedef void (^REAOnAnimationCallback)(CADisplayLink *displayLink);
typedef void (^REANativeAnimationOp)(RCTUIManager *uiManager);
2024-10-29 07:36:43 +00:00
typedef void (^REAEventHandler)(NSString *eventName, id<RCTEvent> event);
2024-05-02 15:08:24 +00:00
@interface REANodesManager : NSObject
@property (nonatomic, weak, nullable) RCTUIManager *uiManager;
@property (nonatomic, weak, nullable) REAModule *reanimatedModule;
@property (nonatomic, readonly) CFTimeInterval currentAnimationTimestamp;
@property (nonatomic, nullable) NSSet<NSString *> *uiProps;
@property (nonatomic, nullable) NSSet<NSString *> *nativeProps;
2024-10-29 07:36:43 +00:00
- (nonnull instancetype)initWithModule:(REAModule *)reanimatedModule uiManager:(nonnull RCTUIManager *)uiManager;
2024-05-02 15:08:24 +00:00
2024-10-29 07:36:43 +00:00
- (REANode *_Nullable)findNodeByID:(nonnull REANodeID)nodeID;
2024-05-02 15:08:24 +00:00
- (void)invalidate;
- (void)operationsBatchDidComplete;
//
- (void)postOnAnimation:(REAOnAnimationCallback)clb;
- (void)postRunUpdatesAfterAnimation;
2024-10-29 07:36:43 +00:00
- (void)registerEventHandler:(REAEventHandler)eventHandler;
2024-05-02 15:08:24 +00:00
- (void)enqueueUpdateViewOnNativeThread:(nonnull NSNumber *)reactTag
2024-10-29 07:36:43 +00:00
viewName:(NSString *)viewName
nativeProps:(NSMutableDictionary *)nativeProps
trySynchronously:(BOOL)trySync;
- (void)getValue:(REANodeID)nodeID callback:(RCTResponseSenderBlock)callback;
2024-05-02 15:08:24 +00:00
// graph
2024-10-29 07:36:43 +00:00
- (void)createNode:(nonnull REANodeID)tag config:(NSDictionary<NSString *, id> *__nonnull)config;
2024-05-02 15:08:24 +00:00
- (void)dropNode:(nonnull REANodeID)tag;
2024-10-29 07:36:43 +00:00
- (void)connectNodes:(nonnull REANodeID)parentID childID:(nonnull REANodeID)childID;
2024-05-02 15:08:24 +00:00
2024-10-29 07:36:43 +00:00
- (void)disconnectNodes:(nonnull REANodeID)parentID childID:(nonnull REANodeID)childID;
2024-05-02 15:08:24 +00:00
- (void)connectNodeToView:(nonnull REANodeID)nodeID
viewTag:(nonnull NSNumber *)viewTag
viewName:(nonnull NSString *)viewName;
2024-10-29 07:36:43 +00:00
- (void)disconnectNodeFromView:(nonnull REANodeID)nodeID viewTag:(nonnull NSNumber *)viewTag;
2024-05-02 15:08:24 +00:00
- (void)attachEvent:(nonnull NSNumber *)viewTag
eventName:(nonnull NSString *)eventName
eventNodeID:(nonnull REANodeID)eventNodeID;
- (void)detachEvent:(nonnull NSNumber *)viewTag
eventName:(nonnull NSString *)eventName
eventNodeID:(nonnull REANodeID)eventNodeID;
// configuration
2024-10-29 07:36:43 +00:00
- (void)configureUiProps:(nonnull NSSet<NSString *> *)uiPropsSet
andNativeProps:(nonnull NSSet<NSString *> *)nativePropsSet;
- (void)updateProps:(nonnull NSDictionary *)props
ofViewWithTag:(nonnull NSNumber *)viewTag
withName:(nonnull NSString *)viewName;
- (NSString *)obtainProp:(nonnull NSNumber *)viewTag propName:(nonnull NSString *)propName;
2024-05-02 15:08:24 +00:00
// events
- (void)dispatchEvent:(id<RCTEvent>)event;
- (void)setValueForNodeID:(nonnull NSNumber *)nodeID value:(nonnull NSNumber *)newValue;
2024-10-29 07:36:43 +00:00
- (void)maybeFlushUpdateBuffer;
2024-05-02 15:08:24 +00:00
@end