mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 01:25:39 +00:00
2bb41031ba
Summary: `RootShadowNode` is a dedicated class for managing the root node. Reviewed By: mdvacca Differential Revision: D7857050 fbshipit-source-id: f15f4b177f03cea4c0fd5a60d761ee2745319d77
45 lines
960 B
C++
45 lines
960 B
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.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include <fabric/core/LayoutConstraints.h>
|
|
#include <fabric/core/LayoutContext.h>
|
|
#include <fabric/view/ViewProps.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
class RootProps;
|
|
|
|
using SharedRootProps = std::shared_ptr<const RootProps>;
|
|
|
|
class RootProps final:
|
|
public ViewProps {
|
|
|
|
public:
|
|
|
|
/*
|
|
* Same semantic as `apply()` but LayoutConstraints & LayoutContext specific.
|
|
*/
|
|
void applyLayoutConstraints(const LayoutConstraints &layoutConstraints);
|
|
void applyLayoutContext(const LayoutContext &layoutContext);
|
|
|
|
LayoutConstraints getLayoutConstraints() const;
|
|
LayoutContext getLayoutContext() const;
|
|
|
|
private:
|
|
|
|
LayoutConstraints layoutConstraints_;
|
|
LayoutContext layoutContext_;
|
|
};
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|