text
stringlengths
1
24.5M
/* * 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 #include <chrono> #include <condition_variable> #include <functional> #include <future> #include <mutex> #include <...
/* * 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. */ #include <gtest/gtest.h> #include <react/threading/TaskDispatchThread.h> #include <atomic> #include <chrono> #include <thread> n...
/* * 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 #include <react/utils/RunLoopObserver.h> #include <functional> #include <utility> namespace facebook::react { cla...
/* * 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. */ #include "RunLoopObserverManager.h" #include <react/debug/react_native_assert.h> namespace facebook::react { /* * Event beat ...
/* * 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 #include "PlatformRunLoopObserver.h" #include <react/renderer/core/EventBeat.h> #include <react/renderer/runtimesc...
/* * 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. */ #ifdef __OBJC__ #import <UIKit/UIKit.h> #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern...
/* * 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. */ #ifdef __OBJC__ #import <UIKit/UIKit.h> #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern...
/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * * @generated by codegen project: GenerateModuleJniCpp.js */ #include "ReactPopupMenuA...
/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * * @generated by codegen project: GenerateModuleJniH.js */ #pragma once #include <Rea...
/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * * @generated by codegen project: GenerateComponentDescriptorH.js */ #pragma once #in...
/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * * @generated by codegen project: GenerateEventEmitterCpp.js */ #include "EventEmitter...
/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * * @generated by codegen project: GenerateEventEmitterH.js */ #pragma once #include <r...
/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * * @generated by codegen project: GeneratePropsCpp.js */ #include "Props.h" #include <...
/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * * @generated by codegen project: GeneratePropsH.js */ #pragma once #include <react/re...
/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * * @generated by codegen project: GenerateShadowNodeCpp.js */ #include "ShadowNodes.h"...
/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * * @generated by codegen project: GenerateShadowNodeH.js */ #pragma once #include "Ev...
/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * * @generated by codegen project: GenerateStateCpp.js */ #include "States.h" namespace...
/** * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). * * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * * @generated by codegen project: GenerateStateH.js */ #pragma once #ifdef RN_SERIALIZA...
/* * 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. */ #include <DefaultComponentsRegistry.h> #include <DefaultTurboModuleManagerDelegate.h> #include <FBReactNativeSpec.h> #include <Na...
/* * 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. */ #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface InteropTestView : UIView @end NS_ASSUME_NONNULL_END
/* * 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. */ #import <React/RCTViewManager.h> NS_ASSUME_NONNULL_BEGIN @interface InteropTestViewManager : RCTViewManager @end NS_ASSUME_NONN...
/* * 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. */ #import <React/RCTComponent.h> #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface RNTLegacyView : UIView @property (no...
/* * 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. */ #import <React/RCTComponent.h> #import <React/RCTViewComponentView.h> #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interfac...
/* * 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. */ #import <React/RCTComponent.h> #import <UIKit/UIKit.h> #import <string> NS_ASSUME_NONNULL_BEGIN @interface UIView (ColorOverlay...
/* * 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. */ #include "NativeCxxModuleExample.h" #include <react/debug/react_native_assert.h> #include <iomanip> #include <ostream> #include <...
/* * 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 #if __has_include(<ReactCodegen/AppSpecsJSI.h>) // CocoaPod headers on Apple #include <ReactCodegen/AppSpecsJSI.h> ...
/* * 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. */ #include <NativeCxxModuleExample/NativeCxxModuleExample.h> #include <ReactCommon/TurboModuleTestFixture.h> #include <gtest/gtest....
/* * 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. */ #import <React/RCTViewManager.h> @interface ScreenshotManager : RCTViewManager @end
/* * 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. */ #import <React/RCTViewManager.h> @interface RCTSnapshotManager : RCTViewManager @end
/* * 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. */ #import <UIKit/UIKit.h> #import <React/RCTBridgeModule.h> #import <React/RCTDefines.h> typedef NS_ENUM(NSInteger, RCTTestStatus...
/** * 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. * * @generated by an internal plugin build system */ #ifdef RN_DISABLE_OSS_PLUGIN_HEADER // FB Internal: FBRCTTestPlugins.h is a...
/* * 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. */ #import <Foundation/Foundation.h> #import <React/RCTBridge.h> #ifndef FB_REFERENCE_IMAGE_DIR #define FB_REFERENCE_IMAGE_DIR "" ...
/* * 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. */ #import <QuartzCore/QuartzCore.h> #import <UIKit/UIKit.h> #import <XCTest/XCTest.h> #ifndef FB_REFERENCE_IMAGE_DIR #define FB_...
/* * 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. */ #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> typedef NS_ENUM(NSInteger, FBSnapshotTestControllerErrorCode) { FBSn...
/* * 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. */ #import <UIKit/UIKit.h> @interface UIImage (Compare) - (BOOL)compareWithImage:(UIImage *)image; @end
/* * 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. */ #import <UIKit/UIKit.h> @interface UIImage (Diff) - (UIImage *)diffWithImage:(UIImage *)image; @end
/* * 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. */ #import <RCTDefaultReactNativeFactoryDelegate.h> #import <RCTReactNativeFactory.h> #import <UIKit/UIKit.h> @interface AppDelegat...
/* * 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. */ #import <UIKit/UIKit.h> #import <React/RCTView.h> @interface FlexibleSizeExampleView : RCTView @end
/* * 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. */ #import <UIKit/UIKit.h> #import <React/RCTView.h> @interface UpdatePropertiesExampleView : RCTView @end
/* * 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. */ #import <React/RCTImageLoader.h> typedef BOOL (^RCTImageURLLoaderCanLoadImageURLHandler)(NSURL *requestURL); typedef RCTImageLoa...
/* * 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. */ #include "AppSettings.h" #include <folly/json/json.h> #include <gflags/gflags.h> #include <glog/logging.h> static constexpr int ...
/* * 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. */ #include <folly/dynamic.h> #include <optional> #include <string> namespace facebook::react { class AppSettings { public: sta...
/* * 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. */ #include "FantomImageLoader.h" #include <utility> namespace facebook::react { void FantomImageLoader::setImageResponse( co...
/* * 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 #include <react/io/IImageLoader.h> #include <optional> namespace facebook::react { class TesterAppDelegate; class...
/* * 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. */ #include <glog/logging.h> #include <react/debug/flags.h> #include <react/featureflags/ReactNativeFeatureFlags.h> #include <react/...
/* * 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. */ #include "NativeFantom.h" #include <hermes/hermes.h> #include <jsi/JSIDynamic.h> #include <react/bridging/Bridging.h> #include <...
/* * 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 #include <FBReactNativeSpec/FBReactNativeSpecJSI.h> #include <react/renderer/bridging/bridging.h> #include <react/...
/* * 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. */ #include "TesterAppDelegate.h" #include "NativeFantom.h" #include "platform/TesterTurboModuleProvider.h" #include "stubs/StubClo...
/* * 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 #include <react/renderer/core/ReactPrimitives.h> #include <react/runtime/ReactInstanceConfig.h> #include <memory> #...
/* * 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. */ #include "TesterMountingManager.h" #include "stubs/StubComponentRegistryFactory.h" #include <glog/logging.h> #include <react/ren...
/* * 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 #include "FantomImageLoader.h" #include <react/renderer/mounting/stubs/StubViewTree.h> #include <react/renderer/ui...
/* * 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 #include <react/nativemodule/TurboModuleProvider.h> namespace facebook::react { class TesterTurboModuleProvider { ...
/* * 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. */ #include <react/http/HttpClient.h>
/* * 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. */ #include "../TesterTurboModuleProvider.h" #include <NativeCxxModuleExample/NativeCxxModuleExample.h> namespace facebook::react { ...
/* * 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. */ #include <react/http/WebSocketClient.h>
/* * 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. */ #include "../../stubs/StubHttpClient.h" namespace facebook::react { HttpClientFactory getHttpClientFactory() { return getStub...
/* * 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. */ #include "../TesterTurboModuleProvider.h" namespace facebook::react { /* static */ TurboModuleProvider TesterTurboModuleProvider...
/* * 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. */ #include "../../stubs/StubWebSocketClient.h" namespace facebook::react { WebSocketClientFactory getWebSocketClientFactory() { ...
/* * 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 namespace facebook::react { struct RenderFormatOptions { bool includeRoot{false}; bool includeLayoutMetrics{fal...
/* * 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. */ #include "RenderOutput.h" #include <react/debug/react_native_assert.h> #include <react/renderer/components/text/ParagraphState.h>...
/* * 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 #include <folly/json.h> #include <react/renderer/attributedstring/AttributedString.h> #include <react/renderer/moun...
/* * 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 #include <chrono> namespace facebook::react { class StubClock { public: static std::chrono::steady_clock::time...
/* * 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 #include <react/renderer/componentregistry/ComponentDescriptorFactory.h> #include <react/renderer/componentregistry...
/* * 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. */ #include "StubHttpClient.h" #include <react/http/IHttpClient.h> namespace facebook::react { HttpClientFactory getStubHttpClient...
/* * 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 #include <react/http/IHttpClient.h> namespace facebook::react { class StubRequestToken : public http::IRequestTok...
/* * 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. */ #include "StubQueue.h" namespace facebook::react { void StubQueue::runOnQueue(std::function<void()>&& func) { callbackQueue_....
/* * 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 #include <cxxreact/MessageQueueThread.h> #include <glog/logging.h> #include <condition_variable> #include <queue> ...
/* * 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. */ #include "StubWebSocketClient.h" #include <react/http/IWebSocketClient.h> namespace facebook::react { WebSocketClientFactory g...
/* * 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 #include <react/http/IWebSocketClient.h> namespace facebook::react { class StubWebSocketClient : public IWebSocke...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * Copyright (c) Kudo Chien. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <cxxreact/JSBigString.h> #include <fbjni/fbjni.h> #include <folly/Memory.h> #include <glog/...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * Copyright (c) Kudo Chien. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "V8ExecutorFactory.h" #include <thread> #include "V8RuntimeFactory.h" #include "cxxreact/...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * Copyright (c) Kudo Chien. * * 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 <jsireact/JSIExecutor.h> #include "V8RuntimeConfig.h" namespace rnv8 { clas...
/* * Copyright (c) Kudo Chien. * * 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> //! Project version number for V8Executor. FOUNDATION_EXPORT double V8ExecutorVersionNumber; //! Project version string for V8Ex...
/* * Copyright (c) Kudo Chien. * * 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 <jsireact/JSIExecutor.h> namespace rnv8 { class V8ExecutorFactory : public facebook::react::JSExecutorFactory { public: explic...
/* * Copyright (c) Kudo Chien. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "HostProxy.h" #include "JSIV8ValueConverter.h" namespace jsi = facebook::jsi; namespace rnv8 { HostObjectProxy::HostObjectProxy( V8Runtim...
/* * Copyright (c) Kudo Chien. * * 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 "V8Runtime.h" #include "jsi/jsi.h" #include "v8.h" namespace rnv8 { class HostObjectProxy { public: HostObjectProxy( V8R...
/* * Copyright (c) Kudo Chien. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "JSIV8ValueConverter.h" #include "V8PointerValue.h" namespace jsi = facebook::jsi; namespace rnv8 { // static jsi::Value JSIV8ValueConverter:...
/* * Copyright (c) Kudo Chien. * * 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 "V8Runtime.h" #include "jsi/jsi.h" #include "v8.h" namespace rnv8 { class JSIV8ValueConverter { private: JSIV8ValueConverter()...
/* * Copyright (c) Kudo Chien. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "V8Inspector.h" #include <regex> #include <sstream> #include <thread> #include "folly/dynamic.h" #include "folly/json.h" #include "v8.h" names...
/* * Copyright (c) Kudo Chien. * * 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 <cxxreact/MessageQueueThread.h> #include <condition_variable> #include "v8-inspector.h" #if REACT_NATIVE_MINOR_VERSION >= 73 #if ...
/* * Copyright (c) Kudo Chien. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "V8PointerValue.h" namespace rnv8 { V8PointerValue::V8PointerValue( v8::Isolate *isolate, const v8::Local<v8::Value> &value) : isol...
/* * Copyright (c) Kudo Chien. * * 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 "V8Runtime.h" #include "jsi/jsi.h" #include "v8.h" namespace rnv8 { class V8PointerValue final : public V8Runtime::PointerValue {...
/* * Copyright (c) Kudo Chien. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "V8Runtime.h" #include <glog/logging.h> #include <filesystem> #include <mutex> #include <sstream> #include "HostProxy.h" #include "JSIV8ValueCon...
/* * Copyright (c) Kudo Chien. * * 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 <cxxreact/MessageQueueThread.h> #include "V8RuntimeConfig.h" #include "jsi/jsi.h" #include "libplatform/libplatform.h" #include "v8...
/* * Copyright (c) Kudo Chien. * * 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 <cxxreact/JSBigString.h> #include <string> #include <vector> namespace rnv8 { struct V8RuntimeConfig { V8RuntimeConfig() {} ~...
/* * Copyright (c) Kudo Chien. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "V8RuntimeFactory.h" #include "V8Runtime.h" namespace rnv8 { std::unique_ptr<facebook::jsi::Runtime> createV8Runtime( std::unique_ptr<V8Ru...
/* * Copyright (c) Kudo Chien. * * 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 <cxxreact/MessageQueueThread.h> #include <memory.h> #include "V8RuntimeConfig.h" #include "jsi/jsi.h" namespace rnv8 { std::uniqu...
#include <jni.h> #include <jsi/jsi.h> #include <ReactCommon/CallInvokerHolder.h> #include "WKTJsiWorkletApi.h" using namespace facebook; // NOLINT extern "C" JNIEXPORT jboolean JNICALL Java_com_worklets_WorkletsModule_nativeInstall(JNIEnv* env, jclass obj, jlong jsiRuntimeRef, jobject jsCallInvokerHolder) { aut...
#pragma once #include <jsi/jsi.h> namespace RNWorklet { namespace jsi = facebook::jsi; class JsiBaseDecorator { public: /** Initializes the decorator on the JS thread with the JS runtime */ virtual void initialize(jsi::Runtime &runtime) {} /** Called on the context's worklet thread, the runtime is t...
#pragma once #include <cxxabi.h> #include <memory> #include <vector> #include <jsi/jsi.h> #include "WKTJsiWrapper.h" namespace RNWorklet { namespace jsi = facebook::jsi; class JsiDispatcher { public: /** * Creates a function for calling a jsi::Function with args and correct this * value * @param runti...
#pragma once #include <jsi/jsi.h> #include <memory> #include <string> #include <utility> #include <vector> #include "WKTJsiHostObject.h" #include "WKTJsiWorkletContext.h" #include "WKTJsiWrapper.h" #include "WKTRuntimeAwareCache.h" namespace RNWorklet { static const char *PropNameWorkletHash = "__workletHash"; sta...
#include "WKTJsiWorkletApi.h" #include <jsi/jsi.h> #include <memory> #include <string> #include <vector> #include "WKTJsiBaseDecorator.h" #include "WKTJsiHostObject.h" #include "WKTJsiSharedValue.h" #include "WKTJsiWorklet.h" #include "WKTJsiWorkletContext.h" namespace RNWorklet { namespace jsi = facebook::jsi; c...
#pragma once #include <jsi/jsi.h> #include <atomic> #include <memory> #include <string> #include <thread> #include <vector> #include "WKTJsiHostObject.h" #include "WKTJsiJsDecorator.h" #include "WKTJsiPromiseWrapper.h" #include "WKTJsiSharedValue.h" #include "WKTJsiWorklet.h" #include "WKTJsiWorkletContext.h" #inclu...
#include "WKTJsiWorkletContext.h" #include "WKTJsiWorkletApi.h" #include "WKTRuntimeAwareCache.h" #include "WKTArgumentsWrapper.h" #include "WKTDispatchQueue.h" #include "WKTJsRuntimeFactory.h" #include "WKTJsiHostObject.h" #include "WKTJsiPromiseWrapper.h" #include "WKTJsiConsoleDecorator.h" #include "WKTJsiJsDecor...
#pragma once #include "WKTDispatchQueue.h" #include "WKTJsiBaseDecorator.h" #include "WKTJsiHostObject.h" #include "WKTJsiJsDecorator.h" #include <exception> #include <functional> #include <map> #include <memory> #include <string> #include <vector> #include <jsi/jsi.h> namespace RNWorklet { namespace jsi = facebo...
#pragma once #include <jsi/jsi.h> #include <memory> #if !ANDROID && !defined(JS_RUNTIME_HERMES) && __has_include(<hermes/hermes.h>) #define JS_RUNTIME_HERMES 1 #endif #if JS_RUNTIME_HERMES // Hermes #include <hermes/hermes.h> #elif __has_include(<React-jsc/JSCRuntime.h>) // JSC #include <React-jsc/JSCRuntime.h> #els...
#include "WKTJsiHostObject.h" #include <utility> // To be able to find objects that aren't cleaned up correctly, // we can set this value to 1 and debug the constructor/destructor #define JSI_DEBUG_ALLOCATIONS 0 namespace RNWorklet { #if JSI_DEBUG_ALLOCATIONS int objCounter = 0; std::vector<JsiHostObject *> objects...
#pragma once #include <jsi/jsi.h> #include "WKTRuntimeAwareCache.h" #include <functional> #include <map> #include <memory> #include <string> #include <unordered_map> #include <vector> #define STR_CAT_NX(A, B) A##B #define STR_CAT(A, B) STR_CAT_NX(A, B) #define STR_GET get_ #define STR_SET set_ /** * Creates a new...
#pragma once #include <jsi/jsi.h> #include <memory> #include <unordered_map> #include <utility> #include "WKTRuntimeLifecycleMonitor.h" namespace RNWorklet { namespace jsi = facebook::jsi; /** * Provides a way to keep data specific to a jsi::Runtime instance that gets * cleaned up when that runtime is destroyed...
#include "WKTRuntimeLifecycleMonitor.h" #include <unordered_map> #include <unordered_set> #include <utility> namespace RNWorklet { static std::unordered_map<jsi::Runtime *, std::unordered_set<RuntimeLifecycleListener *>> listeners; struct RuntimeLifecycleMonitorObject : public jsi::Hos...