1 | #import <Foundation/Foundation.h>
|
2 |
|
3 | #import "REANode.h"
|
4 | #import <React/RCTBridgeModule.h>
|
5 | #import <React/RCTUIManager.h>
|
6 |
|
7 | @class REAModule;
|
8 |
|
9 | typedef void (^REAOnAnimationCallback)(CADisplayLink *displayLink);
|
10 | typedef void (^REANativeAnimationOp)(RCTUIManager *uiManager);
|
11 |
|
12 | @interface REANodesManager : NSObject
|
13 |
|
14 | @property (nonatomic, weak, nullable) RCTUIManager *uiManager;
|
15 | @property (nonatomic, weak, nullable) REAModule *reanimatedModule;
|
16 | @property (nonatomic, readonly) CFTimeInterval currentAnimationTimestamp;
|
17 |
|
18 | @property (nonatomic, nullable) NSSet<NSString *> *uiProps;
|
19 | @property (nonatomic, nullable) NSSet<NSString *> *nativeProps;
|
20 |
|
21 | - (nonnull instancetype)initWithModule:(REAModule *)reanimatedModule
|
22 | uiManager:(nonnull RCTUIManager *)uiManager;
|
23 |
|
24 | - (REANode* _Nullable)findNodeByID:(nonnull REANodeID)nodeID;
|
25 |
|
26 | - (void)invalidate;
|
27 |
|
28 | - (void)operationsBatchDidComplete;
|
29 |
|
30 |
|
31 |
|
32 | - (void)postOnAnimation:(REAOnAnimationCallback)clb;
|
33 | - (void)postRunUpdatesAfterAnimation;
|
34 | - (void)enqueueUpdateViewOnNativeThread:(nonnull NSNumber *)reactTag
|
35 | viewName:(NSString *) viewName
|
36 | nativeProps:(NSMutableDictionary *)nativeProps;
|
37 | - (void)getValue:(REANodeID)nodeID
|
38 | callback:(RCTResponseSenderBlock)callback;
|
39 |
|
40 |
|
41 |
|
42 | - (void)createNode:(nonnull REANodeID)tag
|
43 | config:(NSDictionary<NSString *, id> *__nonnull)config;
|
44 |
|
45 | - (void)dropNode:(nonnull REANodeID)tag;
|
46 |
|
47 | - (void)connectNodes:(nonnull REANodeID)parentID
|
48 | childID:(nonnull REANodeID)childID;
|
49 |
|
50 | - (void)disconnectNodes:(nonnull REANodeID)parentID
|
51 | childID:(nonnull REANodeID)childID;
|
52 |
|
53 | - (void)connectNodeToView:(nonnull REANodeID)nodeID
|
54 | viewTag:(nonnull NSNumber *)viewTag
|
55 | viewName:(nonnull NSString *)viewName;
|
56 |
|
57 | - (void)disconnectNodeFromView:(nonnull REANodeID)nodeID
|
58 | viewTag:(nonnull NSNumber *)viewTag;
|
59 |
|
60 | - (void)attachEvent:(nonnull NSNumber *)viewTag
|
61 | eventName:(nonnull NSString *)eventName
|
62 | eventNodeID:(nonnull REANodeID)eventNodeID;
|
63 |
|
64 | - (void)detachEvent:(nonnull NSNumber *)viewTag
|
65 | eventName:(nonnull NSString *)eventName
|
66 | eventNodeID:(nonnull REANodeID)eventNodeID;
|
67 |
|
68 |
|
69 |
|
70 | - (void)configureProps:(nonnull NSSet<NSString *> *)nativeProps
|
71 | uiProps:(nonnull NSSet<NSString *> *)uiProps;
|
72 |
|
73 |
|
74 |
|
75 | - (void)dispatchEvent:(id<RCTEvent>)event;
|
76 |
|
77 | - (void)setValueForNodeID:(nonnull NSNumber *)nodeID value:(nonnull NSNumber *)newValue;
|
78 |
|
79 | @end
|