forked from microsoft/react-native-macos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create option for out-of-tree platforms to customize ViewEventEmitter (…
…facebook#38582) Summary: Pull Request resolved: facebook#38582 Some out of tree platforms may have extra events (e.g., events for different input modalities) that don't exist on other platforms. For example, react-native-windows and react-native-macos have `onKeyUp` and `onKeyDown` that can be emitted from any native component. This change provides a hook for out of platforms to customize which events can be emitted from all native components. ## Changelog: [General] [Added] - Support additional View events in out of tree platform Fabric implementations Reviewed By: christophpurrer Differential Revision: D47721603 fbshipit-source-id: d3ce9f5ccb1a261401c58a54f2d8e82471b27fce
- Loading branch information
1 parent
8b74ce0
commit e5410d7
Showing
4 changed files
with
38 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...nderer/components/view/platform/android/react/renderer/components/view/ViewEventEmitter.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* 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/components/view/BaseViewEventEmitter.h> | ||
|
||
namespace facebook::react { | ||
using ViewEventEmitter = BaseViewEventEmitter; | ||
using SharedViewEventEmitter = std::shared_ptr<const ViewEventEmitter>; | ||
} // namespace facebook::react |
15 changes: 15 additions & 0 deletions
15
...enderer/components/view/platform/common/react/renderer/components/view/ViewEventEmitter.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* 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/components/view/BaseViewEventEmitter.h> | ||
|
||
namespace facebook::react { | ||
using ViewEventEmitter = BaseViewEventEmitter; | ||
using SharedViewEventEmitter = std::shared_ptr<const ViewEventEmitter>; | ||
} // namespace facebook::react |