2016-03-25 06:40:52 +08:00
|
|
|
/**
|
2022-10-18 23:19:24 +08:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2016-03-25 06:40:52 +08:00
|
|
|
*
|
2017-09-25 04:48:13 +08:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2016-03-25 06:40:52 +08:00
|
|
|
*
|
|
|
|
|
* @flow
|
|
|
|
|
*/
|
|
|
|
|
|
2018-02-22 07:40:47 +08:00
|
|
|
import './ReactNativeInjectionShared';
|
|
|
|
|
|
2018-11-20 07:32:54 +08:00
|
|
|
import {
|
|
|
|
|
getFiberCurrentPropsFromNode,
|
|
|
|
|
getInstanceFromNode,
|
|
|
|
|
getNodeFromInstance,
|
|
|
|
|
} from './ReactNativeComponentTree';
|
2020-07-01 23:37:13 +08:00
|
|
|
import {setComponentTree} from './legacy-events/EventPluginUtils';
|
2018-11-20 07:32:54 +08:00
|
|
|
import {receiveEvent, receiveTouches} from './ReactNativeEventEmitter';
|
2018-06-14 08:03:26 +08:00
|
|
|
import ReactNativeGlobalResponderHandler from './ReactNativeGlobalResponderHandler';
|
2020-07-01 23:37:13 +08:00
|
|
|
import ResponderEventPlugin from './legacy-events/ResponderEventPlugin';
|
2016-03-25 06:40:52 +08:00
|
|
|
|
2017-10-25 07:55:00 +08:00
|
|
|
// Module provided by RN:
|
2019-05-23 15:23:54 +08:00
|
|
|
import {RCTEventEmitter} from 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface';
|
2017-10-26 02:07:54 +08:00
|
|
|
|
2017-07-14 03:44:52 +08:00
|
|
|
/**
|
|
|
|
|
* Register the event emitter with the native bridge
|
|
|
|
|
*/
|
2018-11-20 07:32:54 +08:00
|
|
|
RCTEventEmitter.register({
|
|
|
|
|
receiveEvent,
|
|
|
|
|
receiveTouches,
|
|
|
|
|
});
|
2018-06-14 07:20:48 +08:00
|
|
|
|
2018-11-20 07:32:54 +08:00
|
|
|
setComponentTree(
|
|
|
|
|
getFiberCurrentPropsFromNode,
|
|
|
|
|
getInstanceFromNode,
|
|
|
|
|
getNodeFromInstance,
|
2018-08-18 04:17:37 +08:00
|
|
|
);
|
2018-06-14 08:03:26 +08:00
|
|
|
|
|
|
|
|
ResponderEventPlugin.injection.injectGlobalResponderHandler(
|
|
|
|
|
ReactNativeGlobalResponderHandler,
|
|
|
|
|
);
|