Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/react-native/ReactAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ val preparePrefab by
Pair("../ReactCommon/react/renderer/debug/", "react/renderer/debug/"),
// react_renderer_graphics
Pair("../ReactCommon/react/renderer/graphics/", "react/renderer/graphics/"),
Pair("../ReactCommon/react/renderer/graphics/React/", "React/"),
Pair("../ReactCommon/react/renderer/graphics/platform/android/", ""),
// react_renderer_imagemanager
Pair(
Expand All @@ -160,6 +161,7 @@ val preparePrefab by
Pair("../ReactCommon/react/renderer/scheduler/", "react/renderer/scheduler/"),
// react_renderer_uimanager
Pair("../ReactCommon/react/renderer/uimanager/", "react/renderer/uimanager/"),
Pair("../ReactCommon/react/renderer/uimanager/React/", "React/"),
// react_utils
Pair("../ReactCommon/react/utils/", "react/utils/"),
// rrc_image
Expand Down Expand Up @@ -231,6 +233,7 @@ val preparePrefab by
Pair(File(buildDir, "third-party-ndk/folly/").absolutePath, ""),
Pair(File(buildDir, "third-party-ndk/glog/exported/").absolutePath, ""),
Pair("../ReactCommon/callinvoker/", ""),
Pair("../ReactCommon/callinvoker/React/", "React/"),
Pair("../ReactCommon/cxxreact/", "cxxreact/"),
// Exported because the public cxxreact/ErrorUtils.h includes it
Pair("../ReactCommon/jserrorhandler/", "jserrorhandler/"),
Expand All @@ -252,6 +255,7 @@ val preparePrefab by
"react/renderer/leakchecker/",
),
Pair("../ReactCommon/react/renderer/mapbuffer/", "react/renderer/mapbuffer/"),
Pair("../ReactCommon/react/renderer/mapbuffer/React/", "React/"),
Pair("../ReactCommon/react/renderer/mounting/", "react/renderer/mounting/"),
Pair(
"../ReactCommon/react/renderer/runtimescheduler/",
Expand Down
6 changes: 6 additions & 0 deletions packages/react-native/ReactCommon/React-Fabric.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ Pod::Spec.new do |s|
ss.header_dir = "react/renderer/uimanager"
end

s.subspec "uimanagerUmbrella" do |ss|
ss.source_files = "react/renderer/uimanager/React/*.h"
ss.header_dir = "React"
ss.header_mappings_dir = "react/renderer/uimanager/React"
end

s.subspec "leakchecker" do |ss|
ss.source_files = podspec_sources("react/renderer/leakchecker/**/*.{cpp,h}", "react/renderer/leakchecker/**/*.h")
ss.exclude_files = "react/renderer/leakchecker/tests"
Expand Down
9 changes: 8 additions & 1 deletion packages/react-native/ReactCommon/React-Mapbuffer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,21 @@ Pod::Spec.new do |s|
s.platforms = min_supported_versions
s.source = source
s.source_files = podspec_sources("react/renderer/mapbuffer/*.{cpp,h}", "react/renderer/mapbuffer/*.h")
s.exclude_files = "react/renderer/mapbuffer/tests"
s.exclude_files = ["react/renderer/mapbuffer/tests", "react/renderer/mapbuffer/React"]
s.public_header_files = 'react/renderer/mapbuffer/*.h'
s.header_dir = "react/renderer/mapbuffer"
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => ["\"$(PODS_TARGET_SRCROOT)\""], "USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }

s.subspec "MapBufferUmbrella" do |ss|
ss.source_files = "react/renderer/mapbuffer/React/*.h"
ss.header_dir = "React"
ss.header_mappings_dir = "react/renderer/mapbuffer/React"
end

resolve_use_frameworks(s, header_mappings_dir: './', module_name: "React_Mapbuffer")

s.dependency "React-cxxstableapi"
add_dependency(s, "React-debug")
add_rn_third_party_dependencies(s)
add_rncore_dependency(s)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ include(${REACT_COMMON_DIR}/cmake-utils/react-native-flags.cmake)
add_library(callinvoker INTERFACE)

target_include_directories(callinvoker INTERFACE .)
target_link_libraries(callinvoker INTERFACE react_cxxstableapi)
target_compile_reactnative_options(callinvoker INTERFACE)
target_compile_options(callinvoker INTERFACE -Wpedantic)
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ else
source[:tag] = "v#{version}"
end

header_search_paths = []

if ENV['USE_FRAMEWORKS']
header_search_paths << "\"$(PODS_TARGET_SRCROOT)/..\"" # ReactCommon, for <react/cxxstableapi/...>
end

Pod::Spec.new do |s|
s.name = "React-callinvoker"
s.version = version
Expand All @@ -26,7 +32,17 @@ Pod::Spec.new do |s|
s.platforms = min_supported_versions
s.source = source
s.source_files = podspec_sources("**/*.{cpp,h}", "**/*.h")
s.exclude_files = "React"
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_paths.join(' ') }
s.header_dir = "ReactCommon"

s.subspec "CallInvokerUmbrella" do |ss|
ss.source_files = "React/*.h"
ss.header_dir = "React"
ss.header_mappings_dir = "React"
end

s.dependency "React-cxxstableapi"

mark_as_react_native_build(s)
end
27 changes: 27 additions & 0 deletions packages/react-native/ReactCommon/callinvoker/React/CallInvoker.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once

// =============================================================================
// Umbrella header for the `callinvoker` module - public entry point.
//
// #include <React/CallInvoker.h>
//
// Re-exports the module's public interface headers. React Native's own code
// should keep using the fine-grained `<ReactCommon/...>` includes; only outside
// consumers use this umbrella.
// =============================================================================

// Marks that the following headers are pulled in through the umbrella, so their
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them.
#define RN_UMBRELLA_CONTEXT

#include <ReactCommon/CallInvoker.h>
#include <ReactCommon/SchedulerPriority.h>

#undef RN_UMBRELLA_CONTEXT
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include "SchedulerPriority.h"

#include <functional>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

namespace facebook::react {

enum class SchedulerPriority : int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/LinearGradient.h>
#include <react/renderer/graphics/RadialGradient.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/ValueUnit.h>
#include <optional>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

namespace facebook::react {

enum class BackgroundRepeatStyle {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/ValueUnit.h>
#include <variant>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <optional>
#include <string_view>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/Color.h>
#include <react/renderer/graphics/Float.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ target_link_libraries(react_renderer_graphics
glog
${fbjni}
folly_runtime
react_cxxstableapi
react_debug
react_renderer_debug
react_utils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/ColorComponents.h>
#include <react/renderer/graphics/HostPlatformColor.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

namespace facebook::react {

enum class ColorSpace { sRGB, DisplayP3 };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/debug/flags.h>
#include <react/renderer/graphics/Color.h>
#include <react/renderer/graphics/Float.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/Color.h>
#include <react/renderer/graphics/Float.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <optional>
#include <string_view>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/debug/flags.h>
#include <react/renderer/graphics/ColorStop.h>
#include <react/renderer/graphics/Float.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/Float.h>
#include <react/utils/hash_combine.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/debug/flags.h>
#include <react/renderer/graphics/ColorStop.h>
#include <react/renderer/graphics/Float.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,20 @@ Pod::Spec.new do |s|
s.platforms = min_supported_versions
s.source = source
s.source_files = podspec_sources(source_files, ["*.h", "platform/ios/**/*.h"])
s.exclude_files = "React"
s.header_dir = "react/renderer/graphics"
s.framework = "UIKit"

if ENV['USE_FRAMEWORKS']
header_search_paths = header_search_paths + ["\"$(PODS_TARGET_SRCROOT)/platform/ios\""]
end

s.subspec "GraphicsUmbrella" do |ss|
ss.source_files = "React/*.h"
ss.header_dir = "React"
ss.header_mappings_dir = "React"
end

resolve_use_frameworks(s, header_mappings_dir: "../../..", module_name: "React_graphics")

s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
Expand All @@ -50,6 +57,7 @@ Pod::Spec.new do |s|
s.dependency "React-featureflags"
s.dependency "React-utils"
s.dependency "React-rendererdebug"
s.dependency "React-cxxstableapi"

depend_on_js_engine(s)
add_rn_third_party_dependencies(s)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once

// =============================================================================
// Umbrella header for the `react/renderer/graphics` module - public entry
// point.
//
// #include <React/Graphics.h>
//
// Re-exports the module's public interface headers. React Native's own code
// should keep using the fine-grained `<react/renderer/graphics/...>` includes;
// only outside consumers use this umbrella.
// =============================================================================

// Marks that the following headers are pulled in through the umbrella, so their
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them.
#define RN_UMBRELLA_CONTEXT

#include <react/renderer/graphics/BackgroundImage.h>
#include <react/renderer/graphics/BackgroundPosition.h>
#include <react/renderer/graphics/BackgroundRepeat.h>
#include <react/renderer/graphics/BackgroundSize.h>
#include <react/renderer/graphics/BlendMode.h>
#include <react/renderer/graphics/BoxShadow.h>
#include <react/renderer/graphics/Color.h>
#include <react/renderer/graphics/ColorComponents.h>
#include <react/renderer/graphics/ColorStop.h>
#include <react/renderer/graphics/Filter.h>
#include <react/renderer/graphics/Float.h>
#include <react/renderer/graphics/HostPlatformColor.h>
#include <react/renderer/graphics/Isolation.h>
#include <react/renderer/graphics/LinearGradient.h>
#include <react/renderer/graphics/PlatformColorParser.h>
#include <react/renderer/graphics/Point.h>
#include <react/renderer/graphics/RadialGradient.h>
#include <react/renderer/graphics/Rect.h>
#include <react/renderer/graphics/RectangleCorners.h>
#include <react/renderer/graphics/RectangleEdges.h>
#include <react/renderer/graphics/Size.h>
#include <react/renderer/graphics/Transform.h>
#include <react/renderer/graphics/TransformUtils.h>
#include <react/renderer/graphics/ValueUnit.h>
#include <react/renderer/graphics/Vector.h>
#include <react/renderer/graphics/fromRawValueShared.h>
#include <react/renderer/graphics/rounding.h>

#ifdef ANDROID
#include <react/renderer/graphics/configurePlatformColorCacheInvalidationHook.h>
#endif

#undef RN_UMBRELLA_CONTEXT
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <algorithm>
#include <tuple>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <tuple>

#include <react/renderer/graphics/Float.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <tuple>

#include <react/renderer/graphics/Float.h>
Expand Down
Loading
Loading