react-native/React/Fabric/RCTFabricUIManagerWrapper.h
Kevin Gozali 7bf3b20837 iOS: create C++ <-> ObjC++ connector for FabricUIManager to do UI operations
Reviewed By: shergin

Differential Revision: D7162911

fbshipit-source-id: 3e303020dafdccc51f52c3359a7054dc8a787978
2018-03-07 16:54:16 -08:00

45 lines
937 B
Objective-C

/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <UIKit/UIKit.h>
#import <memory>
#import <React/RCTBridge.h>
#import <React/RCTInvalidating.h>
#import <React/RCTShadowView.h>
namespace facebook {
namespace react {
class FabricUIManager;
} // namespace react
} // namespace facebook
using namespace facebook::react;
/**
* An ObjC++ wrapper around the C++ FabricUIManager instance, so that the RCTCxxBridge can access it as needed.
*/
@interface RCTFabricUIManagerWrapper : NSObject <RCTInvalidating>
- (std::shared_ptr<FabricUIManager>)manager;
@end
@interface RCTBridge (RCTFabricUIManagerWrapper)
/**
* To access via the bridge:
*
* std::shared_ptr<FabricUIManager> fabricUIManager = [_bridge fabricUIManager];
*/
- (std::shared_ptr<FabricUIManager>)fabricUIManager;
@end