ViewShadowNode.h 982 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #pragma once
  8. #include <react/components/view/ConcreteViewShadowNode.h>
  9. #include <react/components/view/ViewProps.h>
  10. namespace facebook {
  11. namespace react {
  12. extern const char ViewComponentName[];
  13. /*
  14. * `ShadowNode` for <View> component.
  15. */
  16. class ViewShadowNode final : public ConcreteViewShadowNode<
  17. ViewComponentName,
  18. ViewProps,
  19. ViewEventEmitter> {
  20. public:
  21. ViewShadowNode(
  22. ShadowNodeFragment const &fragment,
  23. ShadowNodeFamily::Shared const &family,
  24. ShadowNodeTraits traits);
  25. ViewShadowNode(
  26. ShadowNode const &sourceShadowNode,
  27. ShadowNodeFragment const &fragment);
  28. private:
  29. void initialize() noexcept;
  30. };
  31. } // namespace react
  32. } // namespace facebook