2018-03-08 00:40:38 +00:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2018-02-24 03:32:36 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
2018-03-19 02:04:27 +00:00
|
|
|
#include <folly/dynamic.h>
|
|
|
|
|
|
|
|
#include <fabric/core/ComponentDescriptor.h>
|
2018-03-19 02:04:10 +00:00
|
|
|
#include <fabric/core/ShadowNode.h>
|
2018-03-19 02:04:27 +00:00
|
|
|
#include <fabric/uimanager/ComponentDescriptorRegistry.h>
|
2018-03-19 02:04:10 +00:00
|
|
|
|
2018-02-24 03:32:36 +00:00
|
|
|
namespace facebook {
|
|
|
|
namespace react {
|
|
|
|
|
2018-03-08 00:40:38 +00:00
|
|
|
class IFabricPlatformUIOperationManager;
|
2018-03-19 02:04:27 +00:00
|
|
|
class ComponentDescriptorRegistry;
|
2018-02-24 03:32:36 +00:00
|
|
|
|
|
|
|
class FabricUIManager {
|
2018-03-19 02:04:27 +00:00
|
|
|
|
2018-02-24 03:32:36 +00:00
|
|
|
public:
|
2018-03-08 00:40:38 +00:00
|
|
|
FabricUIManager(const std::shared_ptr<IFabricPlatformUIOperationManager> &platformUIOperationManager);
|
2018-02-24 03:32:36 +00:00
|
|
|
|
2018-03-19 02:04:10 +00:00
|
|
|
SharedShadowNode createNode(int reactTag, std::string viewName, int rootTag, folly::dynamic props, void *instanceHandle);
|
|
|
|
SharedShadowNode cloneNode(const SharedShadowNode &node);
|
|
|
|
SharedShadowNode cloneNodeWithNewChildren(const SharedShadowNode &node);
|
|
|
|
SharedShadowNode cloneNodeWithNewProps(const SharedShadowNode &node, folly::dynamic props);
|
|
|
|
SharedShadowNode cloneNodeWithNewChildrenAndProps(const SharedShadowNode &node, folly::dynamic newProps);
|
|
|
|
void appendChild(const SharedShadowNode &parentNode, const SharedShadowNode &childNode);
|
|
|
|
SharedShadowNodeUnsharedList createChildSet(int rootTag);
|
|
|
|
void appendChildToSet(const SharedShadowNodeUnsharedList &childSet, const SharedShadowNode &childNode);
|
|
|
|
void completeRoot(int rootTag, const SharedShadowNodeUnsharedList &childSet);
|
2018-02-24 03:32:36 +00:00
|
|
|
|
2018-03-08 00:40:38 +00:00
|
|
|
private:
|
2018-03-19 02:04:27 +00:00
|
|
|
ComponentDescriptorRegistry _registry;
|
2018-03-08 00:40:38 +00:00
|
|
|
std::shared_ptr<IFabricPlatformUIOperationManager> platformUIOperationManager_;
|
|
|
|
};
|
2018-02-24 03:32:36 +00:00
|
|
|
|
2018-03-08 00:40:38 +00:00
|
|
|
} // namespace react
|
|
|
|
} // namespace facebook
|